From 19f44d8127579d500236c2456d381931d98600ec Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Sat, 9 May 2026 03:35:20 +0000 Subject: [PATCH 1/2] Configurations: 'specification/containerservice/resource-manager/Microsoft.ContainerService/aks/tspconfig.yaml', API Version: 2026-03-01, SDK Release Type: stable, and CommitSHA: '0e3000dfffe6c32c8ed124140dd972dafae67cfa' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6274120 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../azure-mgmt-containerservice/CHANGELOG.md | 10 + .../azure-mgmt-containerservice/README.md | 4 +- .../_metadata.json | 6 +- .../apiview-properties.json | 167 +- .../azure/mgmt/containerservice/_client.py | 52 +- .../mgmt/containerservice/_configuration.py | 8 +- .../mgmt/containerservice/_validation.py | 66 - .../azure/mgmt/containerservice/_version.py | 2 +- .../mgmt/containerservice/aio/_client.py | 55 +- .../containerservice/aio/_configuration.py | 8 +- .../aio/operations/__init__.py | 16 - .../aio/operations/_operations.py | 7512 ++------- .../mgmt/containerservice/models/__init__.py | 194 - .../mgmt/containerservice/models/_enums.py | 359 +- .../mgmt/containerservice/models/_models.py | 5016 +----- .../containerservice/operations/__init__.py | 16 - .../operations/_operations.py | 13997 +++++----------- .../advanced_networking_transit_encryption.py | 2 +- .../agent_pools_abort_operation.py | 2 +- .../agent_pools_complete_upgrade.py | 42 - ...ciate_crg.py => agent_pools_create_crg.py} | 4 +- .../agent_pools_create_custom_node_config.py | 2 +- ...agent_pools_create_dedicated_host_group.py | 2 +- ..._pools_create_enable_encryption_at_host.py | 2 +- .../agent_pools_create_enable_fips.py | 2 +- .../agent_pools_create_enable_ultra_ssd.py | 2 +- .../agent_pools_create_ephemeral.py | 2 +- .../agent_pools_create_gpumig.py | 2 +- .../agent_pools_create_message_of_the_day.py | 2 +- .../agent_pools_create_ossku.py | 2 +- .../agent_pools_create_ppg.py | 2 +- .../agent_pools_create_snapshot.py | 2 +- .../agent_pools_create_spot.py | 2 +- ...gent_pools_create_type_virtual_machines.py | 2 +- ..._create_type_virtual_machines_autoscale.py | 56 - .../agent_pools_create_update.py | 2 +- .../agent_pools_create_wasm_wasi.py | 2 +- ...ols_create_windows_disable_outbound_nat.py | 2 +- .../agent_pools_create_windows_ossku.py | 2 +- .../generated_samples/agent_pools_delete.py | 2 +- ...ols_delete_ignore_pod_disruption_budget.py | 42 - .../agent_pools_delete_machines.py | 2 +- .../generated_samples/agent_pools_get.py | 2 +- ...pools_get_agent_pool_available_versions.py | 2 +- .../agent_pools_get_upgrade_profile.py | 2 +- .../generated_samples/agent_pools_list.py | 2 +- .../generated_samples/agent_pools_start.py | 2 +- .../generated_samples/agent_pools_stop.py | 2 +- .../generated_samples/agent_pools_update.py | 2 +- .../agent_pools_upgrade_node_image_version.py | 2 +- .../get_guardrails_versions.py | 42 - .../get_safeguards_versions.py | 42 - .../identity_bindings_create_or_update.py | 51 - .../identity_bindings_delete.py | 42 - .../identity_bindings_get.py | 43 - .../identity_bindings_list.py | 43 - .../jwt_authenticators_create_or_update.py | 66 - .../jwt_authenticators_delete.py | 42 - .../jwt_authenticators_get.py | 43 - .../jwt_authenticators_list.py | 43 - .../kubernetes_versions_list.py | 2 +- ...ist_available_container_service_vm_skus.py | 42 - ...service_vm_skus_with_extended_locations.py | 42 - .../list_guardrails_versions.py | 42 - .../list_safeguards_versions.py | 42 - .../load_balancers_create_or_update.py | 44 - .../load_balancers_delete.py | 42 - .../generated_samples/load_balancers_get.py | 43 - .../generated_samples/load_balancers_list.py | 43 - .../load_balancers_rebalance.py | 42 - .../machine_create_update.py | 60 - .../generated_samples/machine_get.py | 2 +- .../generated_samples/machine_list.py | 2 +- ...ations_create_update_maintenance_window.py | 2 +- ...onfigurations_delete_maintenance_window.py | 2 +- ...e_configurations_get_maintenance_window.py | 2 +- ..._configurations_list_maintenance_window.py | 2 +- .../managed_cluster_snapshots_create.py | 52 - .../managed_cluster_snapshots_delete.py | 41 - .../managed_cluster_snapshots_get.py | 42 - .../managed_cluster_snapshots_list.py | 40 - ...luster_snapshots_list_by_resource_group.py | 42 - .../managed_cluster_snapshots_update_tags.py | 43 - .../managed_clusters_abort_operation.py | 2 +- ..._create_azure_keyvault_secrets_provider.py | 2 +- ...aged_clusters_create_azure_service_mesh.py | 10 +- ...rs_create_control_plane_scaling_profile.py | 71 - ..._crg.py => managed_clusters_create_crg.py} | 4 +- ...ers_create_custom_ca_trust_certificates.py | 2 +- ...ed_clusters_create_dedicated_host_group.py | 2 +- ...ged_clusters_create_disable_run_command.py | 2 +- ...d_clusters_create_dual_stack_networking.py | 2 +- ...ers_create_enable_ai_toolchain_operator.py | 75 - ...usters_create_enable_encryption_at_host.py | 2 +- ...anaged_clusters_create_enable_ultra_ssd.py | 2 +- .../managed_clusters_create_enabled_fips.py | 2 +- .../managed_clusters_create_gpumig.py | 2 +- .../managed_clusters_create_httpproxy.py | 2 +- ...gress_profile_application_load_balancer.py | 69 - ..._create_ingress_profile_web_app_routing.py | 2 +- ...ged_clusters_create_managed_nat_gateway.py | 2 +- .../managed_clusters_create_mcsnapshot.py | 69 - ..._clusters_create_node_auto_provisioning.py | 74 - ...d_clusters_create_node_public_ip_prefix.py | 2 +- .../managed_clusters_create_ossku.py | 2 +- .../managed_clusters_create_pod_identity.py | 2 +- .../managed_clusters_create_ppg.py | 2 +- .../managed_clusters_create_premium.py | 2 +- ...s_create_private_cluster_fqdn_subdomain.py | 2 +- ...ters_create_private_cluster_public_fqdn.py | 2 +- ...anaged_clusters_create_security_profile.py | 18 +- .../managed_clusters_create_snapshot.py | 2 +- .../managed_clusters_create_update.py | 4 +- ...ged_clusters_create_update_windows_gmsa.py | 2 +- ...anaged_clusters_create_update_with_ahub.py | 2 +- ...rs_create_update_with_enable_azure_rbac.py | 2 +- ..._update_with_enable_namespace_resources.py | 77 - ...usters_create_user_assigned_nat_gateway.py | 2 +- ...anaged_clusters_create_virtual_machines.py | 73 - .../managed_clusters_delete.py | 2 +- .../generated_samples/managed_clusters_get.py | 2 +- .../managed_clusters_get_access_profile.py | 2 +- ...aged_clusters_get_mesh_revision_profile.py | 2 +- ...naged_clusters_get_mesh_upgrade_profile.py | 2 +- .../managed_clusters_get_upgrade_profile.py | 2 +- .../managed_clusters_list.py | 2 +- ...managed_clusters_list_by_resource_group.py | 2 +- ...clusters_list_cluster_admin_credentials.py | 2 +- ...st_cluster_monitoring_user_credentials.py} | 4 +- ..._clusters_list_cluster_user_credentials.py | 2 +- ...ed_clusters_list_mesh_revision_profiles.py | 2 +- ...ged_clusters_list_mesh_upgrade_profiles.py | 2 +- .../managed_clusters_reset_aad_profile.py | 2 +- ...lusters_reset_service_principal_profile.py | 2 +- ...ed_clusters_rotate_cluster_certificates.py | 2 +- ...ers_rotate_service_account_signing_keys.py | 2 +- .../managed_clusters_start.py | 2 +- .../managed_clusters_stop.py | 2 +- .../managed_clusters_update_tags.py | 2 +- .../managed_namespaces_create_update.py | 2 +- .../managed_namespaces_delete.py | 2 +- .../managed_namespaces_get.py | 2 +- .../managed_namespaces_list.py | 2 +- ...naged_namespaces_list_credential_result.py | 2 +- .../managed_namespaces_update_tags.py | 2 +- .../mesh_memberships_create_or_update.py | 49 - .../mesh_memberships_delete.py | 42 - .../generated_samples/mesh_memberships_get.py | 43 - ...esh_memberships_list_by_managed_cluster.py | 43 - .../node_image_versions_list.py | 42 - .../generated_samples/operation_list.py | 2 +- .../operation_status_result_get.py | 43 - ...eration_status_result_get_by_agent_pool.py | 44 - .../operation_status_result_list.py | 43 - ...und_network_dependencies_endpoints_list.py | 2 +- .../private_endpoint_connections_delete.py | 2 +- .../private_endpoint_connections_get.py | 2 +- .../private_endpoint_connections_list.py | 2 +- .../private_endpoint_connections_update.py | 2 +- .../private_link_resources_list.py | 2 +- .../resolve_private_link_service_id.py | 2 +- .../generated_samples/run_command_request.py | 2 +- .../run_command_result_failed.py | 2 +- .../run_command_result_succeed.py | 2 +- .../generated_samples/snapshots_create.py | 2 +- .../generated_samples/snapshots_delete.py | 2 +- .../generated_samples/snapshots_get.py | 2 +- .../generated_samples/snapshots_list.py | 2 +- .../snapshots_list_by_resource_group.py | 2 +- .../snapshots_update_tags.py | 2 +- ...d_access_role_bindings_create_or_update.py | 2 +- .../trusted_access_role_bindings_delete.py | 2 +- .../trusted_access_role_bindings_get.py | 2 +- .../trusted_access_role_bindings_list.py | 2 +- .../trusted_access_roles_list.py | 2 +- ...ontainer_service_agent_pools_operations.py | 37 +- ...er_service_agent_pools_operations_async.py | 39 +- ...er_service_container_service_operations.py | 29 - ...vice_container_service_operations_async.py | 30 - ...er_service_identity_bindings_operations.py | 85 - ...vice_identity_bindings_operations_async.py | 95 - ...r_service_jwt_authenticators_operations.py | 91 - ...ice_jwt_authenticators_operations_async.py | 96 - ...ainer_service_load_balancers_operations.py | 96 - ...service_load_balancers_operations_async.py | 99 - ...t_container_service_machines_operations.py | 175 - ...ainer_service_machines_operations_async.py | 177 - ...ce_managed_cluster_snapshots_operations.py | 113 - ...aged_cluster_snapshots_operations_async.py | 114 - ...ner_service_managed_clusters_operations.py | 147 +- ...rvice_managed_clusters_operations_async.py | 144 +- ...ner_service_mesh_memberships_operations.py | 86 - ...rvice_mesh_memberships_operations_async.py | 91 - ...vice_operation_status_result_operations.py | 55 - ...peration_status_result_operations_async.py | 56 - ...st_container_service_vm_skus_operations.py | 29 - ...tainer_service_vm_skus_operations_async.py | 30 - .../pyproject.toml | 4 +- .../tsp-location.yaml | 2 +- 199 files changed, 6071 insertions(+), 25753 deletions(-) delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_validation.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{agent_pools_associate_crg.py => agent_pools_create_crg.py} (94%) delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{managed_clusters_associate_crg.py => managed_clusters_create_crg.py} (96%) delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{managed_clusters_list_cluster_credential_result.py => managed_clusters_list_cluster_monitoring_user_credentials.py} (89%) delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py diff --git a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md index 7649b968d53c..62e4c64a8bea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 41.2.0 (2026-05-09) + +### Features Added + + - Model `AgentPoolManagedClusterAgentPoolProfileProperties` added property `artifact_streaming_profile` + - Model `ManagedClusterAgentPoolProfile` added property `artifact_streaming_profile` + - Model `ManagedClusterAgentPoolProfileProperties` added property `artifact_streaming_profile` + - Enum `OSSKU` added member `AZURE_CONTAINER_LINUX` + - Added model `AgentPoolArtifactStreamingProfile` + ## 41.2.0b1 (2026-04-24) ### Features Added diff --git a/sdk/containerservice/azure-mgmt-containerservice/README.md b/sdk/containerservice/azure-mgmt-containerservice/README.md index 7fb3f35472de..0defa9d12e4d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/README.md +++ b/sdk/containerservice/azure-mgmt-containerservice/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Container Service Management Client Library. -This package has been tested with Python 3.9+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.9+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json index 800e0a1fb6b2..be1614524fcf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json @@ -1,9 +1,9 @@ { - "apiVersion": "2026-02-02-preview", + "apiVersion": "2026-03-01", "apiVersions": { - "Microsoft.ContainerService": "2026-02-02-preview" + "Microsoft.ContainerService": "2026-03-01" }, - "commit": "84d3ee44165575ed56740413fa1346ed0a65e4e1", + "commit": "0e3000dfffe6c32c8ed124140dd972dafae67cfa", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks", "emitterVersion": "0.61.3" diff --git a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json index 3c26b29cf6a5..b642a05fd58f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json +++ b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json @@ -15,12 +15,10 @@ "azure.mgmt.containerservice.models.AgentPoolAvailableVersions": "Microsoft.ContainerService.AgentPoolAvailableVersions", "azure.mgmt.containerservice.models.AgentPoolAvailableVersionsProperties": "Microsoft.ContainerService.AgentPoolAvailableVersionsProperties", "azure.mgmt.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem": "Microsoft.ContainerService.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", - "azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings": "Microsoft.ContainerService.AgentPoolBlueGreenUpgradeSettings", "azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter": "Microsoft.ContainerService.AgentPoolDeleteMachinesParameter", "azure.mgmt.containerservice.models.AgentPoolGatewayProfile": "Microsoft.ContainerService.AgentPoolGatewayProfile", "azure.mgmt.containerservice.models.AgentPoolManagedClusterAgentPoolProfileProperties": "Microsoft.ContainerService.AgentPoolManagedClusterAgentPoolProfileProperties", "azure.mgmt.containerservice.models.AgentPoolNetworkProfile": "Microsoft.ContainerService.AgentPoolNetworkProfile", - "azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion": "Microsoft.ContainerService.AgentPoolRecentlyUsedVersion", "azure.mgmt.containerservice.models.AgentPoolSecurityProfile": "Microsoft.ContainerService.AgentPoolSecurityProfile", "azure.mgmt.containerservice.models.AgentPoolStatus": "Microsoft.ContainerService.AgentPoolStatus", "azure.mgmt.containerservice.models.AgentPoolUpgradeProfile": "Microsoft.ContainerService.AgentPoolUpgradeProfile", @@ -28,17 +26,12 @@ "azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem": "Microsoft.ContainerService.AgentPoolUpgradeProfilePropertiesUpgradesItem", "azure.mgmt.containerservice.models.AgentPoolUpgradeSettings": "Microsoft.ContainerService.AgentPoolUpgradeSettings", "azure.mgmt.containerservice.models.AgentPoolWindowsProfile": "Microsoft.ContainerService.AgentPoolWindowsProfile", - "azure.mgmt.containerservice.models.AutoScaleProfile": "Microsoft.ContainerService.AutoScaleProfile", "azure.mgmt.containerservice.models.AzureKeyVaultKms": "Microsoft.ContainerService.AzureKeyVaultKms", "azure.mgmt.containerservice.models.ClusterUpgradeSettings": "Microsoft.ContainerService.ClusterUpgradeSettings", "azure.mgmt.containerservice.models.CommandResultProperties": "Microsoft.ContainerService.CommandResultProperties", "azure.mgmt.containerservice.models.CompatibleVersions": "Microsoft.ContainerService.CompatibleVersions", - "azure.mgmt.containerservice.models.Component": "Microsoft.ContainerService.Component", - "azure.mgmt.containerservice.models.ComponentsByRelease": "Microsoft.ContainerService.ComponentsByRelease", "azure.mgmt.containerservice.models.ContainerServiceLinuxProfile": "Microsoft.ContainerService.ContainerServiceLinuxProfile", "azure.mgmt.containerservice.models.ContainerServiceNetworkProfile": "Microsoft.ContainerService.ContainerServiceNetworkProfile", - "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig": "Microsoft.ContainerService.ContainerServiceNetworkProfileKubeProxyConfig", - "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig": "Microsoft.ContainerService.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", "azure.mgmt.containerservice.models.ContainerServiceSshConfiguration": "Microsoft.ContainerService.ContainerServiceSshConfiguration", "azure.mgmt.containerservice.models.ContainerServiceSshPublicKey": "Microsoft.ContainerService.ContainerServiceSshPublicKey", "azure.mgmt.containerservice.models.CreationData": "Microsoft.ContainerService.CreationData", @@ -54,12 +47,6 @@ "azure.mgmt.containerservice.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", "azure.mgmt.containerservice.models.ExtendedLocation": "Microsoft.ContainerService.ExtendedLocation", "azure.mgmt.containerservice.models.GPUProfile": "Microsoft.ContainerService.GPUProfile", - "azure.mgmt.containerservice.models.GuardrailsAvailableVersion": "Microsoft.ContainerService.GuardrailsAvailableVersion", - "azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties": "Microsoft.ContainerService.GuardrailsAvailableVersionsProperties", - "azure.mgmt.containerservice.models.IdentityBinding": "Microsoft.ContainerService.IdentityBinding", - "azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile": "Microsoft.ContainerService.IdentityBindingManagedIdentityProfile", - "azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile": "Microsoft.ContainerService.IdentityBindingOidcIssuerProfile", - "azure.mgmt.containerservice.models.IdentityBindingProperties": "Microsoft.ContainerService.IdentityBindingProperties", "azure.mgmt.containerservice.models.IPTag": "Microsoft.ContainerService.IPTag", "azure.mgmt.containerservice.models.IstioCertificateAuthority": "Microsoft.ContainerService.IstioCertificateAuthority", "azure.mgmt.containerservice.models.IstioComponents": "Microsoft.ContainerService.IstioComponents", @@ -67,37 +54,18 @@ "azure.mgmt.containerservice.models.IstioIngressGateway": "Microsoft.ContainerService.IstioIngressGateway", "azure.mgmt.containerservice.models.IstioPluginCertificateAuthority": "Microsoft.ContainerService.IstioPluginCertificateAuthority", "azure.mgmt.containerservice.models.IstioServiceMesh": "Microsoft.ContainerService.IstioServiceMesh", - "azure.mgmt.containerservice.models.JWTAuthenticator": "Microsoft.ContainerService.JWTAuthenticator", - "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression": "Microsoft.ContainerService.JWTAuthenticatorClaimMappingExpression", - "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings": "Microsoft.ContainerService.JWTAuthenticatorClaimMappings", - "azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression": "Microsoft.ContainerService.JWTAuthenticatorExtraClaimMappingExpression", - "azure.mgmt.containerservice.models.JWTAuthenticatorIssuer": "Microsoft.ContainerService.JWTAuthenticatorIssuer", - "azure.mgmt.containerservice.models.JWTAuthenticatorProperties": "Microsoft.ContainerService.JWTAuthenticatorProperties", - "azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule": "Microsoft.ContainerService.JWTAuthenticatorValidationRule", "azure.mgmt.containerservice.models.KubeletConfig": "Microsoft.ContainerService.KubeletConfig", "azure.mgmt.containerservice.models.KubernetesPatchVersion": "Microsoft.ContainerService.KubernetesPatchVersion", - "azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile": "Microsoft.ContainerService.KubernetesResourceObjectEncryptionProfile", "azure.mgmt.containerservice.models.KubernetesVersion": "Microsoft.ContainerService.KubernetesVersion", "azure.mgmt.containerservice.models.KubernetesVersionCapabilities": "Microsoft.ContainerService.KubernetesVersionCapabilities", "azure.mgmt.containerservice.models.KubernetesVersionListResult": "Microsoft.ContainerService.KubernetesVersionListResult", - "azure.mgmt.containerservice.models.LabelSelector": "Microsoft.ContainerService.LabelSelector", - "azure.mgmt.containerservice.models.LabelSelectorRequirement": "Microsoft.ContainerService.LabelSelectorRequirement", "azure.mgmt.containerservice.models.LinuxOSConfig": "Microsoft.ContainerService.LinuxOSConfig", - "azure.mgmt.containerservice.models.LoadBalancer": "Microsoft.ContainerService.LoadBalancer", - "azure.mgmt.containerservice.models.LoadBalancerProperties": "Microsoft.ContainerService.LoadBalancerProperties", "azure.mgmt.containerservice.models.LocalDNSOverride": "Microsoft.ContainerService.LocalDNSOverride", "azure.mgmt.containerservice.models.LocalDNSProfile": "Microsoft.ContainerService.LocalDNSProfile", "azure.mgmt.containerservice.models.Machine": "Microsoft.ContainerService.Machine", - "azure.mgmt.containerservice.models.MachineBillingProfile": "Microsoft.ContainerService.MachineBillingProfile", - "azure.mgmt.containerservice.models.MachineHardwareProfile": "Microsoft.ContainerService.MachineHardwareProfile", "azure.mgmt.containerservice.models.MachineIpAddress": "Microsoft.ContainerService.MachineIpAddress", - "azure.mgmt.containerservice.models.MachineKubernetesProfile": "Microsoft.ContainerService.MachineKubernetesProfile", "azure.mgmt.containerservice.models.MachineNetworkProperties": "Microsoft.ContainerService.MachineNetworkProperties", - "azure.mgmt.containerservice.models.MachineOSProfile": "Microsoft.ContainerService.MachineOSProfile", - "azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile": "Microsoft.ContainerService.MachineOSProfileLinuxProfile", "azure.mgmt.containerservice.models.MachineProperties": "Microsoft.ContainerService.MachineProperties", - "azure.mgmt.containerservice.models.MachineSecurityProfile": "Microsoft.ContainerService.MachineSecurityProfile", - "azure.mgmt.containerservice.models.MachineStatus": "Microsoft.ContainerService.MachineStatus", "azure.mgmt.containerservice.models.MaintenanceConfiguration": "Microsoft.ContainerService.MaintenanceConfiguration", "azure.mgmt.containerservice.models.MaintenanceConfigurationProperties": "Microsoft.ContainerService.MaintenanceConfigurationProperties", "azure.mgmt.containerservice.models.MaintenanceWindow": "Microsoft.ContainerService.MaintenanceWindow", @@ -117,22 +85,14 @@ "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfile", "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileAppMonitoring", "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces", - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileContainerInsights", "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileKubeStateMetrics", "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileMetrics", - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetricsControlPlane": "Microsoft.ContainerService.ManagedClusterAzureMonitorProfileMetricsControlPlane", "azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile": "Microsoft.ContainerService.ManagedClusterBootstrapProfile", - "azure.mgmt.containerservice.models.ManagedClusterControlPlaneScalingProfile": "Microsoft.ContainerService.ManagedClusterControlPlaneScalingProfile", "azure.mgmt.containerservice.models.ManagedClusterCostAnalysis": "Microsoft.ContainerService.ManagedClusterCostAnalysis", - "azure.mgmt.containerservice.models.ManagedClusterHealthMonitorProfile": "Microsoft.ContainerService.ManagedClusterHealthMonitorProfile", "azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile": "Microsoft.ContainerService.ManagedClusterHostedSystemProfile", "azure.mgmt.containerservice.models.ManagedClusterHTTPProxyConfig": "Microsoft.ContainerService.ManagedClusterHTTPProxyConfig", "azure.mgmt.containerservice.models.ManagedClusterIdentity": "Microsoft.ContainerService.ManagedClusterIdentity", - "azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile": "Microsoft.ContainerService.ManagedClusterIngressDefaultDomainProfile", "azure.mgmt.containerservice.models.ManagedClusterIngressProfile": "Microsoft.ContainerService.ManagedClusterIngressProfile", - "azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer": "Microsoft.ContainerService.ManagedClusterIngressProfileApplicationLoadBalancer", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration": "Microsoft.ContainerService.ManagedClusterIngressProfileGatewayConfiguration", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx": "Microsoft.ContainerService.ManagedClusterIngressProfileNginx", "azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting": "Microsoft.ContainerService.ManagedClusterIngressProfileWebAppRouting", @@ -143,8 +103,6 @@ "azure.mgmt.containerservice.models.ManagedClusterManagedOutboundIPProfile": "Microsoft.ContainerService.ManagedClusterManagedOutboundIPProfile", "azure.mgmt.containerservice.models.ManagedClusterMetricsProfile": "Microsoft.ContainerService.ManagedClusterMetricsProfile", "azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfile": "Microsoft.ContainerService.ManagedClusterNATGatewayProfile", - "azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIpPrefixes": "Microsoft.ContainerService.ManagedClusterNATGatewayProfile.outboundIPPrefixes.anonymous", - "azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIPs": "Microsoft.ContainerService.ManagedClusterNATGatewayProfile.outboundIPs.anonymous", "azure.mgmt.containerservice.models.ManagedClusterNodeProvisioningProfile": "Microsoft.ContainerService.ManagedClusterNodeProvisioningProfile", "azure.mgmt.containerservice.models.ManagedClusterNodeResourceGroupProfile": "Microsoft.ContainerService.ManagedClusterNodeResourceGroupProfile", "azure.mgmt.containerservice.models.ManagedClusterOIDCIssuerProfile": "Microsoft.ContainerService.ManagedClusterOIDCIssuerProfile", @@ -158,20 +116,13 @@ "azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem": "Microsoft.ContainerService.ManagedClusterPoolUpgradeProfileUpgradesItem", "azure.mgmt.containerservice.models.ManagedClusterProperties": "Microsoft.ContainerService.ManagedClusterProperties", "azure.mgmt.containerservice.models.ManagedClusterPropertiesAutoScalerProfile": "Microsoft.ContainerService.ManagedClusterPropertiesAutoScalerProfile", - "azure.mgmt.containerservice.models.ManagedClusterPropertiesForSnapshot": "Microsoft.ContainerService.ManagedClusterPropertiesForSnapshot", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfile": "Microsoft.ContainerService.ManagedClusterSecurityProfile", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefender": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefender", - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityGating", - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring": "Microsoft.ContainerService.ManagedClusterSecurityProfileDefenderSecurityMonitoring", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner": "Microsoft.ContainerService.ManagedClusterSecurityProfileImageCleaner", - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity": "Microsoft.ContainerService.ManagedClusterSecurityProfileImageIntegrity", - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction": "Microsoft.ContainerService.ManagedClusterSecurityProfileNodeRestriction", "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity": "Microsoft.ContainerService.ManagedClusterSecurityProfileWorkloadIdentity", "azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile": "Microsoft.ContainerService.ManagedClusterServicePrincipalProfile", "azure.mgmt.containerservice.models.ManagedClusterSKU": "Microsoft.ContainerService.ManagedClusterSKU", - "azure.mgmt.containerservice.models.ManagedClusterSnapshot": "Microsoft.ContainerService.ManagedClusterSnapshot", - "azure.mgmt.containerservice.models.ManagedClusterSnapshotProperties": "Microsoft.ContainerService.ManagedClusterSnapshotProperties", "azure.mgmt.containerservice.models.ManagedClusterStaticEgressGatewayProfile": "Microsoft.ContainerService.ManagedClusterStaticEgressGatewayProfile", "azure.mgmt.containerservice.models.ManagedClusterStatus": "Microsoft.ContainerService.ManagedClusterStatus", "azure.mgmt.containerservice.models.ManagedClusterStorageProfile": "Microsoft.ContainerService.ManagedClusterStorageProfile", @@ -189,9 +140,6 @@ "azure.mgmt.containerservice.models.ManagedNamespace": "Microsoft.ContainerService.ManagedNamespace", "azure.mgmt.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue": "Microsoft.ContainerService.ManagedServiceIdentityUserAssignedIdentitiesValue", "azure.mgmt.containerservice.models.ManualScaleProfile": "Microsoft.ContainerService.ManualScaleProfile", - "azure.mgmt.containerservice.models.MeshMembership": "Microsoft.ContainerService.MeshMembership", - "azure.mgmt.containerservice.models.MeshMembershipPrivateConnectProfile": "Microsoft.ContainerService.MeshMembershipPrivateConnectProfile", - "azure.mgmt.containerservice.models.MeshMembershipProperties": "Microsoft.ContainerService.MeshMembershipProperties", "azure.mgmt.containerservice.models.MeshRevision": "Microsoft.ContainerService.MeshRevision", "azure.mgmt.containerservice.models.MeshRevisionProfile": "Microsoft.ContainerService.MeshRevisionProfile", "azure.mgmt.containerservice.models.MeshRevisionProfileProperties": "Microsoft.ContainerService.MeshRevisionProfileProperties", @@ -199,16 +147,11 @@ "azure.mgmt.containerservice.models.MeshUpgradeProfileProperties": "Microsoft.ContainerService.MeshUpgradeProfileProperties", "azure.mgmt.containerservice.models.NamespaceProperties": "Microsoft.ContainerService.NamespaceProperties", "azure.mgmt.containerservice.models.NetworkPolicies": "Microsoft.ContainerService.NetworkPolicies", - "azure.mgmt.containerservice.models.NetworkProfileForSnapshot": "Microsoft.ContainerService.NetworkProfileForSnapshot", - "azure.mgmt.containerservice.models.NodeImageVersion": "Microsoft.ContainerService.NodeImageVersion", - "azure.mgmt.containerservice.models.NvidiaGPUProfile": "Microsoft.ContainerService.NvidiaGPUProfile", - "azure.mgmt.containerservice.models.OperationStatusResult": "Azure.ResourceManager.CommonTypes.OperationStatusResult", "azure.mgmt.containerservice.models.OperationValue": "Microsoft.ContainerService.OperationValue", "azure.mgmt.containerservice.models.OperationValueDisplay": "Microsoft.ContainerService.OperationValueDisplay", "azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint": "Microsoft.ContainerService.OutboundEnvironmentEndpoint", "azure.mgmt.containerservice.models.PortRange": "Microsoft.ContainerService.PortRange", "azure.mgmt.containerservice.models.PowerState": "Microsoft.ContainerService.PowerState", - "azure.mgmt.containerservice.models.PreparedImageSpecificationProfile": "Microsoft.ContainerService.PreparedImageSpecificationProfile", "azure.mgmt.containerservice.models.PrivateEndpoint": "Microsoft.ContainerService.PrivateEndpoint", "azure.mgmt.containerservice.models.PrivateEndpointConnection": "Microsoft.ContainerService.PrivateEndpointConnection", "azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult": "Microsoft.ContainerService.PrivateEndpointConnectionListResult", @@ -216,28 +159,13 @@ "azure.mgmt.containerservice.models.PrivateLinkResource": "Microsoft.ContainerService.PrivateLinkResource", "azure.mgmt.containerservice.models.PrivateLinkResourcesListResult": "Microsoft.ContainerService.PrivateLinkResourcesListResult", "azure.mgmt.containerservice.models.PrivateLinkServiceConnectionState": "Microsoft.ContainerService.PrivateLinkServiceConnectionState", - "azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody": "Microsoft.ContainerService.RebalanceLoadBalancersRequestBody", "azure.mgmt.containerservice.models.RelativeMonthlySchedule": "Microsoft.ContainerService.RelativeMonthlySchedule", "azure.mgmt.containerservice.models.ResourceQuota": "Microsoft.ContainerService.ResourceQuota", "azure.mgmt.containerservice.models.ResourceReference": "Microsoft.ContainerService.ResourceReference", - "azure.mgmt.containerservice.models.ResourceSku": "Microsoft.ContainerService.ResourceSku", - "azure.mgmt.containerservice.models.ResourceSkuCapabilities": "Microsoft.ContainerService.ResourceSkuCapabilities", - "azure.mgmt.containerservice.models.ResourceSkuCapacity": "Microsoft.ContainerService.ResourceSkuCapacity", - "azure.mgmt.containerservice.models.ResourceSkuCosts": "Microsoft.ContainerService.ResourceSkuCosts", - "azure.mgmt.containerservice.models.ResourceSkuLocationInfo": "Microsoft.ContainerService.ResourceSkuLocationInfo", - "azure.mgmt.containerservice.models.ResourceSkuRestrictionInfo": "Microsoft.ContainerService.ResourceSkuRestrictionInfo", - "azure.mgmt.containerservice.models.ResourceSkuRestrictions": "Microsoft.ContainerService.ResourceSkuRestrictions", - "azure.mgmt.containerservice.models.ResourceSkuZoneDetails": "Microsoft.ContainerService.ResourceSkuZoneDetails", "azure.mgmt.containerservice.models.RunCommandRequest": "Microsoft.ContainerService.RunCommandRequest", "azure.mgmt.containerservice.models.RunCommandResult": "Microsoft.ContainerService.RunCommandResult", - "azure.mgmt.containerservice.models.SafeguardsAvailableVersion": "Microsoft.ContainerService.SafeguardsAvailableVersion", - "azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties": "Microsoft.ContainerService.SafeguardsAvailableVersionsProperties", "azure.mgmt.containerservice.models.ScaleProfile": "Microsoft.ContainerService.ScaleProfile", "azure.mgmt.containerservice.models.Schedule": "Microsoft.ContainerService.Schedule", - "azure.mgmt.containerservice.models.SchedulerInstanceProfile": "Microsoft.ContainerService.SchedulerInstanceProfile", - "azure.mgmt.containerservice.models.SchedulerProfile": "Microsoft.ContainerService.SchedulerProfile", - "azure.mgmt.containerservice.models.SchedulerProfileSchedulerInstanceProfiles": "Microsoft.ContainerService.SchedulerProfileSchedulerInstanceProfiles", - "azure.mgmt.containerservice.models.ServiceAccountImagePullProfile": "Microsoft.ContainerService.ServiceAccountImagePullProfile", "azure.mgmt.containerservice.models.ServiceMeshProfile": "Microsoft.ContainerService.ServiceMeshProfile", "azure.mgmt.containerservice.models.Snapshot": "Microsoft.ContainerService.Snapshot", "azure.mgmt.containerservice.models.SnapshotProperties": "Microsoft.ContainerService.SnapshotProperties", @@ -265,19 +193,14 @@ "azure.mgmt.containerservice.models.ScaleDownMode": "Microsoft.ContainerService.ScaleDownMode", "azure.mgmt.containerservice.models.AgentPoolType": "Microsoft.ContainerService.AgentPoolType", "azure.mgmt.containerservice.models.AgentPoolMode": "Microsoft.ContainerService.AgentPoolMode", - "azure.mgmt.containerservice.models.UpgradeStrategy": "Microsoft.ContainerService.UpgradeStrategy", "azure.mgmt.containerservice.models.UndrainableNodeBehavior": "Microsoft.ContainerService.UndrainableNodeBehavior", "azure.mgmt.containerservice.models.Code": "Microsoft.ContainerService.Code", "azure.mgmt.containerservice.models.ScaleSetPriority": "Microsoft.ContainerService.ScaleSetPriority", "azure.mgmt.containerservice.models.ScaleSetEvictionPolicy": "Microsoft.ContainerService.ScaleSetEvictionPolicy", - "azure.mgmt.containerservice.models.SeccompDefault": "Microsoft.ContainerService.SeccompDefault", "azure.mgmt.containerservice.models.GPUInstanceProfile": "Microsoft.ContainerService.GPUInstanceProfile", "azure.mgmt.containerservice.models.Protocol": "Microsoft.ContainerService.Protocol", "azure.mgmt.containerservice.models.AgentPoolSSHAccess": "Microsoft.ContainerService.AgentPoolSSHAccess", "azure.mgmt.containerservice.models.GPUDriver": "Microsoft.ContainerService.GPUDriver", - "azure.mgmt.containerservice.models.DriverType": "Microsoft.ContainerService.DriverType", - "azure.mgmt.containerservice.models.ManagementMode": "Microsoft.ContainerService.ManagementMode", - "azure.mgmt.containerservice.models.MigStrategy": "Microsoft.ContainerService.MigStrategy", "azure.mgmt.containerservice.models.LocalDNSMode": "Microsoft.ContainerService.LocalDNSMode", "azure.mgmt.containerservice.models.LocalDNSState": "Microsoft.ContainerService.LocalDNSState", "azure.mgmt.containerservice.models.LocalDNSQueryLogging": "Microsoft.ContainerService.LocalDNSQueryLogging", @@ -300,56 +223,36 @@ "azure.mgmt.containerservice.models.OutboundType": "Microsoft.ContainerService.OutboundType", "azure.mgmt.containerservice.models.LoadBalancerSku": "Microsoft.ContainerService.LoadBalancerSku", "azure.mgmt.containerservice.models.BackendPoolType": "Microsoft.ContainerService.BackendPoolType", - "azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode": "Microsoft.ContainerService.ClusterServiceLoadBalancerHealthProbeMode", "azure.mgmt.containerservice.models.IPFamily": "Microsoft.ContainerService.IPFamily", - "azure.mgmt.containerservice.models.PodLinkLocalAccess": "Microsoft.ContainerService.PodLinkLocalAccess", - "azure.mgmt.containerservice.models.Mode": "Microsoft.ContainerService.Mode", - "azure.mgmt.containerservice.models.IpvsScheduler": "Microsoft.ContainerService.IpvsScheduler", "azure.mgmt.containerservice.models.UpgradeChannel": "Microsoft.ContainerService.UpgradeChannel", "azure.mgmt.containerservice.models.NodeOSUpgradeChannel": "Microsoft.ContainerService.NodeOSUpgradeChannel", "azure.mgmt.containerservice.models.Expander": "Microsoft.ContainerService.Expander", "azure.mgmt.containerservice.models.KeyVaultNetworkAccessTypes": "Microsoft.ContainerService.KeyVaultNetworkAccessTypes", - "azure.mgmt.containerservice.models.InfrastructureEncryption": "Microsoft.ContainerService.InfrastructureEncryption", "azure.mgmt.containerservice.models.GatewayAPIIstioEnabled": "Microsoft.ContainerService.GatewayAPIIstioEnabled", "azure.mgmt.containerservice.models.NginxIngressControllerType": "Microsoft.ContainerService.NginxIngressControllerType", "azure.mgmt.containerservice.models.ManagedGatewayType": "Microsoft.ContainerService.ManagedGatewayType", "azure.mgmt.containerservice.models.PublicNetworkAccess": "Microsoft.ContainerService.PublicNetworkAccess", - "azure.mgmt.containerservice.models.AddonAutoscaling": "Microsoft.ContainerService.AddonAutoscaling", - "azure.mgmt.containerservice.models.ContainerNetworkLogs": "Microsoft.ContainerService.ContainerNetworkLogs", "azure.mgmt.containerservice.models.ServiceMeshMode": "Microsoft.ContainerService.ServiceMeshMode", "azure.mgmt.containerservice.models.IstioIngressGatewayMode": "Microsoft.ContainerService.IstioIngressGatewayMode", "azure.mgmt.containerservice.models.ProxyRedirectionMechanism": "Microsoft.ContainerService.ProxyRedirectionMechanism", "azure.mgmt.containerservice.models.NodeProvisioningMode": "Microsoft.ContainerService.NodeProvisioningMode", "azure.mgmt.containerservice.models.NodeProvisioningDefaultNodePools": "Microsoft.ContainerService.NodeProvisioningDefaultNodePools", "azure.mgmt.containerservice.models.ArtifactSource": "Microsoft.ContainerService.ArtifactSource", - "azure.mgmt.containerservice.models.SchedulerConfigMode": "Microsoft.ContainerService.SchedulerConfigMode", - "azure.mgmt.containerservice.models.ControlPlaneScalingSize": "Microsoft.ContainerService.ControlPlaneScalingSize", "azure.mgmt.containerservice.models.ManagedClusterSKUName": "Microsoft.ContainerService.ManagedClusterSKUName", "azure.mgmt.containerservice.models.ManagedClusterSKUTier": "Microsoft.ContainerService.ManagedClusterSKUTier", "azure.mgmt.containerservice.models.ExtendedLocationTypes": "Microsoft.ContainerService.ExtendedLocationTypes", "azure.mgmt.containerservice.models.ResourceIdentityType": "Microsoft.ContainerService.ResourceIdentityType", "azure.mgmt.containerservice.models.Format": "Microsoft.ContainerService.Format", - "azure.mgmt.containerservice.models.GuardrailsSupport": "Microsoft.ContainerService.GuardrailsSupport", - "azure.mgmt.containerservice.models.SafeguardsSupport": "Microsoft.ContainerService.SafeguardsSupport", "azure.mgmt.containerservice.models.WeekDay": "Microsoft.ContainerService.WeekDay", "azure.mgmt.containerservice.models.Type": "Microsoft.ContainerService.Type", "azure.mgmt.containerservice.models.NamespaceProvisioningState": "Microsoft.ContainerService.NamespaceProvisioningState", "azure.mgmt.containerservice.models.PolicyRule": "Microsoft.ContainerService.PolicyRule", "azure.mgmt.containerservice.models.AdoptionPolicy": "Microsoft.ContainerService.AdoptionPolicy", "azure.mgmt.containerservice.models.DeletePolicy": "Microsoft.ContainerService.DeletePolicy", - "azure.mgmt.containerservice.models.DriftAction": "Microsoft.ContainerService.DriftAction", - "azure.mgmt.containerservice.models.VmState": "Microsoft.ContainerService.VmState", "azure.mgmt.containerservice.models.PrivateEndpointConnectionProvisioningState": "Microsoft.ContainerService.PrivateEndpointConnectionProvisioningState", "azure.mgmt.containerservice.models.ConnectionStatus": "Microsoft.ContainerService.ConnectionStatus", "azure.mgmt.containerservice.models.SnapshotType": "Microsoft.ContainerService.SnapshotType", "azure.mgmt.containerservice.models.TrustedAccessRoleBindingProvisioningState": "Microsoft.ContainerService.TrustedAccessRoleBindingProvisioningState", - "azure.mgmt.containerservice.models.Operator": "Microsoft.ContainerService.Operator", - "azure.mgmt.containerservice.models.IdentityBindingProvisioningState": "Microsoft.ContainerService.IdentityBindingProvisioningState", - "azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState": "Microsoft.ContainerService.JWTAuthenticatorProvisioningState", - "azure.mgmt.containerservice.models.MeshMembershipProvisioningState": "Microsoft.ContainerService.MeshMembershipProvisioningState", - "azure.mgmt.containerservice.models.ResourceSkuCapacityScaleType": "Microsoft.ContainerService.ResourceSkuCapacityScaleType", - "azure.mgmt.containerservice.models.ResourceSkuRestrictionsType": "Microsoft.ContainerService.ResourceSkuRestrictionsType", - "azure.mgmt.containerservice.models.ResourceSkuRestrictionsReasonCode": "Microsoft.ContainerService.ResourceSkuRestrictionsReasonCode", "azure.mgmt.containerservice.operations.AgentPoolsOperations.get": "Microsoft.ContainerService.AgentPools.get", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.get": "Microsoft.ContainerService.AgentPools.get", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_create_or_update": "Microsoft.ContainerService.AgentPools.createOrUpdate", @@ -360,8 +263,6 @@ "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.list": "Microsoft.ContainerService.AgentPools.list", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_abort_latest_operation": "Microsoft.ContainerService.AgentPools.abortLatestOperation", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_abort_latest_operation": "Microsoft.ContainerService.AgentPools.abortLatestOperation", - "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_complete_upgrade": "Microsoft.ContainerService.AgentPools.completeUpgrade", - "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_complete_upgrade": "Microsoft.ContainerService.AgentPools.completeUpgrade", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_delete_machines": "Microsoft.ContainerService.AgentPools.deleteMachines", "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_delete_machines": "Microsoft.ContainerService.AgentPools.deleteMachines", "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_upgrade_node_image_version": "Microsoft.ContainerService.AgentPools.upgradeNodeImageVersion", @@ -410,18 +311,8 @@ "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_command_result": "Microsoft.ContainerService.ManagedClusters.getCommandResult", "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.ContainerService.ManagedClusters.listOutboundNetworkDependenciesEndpoints", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": "Microsoft.ContainerService.ManagedClusters.listOutboundNetworkDependenciesEndpoints", - "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_rebalance_load_balancers": "Microsoft.ContainerService.ManagedClusters.rebalanceLoadBalancers", - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_rebalance_load_balancers": "Microsoft.ContainerService.ManagedClusters.rebalanceLoadBalancers", "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_upgrade_profile": "Microsoft.ContainerService.ManagedClusterUpgradeProfiles.getUpgradeProfile", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_upgrade_profile": "Microsoft.ContainerService.ManagedClusterUpgradeProfiles.getUpgradeProfile", - "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.getGuardrailsVersions", - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.getGuardrailsVersions", - "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.listGuardrailsVersions", - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_guardrails_versions": "Microsoft.ContainerService.GuardrailsAvailableVersions.listGuardrailsVersions", - "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.getSafeguardsVersions", - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.getSafeguardsVersions", - "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.listSafeguardsVersions", - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_safeguards_versions": "Microsoft.ContainerService.SafeguardsAvailableVersions.listSafeguardsVersions", "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_mesh_revision_profile": "Microsoft.ContainerService.MeshRevisionProfiles.getMeshRevisionProfile", "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_mesh_revision_profile": "Microsoft.ContainerService.MeshRevisionProfiles.getMeshRevisionProfile", "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_mesh_revision_profiles": "Microsoft.ContainerService.MeshRevisionProfiles.listMeshRevisionProfiles", @@ -454,8 +345,6 @@ "azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations.list_credential": "Microsoft.ContainerService.ManagedNamespaces.listCredential", "azure.mgmt.containerservice.operations.MachinesOperations.get": "Microsoft.ContainerService.Machines.get", "azure.mgmt.containerservice.aio.operations.MachinesOperations.get": "Microsoft.ContainerService.Machines.get", - "azure.mgmt.containerservice.operations.MachinesOperations.begin_create_or_update": "Microsoft.ContainerService.Machines.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.MachinesOperations.begin_create_or_update": "Microsoft.ContainerService.Machines.createOrUpdate", "azure.mgmt.containerservice.operations.MachinesOperations.list": "Microsoft.ContainerService.Machines.list", "azure.mgmt.containerservice.aio.operations.MachinesOperations.list": "Microsoft.ContainerService.Machines.list", "azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations.get": "Microsoft.ContainerService.PrivateEndpointConnections.get", @@ -478,18 +367,6 @@ "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.Snapshots.listByResourceGroup", "azure.mgmt.containerservice.operations.SnapshotsOperations.list": "Microsoft.ContainerService.Snapshots.list", "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.list": "Microsoft.ContainerService.Snapshots.list", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.get": "Microsoft.ContainerService.ManagedClusterSnapshots.get", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.get": "Microsoft.ContainerService.ManagedClusterSnapshots.get", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.create_or_update": "Microsoft.ContainerService.ManagedClusterSnapshots.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.create_or_update": "Microsoft.ContainerService.ManagedClusterSnapshots.createOrUpdate", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.update_tags": "Microsoft.ContainerService.ManagedClusterSnapshots.updateTags", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.update_tags": "Microsoft.ContainerService.ManagedClusterSnapshots.updateTags", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.delete": "Microsoft.ContainerService.ManagedClusterSnapshots.delete", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.delete": "Microsoft.ContainerService.ManagedClusterSnapshots.delete", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.ManagedClusterSnapshots.listByResourceGroup", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": "Microsoft.ContainerService.ManagedClusterSnapshots.listByResourceGroup", - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list": "Microsoft.ContainerService.ManagedClusterSnapshots.list", - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list": "Microsoft.ContainerService.ManagedClusterSnapshots.list", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.get": "Microsoft.ContainerService.TrustedAccessRoleBindings.get", "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.get": "Microsoft.ContainerService.TrustedAccessRoleBindings.get", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.begin_create_or_update": "Microsoft.ContainerService.TrustedAccessRoleBindings.createOrUpdate", @@ -498,55 +375,13 @@ "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.begin_delete": "Microsoft.ContainerService.TrustedAccessRoleBindings.delete", "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.list": "Microsoft.ContainerService.TrustedAccessRoleBindings.list", "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.list": "Microsoft.ContainerService.TrustedAccessRoleBindings.list", - "azure.mgmt.containerservice.operations.LoadBalancersOperations.get": "Microsoft.ContainerService.LoadBalancers.get", - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.get": "Microsoft.ContainerService.LoadBalancers.get", - "azure.mgmt.containerservice.operations.LoadBalancersOperations.create_or_update": "Microsoft.ContainerService.LoadBalancers.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.create_or_update": "Microsoft.ContainerService.LoadBalancers.createOrUpdate", - "azure.mgmt.containerservice.operations.LoadBalancersOperations.begin_delete": "Microsoft.ContainerService.LoadBalancers.delete", - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.begin_delete": "Microsoft.ContainerService.LoadBalancers.delete", - "azure.mgmt.containerservice.operations.LoadBalancersOperations.list_by_managed_cluster": "Microsoft.ContainerService.LoadBalancers.listByManagedCluster", - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.list_by_managed_cluster": "Microsoft.ContainerService.LoadBalancers.listByManagedCluster", - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.get": "Microsoft.ContainerService.IdentityBindings.get", - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.get": "Microsoft.ContainerService.IdentityBindings.get", - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.begin_create_or_update": "Microsoft.ContainerService.IdentityBindings.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.begin_create_or_update": "Microsoft.ContainerService.IdentityBindings.createOrUpdate", - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.begin_delete": "Microsoft.ContainerService.IdentityBindings.delete", - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.begin_delete": "Microsoft.ContainerService.IdentityBindings.delete", - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.list_by_managed_cluster": "Microsoft.ContainerService.IdentityBindings.listByManagedCluster", - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.list_by_managed_cluster": "Microsoft.ContainerService.IdentityBindings.listByManagedCluster", - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.get": "Microsoft.ContainerService.JWTAuthenticators.get", - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.get": "Microsoft.ContainerService.JWTAuthenticators.get", - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_create_or_update": "Microsoft.ContainerService.JWTAuthenticators.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_create_or_update": "Microsoft.ContainerService.JWTAuthenticators.createOrUpdate", - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_delete": "Microsoft.ContainerService.JWTAuthenticators.delete", - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_delete": "Microsoft.ContainerService.JWTAuthenticators.delete", - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": "Microsoft.ContainerService.JWTAuthenticators.listByManagedCluster", - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": "Microsoft.ContainerService.JWTAuthenticators.listByManagedCluster", - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.get": "Microsoft.ContainerService.MeshMemberships.get", - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.get": "Microsoft.ContainerService.MeshMemberships.get", - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_create_or_update": "Microsoft.ContainerService.MeshMemberships.createOrUpdate", - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_create_or_update": "Microsoft.ContainerService.MeshMemberships.createOrUpdate", - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_delete": "Microsoft.ContainerService.MeshMemberships.delete", - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_delete": "Microsoft.ContainerService.MeshMemberships.delete", - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MeshMemberships.listByManagedCluster", - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.list_by_managed_cluster": "Microsoft.ContainerService.MeshMemberships.listByManagedCluster", "azure.mgmt.containerservice.operations.Operations.list": "Microsoft.ContainerService.Operations.list", "azure.mgmt.containerservice.aio.operations.Operations.list": "Microsoft.ContainerService.Operations.list", - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get_by_agent_pool": "Microsoft.ContainerService.AgentPools.getByAgentPool", - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get_by_agent_pool": "Microsoft.ContainerService.AgentPools.getByAgentPool", - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.list": "Microsoft.ContainerService.ManagedClusters.operationStatusResultList", - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.list": "Microsoft.ContainerService.ManagedClusters.operationStatusResultList", - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get": "Microsoft.ContainerService.ManagedClusters.operationStatusResultGet", - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get": "Microsoft.ContainerService.ManagedClusters.operationStatusResultGet", "azure.mgmt.containerservice.operations.PrivateLinkResourcesOperations.list": "Microsoft.ContainerService.ManagedClusters.privateLinkResourcesList", "azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations.list": "Microsoft.ContainerService.ManagedClusters.privateLinkResourcesList", "azure.mgmt.containerservice.operations.ResolvePrivateLinkServiceIdOperations.post": "Microsoft.ContainerService.ManagedClusters.post", "azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations.post": "Microsoft.ContainerService.ManagedClusters.post", "azure.mgmt.containerservice.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list", - "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list", - "azure.mgmt.containerservice.operations.ContainerServiceOperations.list_node_image_versions": "Microsoft.ContainerService.ContainerServiceOperationGroup.listNodeImageVersions", - "azure.mgmt.containerservice.aio.operations.ContainerServiceOperations.list_node_image_versions": "Microsoft.ContainerService.ContainerServiceOperationGroup.listNodeImageVersions", - "azure.mgmt.containerservice.operations.VmSkusOperations.list": "Microsoft.ContainerService.VmSkusOperationGroup.list", - "azure.mgmt.containerservice.aio.operations.VmSkusOperations.list": "Microsoft.ContainerService.VmSkusOperationGroup.list" + "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": "Microsoft.ContainerService.TrustedAccessRolesOperationGroup.list" } } \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py index 99f55cb5efdb..7a79e63177ce 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_client.py @@ -21,17 +21,10 @@ from ._utils.serialization import Deserializer, Serializer from .operations import ( AgentPoolsOperations, - ContainerServiceOperations, - IdentityBindingsOperations, - JWTAuthenticatorsOperations, - LoadBalancersOperations, MachinesOperations, MaintenanceConfigurationsOperations, - ManagedClusterSnapshotsOperations, ManagedClustersOperations, ManagedNamespacesOperations, - MeshMembershipsOperations, - OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -39,7 +32,6 @@ SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations, - VmSkusOperations, ) if TYPE_CHECKING: @@ -66,25 +58,11 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: azure.mgmt.containerservice.operations.SnapshotsOperations - :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations - :vartype managed_cluster_snapshots: - azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.containerservice.operations.LoadBalancersOperations - :ivar identity_bindings: IdentityBindingsOperations operations - :vartype identity_bindings: azure.mgmt.containerservice.operations.IdentityBindingsOperations - :ivar jwt_authenticators: JWTAuthenticatorsOperations operations - :vartype jwt_authenticators: azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations - :ivar mesh_memberships: MeshMembershipsOperations operations - :vartype mesh_memberships: azure.mgmt.containerservice.operations.MeshMembershipsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.operations.Operations - :ivar operation_status_result: OperationStatusResultOperations operations - :vartype operation_status_result: - azure.mgmt.containerservice.operations.OperationStatusResultOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.operations.PrivateLinkResourcesOperations @@ -94,10 +72,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: azure.mgmt.containerservice.operations.TrustedAccessRolesOperations - :ivar container_service: ContainerServiceOperations operations - :vartype container_service: azure.mgmt.containerservice.operations.ContainerServiceOperations - :ivar vm_skus: VmSkusOperations operations - :vartype vm_skus: azure.mgmt.containerservice.operations.VmSkusOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -107,9 +81,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-02-02-preview". Default value is "2026-02-02-preview". Note that overriding this default - value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-03-01". + Default value is "2026-03-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. @@ -177,26 +151,10 @@ def __init__( 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_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) - self.identity_bindings = IdentityBindingsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.jwt_authenticators = JWTAuthenticatorsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.mesh_memberships = MeshMembershipsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -206,10 +164,6 @@ def __init__( self.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.vm_skus = VmSkusOperations(self._client, self._config, self._serialize, self._deserialize) def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py index 90196dd70d2a..b6cf8fbcd95d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py @@ -33,9 +33,9 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-02-02-preview". Default value is "2026-02-02-preview". Note that overriding this default - value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-03-01". + Default value is "2026-03-01". Note that overriding this default value may result in + unsupported behavior. :paramtype api_version: str """ @@ -47,7 +47,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-02-02-preview") + api_version: str = kwargs.pop("api_version", "2026-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_validation.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_validation.py deleted file mode 100644 index f5af3a4eb8a2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_validation.py +++ /dev/null @@ -1,66 +0,0 @@ -# -------------------------------------------------------------------------- -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import functools - - -def api_version_validation(**kwargs): - params_added_on = kwargs.pop("params_added_on", {}) - method_added_on = kwargs.pop("method_added_on", "") - api_versions_list = kwargs.pop("api_versions_list", []) - - def _index_with_default(value: str, default: int = -1) -> int: - """Get the index of value in lst, or return default if not found. - - :param value: The value to search for in the api_versions_list. - :type value: str - :param default: The default value to return if the value is not found. - :type default: int - :return: The index of the value in the list, or the default value if not found. - :rtype: int - """ - try: - return api_versions_list.index(value) - except ValueError: - return default - - def decorator(func): - @functools.wraps(func) - def wrapper(*args, **kwargs): - try: - # this assumes the client has an _api_version attribute - client = args[0] - client_api_version = client._config.api_version # pylint: disable=protected-access - except AttributeError: - return func(*args, **kwargs) - - if _index_with_default(method_added_on) > _index_with_default(client_api_version): - raise ValueError( - f"'{func.__name__}' is not available in API version " - f"{client_api_version}. Pass service API version {method_added_on} or newer to your client." - ) - - unsupported = { - parameter: api_version - for api_version, parameters in params_added_on.items() - for parameter in parameters - if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version) - } - if unsupported: - raise ValueError( - "".join( - [ - f"'{param}' is not available in API version {client_api_version}. " - f"Use service API version {version} or newer.\n" - for param, version in unsupported.items() - ] - ) - ) - return func(*args, **kwargs) - - return wrapper - - return decorator diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py index 146e5cfdffbb..c8850caf8eb4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "41.2.0b1" +VERSION = "41.2.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py index 7b6dc26c1790..e8224ff861c8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_client.py @@ -21,17 +21,10 @@ from ._configuration import ContainerServiceClientConfiguration from .operations import ( AgentPoolsOperations, - ContainerServiceOperations, - IdentityBindingsOperations, - JWTAuthenticatorsOperations, - LoadBalancersOperations, MachinesOperations, MaintenanceConfigurationsOperations, - ManagedClusterSnapshotsOperations, ManagedClustersOperations, ManagedNamespacesOperations, - MeshMembershipsOperations, - OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -39,7 +32,6 @@ SnapshotsOperations, TrustedAccessRoleBindingsOperations, TrustedAccessRolesOperations, - VmSkusOperations, ) if TYPE_CHECKING: @@ -67,27 +59,11 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: azure.mgmt.containerservice.aio.operations.SnapshotsOperations - :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations - :vartype managed_cluster_snapshots: - azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.containerservice.aio.operations.LoadBalancersOperations - :ivar identity_bindings: IdentityBindingsOperations operations - :vartype identity_bindings: - azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations - :ivar jwt_authenticators: JWTAuthenticatorsOperations operations - :vartype jwt_authenticators: - azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations - :ivar mesh_memberships: MeshMembershipsOperations operations - :vartype mesh_memberships: azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.containerservice.aio.operations.Operations - :ivar operation_status_result: OperationStatusResultOperations operations - :vartype operation_status_result: - azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations @@ -97,11 +73,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations - :ivar container_service: ContainerServiceOperations operations - :vartype container_service: - azure.mgmt.containerservice.aio.operations.ContainerServiceOperations - :ivar vm_skus: VmSkusOperations operations - :vartype vm_skus: azure.mgmt.containerservice.aio.operations.VmSkusOperations :param credential: Credential used to authenticate requests to the service. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -111,9 +82,9 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :paramtype cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-02-02-preview". Default value is "2026-02-02-preview". Note that overriding this default - value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-03-01". + Default value is "2026-03-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. @@ -183,26 +154,10 @@ def __init__( 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_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) - self.load_balancers = LoadBalancersOperations(self._client, self._config, self._serialize, self._deserialize) - self.identity_bindings = IdentityBindingsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.jwt_authenticators = JWTAuthenticatorsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.mesh_memberships = MeshMembershipsOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -212,10 +167,6 @@ def __init__( self.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) - self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.vm_skus = VmSkusOperations(self._client, self._config, self._serialize, self._deserialize) def send_request( self, request: HttpRequest, *, stream: bool = False, **kwargs: Any diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py index 4c51d56358f2..8a6131a52e1a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_configuration.py @@ -33,9 +33,9 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is None. :type cloud_setting: ~azure.core.AzureClouds - :keyword api_version: The API version to use for this operation. Known values are - "2026-02-02-preview". Default value is "2026-02-02-preview". Note that overriding this default - value may result in unsupported behavior. + :keyword api_version: The API version to use for this operation. Known values are "2026-03-01". + Default value is "2026-03-01". Note that overriding this default value may result in + unsupported behavior. :paramtype api_version: str """ @@ -47,7 +47,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2026-02-02-preview") + api_version: str = kwargs.pop("api_version", "2026-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py index 49ff26d86c61..c93b651bf54b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py @@ -19,19 +19,11 @@ from ._operations import MachinesOperations # type: ignore from ._operations import PrivateEndpointConnectionsOperations # type: ignore from ._operations import SnapshotsOperations # type: ignore -from ._operations import ManagedClusterSnapshotsOperations # type: ignore from ._operations import TrustedAccessRoleBindingsOperations # type: ignore -from ._operations import LoadBalancersOperations # type: ignore -from ._operations import IdentityBindingsOperations # type: ignore -from ._operations import JWTAuthenticatorsOperations # type: ignore -from ._operations import MeshMembershipsOperations # type: ignore from ._operations import Operations # type: ignore -from ._operations import OperationStatusResultOperations # type: ignore from ._operations import PrivateLinkResourcesOperations # type: ignore from ._operations import ResolvePrivateLinkServiceIdOperations # type: ignore from ._operations import TrustedAccessRolesOperations # type: ignore -from ._operations import ContainerServiceOperations # type: ignore -from ._operations import VmSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -45,19 +37,11 @@ "MachinesOperations", "PrivateEndpointConnectionsOperations", "SnapshotsOperations", - "ManagedClusterSnapshotsOperations", "TrustedAccessRoleBindingsOperations", - "LoadBalancersOperations", - "IdentityBindingsOperations", - "JWTAuthenticatorsOperations", - "MeshMembershipsOperations", "Operations", - "OperationStatusResultOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", "TrustedAccessRolesOperations", - "ContainerServiceOperations", - "VmSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py index b7d3a6c781a8..c7cb16fc6756 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operations.py @@ -37,10 +37,8 @@ from ... import models as _models from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ..._utils.serialization import Deserializer, Serializer -from ..._validation import api_version_validation from ...operations._operations import ( build_agent_pools_abort_latest_operation_request, - build_agent_pools_complete_upgrade_request, build_agent_pools_create_or_update_request, build_agent_pools_delete_machines_request, build_agent_pools_delete_request, @@ -49,55 +47,30 @@ build_agent_pools_get_upgrade_profile_request, build_agent_pools_list_request, build_agent_pools_upgrade_node_image_version_request, - build_container_service_list_node_image_versions_request, - build_identity_bindings_create_or_update_request, - build_identity_bindings_delete_request, - build_identity_bindings_get_request, - build_identity_bindings_list_by_managed_cluster_request, - build_jwt_authenticators_create_or_update_request, - build_jwt_authenticators_delete_request, - build_jwt_authenticators_get_request, - build_jwt_authenticators_list_by_managed_cluster_request, - build_load_balancers_create_or_update_request, - build_load_balancers_delete_request, - build_load_balancers_get_request, - build_load_balancers_list_by_managed_cluster_request, - build_machines_create_or_update_request, build_machines_get_request, build_machines_list_request, build_maintenance_configurations_create_or_update_request, build_maintenance_configurations_delete_request, build_maintenance_configurations_get_request, build_maintenance_configurations_list_by_managed_cluster_request, - build_managed_cluster_snapshots_create_or_update_request, - build_managed_cluster_snapshots_delete_request, - build_managed_cluster_snapshots_get_request, - build_managed_cluster_snapshots_list_by_resource_group_request, - build_managed_cluster_snapshots_list_request, - build_managed_cluster_snapshots_update_tags_request, build_managed_clusters_abort_latest_operation_request, build_managed_clusters_create_or_update_request, build_managed_clusters_delete_request, build_managed_clusters_get_access_profile_request, build_managed_clusters_get_command_result_request, - build_managed_clusters_get_guardrails_versions_request, build_managed_clusters_get_mesh_revision_profile_request, build_managed_clusters_get_mesh_upgrade_profile_request, build_managed_clusters_get_request, - build_managed_clusters_get_safeguards_versions_request, build_managed_clusters_get_upgrade_profile_request, build_managed_clusters_list_by_resource_group_request, build_managed_clusters_list_cluster_admin_credentials_request, build_managed_clusters_list_cluster_monitoring_user_credentials_request, build_managed_clusters_list_cluster_user_credentials_request, - build_managed_clusters_list_guardrails_versions_request, build_managed_clusters_list_kubernetes_versions_request, build_managed_clusters_list_mesh_revision_profiles_request, build_managed_clusters_list_mesh_upgrade_profiles_request, build_managed_clusters_list_outbound_network_dependencies_endpoints_request, build_managed_clusters_list_request, - build_managed_clusters_list_safeguards_versions_request, - build_managed_clusters_rebalance_load_balancers_request, build_managed_clusters_reset_aad_profile_request, build_managed_clusters_reset_service_principal_profile_request, build_managed_clusters_rotate_cluster_certificates_request, @@ -112,13 +85,6 @@ build_managed_namespaces_list_by_managed_cluster_request, build_managed_namespaces_list_credential_request, build_managed_namespaces_update_request, - build_mesh_memberships_create_or_update_request, - build_mesh_memberships_delete_request, - build_mesh_memberships_get_request, - build_mesh_memberships_list_by_managed_cluster_request, - build_operation_status_result_get_by_agent_pool_request, - build_operation_status_result_get_request, - build_operation_status_result_list_request, build_operations_list_request, build_private_endpoint_connections_delete_request, build_private_endpoint_connections_get_request, @@ -137,7 +103,6 @@ build_trusted_access_role_bindings_get_request, build_trusted_access_role_bindings_list_request, build_trusted_access_roles_list_request, - build_vm_skus_list_request, ) from .._configuration import ContainerServiceClientConfiguration @@ -923,161 +888,6 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _complete_upgrade_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_agent_pools_complete_upgrade_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_complete_upgrade( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Completes the upgrade of an agent pool. - - Completes the upgrade operation for the specified 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 - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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._complete_upgrade_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - async def _delete_machines_initial( self, resource_group_name: str, @@ -2250,16 +2060,11 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - params_added_on={"2026-02-02-preview": ["ignore_pod_disruption_budget"]}, - api_versions_list=["2025-10-01", "2026-01-01", "2026-02-01", "2026-02-02-preview"], - ) async def _delete_initial( self, resource_group_name: str, resource_name: str, *, - ignore_pod_disruption_budget: Optional[bool] = None, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any @@ -2287,7 +2092,6 @@ async def _delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, etag=etag, match_condition=match_condition, api_version=self._config.api_version, @@ -2335,16 +2139,11 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - params_added_on={"2026-02-02-preview": ["ignore_pod_disruption_budget"]}, - api_versions_list=["2025-10-01", "2026-01-01", "2026-02-01", "2026-02-02-preview"], - ) async def begin_delete( self, resource_group_name: str, resource_name: str, *, - ignore_pod_disruption_budget: Optional[bool] = None, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any @@ -2356,9 +2155,6 @@ async def begin_delete( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :keyword 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. - :paramtype ignore_pod_disruption_budget: bool :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is None. :paramtype etag: str @@ -2379,7 +2175,6 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, etag=etag, match_condition=match_condition, cls=lambda x, y, z: x, @@ -4452,26 +4247,22 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _rebalance_load_balancers_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: + @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. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -4480,26 +4271,16 @@ async def _rebalance_load_balancers_initial( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) - _request = build_managed_clusters_rebalance_load_balancers_request( + _request = build_managed_clusters_get_upgrade_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -4509,18 +4290,19 @@ async def _rebalance_load_balancers_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -4528,295 +4310,47 @@ async def _rebalance_load_balancers_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.RebalanceLoadBalancersRequestBody, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rebalance nodes across specific load balancers. + @distributed_trace_async + async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: + """Gets a mesh revision profile for a specified mesh in the specified location. - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + Contains extra metadata on the revision, including supported revisions, cluster compatibility + and available upgrades. + + :param location: The name of the Azure region. Required. + :type location: str + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - async def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rebalance nodes across specific load balancers. + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ + cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) - @overload - async def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Is one of the following types: RebalanceLoadBalancersRequestBody, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or JSON - or IO[bytes] - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[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._rebalance_load_balancers_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def get_guardrails_versions( - self, location: str, version: str, **kwargs: Any - ) -> _models.GuardrailsAvailableVersion: - """Gets supported Guardrails version in the specified subscription and location. - - Contains Guardrails version along with its support info and whether it is a default version. - - :param location: The name of the Azure region. Required. - :type location: str - :param version: Safeguards version. Required. - :type version: str - :return: GuardrailsAvailableVersion. The GuardrailsAvailableVersion is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersion - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_guardrails_versions_request( + _request = build_managed_clusters_get_mesh_revision_profile_request( location=location, - version=version, + mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -4851,7 +4385,7 @@ async def get_guardrails_versions( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.GuardrailsAvailableVersion, response.json()) + deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -4859,25 +4393,25 @@ async def get_guardrails_versions( return deserialized # type: ignore @distributed_trace - def list_guardrails_versions( + def list_mesh_revision_profiles( self, location: str, **kwargs: Any - ) -> AsyncItemPaged["_models.GuardrailsAvailableVersion"]: - """Gets a list of supported Guardrails versions in the specified subscription and location. + ) -> AsyncItemPaged["_models.MeshRevisionProfile"]: + """Lists mesh revision profiles for all meshes in the specified location. - Contains list of Guardrails version along with its support info and whether it is a default - version. + Contains extra metadata on each revision, including supported revisions, cluster compatibility + and available upgrades. :param location: The name of the Azure region. Required. :type location: str - :return: An iterator like instance of GuardrailsAvailableVersion + :return: An iterator like instance of MeshRevisionProfile :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.GuardrailsAvailableVersion]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -4890,7 +4424,7 @@ def list_guardrails_versions( def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_guardrails_versions_request( + _request = build_managed_clusters_list_mesh_revision_profiles_request( location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, @@ -4929,7 +4463,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.GuardrailsAvailableVersion], + List[_models.MeshRevisionProfile], deserialized.get("value", []), ) if cls: @@ -4958,20 +4492,20 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def get_safeguards_versions( - self, location: str, version: str, **kwargs: Any - ) -> _models.SafeguardsAvailableVersion: - """Gets supported Safeguards version in the specified subscription and location. - - Contains Safeguards version along with its support info and whether it is a default version. + async def get_mesh_upgrade_profile( + self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any + ) -> _models.MeshUpgradeProfile: + """Gets available upgrades for a service mesh in a cluster. - :param location: The name of the Azure region. Required. - :type location: str - :param version: Safeguards version. Required. - :type version: str - :return: SafeguardsAvailableVersion. The SafeguardsAvailableVersion is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion + :param resource_group_name: The name of the resource group. The name 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 mode: The mode of the mesh. Required. + :type mode: str + :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4985,11 +4519,12 @@ async def get_safeguards_versions( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_safeguards_versions_request( - location=location, - version=version, + _request = build_managed_clusters_get_mesh_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5024,7 +4559,7 @@ async def get_safeguards_versions( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.SafeguardsAvailableVersion, response.json()) + deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -5032,25 +4567,25 @@ async def get_safeguards_versions( return deserialized # type: ignore @distributed_trace - def list_safeguards_versions( - self, location: str, **kwargs: Any - ) -> AsyncItemPaged["_models.SafeguardsAvailableVersion"]: - """Gets a list of supported Safeguards versions in the specified subscription and location. - - Contains list of Safeguards version along with its support info and whether it is a default - version. + def list_mesh_upgrade_profiles( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MeshUpgradeProfile"]: + """Lists available upgrades for all service meshes in a specific cluster. - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of SafeguardsAvailableVersion + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MeshUpgradeProfile :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.SafeguardsAvailableVersion]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -5063,8 +4598,9 @@ def list_safeguards_versions( def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_safeguards_versions_request( - location=location, + _request = build_managed_clusters_list_mesh_upgrade_profiles_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5102,7 +4638,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.SafeguardsAvailableVersion], + List[_models.MeshUpgradeProfile], deserialized.get("value", []), ) if cls: @@ -5131,18 +4667,17 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: - """Gets a mesh revision profile for a specified mesh in the specified location. + async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: + """Gets a list of supported Kubernetes versions in the specified subscription. - Contains extra metadata on the revision, including supported revisions, cluster compatibility - and available upgrades. + Contains extra metadata on the version, including supported patch versions, capabilities, + available upgrades, and details on preview status of the version. :param location: The name of the Azure region. Required. :type location: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile + :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -5156,185 +4691,10 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) + cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_revision_profile_request( + _request = build_managed_clusters_list_kubernetes_versions_request( location=location, - mode=mode, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_mesh_revision_profiles( - self, location: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshRevisionProfile"]: - """Lists mesh revision profiles for all meshes in the specified location. - - Contains extra metadata on each revision, including supported revisions, cluster compatibility - and available upgrades. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of MeshRevisionProfile - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_mesh_revision_profiles_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.MeshRevisionProfile], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def get_mesh_upgrade_profile( - self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any - ) -> _models.MeshUpgradeProfile: - """Gets available upgrades for a service mesh in 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 - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_mesh_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -5369,3386 +4729,48 @@ async def get_mesh_upgrade_profile( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_mesh_upgrade_profiles( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshUpgradeProfile"]: - """Lists available upgrades for all service meshes in a specific 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 - :return: An iterator like instance of MeshUpgradeProfile - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_mesh_upgrade_profiles_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request + deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.MeshUpgradeProfile], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: - """Gets a list of supported Kubernetes versions in the specified subscription. - - Contains extra metadata on the version, including supported patch versions, capabilities, - available upgrades, and details on preview status of the version. - - :param location: The name of the Azure region. Required. - :type location: str - :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) - - _request = build_managed_clusters_list_kubernetes_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class MaintenanceConfigurationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`maintenance_configurations` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @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. - - :param resource_group_name: The name of the resource group. The name 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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - - _request = build_maintenance_configurations_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Is one of the following - types: MaintenanceConfiguration, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or JSON or - IO[bytes] - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_maintenance_configurations_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any) -> None: - """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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_maintenance_configurations_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - config_name=config_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MaintenanceConfiguration"]: - """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 - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_maintenance_configurations_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.MaintenanceConfiguration], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ManagedNamespacesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`managed_namespaces` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.ManagedNamespace: - """Gets the specified namespace 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - - _request = build_managed_namespaces_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_namespaces_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.ManagedNamespace, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Is one of the following types: - ManagedNamespace, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = 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, - managed_namespace_name=managed_namespace_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.ManagedNamespace].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.ManagedNamespace]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @overload - async def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Is one of the following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_namespaces_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_namespaces_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def begin_delete( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ManagedNamespace"]: - """Gets a list of managed namespaces 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 - :return: An iterator like instance of ManagedNamespace - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_namespaces_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedNamespace], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - async def list_credential( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.CredentialResults: - """Lists the credentials of a namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - - _request = build_managed_namespaces_list_credential_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class MachinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`machines` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any - ) -> _models.Machine: - """Get a specific machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :return: Machine. The Machine is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Machine - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Machine] = kwargs.pop("cls", None) - - _request = build_machines_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Machine, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "machine_name", - "content_type", - "accept", - "etag", - "match_condition", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_machines_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, - subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: _models.Machine, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "machine_name", - "content_type", - "accept", - "etag", - "match_condition", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Is one of the following types: Machine, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine or JSON or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of AsyncLROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Machine] = 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, - machine_name=machine_name, - parameters=parameters, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Machine, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.Machine].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.Machine]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.Machine"]: - """Gets a list of machines in the specified 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 - :return: An iterator like instance of Machine - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_machines_list_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Machine], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`private_endpoint_connections` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @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 - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """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 one of the following types: - PrivateEndpointConnection, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or JSON or - IO[bytes] - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_private_endpoint_connections_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, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 200: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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 - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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 - :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is - compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - - _request = build_private_endpoint_connections_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class SnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.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 - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - - _request = build_snapshots_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.Snapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.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 one of the following types: Snapshot, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot or JSON or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.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 one of the - following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_snapshots_update_tags_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: - """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 - :return: None - :rtype: None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_snapshots_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: - """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 - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_snapshots_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Snapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: - """Gets a list of snapshots in the specified subscription. - - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_snapshots_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Snapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class ManagedClusterSnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`managed_cluster_snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: - """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 - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - _request = build_managed_cluster_snapshots_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.ManagedClusterSnapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - :param resource_group_name: The name of the resource group. The name 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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + return deserialized # type: ignore - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. + 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. :param resource_group_name: The name of the resource group. The name 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 one of the following - types: ManagedClusterSnapshot, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or JSON or - IO[bytes] - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8759,26 +4781,17 @@ async def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - _request = build_managed_cluster_snapshots_create_or_update_request( + _request = build_maintenance_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -8795,7 +4808,7 @@ async def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: await response.read() # Load the body in memory and close the socket @@ -8811,7 +4824,7 @@ async def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -8819,123 +4832,127 @@ async def create_or_update( return deserialized # type: ignore @overload - async def update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.TagsObject, + config_name: str, + parameters: _models.MaintenanceConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, + config_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, + config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def update_tags( + async def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, JSON, IO[bytes]], **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is one of the following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is one of the following + types: MaintenanceConfiguration, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or JSON or + IO[bytes] + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8950,7 +4967,7 @@ async def update_tags( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -8959,9 +4976,10 @@ async def update_tags( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_cluster_snapshots_update_tags_request( + _request = build_maintenance_configurations_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -8982,7 +5000,7 @@ async def update_tags( response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: if _stream: try: await response.read() # Load the body in memory and close the socket @@ -8998,7 +5016,7 @@ async def update_tags( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -9006,21 +5024,17 @@ async def update_tags( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name"] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: - """Deletes a managed cluster snapshot. + async def delete(self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any) -> None: + """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. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: @@ -9038,157 +5052,58 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_managed_cluster_snapshots_delete_request( + _request = build_maintenance_configurations_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={"2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.ManagedClusterSnapshot"]: - """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 - :return: An iterator like instance of ManagedClusterSnapshot - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_cluster_snapshots_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedClusterSnapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - return pipeline_response + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return AsyncItemPaged(get_next, extract_data) + if cls: + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={"2026-02-02-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2026-02-02-preview"], - ) - def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedClusterSnapshot"]: - """Gets a list of managed cluster snapshots in the specified subscription. - - :return: An iterator like instance of ManagedClusterSnapshot + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.MaintenanceConfiguration"]: + """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 + :return: An iterator like instance of MaintenanceConfiguration :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9201,7 +5116,9 @@ def list(self, **kwargs: Any) -> AsyncItemPaged["_models.ManagedClusterSnapshot" def prepare_request(next_link=None): if not next_link: - _request = build_managed_cluster_snapshots_list_request( + _request = build_maintenance_configurations_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9239,7 +5156,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ManagedClusterSnapshot], + List[_models.MaintenanceConfiguration], deserialized.get("value", []), ) if cls: @@ -9268,14 +5185,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class TrustedAccessRoleBindingsOperations: +class ManagedNamespacesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`trusted_access_role_bindings` attribute. + :attr:`managed_namespaces` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -9287,20 +5204,19 @@ def __init__(self, *args, **kwargs) -> None: @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. + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.ManagedNamespace: + """Gets the specified namespace 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 trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -9314,12 +5230,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_get_request( + _request = build_managed_namespaces_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9354,7 +5270,7 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -9365,8 +5281,8 @@ async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -9385,15 +5301,15 @@ async def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(trusted_access_role_binding, (IOBase, bytes)): - _content = trusted_access_role_binding + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_trusted_access_role_bindings_create_or_update_request( + _request = build_managed_namespaces_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -9435,190 +5351,383 @@ async def _create_or_update_initial( deserialized = response.iter_bytes() if _decompress else response.iter_raw() - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: _models.ManagedNamespace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. + + :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Is one of the following types: + ManagedNamespace, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = 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, + managed_namespace_name=managed_namespace_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + await raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedNamespace, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - return deserialized # type: ignore + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller[_models.ManagedNamespace].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.ManagedNamespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _models.TrustedAccessRoleBinding, + managed_namespace_name: str, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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.models.TrustedAccessRoleBinding + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: JSON, + managed_namespace_name: str, + parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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: JSON + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: IO[bytes], + managed_namespace_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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[bytes] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], + managed_namespace_name: str, + parameters: Union[_models.TagsObject, JSON, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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 one of the following - types: TrustedAccessRoleBinding, JSON, IO[bytes] Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding - or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is one of the following types: TagsObject, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 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 = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TrustedAccessRoleBinding] = 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, - trusted_access_role_binding_name=trusted_access_role_binding_name, - trusted_access_role_binding=trusted_access_role_binding, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_managed_namespaces_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.TrustedAccessRoleBinding]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore async def _delete_initial( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9633,10 +5742,10 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_delete_request( + _request = build_managed_namespaces_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9684,17 +5793,17 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Delete a trusted access role binding. + """Deletes a namespace. :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -9710,7 +5819,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -9745,25 +5854,25 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def list( + def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.TrustedAccessRoleBinding"]: - """List trusted access role bindings. + ) -> AsyncItemPaged["_models.ManagedNamespace"]: + """Gets a list of managed namespaces 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 - :return: An iterator like instance of TrustedAccessRoleBinding + :return: An iterator like instance of ManagedNamespace :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -9776,7 +5885,7 @@ def list( def prepare_request(next_link=None): if not next_link: - _request = build_trusted_access_role_bindings_list_request( + _request = build_managed_namespaces_list_by_managed_cluster_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -9816,7 +5925,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.TrustedAccessRoleBinding], + List[_models.ManagedNamespace], deserialized.get("value", []), ) if cls: @@ -9844,53 +5953,21 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - -class LoadBalancersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`load_balancers` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def get( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> _models.LoadBalancer: - """Gets the specified load balancer. + async def list_credential( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -9904,12 +5981,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - _request = build_load_balancers_get_request( + _request = build_managed_namespaces_list_credential_request( resource_group_name=resource_group_name, resource_name=resource_name, - load_balancer_name=load_balancer_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -9944,141 +6021,48 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.LoadBalancer, response.json()) + deserialized = _deserialize(_models.CredentialResults, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: _models.LoadBalancer, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ +class MachinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - @overload - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s + :attr:`machines` attribute. + """ - :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + async def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any + ) -> _models.Machine: + """Get a specific machine in the specified 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Is one of the following types: - LoadBalancer, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or JSON or IO[bytes] - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :return: Machine. The Machine is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Machine :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -10089,27 +6073,18 @@ async def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) - _request = build_load_balancers_create_or_update_request( + _request = build_machines_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - load_balancer_name=load_balancer_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -10126,7 +6101,7 @@ async def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: await response.read() # Load the body in memory and close the socket @@ -10142,193 +6117,34 @@ async def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.LoadBalancer, response.json()) + deserialized = _deserialize(_models.Machine, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_load_balancers_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - load_balancer_name=load_balancer_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_delete( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a load balancer 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - load_balancer_name=load_balancer_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.LoadBalancer"]: - """Gets a list of load balancers in the specified managed cluster. + def list( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> AsyncItemPaged["_models.Machine"]: + """Gets a list of machines in the specified 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 - :return: An iterator like instance of LoadBalancer - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An iterator like instance of Machine + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.LoadBalancer]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10341,9 +6157,10 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_by_managed_cluster_request( + _request = build_machines_list_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=self._config.api_version, headers=_headers, @@ -10381,7 +6198,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.LoadBalancer], + List[_models.Machine], deserialized.get("value", []), ) if cls: @@ -10410,14 +6227,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class IdentityBindingsOperations: +class PrivateEndpointConnectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`identity_bindings` attribute. + :attr:`private_endpoint_connections` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -10428,34 +6245,25 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def get( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. + 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -10469,12 +6277,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - _request = build_identity_bindings_get_request( + _request = build_private_endpoint_connections_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -10509,310 +6317,203 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, JSON, IO[bytes]], - **kwargs: Any - ) -> AsyncIterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_identity_bindings_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _models.IdentityBinding, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding + :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.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + private_endpoint_connection_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. + :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: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + private_endpoint_connection_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. + :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[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_create_or_update( + async def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, JSON, IO[bytes]], + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Is one of the following types: - IdentityBinding, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :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 one of the following types: + PrivateEndpointConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or JSON or + IO[bytes] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 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 = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityBinding] = 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, - identity_binding_name=identity_binding_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.IdentityBinding, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_private_endpoint_connections_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, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.IdentityBinding].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.IdentityBinding]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -10827,10 +6528,10 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_identity_bindings_delete_request( + _request = build_private_endpoint_connections_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -10849,7 +6550,7 @@ async def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 204]: try: await response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -10862,11 +6563,10 @@ async def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: + if response.status_code == 200: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -10877,31 +6577,18 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def begin_delete( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes an identity binding in the specified managed cluster. + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -10917,7 +6604,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -10951,34 +6638,26 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( + @distributed_trace_async + async def list( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. + ) -> _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 - :return: An iterator like instance of IdentityBinding - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) - error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10987,86 +6666,64 @@ def list_by_managed_cluster( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_identity_bindings_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - return _request + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.IdentityBinding], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - async def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return AsyncItemPaged(get_next, extract_data) + return deserialized # type: ignore -class JWTAuthenticatorsOperations: +class SnapshotsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`jwt_authenticators` attribute. + :attr:`snapshots` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -11077,117 +6734,178 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def get( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> _models.JWTAuthenticator: - """Gets the specified JWT authenticator of a managed cluster. + async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.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 + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + + _request = build_snapshots_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @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. + + :param resource_group_name: The name of the resource group. The name 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.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: JWTAuthenticator. The JWTAuthenticator is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator + :param parameters: The snapshot to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) - - _request = build_jwt_authenticators_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.JWTAuthenticator, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _create_or_update_initial( + @distributed_trace_async + async def create_or_update( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, JSON, IO[bytes]], + parameters: Union[_models.Snapshot, JSON, IO[bytes]], **kwargs: Any - ) -> AsyncIterator[bytes]: + ) -> _models.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 one of the following types: Snapshot, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot or JSON or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -11200,7 +6918,7 @@ async def _create_or_update_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -11209,10 +6927,9 @@ async def _create_or_update_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_jwt_authenticators_create_or_update_request( + _request = build_snapshots_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -11226,7 +6943,7 @@ async def _create_or_update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -11234,10 +6951,11 @@ async def _create_or_update_initial( response = pipeline_response.http_response if response.status_code not in [200, 201]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -11245,229 +6963,199 @@ async def _create_or_update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload - async def begin_create_or_update( + async def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: _models.JWTAuthenticator, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_or_update( + async def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_create_or_update( + async def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, JSON, IO[bytes]], + parameters: Union[_models.TagsObject, JSON, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Is one of the following types: - JWTAuthenticator, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is one of the + following types: TagsObject, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 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 = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JWTAuthenticator] = 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, - jwt_authenticator_name=jwt_authenticator_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.JWTAuthenticator, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_snapshots_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + await response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.JWTAuthenticator].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.JWTAuthenticator]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.Snapshot, response.json()) - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def _delete_initial( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> AsyncIterator[bytes]: + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def delete(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> None: + """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 + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -11479,12 +7167,11 @@ async def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_jwt_authenticators_delete_request( + _request = build_snapshots_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11495,19 +7182,14 @@ async def _delete_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -11515,123 +7197,115 @@ async def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + return cls(pipeline_response, None, {}) # type: ignore - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def begin_delete( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a JWT authenticator and updates the managed cluster to apply the settings. + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: + """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 - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: An instance of AsyncLROPoller that returns None - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - await raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } + error_map.update(kwargs.pop("error_map", {}) or {}) - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Snapshot], + deserialized.get("value", []), ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.JWTAuthenticator"]: - """Gets a list of JWT authenticators in the specified managed cluster. + def list(self, **kwargs: Any) -> AsyncItemPaged["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of JWTAuthenticator - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.JWTAuthenticator]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -11644,9 +7318,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_jwt_authenticators_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_snapshots_list_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11684,7 +7356,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.JWTAuthenticator], + List[_models.Snapshot], deserialized.get("value", []), ) if cls: @@ -11713,14 +7385,14 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) -class MeshMembershipsOperations: +class TrustedAccessRoleBindingsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`mesh_memberships` attribute. + :attr:`trusted_access_role_bindings` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -11731,34 +7403,21 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def get( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any - ) -> _models.MeshMembership: - """Gets the mesh membership of a managed cluster. + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: MeshMembership. The MeshMembership is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshMembership + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11772,12 +7431,12 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) - _request = build_mesh_memberships_get_request( + _request = build_trusted_access_role_bindings_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11812,34 +7471,19 @@ async def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MeshMembership, response.json()) + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, JSON, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -11858,15 +7502,15 @@ async def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(trusted_access_role_binding, (IOBase, bytes)): + _content = trusted_access_role_binding else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mesh_memberships_create_or_update_request( + _request = build_trusted_access_role_bindings_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -11918,29 +7562,30 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: _models.MeshMembership, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership + :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.models.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -11949,29 +7594,30 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: JSON, + trusted_access_role_binding_name: str, + trusted_access_role_binding: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: JSON + :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: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -11980,78 +7626,66 @@ async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: IO[bytes], + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: IO[bytes] + :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[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, JSON, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Is one of the following types: - MeshMembership, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or JSON or IO[bytes] - :return: An instance of AsyncLROPoller that returns MeshMembership. The MeshMembership is - compatible with MutableMapping - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :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 one of the following + types: TrustedAccessRoleBinding, JSON, IO[bytes] Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + or JSON or IO[bytes] + :return: An instance of AsyncLROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = 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) @@ -12059,8 +7693,8 @@ async def begin_create_or_update( raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - parameters=parameters, + trusted_access_role_binding_name=trusted_access_role_binding_name, + trusted_access_role_binding=trusted_access_role_binding, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -12072,7 +7706,7 @@ async def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.MeshMembership, response.json()) + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -12090,31 +7724,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return AsyncLROPoller[_models.MeshMembership].from_continuation_token( + return AsyncLROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return AsyncLROPoller[_models.MeshMembership]( + return AsyncLROPoller[_models.TrustedAccessRoleBinding]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def _delete_initial( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -12129,10 +7750,10 @@ async def _delete_initial( cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_mesh_memberships_delete_request( + _request = build_trusted_access_role_bindings_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -12179,31 +7800,18 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) async def begin_delete( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the mesh membership of a managed cluster. + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str :return: An instance of AsyncLROPoller that returns None :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -12219,7 +7827,7 @@ async def begin_delete( raw_result = await self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -12254,32 +7862,25 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( + def list( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshMembership"]: - """Lists mesh memberships in a managed cluster. + ) -> AsyncItemPaged["_models.TrustedAccessRoleBinding"]: + """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 - :return: An iterator like instance of MeshMembership + :return: An iterator like instance of TrustedAccessRoleBinding :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshMembership] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshMembership]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -12292,7 +7893,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_mesh_memberships_list_by_managed_cluster_request( + _request = build_trusted_access_role_bindings_list_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -12332,7 +7933,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshMembership], + List[_models.TrustedAccessRoleBinding], deserialized.get("value", []), ) if cls: @@ -12437,343 +8038,36 @@ def prepare_request(next_link=None): return _request - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OperationValue], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class OperationStatusResultOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`operation_status_result` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "operation_id", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def get_by_agent_pool( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, operation_id: str, **kwargs: Any - ) -> _models.OperationStatusResult: - """Get the status of a specific operation in the specified 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 - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_operation_status_result_get_by_agent_pool_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.OperationStatusResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.OperationStatusResult"]: - """Gets a list of operations in the specified managedCluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of OperationStatusResult - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_operation_status_result_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OperationStatusResult], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace_async - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "operation_id", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - async def get( - self, resource_group_name: str, resource_name: str, operation_id: str, **kwargs: Any - ) -> _models.OperationStatusResult: - """Get the status of a specific operation 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 operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_operation_status_result_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + async def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationValue], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - response = pipeline_response.http_response + async def get_next(next_link=None): + _request = prepare_request(next_link) - if response.status_code not in [200]: - if _stream: - try: - await response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return AsyncItemPaged(get_next, extract_data) class PrivateLinkResourcesOperations: @@ -13169,241 +8463,3 @@ async def get_next(next_link=None): return pipeline_response return AsyncItemPaged(get_next, extract_data) - - -class ContainerServiceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`container_service` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_node_image_versions(self, location: str, **kwargs: Any) -> AsyncItemPaged["_models.NodeImageVersion"]: - """Gets a list of supported NodeImage versions in the specified subscription. - - Only returns the latest version of each node image. For example there may be an - AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is - visible in this list. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of NodeImageVersion - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.NodeImageVersion]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_container_service_list_node_image_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.NodeImageVersion], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - -class VmSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.aio.ContainerServiceClient`'s - :attr:`vm_skus` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, location: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.ResourceSku"]: - """Gets the list of VM SKUs accepted by AKS. - - Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS - will perform a best effort approach to provision the requested VM SKUs, but availability is not - guaranteed. - - :param location: The name of the Azure region. Required. - :type location: str - :keyword include_extended_locations: To Include Extended Locations information or not in the - response. Default value is None. - :paramtype include_extended_locations: bool - :return: An iterator like instance of ResourceSku - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ResourceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ResourceSku]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_vm_skus_list_request( - location=location, - subscription_id=self._config.subscription_id, - include_extended_locations=include_extended_locations, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - async def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ResourceSku], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py index 847622d253f7..69f76edc40a0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/__init__.py @@ -26,12 +26,10 @@ AgentPoolAvailableVersions, AgentPoolAvailableVersionsProperties, AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, - AgentPoolBlueGreenUpgradeSettings, AgentPoolDeleteMachinesParameter, AgentPoolGatewayProfile, AgentPoolManagedClusterAgentPoolProfileProperties, AgentPoolNetworkProfile, - AgentPoolRecentlyUsedVersion, AgentPoolSecurityProfile, AgentPoolStatus, AgentPoolUpgradeProfile, @@ -39,17 +37,12 @@ AgentPoolUpgradeProfilePropertiesUpgradesItem, AgentPoolUpgradeSettings, AgentPoolWindowsProfile, - AutoScaleProfile, AzureKeyVaultKms, ClusterUpgradeSettings, CommandResultProperties, CompatibleVersions, - Component, - ComponentsByRelease, ContainerServiceLinuxProfile, ContainerServiceNetworkProfile, - ContainerServiceNetworkProfileKubeProxyConfig, - ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, CreationData, @@ -65,50 +58,25 @@ ErrorResponse, ExtendedLocation, GPUProfile, - GuardrailsAvailableVersion, - GuardrailsAvailableVersionsProperties, IPTag, - IdentityBinding, - IdentityBindingManagedIdentityProfile, - IdentityBindingOidcIssuerProfile, - IdentityBindingProperties, IstioCertificateAuthority, IstioComponents, IstioEgressGateway, IstioIngressGateway, IstioPluginCertificateAuthority, IstioServiceMesh, - JWTAuthenticator, - JWTAuthenticatorClaimMappingExpression, - JWTAuthenticatorClaimMappings, - JWTAuthenticatorExtraClaimMappingExpression, - JWTAuthenticatorIssuer, - JWTAuthenticatorProperties, - JWTAuthenticatorValidationRule, KubeletConfig, KubernetesPatchVersion, - KubernetesResourceObjectEncryptionProfile, KubernetesVersion, KubernetesVersionCapabilities, KubernetesVersionListResult, - LabelSelector, - LabelSelectorRequirement, LinuxOSConfig, - LoadBalancer, - LoadBalancerProperties, LocalDNSOverride, LocalDNSProfile, Machine, - MachineBillingProfile, - MachineHardwareProfile, MachineIpAddress, - MachineKubernetesProfile, MachineNetworkProperties, - MachineOSProfile, - MachineOSProfileLinuxProfile, MachineProperties, - MachineSecurityProfile, - MachineStatus, MaintenanceConfiguration, MaintenanceConfigurationProperties, MaintenanceWindow, @@ -126,22 +94,14 @@ ManagedClusterAzureMonitorProfile, ManagedClusterAzureMonitorProfileAppMonitoring, ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation, - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces, - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics, - ManagedClusterAzureMonitorProfileContainerInsights, ManagedClusterAzureMonitorProfileKubeStateMetrics, ManagedClusterAzureMonitorProfileMetrics, - ManagedClusterAzureMonitorProfileMetricsControlPlane, ManagedClusterBootstrapProfile, - ManagedClusterControlPlaneScalingProfile, ManagedClusterCostAnalysis, ManagedClusterHTTPProxyConfig, - ManagedClusterHealthMonitorProfile, ManagedClusterHostedSystemProfile, ManagedClusterIdentity, - ManagedClusterIngressDefaultDomainProfile, ManagedClusterIngressProfile, - ManagedClusterIngressProfileApplicationLoadBalancer, ManagedClusterIngressProfileGatewayConfiguration, ManagedClusterIngressProfileNginx, ManagedClusterIngressProfileWebAppRouting, @@ -152,8 +112,6 @@ ManagedClusterManagedOutboundIPProfile, ManagedClusterMetricsProfile, ManagedClusterNATGatewayProfile, - ManagedClusterNATGatewayProfileOutboundIPs, - ManagedClusterNATGatewayProfileOutboundIpPrefixes, ManagedClusterNodeProvisioningProfile, ManagedClusterNodeResourceGroupProfile, ManagedClusterOIDCIssuerProfile, @@ -167,20 +125,13 @@ ManagedClusterPoolUpgradeProfileUpgradesItem, ManagedClusterProperties, ManagedClusterPropertiesAutoScalerProfile, - ManagedClusterPropertiesForSnapshot, ManagedClusterSKU, ManagedClusterSecurityProfile, ManagedClusterSecurityProfileDefender, - ManagedClusterSecurityProfileDefenderSecurityGating, - ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem, ManagedClusterSecurityProfileDefenderSecurityMonitoring, ManagedClusterSecurityProfileImageCleaner, - ManagedClusterSecurityProfileImageIntegrity, - ManagedClusterSecurityProfileNodeRestriction, ManagedClusterSecurityProfileWorkloadIdentity, ManagedClusterServicePrincipalProfile, - ManagedClusterSnapshot, - ManagedClusterSnapshotProperties, ManagedClusterStaticEgressGatewayProfile, ManagedClusterStatus, ManagedClusterStorageProfile, @@ -198,9 +149,6 @@ ManagedNamespace, ManagedServiceIdentityUserAssignedIdentitiesValue, ManualScaleProfile, - MeshMembership, - MeshMembershipPrivateConnectProfile, - MeshMembershipProperties, MeshRevision, MeshRevisionProfile, MeshRevisionProfileProperties, @@ -208,16 +156,11 @@ MeshUpgradeProfileProperties, NamespaceProperties, NetworkPolicies, - NetworkProfileForSnapshot, - NodeImageVersion, - NvidiaGPUProfile, - OperationStatusResult, OperationValue, OperationValueDisplay, OutboundEnvironmentEndpoint, PortRange, PowerState, - PreparedImageSpecificationProfile, PrivateEndpoint, PrivateEndpointConnection, PrivateEndpointConnectionListResult, @@ -226,29 +169,14 @@ PrivateLinkResourcesListResult, PrivateLinkServiceConnectionState, ProxyResource, - RebalanceLoadBalancersRequestBody, RelativeMonthlySchedule, Resource, ResourceQuota, ResourceReference, - ResourceSku, - ResourceSkuCapabilities, - ResourceSkuCapacity, - ResourceSkuCosts, - ResourceSkuLocationInfo, - ResourceSkuRestrictionInfo, - ResourceSkuRestrictions, - ResourceSkuZoneDetails, RunCommandRequest, RunCommandResult, - SafeguardsAvailableVersion, - SafeguardsAvailableVersionsProperties, ScaleProfile, Schedule, - SchedulerInstanceProfile, - SchedulerProfile, - SchedulerProfileSchedulerInstanceProfiles, - ServiceAccountImagePullProfile, ServiceMeshProfile, Snapshot, SnapshotProperties, @@ -272,7 +200,6 @@ from ._enums import ( # type: ignore AccelerationMode, - AddonAutoscaling, AdoptionPolicy, AdvancedNetworkPolicies, AgentPoolMode, @@ -280,28 +207,18 @@ AgentPoolType, ArtifactSource, BackendPoolType, - ClusterServiceLoadBalancerHealthProbeMode, Code, ConnectionStatus, - ContainerNetworkLogs, - ControlPlaneScalingSize, CreatedByType, DeletePolicy, - DriftAction, - DriverType, Expander, ExtendedLocationTypes, Format, GPUDriver, GPUInstanceProfile, GatewayAPIIstioEnabled, - GuardrailsSupport, IPFamily, - IdentityBindingProvisioningState, - InfrastructureEncryption, - IpvsScheduler, IstioIngressGatewayMode, - JWTAuthenticatorProvisioningState, KeyVaultNetworkAccessTypes, KubeletDiskType, KubernetesSupportPlan, @@ -318,10 +235,6 @@ ManagedClusterSKUName, ManagedClusterSKUTier, ManagedGatewayType, - ManagementMode, - MeshMembershipProvisioningState, - MigStrategy, - Mode, NamespaceProvisioningState, NetworkDataplane, NetworkMode, @@ -335,26 +248,18 @@ OSDiskType, OSSKU, OSType, - Operator, OutboundType, PodIPAllocationMode, - PodLinkLocalAccess, PolicyRule, PrivateEndpointConnectionProvisioningState, Protocol, ProxyRedirectionMechanism, PublicNetworkAccess, ResourceIdentityType, - ResourceSkuCapacityScaleType, - ResourceSkuRestrictionsReasonCode, - ResourceSkuRestrictionsType, RestrictionLevel, - SafeguardsSupport, ScaleDownMode, ScaleSetEvictionPolicy, ScaleSetPriority, - SchedulerConfigMode, - SeccompDefault, ServiceMeshMode, SnapshotType, TransitEncryptionType, @@ -362,8 +267,6 @@ Type, UndrainableNodeBehavior, UpgradeChannel, - UpgradeStrategy, - VmState, WeekDay, WorkloadRuntime, ) @@ -384,12 +287,10 @@ "AgentPoolAvailableVersions", "AgentPoolAvailableVersionsProperties", "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", - "AgentPoolBlueGreenUpgradeSettings", "AgentPoolDeleteMachinesParameter", "AgentPoolGatewayProfile", "AgentPoolManagedClusterAgentPoolProfileProperties", "AgentPoolNetworkProfile", - "AgentPoolRecentlyUsedVersion", "AgentPoolSecurityProfile", "AgentPoolStatus", "AgentPoolUpgradeProfile", @@ -397,17 +298,12 @@ "AgentPoolUpgradeProfilePropertiesUpgradesItem", "AgentPoolUpgradeSettings", "AgentPoolWindowsProfile", - "AutoScaleProfile", "AzureKeyVaultKms", "ClusterUpgradeSettings", "CommandResultProperties", "CompatibleVersions", - "Component", - "ComponentsByRelease", "ContainerServiceLinuxProfile", "ContainerServiceNetworkProfile", - "ContainerServiceNetworkProfileKubeProxyConfig", - "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", "ContainerServiceSshConfiguration", "ContainerServiceSshPublicKey", "CreationData", @@ -423,50 +319,25 @@ "ErrorResponse", "ExtendedLocation", "GPUProfile", - "GuardrailsAvailableVersion", - "GuardrailsAvailableVersionsProperties", "IPTag", - "IdentityBinding", - "IdentityBindingManagedIdentityProfile", - "IdentityBindingOidcIssuerProfile", - "IdentityBindingProperties", "IstioCertificateAuthority", "IstioComponents", "IstioEgressGateway", "IstioIngressGateway", "IstioPluginCertificateAuthority", "IstioServiceMesh", - "JWTAuthenticator", - "JWTAuthenticatorClaimMappingExpression", - "JWTAuthenticatorClaimMappings", - "JWTAuthenticatorExtraClaimMappingExpression", - "JWTAuthenticatorIssuer", - "JWTAuthenticatorProperties", - "JWTAuthenticatorValidationRule", "KubeletConfig", "KubernetesPatchVersion", - "KubernetesResourceObjectEncryptionProfile", "KubernetesVersion", "KubernetesVersionCapabilities", "KubernetesVersionListResult", - "LabelSelector", - "LabelSelectorRequirement", "LinuxOSConfig", - "LoadBalancer", - "LoadBalancerProperties", "LocalDNSOverride", "LocalDNSProfile", "Machine", - "MachineBillingProfile", - "MachineHardwareProfile", "MachineIpAddress", - "MachineKubernetesProfile", "MachineNetworkProperties", - "MachineOSProfile", - "MachineOSProfileLinuxProfile", "MachineProperties", - "MachineSecurityProfile", - "MachineStatus", "MaintenanceConfiguration", "MaintenanceConfigurationProperties", "MaintenanceWindow", @@ -484,22 +355,14 @@ "ManagedClusterAzureMonitorProfile", "ManagedClusterAzureMonitorProfileAppMonitoring", "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", - "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces", - "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", - "ManagedClusterAzureMonitorProfileContainerInsights", "ManagedClusterAzureMonitorProfileKubeStateMetrics", "ManagedClusterAzureMonitorProfileMetrics", - "ManagedClusterAzureMonitorProfileMetricsControlPlane", "ManagedClusterBootstrapProfile", - "ManagedClusterControlPlaneScalingProfile", "ManagedClusterCostAnalysis", "ManagedClusterHTTPProxyConfig", - "ManagedClusterHealthMonitorProfile", "ManagedClusterHostedSystemProfile", "ManagedClusterIdentity", - "ManagedClusterIngressDefaultDomainProfile", "ManagedClusterIngressProfile", - "ManagedClusterIngressProfileApplicationLoadBalancer", "ManagedClusterIngressProfileGatewayConfiguration", "ManagedClusterIngressProfileNginx", "ManagedClusterIngressProfileWebAppRouting", @@ -510,8 +373,6 @@ "ManagedClusterManagedOutboundIPProfile", "ManagedClusterMetricsProfile", "ManagedClusterNATGatewayProfile", - "ManagedClusterNATGatewayProfileOutboundIPs", - "ManagedClusterNATGatewayProfileOutboundIpPrefixes", "ManagedClusterNodeProvisioningProfile", "ManagedClusterNodeResourceGroupProfile", "ManagedClusterOIDCIssuerProfile", @@ -525,20 +386,13 @@ "ManagedClusterPoolUpgradeProfileUpgradesItem", "ManagedClusterProperties", "ManagedClusterPropertiesAutoScalerProfile", - "ManagedClusterPropertiesForSnapshot", "ManagedClusterSKU", "ManagedClusterSecurityProfile", "ManagedClusterSecurityProfileDefender", - "ManagedClusterSecurityProfileDefenderSecurityGating", - "ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem", "ManagedClusterSecurityProfileDefenderSecurityMonitoring", "ManagedClusterSecurityProfileImageCleaner", - "ManagedClusterSecurityProfileImageIntegrity", - "ManagedClusterSecurityProfileNodeRestriction", "ManagedClusterSecurityProfileWorkloadIdentity", "ManagedClusterServicePrincipalProfile", - "ManagedClusterSnapshot", - "ManagedClusterSnapshotProperties", "ManagedClusterStaticEgressGatewayProfile", "ManagedClusterStatus", "ManagedClusterStorageProfile", @@ -556,9 +410,6 @@ "ManagedNamespace", "ManagedServiceIdentityUserAssignedIdentitiesValue", "ManualScaleProfile", - "MeshMembership", - "MeshMembershipPrivateConnectProfile", - "MeshMembershipProperties", "MeshRevision", "MeshRevisionProfile", "MeshRevisionProfileProperties", @@ -566,16 +417,11 @@ "MeshUpgradeProfileProperties", "NamespaceProperties", "NetworkPolicies", - "NetworkProfileForSnapshot", - "NodeImageVersion", - "NvidiaGPUProfile", - "OperationStatusResult", "OperationValue", "OperationValueDisplay", "OutboundEnvironmentEndpoint", "PortRange", "PowerState", - "PreparedImageSpecificationProfile", "PrivateEndpoint", "PrivateEndpointConnection", "PrivateEndpointConnectionListResult", @@ -584,29 +430,14 @@ "PrivateLinkResourcesListResult", "PrivateLinkServiceConnectionState", "ProxyResource", - "RebalanceLoadBalancersRequestBody", "RelativeMonthlySchedule", "Resource", "ResourceQuota", "ResourceReference", - "ResourceSku", - "ResourceSkuCapabilities", - "ResourceSkuCapacity", - "ResourceSkuCosts", - "ResourceSkuLocationInfo", - "ResourceSkuRestrictionInfo", - "ResourceSkuRestrictions", - "ResourceSkuZoneDetails", "RunCommandRequest", "RunCommandResult", - "SafeguardsAvailableVersion", - "SafeguardsAvailableVersionsProperties", "ScaleProfile", "Schedule", - "SchedulerInstanceProfile", - "SchedulerProfile", - "SchedulerProfileSchedulerInstanceProfiles", - "ServiceAccountImagePullProfile", "ServiceMeshProfile", "Snapshot", "SnapshotProperties", @@ -627,7 +458,6 @@ "WeeklySchedule", "WindowsGmsaProfile", "AccelerationMode", - "AddonAutoscaling", "AdoptionPolicy", "AdvancedNetworkPolicies", "AgentPoolMode", @@ -635,28 +465,18 @@ "AgentPoolType", "ArtifactSource", "BackendPoolType", - "ClusterServiceLoadBalancerHealthProbeMode", "Code", "ConnectionStatus", - "ContainerNetworkLogs", - "ControlPlaneScalingSize", "CreatedByType", "DeletePolicy", - "DriftAction", - "DriverType", "Expander", "ExtendedLocationTypes", "Format", "GPUDriver", "GPUInstanceProfile", "GatewayAPIIstioEnabled", - "GuardrailsSupport", "IPFamily", - "IdentityBindingProvisioningState", - "InfrastructureEncryption", - "IpvsScheduler", "IstioIngressGatewayMode", - "JWTAuthenticatorProvisioningState", "KeyVaultNetworkAccessTypes", "KubeletDiskType", "KubernetesSupportPlan", @@ -673,10 +493,6 @@ "ManagedClusterSKUName", "ManagedClusterSKUTier", "ManagedGatewayType", - "ManagementMode", - "MeshMembershipProvisioningState", - "MigStrategy", - "Mode", "NamespaceProvisioningState", "NetworkDataplane", "NetworkMode", @@ -690,26 +506,18 @@ "OSDiskType", "OSSKU", "OSType", - "Operator", "OutboundType", "PodIPAllocationMode", - "PodLinkLocalAccess", "PolicyRule", "PrivateEndpointConnectionProvisioningState", "Protocol", "ProxyRedirectionMechanism", "PublicNetworkAccess", "ResourceIdentityType", - "ResourceSkuCapacityScaleType", - "ResourceSkuRestrictionsReasonCode", - "ResourceSkuRestrictionsType", "RestrictionLevel", - "SafeguardsSupport", "ScaleDownMode", "ScaleSetEvictionPolicy", "ScaleSetPriority", - "SchedulerConfigMode", - "SeccompDefault", "ServiceMeshMode", "SnapshotType", "TransitEncryptionType", @@ -717,8 +525,6 @@ "Type", "UndrainableNodeBehavior", "UpgradeChannel", - "UpgradeStrategy", - "VmState", "WeekDay", "WorkloadRuntime", ] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py index 5d69242dfd0c..444a3c5355a9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_enums.py @@ -25,16 +25,6 @@ class AccelerationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Disable acceleration options.""" -class AddonAutoscaling(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether VPA add-on is enabled and configured to scale AKS-managed add-ons.""" - - ENABLED = "Enabled" - """Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial - mode.""" - DISABLED = "Disabled" - """Feature to autoscale AKS-managed add-ons is disabled.""" - - class AdoptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Action if Kubernetes namespace with same name already exists.""" @@ -81,15 +71,6 @@ class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): GATEWAY = "Gateway" """Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see `https://aka.ms/aks/static-egress-gateway `_.""" - MANAGED_SYSTEM = "ManagedSystem" - """ManagedSystem is a system pool managed by AKS. The pool scales dynamically according to cluster - usage, and has additional automated monitoring and healing capabilities. There can only be one - ManagedSystem pool, and it is recommended to delete all other system pools for the best - experience.""" - MACHINES = "Machines" - """Machines agent pools are dedicated to hosting machines. Only limited operations, such as - creation and deletion, are allowed at the pool level. Please use the machine APIs to manage the - full machine lifecycle.""" class AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -99,9 +80,6 @@ class AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Can SSH onto the node as a local user using private key.""" DISABLED = "Disabled" """SSH service will be turned off on the node.""" - ENTRA_ID = "EntraId" - """SSH to node with EntraId integration. More information can be found under - `https://aka.ms/aks/ssh/aad `_.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -137,19 +115,6 @@ class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_.""" -class ClusterServiceLoadBalancerHealthProbeMode( # pylint: disable=name-too-long - str, Enum, metaclass=CaseInsensitiveEnumMeta -): - """The health probing behavior for External Traffic Policy Cluster services.""" - - SERVICE_NODE_PORT = "ServiceNodePort" - """Each External Traffic Policy Cluster service will have its own health probe targeting service - nodePort.""" - SHARED = "Shared" - """All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated - health probe targeting the backend nodes' kube-proxy health check port 10256.""" - - class Code(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Tells whether the cluster is Running or Stopped.""" @@ -172,38 +137,6 @@ class ConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Connection is disconnected.""" -class ContainerNetworkLogs(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Configures container network logs ingestion with Azure Monitor. Which network logs to ingest is - controlled by the CRD found in the following links. No network logs are ingested by default. - More information on container network logs can be found at - `https://aka.ms/ContainerNetworkLogsDoc `_. More - information on configuring container network log can be found at - `https://aka.ms/acns/howtoenablecnl `_. If not specified, - the default is Disabled. - """ - - DISABLED = "Disabled" - """Azure monitor ingestion of container network logs is disabled.""" - ENABLED = "Enabled" - """Azure monitor ingestion of container network logs is enabled.""" - - -class ControlPlaneScalingSize(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable - Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased - performance guarantees. See `https://aka.ms/aks/hyperscale `_ - for performance metrics details for each size. - """ - - H2 = "H2" - """H2 is the smallest scaling size with guaranteed capacity and predictable performance beyond - standard tier defaults.""" - H4 = "H4" - """H4 scaling size provides increased guaranteed performance over H2.""" - H8 = "H8" - """H8 scaling size provides increased guaranteed performance over H4.""" - - class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The kind of entity that created the resource.""" @@ -227,32 +160,6 @@ class DeletePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Delete both the ARM resource and the Kubernetes namespace together.""" -class DriftAction(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The drift action of the machine. Indicates whether a machine has deviated from its expected - state due to changes in managed cluster properties, requiring corrective action. - """ - - SYNCED = "Synced" - """The machine is up to date.""" - RECREATE = "Recreate" - """The machine has drifted and needs to be deleted and recreated.""" - - -class DriverType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specify the type of GPU driver to install when creating Windows agent pools. If not provided, - AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool - has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is - selected based on system compatibility. - """ - - GRID = "GRID" - """Install the GRID driver for the GPU, suitable for applications requiring virtualization - support.""" - CUDA = "CUDA" - """Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing - and data-intensive applications.""" - - class Expander(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The expander to use when scaling up. If not specified, the default is 'random'. See `expanders `_ @@ -327,50 +234,6 @@ class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """MIG 7g GPU instance profile.""" -class GuardrailsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether the version is preview or stable.""" - - PREVIEW = "Preview" - """The version is preview. It is not recommended to use preview versions on critical production - clusters. The preview version may not support all use-cases.""" - STABLE = "Stable" - """The version is stable and can be used on critical production clusters.""" - - -class IdentityBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the last accepted operation.""" - - SUCCEEDED = "Succeeded" - """Resource has been created.""" - FAILED = "Failed" - """Resource creation failed.""" - CANCELED = "Canceled" - """Resource creation was canceled.""" - CREATING = "Creating" - """The identity binding is being created.""" - UPDATING = "Updating" - """The identity binding is being updated.""" - DELETING = "Deleting" - """The identity binding is being deleted.""" - - -class InfrastructureEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. - More information on this can be found under - `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_. - """ - - ENABLED = "Enabled" - """Encryption at rest of Kubernetes resource objects using service-managed keys is enabled. More - information on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_.""" - DISABLED = "Disabled" - """Encryption at rest of Kubernetes resource objects using service-managed keys is disabled. More - information on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_.""" - - class IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): """To determine if address belongs IPv4 or IPv6 family.""" @@ -380,18 +243,6 @@ class IPFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): """IPv6 family.""" -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 IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Mode of an ingress gateway.""" @@ -401,23 +252,6 @@ class IstioIngressGatewayMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The ingress gateway is assigned an internal IP address and cannot is accessed publicly.""" -class JWTAuthenticatorProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the last accepted operation.""" - - SUCCEEDED = "Succeeded" - """Resource has been created.""" - FAILED = "Failed" - """Resource creation failed.""" - CANCELED = "Canceled" - """Resource creation was canceled.""" - CREATING = "Creating" - """The JWT authenticator is being created.""" - UPDATING = "Updating" - """The JWT authenticator is being updated.""" - DELETING = "Deleting" - """The JWT authenticator is being deleted.""" - - class KeyVaultNetworkAccessTypes(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network access of the key vault. Network access of key vault. The possible values are ``Public`` and ``Private``. ``Public`` means the key vault allows public access from all @@ -624,61 +458,6 @@ class ManagedGatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): bundle will be installed for your Kubernetes version.""" -class ManagementMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The Managed GPU experience installs additional components, such as the Data Center GPU Manager - (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is - installed, check out aka.ms/aks/managed-gpu. - """ - - UNMANAGED = "Unmanaged" - """Managed GPU experience is disabled for NVIDIA GPUs.""" - MANAGED = "Managed" - """Managed GPU experience is enabled for NVIDIA GPUs.""" - - -class MeshMembershipProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the last accepted operation.""" - - CANCELED = "Canceled" - """Resource creation was canceled.""" - CREATING = "Creating" - """The Mesh Membership is being created.""" - DELETING = "Deleting" - """The Mesh Membership is being deleted.""" - FAILED = "Failed" - """Resource creation failed.""" - SUCCEEDED = "Succeeded" - """Resource has been created.""" - UPDATING = "Updating" - """The Mesh Membership is being updated.""" - - -class MigStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more - information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, - the default is None. - """ - - NONE = "None" - """Don't set a MIG strategy. If you previously had one set, this will override it and set remove - the set MIG strategy.""" - SINGLE = "Single" - """Set the MIG strategy for managed MIG as single.""" - MIXED = "Mixed" - """Set the MIG strategy for managed MIG as mixed.""" - - -class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES').""" - - IPTABLES = "IPTABLES" - """IPTables proxy mode.""" - IPVS = "IPVS" - """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" - NFTABLES = "NFTABLES" - """NFTables proxy mode. Must be using Kubernetes version >= 1.33.""" - - class NamespaceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The current provisioning state of the namespace.""" @@ -838,19 +617,6 @@ class NodeProvisioningMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): (See aka.ms/aks/nap for more details).""" -class Operator(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """operator represents a key's relationship to a set of values. Valid operators are In and NotIn.""" - - IN = "In" - """The value of the key should be in the given list.""" - NOT_IN = "NotIn" - """The value of the key should not be in the given list.""" - EXISTS = "Exists" - """The value of the key should exist.""" - DOES_NOT_EXIST = "DoesNotExist" - """The value of the key should not exist.""" - - class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults @@ -886,13 +652,6 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): information. For limitations, visit `https://aka.ms/aks/node-images `_. For OS migration guidance, see `https://aka.ms/aks/upgrade-os-version `_.""" - MARINER = "Mariner" - """Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead.""" - FLATCAR = "Flatcar" - """Use Flatcar Container Linux as the OS for node images. Flatcar is a container-optimized, - security-focused Linux OS, with an immutable filesystem and part of the Cloud Native Computing - Foundation (CNCF). For more information about Flatcar Container Linux for AKS, see - aka.ms/aks/flatcar-container-linux-for-aks.""" CBL_MARINER = "CBLMariner" """Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead.""" WINDOWS2019 = "Windows2019" @@ -909,15 +668,17 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Use Windows2025 as the OS for node images. Unsupported for system node pools. Windows2025 supports Windows2022 and Windows 2025 containers; it cannot run Windows2019 containers and vice versa.""" - WINDOWS_ANNUAL = "WindowsAnnual" - """Use Windows Annual Channel version as the OS for node images. Unsupported for system node - pools. Details about supported container images and kubernetes versions under different AKS - Annual Channel versions could be seen in `https://aka.ms/aks/windows-annual-channel-details - `_.""" UBUNTU2404 = "Ubuntu2404" """Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see see `https://aka.ms/aks/supported-ubuntu-versions `_.""" + AZURE_CONTAINER_LINUX = "AzureContainerLinux" + """Use Azure Container Linux as the OS for node images. Azure Container Linux is a + container-optimized, security-focused Linux OS built on Azure Linux, with an immutable + filesystem. ACL is derived from the Flatcar Container Linux project, building on Flatcar's + proven container-first, immutable design, while adding Azure Linux packages, servicing, and + deep integration with the Azure and AKS lifecycle. For more information, see + `https://aka.ms/azurecontainerlinux `_.""" class OSType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -946,8 +707,6 @@ class OutboundType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_.""" MANAGED_NAT_GATEWAY = "managedNATGateway" """The AKS-managed NAT gateway is used for egress.""" - MANAGED_NAT_GATEWAY_V2 = "managedNATGatewayV2" - """The AKS-managed NAT gateway V2 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.""" @@ -976,18 +735,6 @@ class PodIPAllocationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): is better suited to scale with larger subnets of /15 or bigger.""" -class PodLinkLocalAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for - pods with hostNetwork=false. If not specified, the default is 'IMDS'. - """ - - IMDS = "IMDS" - """Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without - restriction.""" - NONE = "None" - """Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS).""" - - class PolicyRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Enum representing different network policy rules.""" @@ -1042,8 +789,6 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """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): @@ -1063,35 +808,6 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Do not use a managed identity for the Managed Cluster, service principal will be used instead.""" -class ResourceSkuCapacityScaleType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The scale type applicable to the sku.""" - - AUTOMATIC = "Automatic" - """Automatic scaling.""" - MANUAL = "Manual" - """Manual scaling.""" - NONE = "None" - """No scaling.""" - - -class ResourceSkuRestrictionsReasonCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The reason for restriction.""" - - QUOTA_ID = "QuotaId" - """Quota ID restriction.""" - NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" - """Not available for subscription.""" - - -class ResourceSkuRestrictionsType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The type of restrictions.""" - - LOCATION = "Location" - """Location restriction.""" - ZONE = "Zone" - """Zone restriction.""" - - class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted'. @@ -1103,16 +819,6 @@ class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Only \\*\\/read RBAC permissions allowed on the managed node resource group.""" -class SafeguardsSupport(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Whether the version is preview or stable.""" - - PREVIEW = "Preview" - """The version is preview. It is not recommended to use preview versions on critical production - clusters. The preview version may not support all use-cases.""" - STABLE = "Stable" - """The version is stable and can be used on critical production clusters.""" - - class ScaleDownMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Describes how VMs are added to or removed from Agent Pools. See `billing states `_. @@ -1149,28 +855,6 @@ class ScaleSetPriority(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Regular VMs will be used.""" -class SchedulerConfigMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The config customization mode for this scheduler instance.""" - - DEFAULT = "Default" - """No config customization. Use default configuration.""" - MANAGED_BY_CRD = "ManagedByCRD" - """Enable config customization. Customer can specify scheduler configuration via a CRD. See - aka.ms/aks/scheduler-crd for details.""" - - -class SeccompDefault(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' - will be used by default. - """ - - UNCONFINED = "Unconfined" - """No seccomp profile is applied, allowing all system calls.""" - RUNTIME_DEFAULT = "RuntimeDefault" - """The default seccomp profile for container runtime is applied, which restricts certain system - calls for enhanced security.""" - - class ServiceMeshMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Mode of the service mesh.""" @@ -1185,8 +869,6 @@ class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): 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 TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1199,9 +881,6 @@ class TransitEncryptionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): `https://docs.cilium.io/en/latest/security/network/encryption-wireguard/ `_ on use cases and implementation details.""" - M_TLS = "mTLS" - """Enables mTLS authentication and encryption for pod-to-pod traffic within the cluster. Refer to - `https://aka.ms/acnsciliummtls `_ for relevant documentation.""" NONE = "None" """Disable Transit encryption.""" @@ -1290,25 +969,6 @@ class UpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.""" -class UpgradeStrategy(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Defines the upgrade strategy for the agent pool. The default is Rolling.""" - - ROLLING = "Rolling" - """Specifies that the agent pool will conduct rolling upgrade. This is the default upgrade - strategy.""" - BLUE_GREEN = "BlueGreen" - """Specifies that the agent pool will conduct blue-green upgrade.""" - - -class VmState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Virtual machine state. Indicates the current state of the underlying virtual machine.""" - - RUNNING = "Running" - """The virtual machine is currently running.""" - DELETED = "Deleted" - """The virtual machine has been deleted by the user or due to spot eviction.""" - - class WeekDay(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The weekday enum.""" @@ -1335,11 +995,6 @@ class WorkloadRuntime(str, Enum, metaclass=CaseInsensitiveEnumMeta): """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. This naming - convention will be deprecated in future releases in favor of KataVmIsolation.""" KATA_VM_ISOLATION = "KataVmIsolation" """Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. 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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py index 20177350e6c1..a1038008c86e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models.py @@ -273,8 +273,8 @@ class AdvancedNetworkingSecurityTransitEncryption(_Model): # pylint: disable=na managed pods will be encrypted when it leaves the node boundary. :ivar type: Configures pod-to-pod encryption. This can be enabled only on Cilium-based - clusters. If not specified, the default value is None. Known values are: "WireGuard", "mTLS", - and "None". + clusters. If not specified, the default value is None. Known values are: "WireGuard" and + "None". :vartype type: str or ~azure.mgmt.containerservice.models.TransitEncryptionType """ @@ -282,7 +282,7 @@ class AdvancedNetworkingSecurityTransitEncryption(_Model): # pylint: disable=na visibility=["read", "create", "update", "delete", "query"] ) """Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not - specified, the default value is None. Known values are: \"WireGuard\", \"mTLS\", and \"None\".""" + specified, the default value is None. Known values are: \"WireGuard\" and \"None\".""" @overload def __init__( @@ -396,10 +396,7 @@ class AgentPool(ProxyResource): "orchestrator_version", "current_orchestrator_version", "node_image_version", - "upgrade_strategy", - "enable_os_disk_full_caching", "upgrade_settings", - "upgrade_settings_blue_green", "provisioning_state", "power_state", "availability_zones", @@ -411,7 +408,6 @@ class AgentPool(ProxyResource): "tags", "node_labels", "node_taints", - "node_initialization_taints", "proximity_placement_group_id", "kubelet_config", "linux_os_config", @@ -432,7 +428,6 @@ class AgentPool(ProxyResource): "virtual_machine_nodes_status", "status", "local_dns_profile", - "prepared_image_specification_profile", ] @overload @@ -638,83 +633,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AgentPoolBlueGreenUpgradeSettings(_Model): - """Settings for blue-green upgrade on an agentpool. - - :ivar drain_batch_size: The number or percentage of nodes to drain in batch during blue-green - upgrade. Must be a non-zero number. 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 number - of blue nodes of the initial upgrade operation. For percentages, fractional nodes are rounded - up. If not specified, the default is 10%. For more information, including best practices, see: - `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - `_. - :vartype drain_batch_size: str - :ivar drain_timeout_in_minutes: The drain timeout for a node, i.e., the amount of time (in - minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time - honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not - specified, the default is 30 minutes. - :vartype drain_timeout_in_minutes: int - :ivar batch_soak_duration_in_minutes: The soak duration after draining a batch of nodes, i.e., - the amount of time (in minutes) to wait after draining a batch of nodes before moving on the - next batch. If not specified, the default is 15 minutes. - :vartype batch_soak_duration_in_minutes: int - :ivar final_soak_duration_in_minutes: The soak duration for a node pool, i.e., the amount of - time (in minutes) to wait after all old nodes are drained before we remove the old nodes. If - not specified, the default is 60 minutes. Only applicable for blue-green upgrade strategy. - :vartype final_soak_duration_in_minutes: int - """ - - drain_batch_size: Optional[str] = rest_field( - name="drainBatchSize", visibility=["read", "create", "update", "delete", "query"] - ) - """The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a - non-zero number. 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 number of blue nodes of the - initial upgrade operation. For percentages, fractional nodes are rounded up. If not specified, - the default is 10%. For more information, including best practices, see: - `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - `_.""" - drain_timeout_in_minutes: Optional[int] = rest_field( - name="drainTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] - ) - """The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods - and graceful termination per node. This eviction wait time honors waiting on pod disruption - budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 - minutes.""" - batch_soak_duration_in_minutes: Optional[int] = rest_field( - name="batchSoakDurationInMinutes", visibility=["read", "create", "update", "delete", "query"] - ) - """The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to - wait after draining a batch of nodes before moving on the next batch. If not specified, the - default is 15 minutes.""" - final_soak_duration_in_minutes: Optional[int] = rest_field( - name="finalSoakDurationInMinutes", visibility=["read", "create", "update", "delete", "query"] - ) - """The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old - nodes are drained before we remove the old nodes. If not specified, the default is 60 minutes. - Only applicable for blue-green upgrade strategy.""" - - @overload - def __init__( - self, - *, - drain_batch_size: Optional[str] = None, - drain_timeout_in_minutes: Optional[int] = None, - batch_soak_duration_in_minutes: Optional[int] = None, - final_soak_duration_in_minutes: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class AgentPoolDeleteMachinesParameter(_Model): """Specifies a list of machine names from the agent pool to be deleted. @@ -817,7 +735,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -846,9 +764,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa :vartype os_type: str or ~azure.mgmt.containerservice.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", "AzureLinux", "AzureLinux3", "Mariner", - "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", - "WindowsAnnual", and "Ubuntu2404". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and + "AzureContainerLinux". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -867,7 +785,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa 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", "User", - "Gateway", "ManagedSystem", and "Machines". + and "Gateway". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -887,19 +805,8 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. - When this feature is enabled, the entire operating system will be locally cached on the - ephemeral OS disk, preventing E17 events caused by network failures. - :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :vartype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -944,14 +851,6 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa :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 node_initialization_taints: Taints added on the nodes during creation that will not be - reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl - call. This field can be modified after node pool is created, but nodes will not be recreated - with new taints until another operation that requires recreation (e.g. node image upgrade) - happens. These taints allow for required configuration to run before the node is ready to - accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl - taint nodes node1 key1=value1:NoSchedule-``. - :vartype node_initialization_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. @@ -1015,10 +914,6 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :ivar prepared_image_specification_profile: Settings to determine the prepared image - specification used to provision nodes in a pool. - :vartype prepared_image_specification_profile: - ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile """ e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) @@ -1057,7 +952,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] ) """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" + \"WasmWasi\", and \"KataVmIsolation\".""" message_of_the_day: Optional[str] = rest_field( name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] ) @@ -1095,9 +990,9 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa ) """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\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", - \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", - \"WindowsAnnual\", and \"Ubuntu2404\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", + \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and + \"AzureContainerLinux\".""" max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) """The maximum number of nodes for auto-scaling.""" min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) @@ -1124,7 +1019,7 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" + \"User\", and \"Gateway\".""" orchestrator_version: Optional[str] = rest_field( name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] ) @@ -1143,30 +1038,12 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.""" - node_image_version: Optional[str] = rest_field( - name="nodeImageVersion", visibility=["read", "create", "update", "delete", "query"] - ) + node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) """The version of node image.""" - upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = rest_field( - name="upgradeStrategy", visibility=["read", "create", "update", "delete", "query"] - ) - """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: - \"Rolling\" and \"BlueGreen\".""" - enable_os_disk_full_caching: Optional[bool] = rest_field( - name="enableOSDiskFullCaching", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the - entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events - caused by network failures.""" upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = rest_field( name="upgradeSettings", visibility=["read", "create", "update", "delete", "query"] ) """Settings for upgrading the agentpool.""" - upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = rest_field( - name="upgradeSettingsBlueGreen", visibility=["read", "create", "update", "delete", "query"] - ) - """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to - BlueGreen.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """The current deployment or provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field( @@ -1225,16 +1102,6 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa ) """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" - node_initialization_taints: Optional[list[str]] = rest_field( - name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] - ) - """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will - not be reconciled by AKS and can be removed with a kubectl call. This field can be modified - after node pool is created, but nodes will not be recreated with new taints until another - operation that requires recreation (e.g. node image upgrade) happens. These taints allow for - required configuration to run before the node is ready to accept workloads, for example - 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 - key1=value1:NoSchedule-``.""" proximity_placement_group_id: Optional[str] = rest_field( name="proximityPlacementGroupID", visibility=["read", "create", "update", "delete", "query"] ) @@ -1332,10 +1199,6 @@ class AgentPoolManagedClusterAgentPoolProfileProperties(_Model): # pylint: disa """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" - prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = rest_field( - name="preparedImageSpecificationProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Settings to determine the prepared image specification used to provision nodes in a pool.""" @overload def __init__( # pylint: disable=too-many-locals @@ -1361,11 +1224,7 @@ def __init__( # pylint: disable=too-many-locals type_properties_type: Optional[Union[str, "_models.AgentPoolType"]] = None, mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, - node_image_version: Optional[str] = None, - upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, - enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, - upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -1376,7 +1235,6 @@ 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, - node_initialization_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, @@ -1397,7 +1255,6 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, ) -> None: ... @overload @@ -1457,50 +1314,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AgentPoolRecentlyUsedVersion(_Model): - """A historical version that can be used for rollback operations. - - :ivar orchestrator_version: The Kubernetes version (major.minor.patch) available for rollback. - :vartype orchestrator_version: str - :ivar node_image_version: The node image version available for rollback. - :vartype node_image_version: str - :ivar timestamp: The timestamp when this version was last used. - :vartype timestamp: ~datetime.datetime - """ - - orchestrator_version: Optional[str] = rest_field( - name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] - ) - """The Kubernetes version (major.minor.patch) available for rollback.""" - node_image_version: Optional[str] = rest_field( - name="nodeImageVersion", visibility=["read", "create", "update", "delete", "query"] - ) - """The node image version available for rollback.""" - timestamp: Optional[datetime.datetime] = rest_field( - visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The timestamp when this version was last used.""" - - @overload - def __init__( - self, - *, - orchestrator_version: Optional[str] = None, - node_image_version: Optional[str] = None, - timestamp: Optional[datetime.datetime] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class AgentPoolSecurityProfile(_Model): """The security settings of an agent pool. @@ -1512,8 +1325,8 @@ class AgentPoolSecurityProfile(_Model): signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. :vartype enable_secure_boot: bool - :ivar ssh_access: SSH access method of an agent pool. Known values are: "LocalUser", - "Disabled", and "EntraId". + :ivar ssh_access: SSH access method of an agent pool. Known values are: "LocalUser" and + "Disabled". :vartype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess """ @@ -1532,8 +1345,7 @@ class AgentPoolSecurityProfile(_Model): ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = rest_field( name="sshAccess", visibility=["read", "create", "update", "delete", "query"] ) - """SSH access method of an agent pool. Known values are: \"LocalUser\", \"Disabled\", and - \"EntraId\".""" + """SSH access method of an agent pool. Known values are: \"LocalUser\" and \"Disabled\".""" @overload def __init__( @@ -1591,14 +1403,7 @@ class AgentPoolUpgradeProfile(ProxyResource): ) """The properties of the agent pool upgrade profile. Required.""" - __flattened_items = [ - "kubernetes_version", - "os_type", - "upgrades", - "components_by_releases", - "recently_used_versions", - "latest_node_image_version", - ] + __flattened_items = ["kubernetes_version", "os_type", "upgrades", "latest_node_image_version"] @overload def __init__( @@ -1647,11 +1452,6 @@ class AgentPoolUpgradeProfileProperties(_Model): :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: list[~azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :ivar components_by_releases: List of components grouped by kubernetes major.minor version. - :vartype components_by_releases: list[~azure.mgmt.containerservice.models.ComponentsByRelease] - :ivar recently_used_versions: List of historical good versions for rollback operations. - :vartype recently_used_versions: - list[~azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion] :ivar latest_node_image_version: The latest AKS supported node image version. :vartype latest_node_image_version: str """ @@ -1669,14 +1469,6 @@ class AgentPoolUpgradeProfileProperties(_Model): visibility=["read", "create", "update", "delete", "query"] ) """List of orchestrator types and versions available for upgrade.""" - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = rest_field( - name="componentsByReleases", visibility=["read", "create", "update", "delete", "query"] - ) - """List of components grouped by kubernetes major.minor version.""" - recently_used_versions: Optional[list["_models.AgentPoolRecentlyUsedVersion"]] = rest_field( - name="recentlyUsedVersions", visibility=["read"] - ) - """List of historical good versions for rollback operations.""" latest_node_image_version: Optional[str] = rest_field( name="latestNodeImageVersion", visibility=["read", "create", "update", "delete", "query"] ) @@ -1689,7 +1481,6 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"], upgrades: Optional[list["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, latest_node_image_version: Optional[str] = None, ) -> None: ... @@ -1711,8 +1502,6 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_Model): # pylint: disable= :vartype kubernetes_version: str :ivar is_preview: Whether the Kubernetes version is currently in preview. :vartype is_preview: bool - :ivar is_out_of_support: Whether the Kubernetes version is out of support. - :vartype is_out_of_support: bool """ kubernetes_version: Optional[str] = rest_field( @@ -1723,10 +1512,6 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_Model): # pylint: disable= name="isPreview", visibility=["read", "create", "update", "delete", "query"] ) """Whether the Kubernetes version is currently in preview.""" - is_out_of_support: Optional[bool] = rest_field( - name="isOutOfSupport", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the Kubernetes version is out of support.""" @overload def __init__( @@ -1734,7 +1519,6 @@ def __init__( *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - is_out_of_support: Optional[bool] = None, ) -> None: ... @overload @@ -1767,15 +1551,6 @@ class AgentPoolUpgradeSettings(_Model): `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_. :vartype max_unavailable: str - :ivar max_blocked_nodes: The maximum number or percentage of extra nodes that are allowed to be - blocked in the agent pool during an upgrade when undrainable node behavior is Cordon. 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 maxSurge. This - must always be greater than or equal to maxSurge. For more information, including best - practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - `_. - :vartype max_blocked_nodes: str :ivar drain_timeout_in_minutes: The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, the upgrade fails. If not @@ -1811,17 +1586,6 @@ class AgentPoolUpgradeSettings(_Model): For more information, including best practices, see: `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster `_.""" - max_blocked_nodes: Optional[str] = rest_field( - name="maxBlockedNodes", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum number or percentage of extra nodes that are allowed to be blocked in the agent - pool during an upgrade when undrainable node behavior is Cordon. 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 maxSurge. This must always be greater - than or equal to maxSurge. For more information, including best practices, see: - `https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - `_.""" drain_timeout_in_minutes: Optional[int] = rest_field( name="drainTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] ) @@ -1848,7 +1612,6 @@ def __init__( *, max_surge: Optional[str] = None, max_unavailable: Optional[str] = None, - max_blocked_nodes: Optional[str] = None, drain_timeout_in_minutes: Optional[int] = None, node_soak_duration_in_minutes: Optional[int] = None, undrainable_node_behavior: Optional[Union[str, "_models.UndrainableNodeBehavior"]] = None, @@ -1899,46 +1662,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class AutoScaleProfile(_Model): - """Specifications on auto-scaling. - - :ivar size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - 'Standard_E16s_v3' or 'Standard_D16s_v5'. - :vartype size: str - :ivar min_count: The minimum number of nodes of the specified sizes. - :vartype min_count: int - :ivar max_count: The maximum number of nodes of the specified sizes. - :vartype max_count: int - """ - - size: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' - or 'Standard_D16s_v5'.""" - min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) - """The minimum number of nodes of the specified sizes.""" - max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) - """The maximum number of nodes of the specified sizes.""" - - @overload - def __init__( - self, - *, - size: Optional[str] = None, - min_count: Optional[int] = None, - max_count: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class AzureKeyVaultKms(_Model): """Azure Key Vault key management service settings for the security profile. @@ -2099,89 +1822,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class Component(_Model): - """Component information for a Kubernetes version. - - :ivar name: Component name. - :vartype name: str - :ivar version: Component version. - :vartype version: str - :ivar has_breaking_changes: If upgraded component version contains breaking changes from the - current version. To see a detailed description of what the breaking changes are, visit - `https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version - `_. - :vartype has_breaking_changes: bool - """ - - name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Component name.""" - version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Component version.""" - has_breaking_changes: Optional[bool] = rest_field( - name="hasBreakingChanges", visibility=["read", "create", "update", "delete", "query"] - ) - """If upgraded component version contains breaking changes from the current version. To see a - detailed description of what the breaking changes are, visit - `https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version - `_.""" - - @overload - def __init__( - self, - *, - name: Optional[str] = None, - version: Optional[str] = None, - has_breaking_changes: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ComponentsByRelease(_Model): - """components of given Kubernetes version. - - :ivar kubernetes_version: The Kubernetes version (major.minor). - :vartype kubernetes_version: str - :ivar components: components of current or upgraded Kubernetes version in the cluster. - :vartype components: list[~azure.mgmt.containerservice.models.Component] - """ - - kubernetes_version: Optional[str] = rest_field( - name="kubernetesVersion", visibility=["read", "create", "update", "delete", "query"] - ) - """The Kubernetes version (major.minor).""" - components: Optional[list["_models.Component"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """components of current or upgraded Kubernetes version in the cluster.""" - - @overload - def __init__( - self, - *, - kubernetes_version: Optional[str] = None, - components: Optional[list["_models.Component"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ContainerServiceLinuxProfile(_Model): """Profile for Linux VMs in the container service cluster. @@ -2248,8 +1888,7 @@ class ContainerServiceNetworkProfile(_Model): :ivar outbound_type: The outbound (egress) routing method. 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", "managedNATGatewayV2", "userAssignedNATGateway", and - "none". + "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway", and "none". :vartype outbound_type: str or ~azure.mgmt.containerservice.models.OutboundType :ivar load_balancer_sku: The load balancer sku for the managed cluster. The default is 'standard'. See `Azure Load Balancer SKUs @@ -2280,17 +1919,6 @@ class ContainerServiceNetworkProfile(_Model): 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.models.IPFamily] - :ivar pod_link_local_access: Defines access to special link local addresses (Azure Instance - Metadata Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is - 'IMDS'. Known values are: "IMDS" and "None". - :vartype pod_link_local_access: str or ~azure.mgmt.containerservice.models.PodLinkLocalAccess - :ivar kube_proxy_config: Holds configuration customizations for kube-proxy. Any values not - defined will use the kube-proxy defaulting behavior. See `https://v - `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where is represented by a - string. Kubernetes version - 1.23 would be '1-23'. - :vartype kube_proxy_config: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig """ network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = rest_field( @@ -2339,8 +1967,8 @@ class ContainerServiceNetworkProfile(_Model): """The outbound (egress) routing method. 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\", \"managedNATGatewayV2\", - \"userAssignedNATGateway\", and \"none\".""" + \"loadBalancer\", \"userDefinedRouting\", \"managedNATGateway\", \"userAssignedNATGateway\", + and \"none\".""" load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = rest_field( name="loadBalancerSku", visibility=["read", "create", "update", "delete", "query"] ) @@ -2378,20 +2006,6 @@ class ContainerServiceNetworkProfile(_Model): """The IP families used to specify IP versions available to the cluster. 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.""" - pod_link_local_access: Optional[Union[str, "_models.PodLinkLocalAccess"]] = rest_field( - name="podLinkLocalAccess", visibility=["read", "create", "update", "delete", "query"] - ) - """Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for - pods with hostNetwork=false. if not specified, the default is 'IMDS'. Known values are: - \"IMDS\" and \"None\".""" - kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = rest_field( - name="kubeProxyConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """Holds configuration customizations for kube-proxy. Any values not defined will use the - kube-proxy defaulting behavior. See `https://v - `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where is represented by a - string. Kubernetes version - 1.23 would be '1-23'.""" @overload def __init__( @@ -2414,119 +2028,6 @@ def __init__( pod_cidrs: Optional[list[str]] = None, service_cidrs: Optional[list[str]] = None, ip_families: Optional[list[Union[str, "_models.IPFamily"]]] = None, - pod_link_local_access: Optional[Union[str, "_models.PodLinkLocalAccess"]] = None, - kube_proxy_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfig"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ContainerServiceNetworkProfileKubeProxyConfig(_Model): # pylint: disable=name-too-long - """Holds configuration customizations for kube-proxy. Any values not defined will use the - kube-proxy defaulting behavior. See `https://v - `_.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where is represented by a - 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', 'IPVS' or 'NFTABLES'). Known values - are: "IPTABLES", "IPVS", and "NFTABLES". - :vartype mode: str or ~azure.mgmt.containerservice.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.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is - enabled in AKS by default without these customizations).""" - mode: Optional[Union[str, "_models.Mode"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values are: - \"IPTABLES\", \"IPVS\", and \"NFTABLES\".""" - ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = rest_field( - name="ipvsConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - mode: Optional[Union[str, "_models.Mode"]] = None, - ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(_Model): # pylint: disable=name-too-long - """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.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 - """ - - scheduler: Optional[Union[str, "_models.IpvsScheduler"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """IPVS scheduler, for more information please see - `http://www.linuxvirtualserver.org/docs/scheduling.html - `_. Known values are: \"RoundRobin\" - and \"LeastConnection\".""" - tcp_timeout_seconds: Optional[int] = rest_field( - name="tcpTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value.""" - tcp_fin_timeout_seconds: Optional[int] = rest_field( - name="tcpFinTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a - positive integer value.""" - udp_timeout_seconds: Optional[int] = rest_field( - name="udpTimeoutSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value.""" - - @overload - 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, ) -> None: ... @overload @@ -2961,14 +2462,6 @@ class GPUProfile(_Model): :ivar driver: Whether to install GPU drivers. When it's not specified, default is Install. Known values are: "Install" and "None". :vartype driver: str or ~azure.mgmt.containerservice.models.GPUDriver - :ivar driver_type: Specify the type of GPU driver to install when creating Windows agent pools. - If not provided, AKS selects the driver based on system compatibility. This cannot be changed - once the AgentPool has been created. This cannot be set on Linux AgentPools. For Linux - AgentPools, the driver is selected based on system compatibility. Known values are: "GRID" and - "CUDA". - :vartype driver_type: str or ~azure.mgmt.containerservice.models.DriverType - :ivar nvidia: NVIDIA-specific GPU settings. - :vartype nvidia: ~azure.mgmt.containerservice.models.NvidiaGPUProfile """ driver: Optional[Union[str, "_models.GPUDriver"]] = rest_field( @@ -2976,25 +2469,12 @@ class GPUProfile(_Model): ) """Whether to install GPU drivers. When it's not specified, default is Install. Known values are: \"Install\" and \"None\".""" - driver_type: Optional[Union[str, "_models.DriverType"]] = rest_field( - name="driverType", visibility=["read", "create", "update", "delete", "query"] - ) - """Specify the type of GPU driver to install when creating Windows agent pools. If not provided, - AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool - has been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is - selected based on system compatibility. Known values are: \"GRID\" and \"CUDA\".""" - nvidia: Optional["_models.NvidiaGPUProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """NVIDIA-specific GPU settings.""" @overload def __init__( self, *, driver: Optional[Union[str, "_models.GPUDriver"]] = None, - driver_type: Optional[Union[str, "_models.DriverType"]] = None, - nvidia: Optional["_models.NvidiaGPUProfile"] = None, ) -> None: ... @overload @@ -3008,34 +2488,28 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GuardrailsAvailableVersion(ProxyResource): - """Available Guardrails Version. +class IPTag(_Model): + """Contains the IPTag associated with the object. - :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.models.SystemData - :ivar properties: Whether the version is default or not and support info. Required. - :vartype properties: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties + :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 """ - properties: "_models.GuardrailsAvailableVersionsProperties" = rest_field( - visibility=["read", "create", "update", "delete", "query"] + ip_tag_type: Optional[str] = rest_field( + name="ipTagType", visibility=["read", "create", "update", "delete", "query"] ) - """Whether the version is default or not and support info. Required.""" + """The IP tag type. Example: RoutingPreference.""" + tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The value of the IP tag associated with the public IP. Example: Internet.""" @overload def __init__( self, *, - properties: "_models.GuardrailsAvailableVersionsProperties", + ip_tag_type: Optional[str] = None, + tag: Optional[str] = None, ) -> None: ... @overload @@ -3049,208 +2523,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class GuardrailsAvailableVersionsProperties(_Model): - """Whether the version is default or not and support info. - - :ivar is_default_version: Whether this is the default version. - :vartype is_default_version: bool - :ivar support: Whether the version is preview or stable. Known values are: "Preview" and - "Stable". - :vartype support: str or ~azure.mgmt.containerservice.models.GuardrailsSupport - """ - - is_default_version: Optional[bool] = rest_field(name="isDefaultVersion", visibility=["read"]) - """Whether this is the default version.""" - support: Optional[Union[str, "_models.GuardrailsSupport"]] = rest_field(visibility=["read"]) - """Whether the version is preview or stable. Known values are: \"Preview\" and \"Stable\".""" - - -class IdentityBinding(ProxyResource): - """The IdentityBinding resource. - - :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.models.SystemData - :ivar properties: The resource-specific properties for this resource. - :vartype properties: ~azure.mgmt.containerservice.models.IdentityBindingProperties - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - """ - - properties: Optional["_models.IdentityBindingProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The resource-specific properties for this resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.IdentityBindingProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class IdentityBindingManagedIdentityProfile(_Model): - """Managed identity profile for the identity binding. - - :ivar resource_id: The resource ID of the managed identity. Required. - :vartype resource_id: str - :ivar object_id: The object ID of the managed identity. - :vartype object_id: str - :ivar client_id: The client ID of the managed identity. - :vartype client_id: str - :ivar tenant_id: The tenant ID of the managed identity. - :vartype tenant_id: str - """ - - resource_id: str = rest_field(name="resourceId", visibility=["read", "create"]) - """The resource ID of the managed identity. Required.""" - object_id: Optional[str] = rest_field(name="objectId", visibility=["read"]) - """The object ID of the managed identity.""" - client_id: Optional[str] = rest_field(name="clientId", visibility=["read"]) - """The client ID of the managed identity.""" - tenant_id: Optional[str] = rest_field(name="tenantId", visibility=["read"]) - """The tenant ID of the managed identity.""" - - @overload - def __init__( - self, - *, - resource_id: str, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class IdentityBindingOidcIssuerProfile(_Model): - """IdentityBinding OIDC issuer profile. - - :ivar oidc_issuer_url: The OIDC issuer URL of the IdentityBinding. - :vartype oidc_issuer_url: str - """ - - oidc_issuer_url: Optional[str] = rest_field(name="oidcIssuerUrl", visibility=["read"]) - """The OIDC issuer URL of the IdentityBinding.""" - - -class IdentityBindingProperties(_Model): - """IdentityBinding properties. - - :ivar managed_identity: Managed identity profile for the identity binding. Required. - :vartype managed_identity: - ~azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile - :ivar oidc_issuer: The OIDC issuer URL of the IdentityBinding. - :vartype oidc_issuer: ~azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile - :ivar provisioning_state: The status of the last operation. Known values are: "Succeeded", - "Failed", "Canceled", "Creating", "Updating", and "Deleting". - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.models.IdentityBindingProvisioningState - """ - - managed_identity: "_models.IdentityBindingManagedIdentityProfile" = rest_field( - name="managedIdentity", visibility=["read", "create"] - ) - """Managed identity profile for the identity binding. Required.""" - oidc_issuer: Optional["_models.IdentityBindingOidcIssuerProfile"] = rest_field( - name="oidcIssuer", visibility=["read"] - ) - """The OIDC issuer URL of the IdentityBinding.""" - provisioning_state: Optional[Union[str, "_models.IdentityBindingProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The status of the last operation. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", - \"Creating\", \"Updating\", and \"Deleting\".""" - - @overload - def __init__( - self, - *, - managed_identity: "_models.IdentityBindingManagedIdentityProfile", - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class IPTag(_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 - """ - - ip_tag_type: Optional[str] = rest_field( - name="ipTagType", visibility=["read", "create", "update", "delete", "query"] - ) - """The IP tag type. Example: RoutingPreference.""" - tag: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The value of the IP tag associated with the public IP. Example: Internet.""" - - @overload - def __init__( - self, - *, - ip_tag_type: Optional[str] = None, - tag: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class IstioCertificateAuthority(_Model): - """Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin - certificates as described here `https://aka.ms/asm-plugin-ca `_. +class IstioCertificateAuthority(_Model): + """Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin + certificates as described here `https://aka.ms/asm-plugin-ca `_. :ivar plugin: Plugin certificates information for Service Mesh. :vartype plugin: ~azure.mgmt.containerservice.models.IstioPluginCertificateAuthority @@ -3523,51 +2798,124 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticator(ProxyResource): - """Configuration for JWT authenticator in the managed cluster. +class KubeletConfig(_Model): + """Kubelet configurations of agent nodes. See `AKS custom node configuration + `_ for more details. - :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.models.SystemData - :ivar properties: The properties of JWTAuthenticator. For details on how to configure the - properties of a JWT authenticator, please refer to the Kubernetes documentation: - `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration - `_. - Please note that not all fields available in the Kubernetes documentation are supported by AKS. - For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs - `_. Required. - :vartype properties: ~azure.mgmt.containerservice.models.JWTAuthenticatorProperties + :ivar cpu_manager_policy: The CPU Manager policy to use. 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: If CPU CFS quota enforcement is enabled for containers that specify CPU + limits. The default is true. + :vartype cpu_cfs_quota: bool + :ivar cpu_cfs_quota_period: The CPU CFS quota period value. 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: The percent of disk usage after which image garbage collection + is always run. To disable image garbage collection, set to 100. The default is 85%. + :vartype image_gc_high_threshold: int + :ivar image_gc_low_threshold: The percent of disk usage before which image garbage collection + is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%. + :vartype image_gc_low_threshold: int + :ivar topology_manager_policy: The Topology Manager policy to use. 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 """ - properties: "_models.JWTAuthenticatorProperties" = rest_field( - visibility=["read", "create", "update", "delete", "query"] + cpu_manager_policy: Optional[str] = rest_field( + name="cpuManagerPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The CPU Manager policy to use. The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'.""" + cpu_cfs_quota: Optional[bool] = rest_field( + name="cpuCfsQuota", visibility=["read", "create", "update", "delete", "query"] + ) + """If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is + true.""" + cpu_cfs_quota_period: Optional[str] = rest_field( + name="cpuCfsQuotaPeriod", visibility=["read", "create", "update", "delete", "query"] + ) + """The CPU CFS quota period value. 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'.""" + image_gc_high_threshold: Optional[int] = rest_field( + name="imageGcHighThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """The percent of disk usage after which image garbage collection is always run. To disable image + garbage collection, set to 100. The default is 85%.""" + image_gc_low_threshold: Optional[int] = rest_field( + name="imageGcLowThreshold", visibility=["read", "create", "update", "delete", "query"] + ) + """The percent of disk usage before which image garbage collection is never run. This cannot be + set higher than imageGcHighThreshold. The default is 80%.""" + topology_manager_policy: Optional[str] = rest_field( + name="topologyManagerPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """The Topology Manager policy to use. For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.""" + allowed_unsafe_sysctls: Optional[list[str]] = rest_field( + name="allowedUnsafeSysctls", visibility=["read", "create", "update", "delete", "query"] + ) + """Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in ``*``).""" + fail_swap_on: Optional[bool] = rest_field( + name="failSwapOn", visibility=["read", "create", "update", "delete", "query"] + ) + """If set to true it will make the Kubelet fail to start if swap is enabled on the node.""" + container_log_max_size_mb: Optional[int] = rest_field( + name="containerLogMaxSizeMB", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum size (e.g. 10Mi) of container log file before it is rotated.""" + container_log_max_files: Optional[int] = rest_field( + name="containerLogMaxFiles", visibility=["read", "create", "update", "delete", "query"] + ) + """The maximum number of container log files that can be present for a container. The number must + be ≥ 2.""" + pod_max_pids: Optional[int] = rest_field( + name="podMaxPids", visibility=["read", "create", "update", "delete", "query"] ) - """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT - authenticator, please refer to the Kubernetes documentation: - `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration - `_. - Please note that not all fields available in the Kubernetes documentation are supported by AKS. - For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs - `_. Required.""" + """The maximum number of processes per pod.""" @overload def __init__( self, *, - properties: "_models.JWTAuthenticatorProperties", - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ + 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, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ @@ -3576,21 +2924,21 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorClaimMappingExpression(_Model): - """The claim mapping expression for JWTAuthenticator. +class KubernetesPatchVersion(_Model): + """Kubernetes patch version profile. - :ivar expression: The CEL expression used to access token claims. Required. - :vartype expression: str + :ivar upgrades: Possible upgrade path for given patch version. + :vartype upgrades: list[str] """ - expression: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The CEL expression used to access token claims. Required.""" + upgrades: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Possible upgrade path for given patch version.""" @overload def __init__( self, *, - expression: str, + upgrades: Optional[list[str]] = None, ) -> None: ... @overload @@ -3604,51 +2952,49 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorClaimMappings(_Model): - """The claim mappings for JWTAuthenticator. +class KubernetesVersion(_Model): + """Kubernetes version profile for given major.minor release. - :ivar username: The expression to extract username attribute from the token claims. Required. - :vartype username: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :ivar groups: The expression to extract groups attribute from the token claims. When not - provided, no groups are extracted from the token claims. - :vartype groups: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :ivar uid: The expression to extract uid attribute from the token claims. When not provided, no - uid is extracted from the token claims. - :vartype uid: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :ivar extra: The expression to extract extra attribute from the token claims. When not - provided, no extra attributes are extracted from the token claims. - :vartype extra: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression] + :ivar version: major.minor version of Kubernetes release. + :vartype version: str + :ivar capabilities: Capabilities on this Kubernetes version. + :vartype capabilities: ~azure.mgmt.containerservice.models.KubernetesVersionCapabilities + :ivar is_default: Whether this version is default. + :vartype is_default: bool + :ivar is_preview: Whether this version is in preview mode. + :vartype is_preview: bool + :ivar patch_versions: Patch versions of Kubernetes release. + :vartype patch_versions: dict[str, ~azure.mgmt.containerservice.models.KubernetesPatchVersion] """ - username: "_models.JWTAuthenticatorClaimMappingExpression" = rest_field( + version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """major.minor version of Kubernetes release.""" + capabilities: Optional["_models.KubernetesVersionCapabilities"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The expression to extract username attribute from the token claims. Required.""" - groups: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Capabilities on this Kubernetes version.""" + is_default: Optional[bool] = rest_field( + name="isDefault", visibility=["read", "create", "update", "delete", "query"] ) - """The expression to extract groups attribute from the token claims. When not provided, no groups - are extracted from the token claims.""" - uid: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Whether this version is default.""" + is_preview: Optional[bool] = rest_field( + name="isPreview", visibility=["read", "create", "update", "delete", "query"] ) - """The expression to extract uid attribute from the token claims. When not provided, no uid is - extracted from the token claims.""" - extra: Optional[list["_models.JWTAuthenticatorExtraClaimMappingExpression"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] + """Whether this version is in preview mode.""" + patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = rest_field( + name="patchVersions", visibility=["read", "create", "update", "delete", "query"] ) - """The expression to extract extra attribute from the token claims. When not provided, no extra - attributes are extracted from the token claims.""" + """Patch versions of Kubernetes release.""" @overload def __init__( self, *, - username: "_models.JWTAuthenticatorClaimMappingExpression", - groups: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, - uid: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, - extra: Optional[list["_models.JWTAuthenticatorExtraClaimMappingExpression"]] = None, + version: Optional[str] = None, + capabilities: Optional["_models.KubernetesVersionCapabilities"] = None, + is_default: Optional[bool] = None, + is_preview: Optional[bool] = None, + patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = None, ) -> None: ... @overload @@ -3662,29 +3008,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorExtraClaimMappingExpression(_Model): # pylint: disable=name-too-long - """The extra claim mapping expression for JWTAuthenticator. +class KubernetesVersionCapabilities(_Model): + """Capabilities on this Kubernetes version. - :ivar key: The key of the extra attribute. Required. - :vartype key: str - :ivar value_expression: The CEL expression used to extract the value of the extra attribute. - Required. - :vartype value_expression: str + :ivar support_plan: Kubernetes support plans available for this version. + :vartype support_plan: list[str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan] """ - key: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The key of the extra attribute. Required.""" - value_expression: str = rest_field( - name="valueExpression", visibility=["read", "create", "update", "delete", "query"] + support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = rest_field( + name="supportPlan", visibility=["read", "create", "update", "delete", "query"] ) - """The CEL expression used to extract the value of the extra attribute. Required.""" + """Kubernetes support plans available for this version.""" @overload def __init__( self, *, - key: str, - value_expression: str, + support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = None, ) -> None: ... @overload @@ -3698,33 +3038,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorIssuer(_Model): - """The OIDC issuer details for JWTAuthenticator. +class KubernetesVersionListResult(_Model): + """Hold values properties, which is array of KubernetesVersion. - :ivar url: The issuer URL. The URL must begin with the scheme https and cannot contain a query - string or fragment. This must match the "iss" claim in the presented JWT, and the issuer - returned from discovery. Required. - :vartype url: str - :ivar audiences: The set of acceptable audiences the JWT must be issued to. At least one is - required. When multiple is set, AudienceMatchPolicy is used in API Server configuration. - Required. - :vartype audiences: list[str] + :ivar values_property: Array of AKS supported Kubernetes versions. + :vartype values_property: list[~azure.mgmt.containerservice.models.KubernetesVersion] """ - url: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The issuer URL. The URL must begin with the scheme https and cannot contain a query string or - fragment. This must match the \"iss\" claim in the presented JWT, and the issuer returned from - discovery. Required.""" - audiences: list[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The set of acceptable audiences the JWT must be issued to. At least one is required. When - multiple is set, AudienceMatchPolicy is used in API Server configuration. Required.""" + values_property: Optional[list["_models.KubernetesVersion"]] = rest_field( + name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" + ) + """Array of AKS supported Kubernetes versions.""" @overload def __init__( self, *, - url: str, - audiences: list[str], + values_property: Optional[list["_models.KubernetesVersion"]] = None, ) -> None: ... @overload @@ -3738,64 +3068,55 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorProperties(_Model): - """The properties of JWTAuthenticator. For details on how to configure the properties of a JWT - authenticator, please refer to the Kubernetes documentation: - `https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration - `_. - Please note that not all fields available in the Kubernetes documentation are supported by AKS. - For troubleshooting, please see `https://aka.ms/aks-external-issuers-docs - `_. +class LinuxOSConfig(_Model): + """OS configurations of Linux agent nodes. See `AKS custom node configuration + `_ for more details. - :ivar provisioning_state: The current provisioning state of the JWT authenticator. Known values - are: "Succeeded", "Failed", "Canceled", "Creating", "Updating", and "Deleting". - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState - :ivar issuer: The JWT OIDC issuer details. Required. - :vartype issuer: ~azure.mgmt.containerservice.models.JWTAuthenticatorIssuer - :ivar claim_validation_rules: The rules that are applied to validate token claims to - authenticate users. All the expressions must evaluate to true for validation to succeed. - :vartype claim_validation_rules: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] - :ivar claim_mappings: The mappings that define how user attributes are extracted from the token - claims. Required. - :vartype claim_mappings: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings - :ivar user_validation_rules: The rules that are applied to the mapped user before completing - authentication. All the expressions must evaluate to true for validation to succeed. - :vartype user_validation_rules: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] - """ - - provisioning_state: Optional[Union[str, "_models.JWTAuthenticatorProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The current provisioning state of the JWT authenticator. Known values are: \"Succeeded\", - \"Failed\", \"Canceled\", \"Creating\", \"Updating\", and \"Deleting\".""" - issuer: "_models.JWTAuthenticatorIssuer" = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The JWT OIDC issuer details. Required.""" - claim_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = rest_field( - name="claimValidationRules", visibility=["read", "create", "update", "delete", "query"] + :ivar sysctls: Sysctl settings for Linux agent nodes. + :vartype sysctls: ~azure.mgmt.containerservice.models.SysctlConfig + :ivar transparent_huge_page_enabled: Whether transparent hugepages are 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: Whether the kernel should make aggressive use of memory + compaction to make more hugepages available. 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 + """ + + sysctls: Optional["_models.SysctlConfig"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Sysctl settings for Linux agent nodes.""" + transparent_huge_page_enabled: Optional[str] = rest_field( + name="transparentHugePageEnabled", visibility=["read", "create", "update", "delete", "query"] ) - """The rules that are applied to validate token claims to authenticate users. All the expressions - must evaluate to true for validation to succeed.""" - claim_mappings: "_models.JWTAuthenticatorClaimMappings" = rest_field( - name="claimMappings", visibility=["read", "create", "update", "delete", "query"] + """Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. + The default is 'always'. For more information see `Transparent Hugepages + `_.""" + transparent_huge_page_defrag: Optional[str] = rest_field( + name="transparentHugePageDefrag", visibility=["read", "create", "update", "delete", "query"] ) - """The mappings that define how user attributes are extracted from the token claims. Required.""" - user_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = rest_field( - name="userValidationRules", visibility=["read", "create", "update", "delete", "query"] + """Whether the kernel should make aggressive use of memory compaction to make more hugepages + available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The + default is 'madvise'. For more information see `Transparent Hugepages + `_.""" + swap_file_size_mb: Optional[int] = rest_field( + name="swapFileSizeMB", visibility=["read", "create", "update", "delete", "query"] ) - """The rules that are applied to the mapped user before completing authentication. All the - expressions must evaluate to true for validation to succeed.""" + """The size in MB of a swap file that will be created on each node.""" @overload def __init__( self, *, - issuer: "_models.JWTAuthenticatorIssuer", - claim_mappings: "_models.JWTAuthenticatorClaimMappings", - claim_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = None, - user_validation_rules: Optional[list["_models.JWTAuthenticatorValidationRule"]] = None, + 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, ) -> None: ... @overload @@ -3809,26 +3130,91 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class JWTAuthenticatorValidationRule(_Model): - """The validation rule for JWTAuthenticator. +class LocalDNSOverride(_Model): + """Overrides for localDNS profile. - :ivar expression: The CEL expression used to validate the claim or attribute. Required. - :vartype expression: str - :ivar message: The validation error message. - :vartype message: str + :ivar query_logging: Log level for DNS queries in localDNS. Known values are: "Error" and + "Log". + :vartype query_logging: str or ~azure.mgmt.containerservice.models.LocalDNSQueryLogging + :ivar protocol: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream + DNS server. Known values are: "PreferUDP" and "ForceTCP". + :vartype protocol: str or ~azure.mgmt.containerservice.models.LocalDNSProtocol + :ivar forward_destination: Destination server for DNS queries to be forwarded from localDNS. + Known values are: "ClusterCoreDNS" and "VnetDNS". + :vartype forward_destination: str or + ~azure.mgmt.containerservice.models.LocalDNSForwardDestination + :ivar forward_policy: Forward policy for selecting upstream DNS server. See `forward plugin + `_ for more information. Known values are: "Sequential", + "RoundRobin", and "Random". + :vartype forward_policy: str or ~azure.mgmt.containerservice.models.LocalDNSForwardPolicy + :ivar max_concurrent: Maximum number of concurrent queries. See `forward plugin + `_ for more information. + :vartype max_concurrent: int + :ivar cache_duration_in_seconds: Cache max TTL in seconds. See `cache plugin + `_ for more information. + :vartype cache_duration_in_seconds: int + :ivar serve_stale_duration_in_seconds: Serve stale duration in seconds. See `cache plugin + `_ for more information. + :vartype serve_stale_duration_in_seconds: int + :ivar serve_stale: Policy for serving stale data. See `cache plugin + `_ for more information. Known values are: "Verify", + "Immediate", and "Disable". + :vartype serve_stale: str or ~azure.mgmt.containerservice.models.LocalDNSServeStale """ - expression: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The CEL expression used to validate the claim or attribute. Required.""" - message: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The validation error message.""" + query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = rest_field( + name="queryLogging", visibility=["read", "create", "update", "delete", "query"] + ) + """Log level for DNS queries in localDNS. Known values are: \"Error\" and \"Log\".""" + protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. Known + values are: \"PreferUDP\" and \"ForceTCP\".""" + forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = rest_field( + name="forwardDestination", visibility=["read", "create", "update", "delete", "query"] + ) + """Destination server for DNS queries to be forwarded from localDNS. Known values are: + \"ClusterCoreDNS\" and \"VnetDNS\".""" + forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = rest_field( + name="forwardPolicy", visibility=["read", "create", "update", "delete", "query"] + ) + """Forward policy for selecting upstream DNS server. See `forward plugin + `_ for more information. Known values are: \"Sequential\", + \"RoundRobin\", and \"Random\".""" + max_concurrent: Optional[int] = rest_field( + name="maxConcurrent", visibility=["read", "create", "update", "delete", "query"] + ) + """Maximum number of concurrent queries. See `forward plugin + `_ for more information.""" + cache_duration_in_seconds: Optional[int] = rest_field( + name="cacheDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Cache max TTL in seconds. See `cache plugin `_ for more + information.""" + serve_stale_duration_in_seconds: Optional[int] = rest_field( + name="serveStaleDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] + ) + """Serve stale duration in seconds. See `cache plugin `_ for + more information.""" + serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = rest_field( + name="serveStale", visibility=["read", "create", "update", "delete", "query"] + ) + """Policy for serving stale data. See `cache plugin `_ for more + information. Known values are: \"Verify\", \"Immediate\", and \"Disable\".""" @overload def __init__( self, *, - expression: str, - message: Optional[str] = None, + query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = None, + protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = None, + forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = None, + forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = None, + max_concurrent: Optional[int] = None, + cache_duration_in_seconds: Optional[int] = None, + serve_stale_duration_in_seconds: Optional[int] = None, + serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = None, ) -> None: ... @overload @@ -3842,1395 +3228,49 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class KubeletConfig(_Model): - """Kubelet configurations of agent nodes. See `AKS custom node configuration - `_ for more details. +class LocalDNSProfile(_Model): + """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve + performance and reliability of DNS resolution in an AKS cluster. For more details see + aka.ms/aks/localdns. - :ivar cpu_manager_policy: The CPU Manager policy to use. 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: If CPU CFS quota enforcement is enabled for containers that specify CPU - limits. The default is true. - :vartype cpu_cfs_quota: bool - :ivar cpu_cfs_quota_period: The CPU CFS quota period value. 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: The percent of disk usage after which image garbage collection - is always run. To disable image garbage collection, set to 100. The default is 85%. - :vartype image_gc_high_threshold: int - :ivar image_gc_low_threshold: The percent of disk usage before which image garbage collection - is never run. This cannot be set higher than imageGcHighThreshold. The default is 80%. - :vartype image_gc_low_threshold: int - :ivar topology_manager_policy: The Topology Manager policy to use. 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 - :ivar seccomp_default: Specifies the default seccomp profile applied to all workloads. If not - specified, 'Unconfined' will be used by default. Known values are: "Unconfined" and - "RuntimeDefault". - :vartype seccomp_default: str or ~azure.mgmt.containerservice.models.SeccompDefault + :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and + "Disabled". + :vartype mode: str or ~azure.mgmt.containerservice.models.LocalDNSMode + :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". + :vartype state: str or ~azure.mgmt.containerservice.models.LocalDNSState + :ivar vnet_dns_overrides: VnetDNS overrides apply to DNS traffic from pods with + dnsPolicy:default or kubelet (referred to as VnetDNS traffic). + :vartype vnet_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] + :ivar kube_dns_overrides: KubeDNS overrides apply to DNS traffic from pods with + dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). + :vartype kube_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] """ - cpu_manager_policy: Optional[str] = rest_field( - name="cpuManagerPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """The CPU Manager policy to use. The default is 'none'. See `Kubernetes CPU management policies - `_ - for more information. Allowed values are 'none' and 'static'.""" - cpu_cfs_quota: Optional[bool] = rest_field( - name="cpuCfsQuota", visibility=["read", "create", "update", "delete", "query"] - ) - """If CPU CFS quota enforcement is enabled for containers that specify CPU limits. The default is - true.""" - cpu_cfs_quota_period: Optional[str] = rest_field( - name="cpuCfsQuotaPeriod", visibility=["read", "create", "update", "delete", "query"] - ) - """The CPU CFS quota period value. 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'.""" - image_gc_high_threshold: Optional[int] = rest_field( - name="imageGcHighThreshold", visibility=["read", "create", "update", "delete", "query"] - ) - """The percent of disk usage after which image garbage collection is always run. To disable image - garbage collection, set to 100. The default is 85%.""" - image_gc_low_threshold: Optional[int] = rest_field( - name="imageGcLowThreshold", visibility=["read", "create", "update", "delete", "query"] - ) - """The percent of disk usage before which image garbage collection is never run. This cannot be - set higher than imageGcHighThreshold. The default is 80%.""" - topology_manager_policy: Optional[str] = rest_field( - name="topologyManagerPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """The Topology Manager policy to use. For more information see `Kubernetes Topology Manager - `_. The default is - 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.""" - allowed_unsafe_sysctls: Optional[list[str]] = rest_field( - name="allowedUnsafeSysctls", visibility=["read", "create", "update", "delete", "query"] - ) - """Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in ``*``).""" - fail_swap_on: Optional[bool] = rest_field( - name="failSwapOn", visibility=["read", "create", "update", "delete", "query"] - ) - """If set to true it will make the Kubelet fail to start if swap is enabled on the node.""" - container_log_max_size_mb: Optional[int] = rest_field( - name="containerLogMaxSizeMB", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum size (e.g. 10Mi) of container log file before it is rotated.""" - container_log_max_files: Optional[int] = rest_field( - name="containerLogMaxFiles", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum number of container log files that can be present for a container. The number must - be ≥ 2.""" - pod_max_pids: Optional[int] = rest_field( - name="podMaxPids", visibility=["read", "create", "update", "delete", "query"] - ) - """The maximum number of processes per pod.""" - seccomp_default: Optional[Union[str, "_models.SeccompDefault"]] = rest_field( - name="seccompDefault", visibility=["read", "create", "update", "delete", "query"] - ) - """Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' - will be used by default. Known values are: \"Unconfined\" and \"RuntimeDefault\".""" - - @overload - 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, - seccomp_default: Optional[Union[str, "_models.SeccompDefault"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class KubernetesPatchVersion(_Model): - """Kubernetes patch version profile. - - :ivar upgrades: Possible upgrade path for given patch version. - :vartype upgrades: list[str] - """ - - upgrades: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Possible upgrade path for given patch version.""" - - @overload - def __init__( - self, - *, - upgrades: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class KubernetesResourceObjectEncryptionProfile(_Model): # pylint: disable=name-too-long - """Encryption at rest of Kubernetes resource objects using service-managed keys. More information - on this can be found under `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_. - - :ivar infrastructure_encryption: Whether to enable encryption at rest of Kubernetes resource - objects using service-managed keys. More information on this can be found under - `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_. Known values are: "Enabled" and - "Disabled". - :vartype infrastructure_encryption: str or - ~azure.mgmt.containerservice.models.InfrastructureEncryption - """ - - infrastructure_encryption: Optional[Union[str, "_models.InfrastructureEncryption"]] = rest_field( - name="infrastructureEncryption", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. - More information on this can be found under - `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_. Known values are: \"Enabled\" and - \"Disabled\".""" - - @overload - def __init__( - self, - *, - infrastructure_encryption: Optional[Union[str, "_models.InfrastructureEncryption"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class KubernetesVersion(_Model): - """Kubernetes version profile for given major.minor release. - - :ivar version: major.minor version of Kubernetes release. - :vartype version: str - :ivar capabilities: Capabilities on this Kubernetes version. - :vartype capabilities: ~azure.mgmt.containerservice.models.KubernetesVersionCapabilities - :ivar is_default: Whether this version is default. - :vartype is_default: bool - :ivar is_preview: Whether this version is in preview mode. - :vartype is_preview: bool - :ivar patch_versions: Patch versions of Kubernetes release. - :vartype patch_versions: dict[str, ~azure.mgmt.containerservice.models.KubernetesPatchVersion] - """ - - version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """major.minor version of Kubernetes release.""" - capabilities: Optional["_models.KubernetesVersionCapabilities"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Capabilities on this Kubernetes version.""" - is_default: Optional[bool] = rest_field( - name="isDefault", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether this version is default.""" - is_preview: Optional[bool] = rest_field( - name="isPreview", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether this version is in preview mode.""" - patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = rest_field( - name="patchVersions", visibility=["read", "create", "update", "delete", "query"] - ) - """Patch versions of Kubernetes release.""" - - @overload - def __init__( - self, - *, - version: Optional[str] = None, - capabilities: Optional["_models.KubernetesVersionCapabilities"] = None, - is_default: Optional[bool] = None, - is_preview: Optional[bool] = None, - patch_versions: Optional[dict[str, "_models.KubernetesPatchVersion"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class KubernetesVersionCapabilities(_Model): - """Capabilities on this Kubernetes version. - - :ivar support_plan: Kubernetes support plans available for this version. - :vartype support_plan: list[str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan] - """ - - support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = rest_field( - name="supportPlan", visibility=["read", "create", "update", "delete", "query"] - ) - """Kubernetes support plans available for this version.""" - - @overload - def __init__( - self, - *, - support_plan: Optional[list[Union[str, "_models.KubernetesSupportPlan"]]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class KubernetesVersionListResult(_Model): - """Hold values properties, which is array of KubernetesVersion. - - :ivar values_property: Array of AKS supported Kubernetes versions. - :vartype values_property: list[~azure.mgmt.containerservice.models.KubernetesVersion] - """ - - values_property: Optional[list["_models.KubernetesVersion"]] = rest_field( - name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" - ) - """Array of AKS supported Kubernetes versions.""" - - @overload - def __init__( - self, - *, - values_property: Optional[list["_models.KubernetesVersion"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LabelSelector(_Model): - """A label selector is a label query over a set of resources. The result of matchLabels and - matchExpressions are ANDed. An empty label selector matches all objects. A null label selector - matches no objects. - - :ivar match_labels: matchLabels is an array of {key=value} pairs. A single {key=value} in the - matchLabels map is equivalent to an element of matchExpressions, whose key field is ``key``, - the operator is ``In``, and the values array contains only ``value``. The requirements are - ANDed. - :vartype match_labels: list[str] - :ivar match_expressions: matchExpressions is a list of label selector requirements. The - requirements are ANDed. - :vartype match_expressions: list[~azure.mgmt.containerservice.models.LabelSelectorRequirement] - """ - - match_labels: Optional[list[str]] = rest_field( - name="matchLabels", visibility=["read", "create", "update", "delete", "query"] - ) - """matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is - equivalent to an element of matchExpressions, whose key field is ``key``, the operator is - ``In``, and the values array contains only ``value``. The requirements are ANDed.""" - match_expressions: Optional[list["_models.LabelSelectorRequirement"]] = rest_field( - name="matchExpressions", visibility=["read", "create", "update", "delete", "query"] - ) - """matchExpressions is a list of label selector requirements. The requirements are ANDed.""" - - @overload - def __init__( - self, - *, - match_labels: Optional[list[str]] = None, - match_expressions: Optional[list["_models.LabelSelectorRequirement"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LabelSelectorRequirement(_Model): - """A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - - :ivar key: key is the label key that the selector applies to. - :vartype key: str - :ivar operator: operator represents a key's relationship to a set of values. Valid operators - are In and NotIn. Known values are: "In", "NotIn", "Exists", and "DoesNotExist". - :vartype operator: str or ~azure.mgmt.containerservice.models.Operator - :ivar values_property: values is an array of string values, the values array must be non-empty. - :vartype values_property: list[str] - """ - - key: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """key is the label key that the selector applies to.""" - operator: Optional[Union[str, "_models.Operator"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """operator represents a key's relationship to a set of values. Valid operators are In and NotIn. - Known values are: \"In\", \"NotIn\", \"Exists\", and \"DoesNotExist\".""" - values_property: Optional[list[str]] = rest_field( - name="values", visibility=["read", "create", "update", "delete", "query"], original_tsp_name="values" - ) - """values is an array of string values, the values array must be non-empty.""" - - @overload - def __init__( - self, - *, - key: Optional[str] = None, - operator: Optional[Union[str, "_models.Operator"]] = None, - values_property: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LinuxOSConfig(_Model): - """OS configurations of Linux agent nodes. See `AKS custom node configuration - `_ for more details. - - :ivar sysctls: Sysctl settings for Linux agent nodes. - :vartype sysctls: ~azure.mgmt.containerservice.models.SysctlConfig - :ivar transparent_huge_page_enabled: Whether transparent hugepages are 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: Whether the kernel should make aggressive use of memory - compaction to make more hugepages available. 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 - """ - - sysctls: Optional["_models.SysctlConfig"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Sysctl settings for Linux agent nodes.""" - transparent_huge_page_enabled: Optional[str] = rest_field( - name="transparentHugePageEnabled", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether transparent hugepages are enabled. Valid values are 'always', 'madvise', and 'never'. - The default is 'always'. For more information see `Transparent Hugepages - `_.""" - transparent_huge_page_defrag: Optional[str] = rest_field( - name="transparentHugePageDefrag", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the kernel should make aggressive use of memory compaction to make more hugepages - available. Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The - default is 'madvise'. For more information see `Transparent Hugepages - `_.""" - swap_file_size_mb: Optional[int] = rest_field( - name="swapFileSizeMB", visibility=["read", "create", "update", "delete", "query"] - ) - """The size in MB of a swap file that will be created on each node.""" - - @overload - 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, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LoadBalancer(ProxyResource): - """The configurations regarding multiple standard load balancers. If not supplied, single load - balancer mode will be used. Multiple standard load balancers mode will be used if at lease one - configuration is supplied. There has to be a configuration named ``kubernetes``. The name field - will be the name of the corresponding public load balancer. There will be an internal load - balancer created if needed, and the name will be ``-internal``. The internal lb shares - the same configurations as the external one. The internal lbs are not needed to be included in - LoadBalancer list. - - :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.models.SystemData - :ivar properties: The properties of the load balancer. - :vartype properties: ~azure.mgmt.containerservice.models.LoadBalancerProperties - """ - - properties: Optional["_models.LoadBalancerProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The properties of the load balancer.""" - - __flattened_items = [ - "primary_agent_pool_name", - "allow_service_placement", - "service_label_selector", - "service_namespace_selector", - "node_selector", - "provisioning_state", - ] - - @overload - def __init__( - self, - *, - properties: Optional["_models.LoadBalancerProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) - - -class LoadBalancerProperties(_Model): - """Properties for a load balancer resource. - - :ivar primary_agent_pool_name: Required field. A string value that must specify the ID of an - existing agent pool. All nodes in the given pool will always be added to this load balancer. - This agent pool must have at least one node and minCount>=1 for autoscaling operations. An - agent pool can only be the primary pool for a single load balancer. Required. - :vartype primary_agent_pool_name: str - :ivar allow_service_placement: Whether to automatically place services on the load balancer. If - not supplied, the default value is true. If set to false manually, both of the external and the - internal load balancer will not be selected for services unless they explicitly target it. - :vartype allow_service_placement: bool - :ivar service_label_selector: Only services that must match this selector can be placed on this - load balancer. - :vartype service_label_selector: ~azure.mgmt.containerservice.models.LabelSelector - :ivar service_namespace_selector: Services created in namespaces that match the selector can be - placed on this load balancer. - :vartype service_namespace_selector: ~azure.mgmt.containerservice.models.LabelSelector - :ivar node_selector: Nodes that match this selector will be possible members of this load - balancer. - :vartype node_selector: ~azure.mgmt.containerservice.models.LabelSelector - :ivar provisioning_state: The current provisioning state. - :vartype provisioning_state: str - """ - - primary_agent_pool_name: str = rest_field( - name="primaryAgentPoolName", visibility=["read", "create", "update", "delete", "query"] - ) - """Required field. A string value that must specify the ID of an existing agent pool. All nodes in - the given pool will always be added to this load balancer. This agent pool must have at least - one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool - for a single load balancer. Required.""" - allow_service_placement: Optional[bool] = rest_field( - name="allowServicePlacement", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to automatically place services on the load balancer. If not supplied, the default - value is true. If set to false manually, both of the external and the internal load balancer - will not be selected for services unless they explicitly target it.""" - service_label_selector: Optional["_models.LabelSelector"] = rest_field( - name="serviceLabelSelector", visibility=["read", "create", "update", "delete", "query"] - ) - """Only services that must match this selector can be placed on this load balancer.""" - service_namespace_selector: Optional["_models.LabelSelector"] = rest_field( - name="serviceNamespaceSelector", visibility=["read", "create", "update", "delete", "query"] - ) - """Services created in namespaces that match the selector can be placed on this load balancer.""" - node_selector: Optional["_models.LabelSelector"] = rest_field( - name="nodeSelector", visibility=["read", "create", "update", "delete", "query"] - ) - """Nodes that match this selector will be possible members of this load balancer.""" - provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) - """The current provisioning state.""" - - @overload - def __init__( - self, - *, - primary_agent_pool_name: str, - allow_service_placement: Optional[bool] = None, - service_label_selector: Optional["_models.LabelSelector"] = None, - service_namespace_selector: Optional["_models.LabelSelector"] = None, - node_selector: Optional["_models.LabelSelector"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LocalDNSOverride(_Model): - """Overrides for localDNS profile. - - :ivar query_logging: Log level for DNS queries in localDNS. Known values are: "Error" and - "Log". - :vartype query_logging: str or ~azure.mgmt.containerservice.models.LocalDNSQueryLogging - :ivar protocol: Enforce TCP or prefer UDP protocol for connections from localDNS to upstream - DNS server. Known values are: "PreferUDP" and "ForceTCP". - :vartype protocol: str or ~azure.mgmt.containerservice.models.LocalDNSProtocol - :ivar forward_destination: Destination server for DNS queries to be forwarded from localDNS. - Known values are: "ClusterCoreDNS" and "VnetDNS". - :vartype forward_destination: str or - ~azure.mgmt.containerservice.models.LocalDNSForwardDestination - :ivar forward_policy: Forward policy for selecting upstream DNS server. See `forward plugin - `_ for more information. Known values are: "Sequential", - "RoundRobin", and "Random". - :vartype forward_policy: str or ~azure.mgmt.containerservice.models.LocalDNSForwardPolicy - :ivar max_concurrent: Maximum number of concurrent queries. See `forward plugin - `_ for more information. - :vartype max_concurrent: int - :ivar cache_duration_in_seconds: Cache max TTL in seconds. See `cache plugin - `_ for more information. - :vartype cache_duration_in_seconds: int - :ivar serve_stale_duration_in_seconds: Serve stale duration in seconds. See `cache plugin - `_ for more information. - :vartype serve_stale_duration_in_seconds: int - :ivar serve_stale: Policy for serving stale data. See `cache plugin - `_ for more information. Known values are: "Verify", - "Immediate", and "Disable". - :vartype serve_stale: str or ~azure.mgmt.containerservice.models.LocalDNSServeStale - """ - - query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = rest_field( - name="queryLogging", visibility=["read", "create", "update", "delete", "query"] - ) - """Log level for DNS queries in localDNS. Known values are: \"Error\" and \"Log\".""" - protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Enforce TCP or prefer UDP protocol for connections from localDNS to upstream DNS server. Known - values are: \"PreferUDP\" and \"ForceTCP\".""" - forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = rest_field( - name="forwardDestination", visibility=["read", "create", "update", "delete", "query"] - ) - """Destination server for DNS queries to be forwarded from localDNS. Known values are: - \"ClusterCoreDNS\" and \"VnetDNS\".""" - forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = rest_field( - name="forwardPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """Forward policy for selecting upstream DNS server. See `forward plugin - `_ for more information. Known values are: \"Sequential\", - \"RoundRobin\", and \"Random\".""" - max_concurrent: Optional[int] = rest_field( - name="maxConcurrent", visibility=["read", "create", "update", "delete", "query"] - ) - """Maximum number of concurrent queries. See `forward plugin - `_ for more information.""" - cache_duration_in_seconds: Optional[int] = rest_field( - name="cacheDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """Cache max TTL in seconds. See `cache plugin `_ for more - information.""" - serve_stale_duration_in_seconds: Optional[int] = rest_field( - name="serveStaleDurationInSeconds", visibility=["read", "create", "update", "delete", "query"] - ) - """Serve stale duration in seconds. See `cache plugin `_ for - more information.""" - serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = rest_field( - name="serveStale", visibility=["read", "create", "update", "delete", "query"] - ) - """Policy for serving stale data. See `cache plugin `_ for more - information. Known values are: \"Verify\", \"Immediate\", and \"Disable\".""" - - @overload - def __init__( - self, - *, - query_logging: Optional[Union[str, "_models.LocalDNSQueryLogging"]] = None, - protocol: Optional[Union[str, "_models.LocalDNSProtocol"]] = None, - forward_destination: Optional[Union[str, "_models.LocalDNSForwardDestination"]] = None, - forward_policy: Optional[Union[str, "_models.LocalDNSForwardPolicy"]] = None, - max_concurrent: Optional[int] = None, - cache_duration_in_seconds: Optional[int] = None, - serve_stale_duration_in_seconds: Optional[int] = None, - serve_stale: Optional[Union[str, "_models.LocalDNSServeStale"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class LocalDNSProfile(_Model): - """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve - performance and reliability of DNS resolution in an AKS cluster. For more details see - aka.ms/aks/localdns. - - :ivar mode: Mode of enablement for localDNS. Known values are: "Preferred", "Required", and - "Disabled". - :vartype mode: str or ~azure.mgmt.containerservice.models.LocalDNSMode - :ivar state: System-generated state of localDNS. Known values are: "Enabled" and "Disabled". - :vartype state: str or ~azure.mgmt.containerservice.models.LocalDNSState - :ivar vnet_dns_overrides: VnetDNS overrides apply to DNS traffic from pods with - dnsPolicy:default or kubelet (referred to as VnetDNS traffic). - :vartype vnet_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] - :ivar kube_dns_overrides: KubeDNS overrides apply to DNS traffic from pods with - dnsPolicy:ClusterFirst (referred to as KubeDNS traffic). - :vartype kube_dns_overrides: dict[str, ~azure.mgmt.containerservice.models.LocalDNSOverride] - """ - - mode: Optional[Union[str, "_models.LocalDNSMode"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and - \"Disabled\".""" - state: Optional[Union[str, "_models.LocalDNSState"]] = rest_field(visibility=["read"]) - """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" - vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( - name="vnetDNSOverrides", visibility=["read", "create", "update", "delete", "query"] - ) - """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to - as VnetDNS traffic).""" - kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( - name="kubeDNSOverrides", visibility=["read", "create", "update", "delete", "query"] - ) - """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as - KubeDNS traffic).""" - - @overload - def __init__( - self, - *, - mode: Optional[Union[str, "_models.LocalDNSMode"]] = None, - vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, - kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class Machine(ProxyResource): - """A machine. Contains details about the underlying virtual machine. A machine may be visible here - but not in kubectl get nodes; if so it may be because the machine has not been registered with - the Kubernetes API Server yet. - - :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.models.SystemData - :ivar properties: The properties of the machine. - :vartype properties: ~azure.mgmt.containerservice.models.MachineProperties - :ivar zones: The Availability zone in which machine is located. - :vartype zones: list[str] - """ - - properties: Optional["_models.MachineProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The properties of the machine.""" - zones: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The Availability zone in which machine is located.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.MachineProperties"] = None, - zones: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineBillingProfile(_Model): - """The properties having to do with machine billing. - - :ivar spot_max_price: The max price (in US Dollars) you are willing to pay for spot instances. - Possible values are any decimal value greater than zero or -1 which indicates default price to - be up-to on-demand. For more details on spot pricing, see `spot VMs pricing - `_. - :vartype spot_max_price: float - """ - - spot_max_price: Optional[float] = rest_field( - name="spotMaxPrice", visibility=["read", "create", "update", "delete", "query"] - ) - """The max price (in US Dollars) you are willing to pay for spot instances. Possible values are - any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. - For more details on spot pricing, see `spot VMs pricing - `_.""" - - @overload - def __init__( - self, - *, - spot_max_price: Optional[float] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineHardwareProfile(_Model): - """The hardware and GPU settings of the machine. - - :ivar vm_size: The size of the VM. 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 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.models.GPUInstanceProfile - :ivar gpu_profile: The GPU settings of the machine. - :vartype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :ivar ultra_ssd_enabled: Whether to enable UltraSSD. - :vartype ultra_ssd_enabled: bool - """ - - vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read", "create", "update", "delete", "query"]) - """The size of the VM. 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 - `_.""" - gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = rest_field( - name="gpuInstanceProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - Known values are: \"MIG1g\", \"MIG2g\", \"MIG3g\", \"MIG4g\", and \"MIG7g\".""" - gpu_profile: Optional["_models.GPUProfile"] = rest_field( - name="gpuProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """The GPU settings of the machine.""" - ultra_ssd_enabled: Optional[bool] = rest_field( - name="ultraSsdEnabled", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable UltraSSD.""" - - @overload - def __init__( - self, - *, - vm_size: Optional[str] = None, - gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - gpu_profile: Optional["_models.GPUProfile"] = None, - ultra_ssd_enabled: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineIpAddress(_Model): - """The machine IP address details. - - :ivar family: To determine if address belongs IPv4 or IPv6 family. Known values are: "IPv4" and - "IPv6". - :vartype family: str or ~azure.mgmt.containerservice.models.IPFamily - :ivar ip: IPv4 or IPv6 address of the machine. - :vartype ip: str - """ - - family: Optional[Union[str, "_models.IPFamily"]] = rest_field(visibility=["read"]) - """To determine if address belongs IPv4 or IPv6 family. Known values are: \"IPv4\" and \"IPv6\".""" - ip: Optional[str] = rest_field(visibility=["read"]) - """IPv4 or IPv6 address of the machine.""" - - -class MachineKubernetesProfile(_Model): - """The Kubernetes configurations used by the machine. - - :ivar node_labels: The node labels on the machine. - :vartype node_labels: dict[str, str] - :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version - and are supported. When is specified, the - latest supported patch version is chosen automatically. - :vartype orchestrator_version: str - :ivar current_orchestrator_version: The version of Kubernetes running on the machine. 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 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.models.KubeletDiskType - :ivar kubelet_config: The Kubelet configuration on the machine. - :vartype kubelet_config: ~azure.mgmt.containerservice.models.KubeletConfig - :ivar node_initialization_taints: Taints added on the node during creation that will not be - reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl - call. These taints allow for required configuration to run before the node is ready to accept - workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint - nodes node1 key1=value1:NoSchedule-``. - :vartype node_initialization_taints: list[str] - :ivar node_taints: The taints added to new node during machine create. For example, - key=value:NoSchedule. - :vartype node_taints: list[str] - :ivar max_pods: The maximum number of pods that can run on a node. - :vartype max_pods: int - :ivar node_name: The node name in the Kubernetes cluster. - :vartype node_name: str - :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". - :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime - :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile - """ - - node_labels: Optional[dict[str, str]] = rest_field( - name="nodeLabels", visibility=["read", "create", "update", "delete", "query"] - ) - """The node labels on the machine.""" - orchestrator_version: Optional[str] = rest_field( - name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] - ) - """The version of Kubernetes specified by the user. Both patch version and - are supported. When is specified, the latest supported patch - version is chosen automatically.""" - current_orchestrator_version: Optional[str] = rest_field(name="currentOrchestratorVersion", visibility=["read"]) - """The version of Kubernetes running on the machine. 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.""" - kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = rest_field( - name="kubeletDiskType", visibility=["read", "create", "update", "delete", "query"] - ) - """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet - ephemeral storage. Known values are: \"OS\" and \"Temporary\".""" - kubelet_config: Optional["_models.KubeletConfig"] = rest_field( - name="kubeletConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """The Kubelet configuration on the machine.""" - node_initialization_taints: Optional[list[str]] = rest_field( - name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] - ) - """Taints added on the node during creation that will not be reconciled by AKS. These taints will - not be reconciled by AKS and can be removed with a kubectl call. These taints allow for - required configuration to run before the node is ready to accept workloads, for example - 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 - key1=value1:NoSchedule-``.""" - node_taints: Optional[list[str]] = rest_field( - name="nodeTaints", visibility=["read", "create", "update", "delete", "query"] - ) - """The taints added to new node during machine create. For example, key=value:NoSchedule.""" - max_pods: Optional[int] = rest_field(name="maxPods", visibility=["read", "create", "update", "delete", "query"]) - """The maximum number of pods that can run on a node.""" - node_name: Optional[str] = rest_field(name="nodeName", visibility=["read"]) - """The node name in the Kubernetes cluster.""" - workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = rest_field( - name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] - ) - """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" - artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = rest_field( - name="artifactStreamingProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Configuration for using artifact streaming on AKS.""" - - @overload - def __init__( - self, - *, - node_labels: Optional[dict[str, str]] = None, - orchestrator_version: Optional[str] = None, - kubelet_disk_type: Optional[Union[str, "_models.KubeletDiskType"]] = None, - kubelet_config: Optional["_models.KubeletConfig"] = None, - node_initialization_taints: Optional[list[str]] = None, - node_taints: Optional[list[str]] = None, - max_pods: Optional[int] = None, - workload_runtime: Optional[Union[str, "_models.WorkloadRuntime"]] = None, - artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineNetworkProperties(_Model): - """network properties of the machine. - - :ivar ip_addresses: IPv4, IPv6 addresses of the machine. - :vartype ip_addresses: list[~azure.mgmt.containerservice.models.MachineIpAddress] - :ivar vnet_subnet_id: The ID of the subnet which node and optionally pods will join on startup. - 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: The ID of the subnet which pods will join when launched. 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 enable_node_public_ip: Whether the machine is allocated its own public IP. Some scenarios - may require the machine 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. The default is false. - :vartype enable_node_public_ip: bool - :ivar node_public_ip_prefix_id: The public IP prefix ID which VM node should use IPs from. This - is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. - :vartype node_public_ip_prefix_id: str - :ivar node_public_ip_tags: IPTags of instance-level public IPs. - :vartype node_public_ip_tags: list[~azure.mgmt.containerservice.models.IPTag] - """ - - ip_addresses: Optional[list["_models.MachineIpAddress"]] = rest_field(name="ipAddresses", visibility=["read"]) - """IPv4, IPv6 addresses of the machine.""" - vnet_subnet_id: Optional[str] = rest_field( - name="vnetSubnetID", visibility=["read", "create", "update", "delete", "query"] - ) - """The ID of the subnet which node and optionally pods will join on startup. 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}.""" - pod_subnet_id: Optional[str] = rest_field( - name="podSubnetID", visibility=["read", "create", "update", "delete", "query"] - ) - """The ID of the subnet which pods will join when launched. 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}.""" - enable_node_public_ip: Optional[bool] = rest_field( - name="enableNodePublicIP", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the machine is allocated its own public IP. Some scenarios may require the machine 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. - The default is false.""" - node_public_ip_prefix_id: Optional[str] = rest_field( - name="nodePublicIPPrefixID", visibility=["read", "create", "update", "delete", "query"] - ) - """The public IP prefix ID which VM node should use IPs from. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.""" - node_public_ip_tags: Optional[list["_models.IPTag"]] = rest_field( - name="nodePublicIPTags", visibility=["read", "create", "update", "delete", "query"] - ) - """IPTags of instance-level public IPs.""" - - @overload - def __init__( - self, - *, - vnet_subnet_id: Optional[str] = None, - pod_subnet_id: Optional[str] = None, - enable_node_public_ip: Optional[bool] = None, - node_public_ip_prefix_id: Optional[str] = None, - node_public_ip_tags: Optional[list["_models.IPTag"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineOSProfile(_Model): - """The operating system and disk used by the machine. - - :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.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", - "AzureLinux", "AzureLinux3", "Mariner", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Ubuntu2204", "Windows2025", "WindowsAnnual", and "Ubuntu2404". - :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU - :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 OS disk type to be used for machines in the agent pool. 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.models.OSDiskType - :ivar enable_fips: Whether to use a FIPS-enabled OS. - :vartype enable_fips: bool - :ivar linux_profile: The Linux machine's specific profile. - :vartype linux_profile: ~azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile - :ivar windows_profile: The Windows machine's specific profile. - :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile - """ - - os_type: Optional[Union[str, "_models.OSType"]] = rest_field( - name="osType", visibility=["read", "create", "update", "delete", "query"] - ) - """The operating system type. The default is Linux. Known values are: \"Linux\" and \"Windows\".""" - os_sku: Optional[Union[str, "_models.OSSKU"]] = rest_field( - name="osSKU", visibility=["read", "create", "update", "delete", "query"] - ) - """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\", \"AzureLinux\", - \"AzureLinux3\", \"Mariner\", \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", - \"Ubuntu2204\", \"Windows2025\", \"WindowsAnnual\", and \"Ubuntu2404\".""" - os_disk_size_gb: Optional[int] = rest_field( - name="osDiskSizeGB", visibility=["read", "create", "update", "delete", "query"] - ) - """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.""" - os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = rest_field( - name="osDiskType", visibility=["read", "create", "update", "delete", "query"] - ) - """The OS disk type to be used for machines in the agent pool. 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\".""" - enable_fips: Optional[bool] = rest_field( - name="enableFIPS", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to use a FIPS-enabled OS.""" - linux_profile: Optional["_models.MachineOSProfileLinuxProfile"] = rest_field( - name="linuxProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """The Linux machine's specific profile.""" - windows_profile: Optional["_models.AgentPoolWindowsProfile"] = rest_field( - name="windowsProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """The Windows machine's specific profile.""" - - @overload - def __init__( - self, - *, - os_type: Optional[Union[str, "_models.OSType"]] = None, - os_sku: Optional[Union[str, "_models.OSSKU"]] = None, - os_disk_size_gb: Optional[int] = None, - os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, - enable_fips: Optional[bool] = None, - linux_profile: Optional["_models.MachineOSProfileLinuxProfile"] = None, - windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineOSProfileLinuxProfile(_Model): - """The Linux machine's specific profile. - - :ivar linux_os_config: The OS configuration of Linux machine. - :vartype linux_os_config: ~azure.mgmt.containerservice.models.LinuxOSConfig - :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. 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 - """ - - linux_os_config: Optional["_models.LinuxOSConfig"] = rest_field( - name="linuxOSConfig", visibility=["read", "create", "update", "delete", "query"] - ) - """The OS configuration of Linux machine.""" - message_of_the_day: Optional[str] = rest_field( - name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] - ) - """Message of the day for Linux nodes, base64-encoded. 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).""" - - @overload - def __init__( - self, - *, - linux_os_config: Optional["_models.LinuxOSConfig"] = None, - message_of_the_day: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MachineProperties(_Model): - """The properties of the machine. - - :ivar network: network properties of the machine. - :vartype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties - :ivar resource_id: Azure resource id of the machine. It can be used to GET underlying VM - Instance. - :vartype resource_id: str - :ivar hardware: The hardware and GPU settings of the machine. - :vartype hardware: ~azure.mgmt.containerservice.models.MachineHardwareProfile - :ivar operating_system: The operating system and disk used by the machine. - :vartype operating_system: ~azure.mgmt.containerservice.models.MachineOSProfile - :ivar kubernetes: The Kubernetes configurations used by the machine. - :vartype kubernetes: ~azure.mgmt.containerservice.models.MachineKubernetesProfile - :ivar mode: Machine only allows 'System' and 'User' mode. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". - :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode - :ivar security: The security settings of the machine. - :vartype security: ~azure.mgmt.containerservice.models.MachineSecurityProfile - :ivar priority: The priority for the machine. If not specified, the default is 'Regular'. Known - values are: "Spot" and "Regular". - :vartype priority: str or ~azure.mgmt.containerservice.models.ScaleSetPriority - :ivar eviction_policy: The eviction policy for machine. This cannot be specified unless the - priority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and - "Deallocate". - :vartype eviction_policy: str or ~azure.mgmt.containerservice.models.ScaleSetEvictionPolicy - :ivar billing: The properties having to do with machine billing. - :vartype billing: ~azure.mgmt.containerservice.models.MachineBillingProfile - :ivar node_image_version: The version of node image. - :vartype node_image_version: str - :ivar provisioning_state: The current deployment or provisioning state. - :vartype provisioning_state: str - :ivar tags: The tags to be persisted on the machine. - :vartype tags: dict[str, str] - :ivar e_tag: Unique read-only string used to implement optimistic concurrency. The eTag value - will change when the resource is updated. Specify an if-match or if-none-match header with the - eTag value for a subsequent request to enable optimistic concurrency per the normal eTag - convention. - :vartype e_tag: str - :ivar status: Contains read-only information about the machine. - :vartype status: ~azure.mgmt.containerservice.models.MachineStatus - :ivar local_dns_profile: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. - LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For - more details see aka.ms/aks/localdns. - :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - """ - - network: Optional["_models.MachineNetworkProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """network properties of the machine.""" - resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) - """Azure resource id of the machine. It can be used to GET underlying VM Instance.""" - hardware: Optional["_models.MachineHardwareProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The hardware and GPU settings of the machine.""" - operating_system: Optional["_models.MachineOSProfile"] = rest_field( - name="operatingSystem", visibility=["read", "create", "update", "delete", "query"] - ) - """The operating system and disk used by the machine.""" - kubernetes: Optional["_models.MachineKubernetesProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The Kubernetes configurations used by the machine.""" - mode: Optional[Union[str, "_models.AgentPoolMode"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Machine only allows 'System' and 'User' mode. Known values are: \"System\", \"User\", - \"Gateway\", \"ManagedSystem\", and \"Machines\".""" - security: Optional["_models.MachineSecurityProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The security settings of the machine.""" - priority: Optional[Union[str, "_models.ScaleSetPriority"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The priority for the machine. If not specified, the default is 'Regular'. Known values are: - \"Spot\" and \"Regular\".""" - eviction_policy: Optional[Union[str, "_models.ScaleSetEvictionPolicy"]] = rest_field( - name="evictionPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """The eviction policy for machine. This cannot be specified unless the priority is 'Spot'. If not - specified, the default is 'Delete'. Known values are: \"Delete\" and \"Deallocate\".""" - billing: Optional["_models.MachineBillingProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The properties having to do with machine billing.""" - node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) - """The version of node image.""" - provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) - """The current deployment or provisioning state.""" - tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The tags to be persisted on the machine.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """Unique read-only string used to implement optimistic concurrency. The eTag value will change - when the resource is updated. Specify an if-match or if-none-match header with the eTag value - for a subsequent request to enable optimistic concurrency per the normal eTag convention.""" - status: Optional["_models.MachineStatus"] = rest_field(visibility=["read"]) - """Contains read-only information about the machine.""" - local_dns_profile: Optional["_models.LocalDNSProfile"] = rest_field( - name="localDNSProfile", visibility=["read", "create", "update", "delete", "query"] + mode: Optional[Union[str, "_models.LocalDNSMode"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve - performance and reliability of DNS resolution in an AKS cluster. For more details see - aka.ms/aks/localdns.""" + """Mode of enablement for localDNS. Known values are: \"Preferred\", \"Required\", and + \"Disabled\".""" + state: Optional[Union[str, "_models.LocalDNSState"]] = rest_field(visibility=["read"]) + """System-generated state of localDNS. Known values are: \"Enabled\" and \"Disabled\".""" + vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( + name="vnetDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """VnetDNS overrides apply to DNS traffic from pods with dnsPolicy:default or kubelet (referred to + as VnetDNS traffic).""" + kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = rest_field( + name="kubeDNSOverrides", visibility=["read", "create", "update", "delete", "query"] + ) + """KubeDNS overrides apply to DNS traffic from pods with dnsPolicy:ClusterFirst (referred to as + KubeDNS traffic).""" @overload def __init__( self, *, - network: Optional["_models.MachineNetworkProperties"] = None, - hardware: Optional["_models.MachineHardwareProfile"] = None, - operating_system: Optional["_models.MachineOSProfile"] = None, - kubernetes: Optional["_models.MachineKubernetesProfile"] = None, - mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, - security: Optional["_models.MachineSecurityProfile"] = None, - priority: Optional[Union[str, "_models.ScaleSetPriority"]] = None, - eviction_policy: Optional[Union[str, "_models.ScaleSetEvictionPolicy"]] = None, - billing: Optional["_models.MachineBillingProfile"] = None, - tags: Optional[dict[str, str]] = None, - local_dns_profile: Optional["_models.LocalDNSProfile"] = None, + mode: Optional[Union[str, "_models.LocalDNSMode"]] = None, + vnet_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, + kube_dns_overrides: Optional[dict[str, "_models.LocalDNSOverride"]] = None, ) -> None: ... @overload @@ -5244,60 +3284,40 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MachineSecurityProfile(_Model): - """The security settings of the machine. +class Machine(ProxyResource): + """A machine. Contains details about the underlying virtual machine. A machine may be visible here + but not in kubectl get nodes; if so it may be because the machine has not been registered with + the Kubernetes API Server yet. - :ivar enable_vtpm: vTPM is a Trusted Launch feature for configuring a dedicated secure vault - for keys and measurements held locally on the node. For more details, see - aka.ms/aks/trustedlaunch. If not specified, the default is false. - :vartype enable_vtpm: bool - :ivar enable_secure_boot: Secure Boot is a feature of Trusted Launch which ensures that only - signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. - If not specified, the default is false. - :vartype enable_secure_boot: bool - :ivar ssh_access: SSH access method of an agent pool. Known values are: "LocalUser", - "Disabled", and "EntraId". - :vartype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess - :ivar enable_encryption_at_host: Whether to enable host based OS and data drive encryption. - 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 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.models.SystemData + :ivar properties: The properties of the machine. + :vartype properties: ~azure.mgmt.containerservice.models.MachineProperties + :ivar zones: The Availability zone in which machine is located. + :vartype zones: list[str] """ - enable_vtpm: Optional[bool] = rest_field( - name="enableVTPM", visibility=["read", "create", "update", "delete", "query"] - ) - """vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and - measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not - specified, the default is false.""" - enable_secure_boot: Optional[bool] = rest_field( - name="enableSecureBoot", visibility=["read", "create", "update", "delete", "query"] - ) - """Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and - drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - default is false.""" - ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = rest_field( - name="sshAccess", visibility=["read", "create", "update", "delete", "query"] - ) - """SSH access method of an agent pool. Known values are: \"LocalUser\", \"Disabled\", and - \"EntraId\".""" - enable_encryption_at_host: Optional[bool] = rest_field( - name="enableEncryptionAtHost", visibility=["read", "create", "update", "delete", "query"] + properties: Optional["_models.MachineProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """Whether to enable host based OS and data drive encryption. 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 - `_.""" + """The properties of the machine.""" + zones: Optional[list[str]] = rest_field(visibility=["read"]) + """The Availability zone in which machine is located.""" @overload def __init__( self, *, - enable_vtpm: Optional[bool] = None, - enable_secure_boot: Optional[bool] = None, - ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = None, - enable_encryption_at_host: Optional[bool] = None, + properties: Optional["_models.MachineProperties"] = None, ) -> None: ... @overload @@ -5311,43 +3331,47 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MachineStatus(_Model): - """Contains read-only information about the machine. +class MachineIpAddress(_Model): + """The machine IP address details. - :ivar provisioning_error: The error details information of the machine. Preserves the detailed - info of failure. If there was no error, this field is omitted. - :vartype provisioning_error: ~azure.mgmt.containerservice.models.ErrorDetail - :ivar creation_timestamp: Specifies the time at which the machine was created. - :vartype creation_timestamp: ~datetime.datetime - :ivar drift_action: The drift action of the machine. Indicates whether a machine has deviated - from its expected state due to changes in managed cluster properties, requiring corrective - action. Known values are: "Synced" and "Recreate". - :vartype drift_action: str or ~azure.mgmt.containerservice.models.DriftAction - :ivar drift_reason: Reason for machine drift. Provides detailed information on why the machine - has drifted. This field is omitted if the machine is up to date. - :vartype drift_reason: str - :ivar vm_state: Virtual machine state. Indicates the current state of the underlying virtual - machine. Known values are: "Running" and "Deleted". - :vartype vm_state: str or ~azure.mgmt.containerservice.models.VmState + :ivar family: To determine if address belongs IPv4 or IPv6 family. Known values are: "IPv4" and + "IPv6". + :vartype family: str or ~azure.mgmt.containerservice.models.IPFamily + :ivar ip: IPv4 or IPv6 address of the machine. + :vartype ip: str """ - provisioning_error: Optional["_models.ErrorDetail"] = rest_field(name="provisioningError", visibility=["read"]) - """The error details information of the machine. Preserves the detailed info of failure. If there - was no error, this field is omitted.""" - creation_timestamp: Optional[datetime.datetime] = rest_field( - name="creationTimestamp", visibility=["read"], format="rfc3339" - ) - """Specifies the time at which the machine was created.""" - drift_action: Optional[Union[str, "_models.DriftAction"]] = rest_field(name="driftAction", visibility=["read"]) - """The drift action of the machine. Indicates whether a machine has deviated from its expected - state due to changes in managed cluster properties, requiring corrective action. Known values - are: \"Synced\" and \"Recreate\".""" - drift_reason: Optional[str] = rest_field(name="driftReason", visibility=["read"]) - """Reason for machine drift. Provides detailed information on why the machine has drifted. This - field is omitted if the machine is up to date.""" - vm_state: Optional[Union[str, "_models.VmState"]] = rest_field(name="vmState", visibility=["read"]) - """Virtual machine state. Indicates the current state of the underlying virtual machine. Known - values are: \"Running\" and \"Deleted\".""" + family: Optional[Union[str, "_models.IPFamily"]] = rest_field(visibility=["read"]) + """To determine if address belongs IPv4 or IPv6 family. Known values are: \"IPv4\" and \"IPv6\".""" + ip: Optional[str] = rest_field(visibility=["read"]) + """IPv4 or IPv6 address of the machine.""" + + +class MachineNetworkProperties(_Model): + """network properties of the machine. + + :ivar ip_addresses: IPv4, IPv6 addresses of the machine. + :vartype ip_addresses: list[~azure.mgmt.containerservice.models.MachineIpAddress] + """ + + ip_addresses: Optional[list["_models.MachineIpAddress"]] = rest_field(name="ipAddresses", visibility=["read"]) + """IPv4, IPv6 addresses of the machine.""" + + +class MachineProperties(_Model): + """The properties of the machine. + + :ivar network: network properties of the machine. + :vartype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties + :ivar resource_id: Azure resource id of the machine. It can be used to GET underlying VM + Instance. + :vartype resource_id: str + """ + + network: Optional["_models.MachineNetworkProperties"] = rest_field(visibility=["read"]) + """network properties of the machine.""" + resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) + """Azure resource id of the machine. It can be used to GET underlying VM Instance.""" class MaintenanceConfiguration(ProxyResource): @@ -5638,7 +3662,6 @@ class ManagedCluster(TrackedResource): __flattened_items = [ "provisioning_state", "power_state", - "creation_data", "max_agent_pools", "kubernetes_version", "current_kubernetes_version", @@ -5658,7 +3681,6 @@ class ManagedCluster(TrackedResource): "node_resource_group_profile", "enable_rbac", "support_plan", - "enable_namespace_resources", "network_profile", "aad_profile", "auto_upgrade_profile", @@ -5682,10 +3704,7 @@ class ManagedCluster(TrackedResource): "node_provisioning_profile", "bootstrap_profile", "ai_toolchain_operator_profile", - "scheduler_profile", "hosted_system_profile", - "health_monitor_profile", - "control_plane_scaling_profile", "status", ] @@ -6016,7 +4035,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -6045,9 +4064,9 @@ class ManagedClusterAgentPoolProfileProperties(_Model): :vartype os_type: str or ~azure.mgmt.containerservice.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", "AzureLinux", "AzureLinux3", "Mariner", - "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", - "WindowsAnnual", and "Ubuntu2404". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and + "AzureContainerLinux". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -6066,7 +4085,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): 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", "User", - "Gateway", "ManagedSystem", and "Machines". + and "Gateway". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -6086,19 +4105,8 @@ class ManagedClusterAgentPoolProfileProperties(_Model): :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. - When this feature is enabled, the entire operating system will be locally cached on the - ephemeral OS disk, preventing E17 events caused by network failures. - :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :vartype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -6143,14 +4151,6 @@ class ManagedClusterAgentPoolProfileProperties(_Model): :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 node_initialization_taints: Taints added on the nodes during creation that will not be - reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl - call. This field can be modified after node pool is created, but nodes will not be recreated - with new taints until another operation that requires recreation (e.g. node image upgrade) - happens. These taints allow for required configuration to run before the node is ready to - accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl - taint nodes node1 key1=value1:NoSchedule-``. - :vartype node_initialization_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. @@ -6214,10 +4214,6 @@ class ManagedClusterAgentPoolProfileProperties(_Model): LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :ivar prepared_image_specification_profile: Settings to determine the prepared image - specification used to provision nodes in a pool. - :vartype prepared_image_specification_profile: - ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile """ e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) @@ -6256,7 +4252,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): name="workloadRuntime", visibility=["read", "create", "update", "delete", "query"] ) """Determines the type of workload a node can run. Known values are: \"OCIContainer\", - \"WasmWasi\", \"KataMshvVmIsolation\", and \"KataVmIsolation\".""" + \"WasmWasi\", and \"KataVmIsolation\".""" message_of_the_day: Optional[str] = rest_field( name="messageOfTheDay", visibility=["read", "create", "update", "delete", "query"] ) @@ -6294,9 +4290,9 @@ class ManagedClusterAgentPoolProfileProperties(_Model): ) """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\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", - \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", - \"WindowsAnnual\", and \"Ubuntu2404\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", + \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and + \"AzureContainerLinux\".""" max_count: Optional[int] = rest_field(name="maxCount", visibility=["read", "create", "update", "delete", "query"]) """The maximum number of nodes for auto-scaling.""" min_count: Optional[int] = rest_field(name="minCount", visibility=["read", "create", "update", "delete", "query"]) @@ -6323,7 +4319,7 @@ class ManagedClusterAgentPoolProfileProperties(_Model): For additional information on agent pool restrictions and best practices, see: `https://docs.microsoft.com/azure/aks/use-system-pools `_. Known values are: \"System\", - \"User\", \"Gateway\", \"ManagedSystem\", and \"Machines\".""" + \"User\", and \"Gateway\".""" orchestrator_version: Optional[str] = rest_field( name="orchestratorVersion", visibility=["read", "create", "update", "delete", "query"] ) @@ -6342,30 +4338,12 @@ class ManagedClusterAgentPoolProfileProperties(_Model): specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used.""" - node_image_version: Optional[str] = rest_field( - name="nodeImageVersion", visibility=["read", "create", "update", "delete", "query"] - ) + node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) """The version of node image.""" - upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = rest_field( - name="upgradeStrategy", visibility=["read", "create", "update", "delete", "query"] - ) - """Defines the upgrade strategy for the agent pool. The default is Rolling. Known values are: - \"Rolling\" and \"BlueGreen\".""" - enable_os_disk_full_caching: Optional[bool] = rest_field( - name="enableOSDiskFullCaching", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the - entire operating system will be locally cached on the ephemeral OS disk, preventing E17 events - caused by network failures.""" upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = rest_field( name="upgradeSettings", visibility=["read", "create", "update", "delete", "query"] ) """Settings for upgrading the agentpool.""" - upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = rest_field( - name="upgradeSettingsBlueGreen", visibility=["read", "create", "update", "delete", "query"] - ) - """Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to - BlueGreen.""" provisioning_state: Optional[str] = rest_field(name="provisioningState", visibility=["read"]) """The current deployment or provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field( @@ -6424,16 +4402,6 @@ class ManagedClusterAgentPoolProfileProperties(_Model): ) """The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.""" - node_initialization_taints: Optional[list[str]] = rest_field( - name="nodeInitializationTaints", visibility=["read", "create", "update", "delete", "query"] - ) - """Taints added on the nodes during creation that will not be reconciled by AKS. These taints will - not be reconciled by AKS and can be removed with a kubectl call. This field can be modified - after node pool is created, but nodes will not be recreated with new taints until another - operation that requires recreation (e.g. node image upgrade) happens. These taints allow for - required configuration to run before the node is ready to accept workloads, for example - 'key1=value1:NoSchedule' that then can be removed with ``kubectl taint nodes node1 - key1=value1:NoSchedule-``.""" proximity_placement_group_id: Optional[str] = rest_field( name="proximityPlacementGroupID", visibility=["read", "create", "update", "delete", "query"] ) @@ -6531,10 +4499,6 @@ class ManagedClusterAgentPoolProfileProperties(_Model): """Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns.""" - prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = rest_field( - name="preparedImageSpecificationProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Settings to determine the prepared image specification used to provision nodes in a pool.""" @overload def __init__( # pylint: disable=too-many-locals @@ -6560,11 +4524,7 @@ def __init__( # pylint: disable=too-many-locals type: Optional[Union[str, "_models.AgentPoolType"]] = None, mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, - node_image_version: Optional[str] = None, - upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, - enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, - upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -6575,7 +4535,6 @@ 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, - node_initialization_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, @@ -6596,7 +4555,6 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, ) -> None: ... @overload @@ -6642,7 +4600,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :vartype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :ivar message_of_the_day: Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the @@ -6671,9 +4629,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :vartype os_type: str or ~azure.mgmt.containerservice.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", "AzureLinux", "AzureLinux3", "Mariner", - "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", - "WindowsAnnual", and "Ubuntu2404". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and + "AzureContainerLinux". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int @@ -6692,7 +4650,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): 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", "User", - "Gateway", "ManagedSystem", and "Machines". + and "Gateway". :vartype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :ivar orchestrator_version: The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When @@ -6712,19 +4670,8 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :vartype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :ivar enable_os_disk_full_caching: Whether to enable the full-cache ephemeral OS disk feature. - When this feature is enabled, the entire operating system will be locally cached on the - ephemeral OS disk, preventing E17 events caused by network failures. - :vartype enable_os_disk_full_caching: bool :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :ivar upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :vartype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first @@ -6769,14 +4716,6 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :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 node_initialization_taints: Taints added on the nodes during creation that will not be - reconciled by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl - call. This field can be modified after node pool is created, but nodes will not be recreated - with new taints until another operation that requires recreation (e.g. node image upgrade) - happens. These taints allow for required configuration to run before the node is ready to - accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with ``kubectl - taint nodes node1 key1=value1:NoSchedule-``. - :vartype node_initialization_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. @@ -6840,10 +4779,6 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): LocalDNS helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. :vartype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :ivar prepared_image_specification_profile: Settings to determine the prepared image - specification used to provision nodes in a pool. - :vartype prepared_image_specification_profile: - ~azure.mgmt.containerservice.models.PreparedImageSpecificationProfile :ivar name: Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less. Required. :vartype name: str @@ -6878,11 +4813,7 @@ def __init__( # pylint: disable=too-many-locals type: Optional[Union[str, "_models.AgentPoolType"]] = None, mode: Optional[Union[str, "_models.AgentPoolMode"]] = None, orchestrator_version: Optional[str] = None, - node_image_version: Optional[str] = None, - upgrade_strategy: Optional[Union[str, "_models.UpgradeStrategy"]] = None, - enable_os_disk_full_caching: Optional[bool] = None, upgrade_settings: Optional["_models.AgentPoolUpgradeSettings"] = None, - upgrade_settings_blue_green: Optional["_models.AgentPoolBlueGreenUpgradeSettings"] = None, power_state: Optional["_models.PowerState"] = None, availability_zones: Optional[list[str]] = None, enable_node_public_ip: Optional[bool] = None, @@ -6893,7 +4824,6 @@ 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, - node_initialization_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, @@ -6914,7 +4844,6 @@ def __init__( # pylint: disable=too-many-locals virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - prepared_image_specification_profile: Optional["_models.PreparedImageSpecificationProfile"] = None, ) -> None: ... @overload @@ -7143,11 +5072,6 @@ class ManagedClusterAzureMonitorProfile(_Model): and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. :vartype metrics: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics - :ivar container_insights: Azure Monitor Container Insights Profile for Kubernetes Events, - Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for - an overview. - :vartype container_insights: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights :ivar app_monitoring: Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for @@ -7161,183 +5085,21 @@ class ManagedClusterAzureMonitorProfile(_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.""" - container_insights: Optional["_models.ManagedClusterAzureMonitorProfileContainerInsights"] = rest_field( - name="containerInsights", visibility=["read", "create", "update", "delete", "query"] - ) - """Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout - & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview.""" - app_monitoring: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoring"] = rest_field( - name="appMonitoring", visibility=["read", "create", "update", "delete", "query"] - ) - """Application Monitoring Profile for Kubernetes Application Container. Collects application logs, - metrics and traces through auto-instrumentation of the application using Azure Monitor - OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview.""" - - @overload - def __init__( - self, - *, - metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, - container_insights: Optional["_models.ManagedClusterAzureMonitorProfileContainerInsights"] = None, - app_monitoring: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoring"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterAzureMonitorProfileAppMonitoring(_Model): # pylint: disable=name-too-long - """Application Monitoring profile for AKS. - - :ivar auto_instrumentation: Application Monitoring auto-instrumentation for AKS. Deploys a - webhook that auto-instruments workloads with Microsoft OpenTelemetry Distros to collect - OpenTelemetry metrics, logs, and traces. See `https://aka.ms/AKSAppMonitoringDocs - `_ and `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. - :vartype auto_instrumentation: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - :ivar open_telemetry_metrics: Application Monitoring Open Telemetry Metrics Profile for AKS. - Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. - See `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. - :vartype open_telemetry_metrics: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - :ivar open_telemetry_logs_and_traces: Application Monitoring Open Telemetry Logs and Traces - Profile for AKS. Collects OpenTelemetry logs and traces of the application using Azure Monitor - OpenTelemetry based SDKs. See `https://aka.ms/AKSAppMonitoringDocs - `_ and `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. - :vartype open_telemetry_logs_and_traces: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces - """ - - auto_instrumentation: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation"] = ( - rest_field(name="autoInstrumentation", visibility=["read", "create", "update", "delete", "query"]) - ) - """Application Monitoring auto-instrumentation for AKS. Deploys a webhook that auto-instruments - workloads with Microsoft OpenTelemetry Distros to collect OpenTelemetry metrics, logs, and - traces. See `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview.""" - open_telemetry_metrics: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics"] = ( - rest_field(name="openTelemetryMetrics", visibility=["read", "create", "update", "delete", "query"]) - ) - """Application Monitoring Open Telemetry Metrics Profile for AKS. Collects OpenTelemetry metrics - of the application using Azure Monitor OpenTelemetry based SDKs. See - `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview.""" - open_telemetry_logs_and_traces: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces" - ] = rest_field(name="openTelemetryLogsAndTraces", visibility=["read", "create", "update", "delete", "query"]) - """Application Monitoring Open Telemetry Logs and Traces Profile for AKS. Collects OpenTelemetry - logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See - `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview.""" - - @overload - def __init__( - self, - *, - auto_instrumentation: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation" - ] = None, - open_telemetry_metrics: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics" - ] = None, - open_telemetry_logs_and_traces: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces" - ] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(_Model): # pylint: disable=name-too-long - """Application Monitoring auto-instrumentation for AKS. Deploys a webhook that auto-instruments - workloads with Microsoft OpenTelemetry Distros to collect OpenTelemetry metrics, logs, and - traces. See `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. - - :ivar enabled: Indicates if Application Monitoring Auto-instrumentation is enabled or not. - :vartype enabled: bool - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates if Application Monitoring Auto-instrumentation is enabled or not.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces(_Model): # pylint: disable=name-too-long - """Application Monitoring Open Telemetry Logs and Traces Profile for AKS. Collects OpenTelemetry - logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See - `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. - - :ivar enabled: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or - not. - :vartype enabled: bool - :ivar http_port: The host port for Open Telemetry HTTP/PROTOBUF logs and traces. If not - specified, the default port is 28331. - :vartype http_port: int - :ivar grpc_port: The host port for Open Telemetry GRPC logs and traces. If not specified, the - default port is 28332. - :vartype grpc_port: int - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not.""" - http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) - """The host port for Open Telemetry HTTP/PROTOBUF logs and traces. If not specified, the default - port is 28331.""" - grpc_port: Optional[int] = rest_field(name="grpcPort", visibility=["read", "create", "update", "delete", "query"]) - """The host port for Open Telemetry GRPC logs and traces. If not specified, the default port is - 28332.""" + configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview.""" + app_monitoring: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoring"] = rest_field( + name="appMonitoring", visibility=["read", "create", "update", "delete", "query"] + ) + """Application Monitoring Profile for Kubernetes Application Container. Collects application logs, + metrics and traces through auto-instrumentation of the application using Azure Monitor + OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview.""" @overload def __init__( self, *, - enabled: Optional[bool] = None, - http_port: Optional[int] = None, - grpc_port: Optional[int] = None, + metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, + app_monitoring: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoring"] = None, ) -> None: ... @overload @@ -7351,38 +5113,34 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(_Model): # pylint: disable=name-too-long - """Application Monitoring Open Telemetry Metrics Profile for AKS. Collects OpenTelemetry metrics - of the application using Azure Monitor OpenTelemetry based SDKs. See - `https://aka.ms/AKSAppMonitoringDocs `_ and - `https://aka.ms/AzureMonitorApplicationMonitoring - `_ for an overview. +class ManagedClusterAzureMonitorProfileAppMonitoring(_Model): # pylint: disable=name-too-long + """Application Monitoring profile for AKS. - :ivar enabled: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - :vartype enabled: bool - :ivar http_port: The host port for Open Telemetry HTTP/PROTOBUF metrics. If not specified, the - default port is 28333. - :vartype http_port: int - :ivar grpc_port: The host port for Open Telemetry GRPC metrics. If not specified, the default - port is 28334. - :vartype grpc_port: int + :ivar auto_instrumentation: Application Monitoring auto-instrumentation for AKS. Deploys a + webhook that auto-instruments workloads with Microsoft OpenTelemetry Distros to collect + OpenTelemetry metrics, logs, and traces. See `https://aka.ms/AKSAppMonitoringDocs + `_ and `https://aka.ms/AzureMonitorApplicationMonitoring + `_ for an overview. + :vartype auto_instrumentation: + ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation """ - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates if Application Monitoring Open Telemetry Metrics is enabled or not.""" - http_port: Optional[int] = rest_field(name="httpPort", visibility=["read", "create", "update", "delete", "query"]) - """The host port for Open Telemetry HTTP/PROTOBUF metrics. If not specified, the default port is - 28333.""" - grpc_port: Optional[int] = rest_field(name="grpcPort", visibility=["read", "create", "update", "delete", "query"]) - """The host port for Open Telemetry GRPC metrics. If not specified, the default port is 28334.""" + auto_instrumentation: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation"] = ( + rest_field(name="autoInstrumentation", visibility=["read", "create", "update", "delete", "query"]) + ) + """Application Monitoring auto-instrumentation for AKS. Deploys a webhook that auto-instruments + workloads with Microsoft OpenTelemetry Distros to collect OpenTelemetry metrics, logs, and + traces. See `https://aka.ms/AKSAppMonitoringDocs `_ and + `https://aka.ms/AzureMonitorApplicationMonitoring + `_ for an overview.""" @overload def __init__( self, *, - enabled: Optional[bool] = None, - http_port: Optional[int] = None, - grpc_port: Optional[int] = None, + auto_instrumentation: Optional[ + "_models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation" + ] = None, ) -> None: ... @overload @@ -7396,80 +5154,25 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterAzureMonitorProfileContainerInsights(_Model): # pylint: disable=name-too-long - """Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout - & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. +class ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation(_Model): # pylint: disable=name-too-long + """Application Monitoring auto-instrumentation for AKS. Deploys a webhook that auto-instruments + workloads with Microsoft OpenTelemetry Distros to collect OpenTelemetry metrics, logs, and + traces. See `https://aka.ms/AKSAppMonitoringDocs `_ and + `https://aka.ms/AzureMonitorApplicationMonitoring + `_ for an overview. - :ivar enabled: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + :ivar enabled: Indicates if Application Monitoring Auto-instrumentation is enabled or not. :vartype enabled: bool - :ivar log_analytics_workspace_resource_id: Fully Qualified ARM Resource Id of Azure Log - Analytics Workspace for storing Azure Monitor Container Insights Logs. - :vartype log_analytics_workspace_resource_id: str - :ivar syslog_port: The syslog host port. If not specified, the default port is 28330. - :vartype syslog_port: int - :ivar disable_custom_metrics: Indicates whether custom metrics collection has to be disabled or - not. If not specified the default is false. No custom metrics will be emitted if this field is - false but the container insights enabled field is false. - :vartype disable_custom_metrics: bool - :ivar disable_prometheus_metrics_scraping: Indicates whether prometheus metrics scraping is - disabled or not. If not specified the default is false. No prometheus metrics will be emitted - if this field is false but the container insights enabled field is false. - :vartype disable_prometheus_metrics_scraping: bool - :ivar container_network_logs: Configures container network logs ingestion with Azure Monitor. - Which network logs to ingest is controlled by the CRD found in the following links. No network - logs are ingested by default. More information on container network logs can be found at - `https://aka.ms/ContainerNetworkLogsDoc `_. More - information on configuring container network log can be found at - `https://aka.ms/acns/howtoenablecnl `_. If not specified, - the default is Disabled. Known values are: "Disabled" and "Enabled". - :vartype container_network_logs: str or - ~azure.mgmt.containerservice.models.ContainerNetworkLogs """ enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates if Azure Monitor Container Insights Logs Addon is enabled or not.""" - log_analytics_workspace_resource_id: Optional[str] = rest_field( - name="logAnalyticsWorkspaceResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor - Container Insights Logs.""" - syslog_port: Optional[int] = rest_field( - name="syslogPort", visibility=["read", "create", "update", "delete", "query"] - ) - """The syslog host port. If not specified, the default port is 28330.""" - disable_custom_metrics: Optional[bool] = rest_field( - name="disableCustomMetrics", visibility=["read", "create", "update", "delete", "query"] - ) - """Indicates whether custom metrics collection has to be disabled or not. If not specified the - default is false. No custom metrics will be emitted if this field is false but the container - insights enabled field is false.""" - disable_prometheus_metrics_scraping: Optional[bool] = rest_field( - name="disablePrometheusMetricsScraping", visibility=["read", "create", "update", "delete", "query"] - ) - """Indicates whether prometheus metrics scraping is disabled or not. If not specified the default - is false. No prometheus metrics will be emitted if this field is false but the container - insights enabled field is false.""" - container_network_logs: Optional[Union[str, "_models.ContainerNetworkLogs"]] = rest_field( - name="containerNetworkLogs", visibility=["read", "create", "update", "delete", "query"] - ) - """Configures container network logs ingestion with Azure Monitor. Which network logs to ingest is - controlled by the CRD found in the following links. No network logs are ingested by default. - More information on container network logs can be found at - `https://aka.ms/ContainerNetworkLogsDoc `_. More - information on configuring container network log can be found at - `https://aka.ms/acns/howtoenablecnl `_. If not specified, - the default is Disabled. Known values are: \"Disabled\" and \"Enabled\".""" + """Indicates if Application Monitoring Auto-instrumentation is enabled or not.""" @overload def __init__( self, *, enabled: Optional[bool] = None, - log_analytics_workspace_resource_id: Optional[str] = None, - syslog_port: Optional[int] = None, - disable_custom_metrics: Optional[bool] = None, - disable_prometheus_metrics_scraping: Optional[bool] = None, - container_network_logs: Optional[Union[str, "_models.ContainerNetworkLogs"]] = None, ) -> None: ... @overload @@ -7547,11 +5250,6 @@ class ManagedClusterAzureMonitorProfileMetrics(_Model): aka.ms/AzureManagedPrometheus-optional-parameters for details. :vartype kube_state_metrics: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics - :ivar control_plane: Control plane metrics collection profile for the Azure Managed Prometheus - addon. Configures collection of operational runtime metrics from managed control plane - components (kube-apiserver, etcd, etc). See aka.ms/aks/controlplane-metrics for an overview. - :vartype control_plane: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetricsControlPlane """ enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -7563,12 +5261,6 @@ class ManagedClusterAzureMonitorProfileMetrics(_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.""" - control_plane: Optional["_models.ManagedClusterAzureMonitorProfileMetricsControlPlane"] = rest_field( - name="controlPlane", visibility=["read", "create", "update", "delete", "query"] - ) - """Control plane metrics collection profile for the Azure Managed Prometheus addon. Configures - collection of operational runtime metrics from managed control plane components - (kube-apiserver, etcd, etc). See aka.ms/aks/controlplane-metrics for an overview.""" @overload def __init__( @@ -7576,40 +5268,6 @@ def __init__( *, enabled: bool, kube_state_metrics: Optional["_models.ManagedClusterAzureMonitorProfileKubeStateMetrics"] = None, - control_plane: Optional["_models.ManagedClusterAzureMonitorProfileMetricsControlPlane"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterAzureMonitorProfileMetricsControlPlane(_Model): # pylint: disable=name-too-long - """Control plane metrics collection profile for the Azure Managed Prometheus addon. Configures - collection of operational runtime metrics from managed control plane components - (kube-apiserver, etcd, etc). See aka.ms/aks/controlplane-metrics for an overview. - - :ivar enabled: Whether to enable or disable collection of control plane metrics by the Azure - Managed Prometheus addon. Defaults to disabled. See aka.ms/aks/controlplane-metrics for - details. - :vartype enabled: bool - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable or disable collection of control plane metrics by the Azure Managed - Prometheus addon. Defaults to disabled. See aka.ms/aks/controlplane-metrics for details.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, ) -> None: ... @overload @@ -7664,45 +5322,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterControlPlaneScalingProfile(_Model): - """Profile for providing scaled and performance guaranteed control plane capacity to deliver - consistent performance under high workload. Requires Kubernetes version 1.33.0 or later. - - :ivar scaling_size: The scaling size of the control plane. Scaling sizes offer guaranteed - capacity and predictable Kubernetes performance beyond standard tier defaults. Higher H sizes - provide increased performance guarantees. See `https://aka.ms/aks/hyperscale - `_ for performance metrics details for each size. Required. - Known values are: "H2", "H4", and "H8". - :vartype scaling_size: str or ~azure.mgmt.containerservice.models.ControlPlaneScalingSize - """ - - scaling_size: Union[str, "_models.ControlPlaneScalingSize"] = rest_field( - name="scalingSize", visibility=["read", "create", "update", "delete", "query"] - ) - """The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable - Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased - performance guarantees. See `https://aka.ms/aks/hyperscale `_ - for performance metrics details for each size. Required. Known values are: \"H2\", \"H4\", and - \"H8\".""" - - @overload - def __init__( - self, - *, - scaling_size: Union[str, "_models.ControlPlaneScalingSize"], - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ManagedClusterCostAnalysis(_Model): """The cost analysis configuration for the cluster. @@ -7737,44 +5356,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterHealthMonitorProfile(_Model): - """Health monitor profile for the managed cluster. - - :ivar enable_continuous_control_plane_and_addon_monitor: Whether to enable continuous control - plane and addon monitor. - :vartype enable_continuous_control_plane_and_addon_monitor: bool - :ivar enable_on_demand_monitor: Whether to enable on-demand monitor. - :vartype enable_on_demand_monitor: bool - """ - - enable_continuous_control_plane_and_addon_monitor: Optional[bool] = rest_field( - name="enableContinuousControlPlaneAndAddonMonitor", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable continuous control plane and addon monitor.""" - enable_on_demand_monitor: Optional[bool] = rest_field( - name="enableOnDemandMonitor", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether to enable on-demand monitor.""" - - @overload - def __init__( - self, - *, - enable_continuous_control_plane_and_addon_monitor: Optional[bool] = None, - enable_on_demand_monitor: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ManagedClusterHostedSystemProfile(_Model): """Settings for hosted system addons. @@ -7842,9 +5423,6 @@ class ManagedClusterHTTPProxyConfig(_Model): :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 :ivar enabled: Whether to enable HTTP proxy. If disabled, the specified proxy configuration @@ -7862,9 +5440,6 @@ class ManagedClusterHTTPProxyConfig(_Model): name="noProxy", visibility=["read", "create", "update", "delete", "query"] ) """The endpoints that should not go through proxy.""" - effective_no_proxy: Optional[list[str]] = rest_field(name="effectiveNoProxy", visibility=["read"]) - """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.""" trusted_ca: Optional[str] = rest_field(name="trustedCa", visibility=["read", "create", "update", "delete", "query"]) """Alternative CA cert to use for connecting to proxy servers.""" enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -7964,40 +5539,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterIngressDefaultDomainProfile(_Model): # pylint: disable=name-too-long - """Default domain profile for the managed cluster ingress profile. - - :ivar enabled: Whether to enable Default Domain. - :vartype enabled: bool - :ivar domain_name: The unique fully qualified domain name assigned to the cluster. This will - not change even if disabled then reenabled. - :vartype domain_name: str - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable Default Domain.""" - domain_name: Optional[str] = rest_field(name="domainName", visibility=["read"]) - """The unique fully qualified domain name assigned to the cluster. This will not change even if - disabled then reenabled.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ManagedClusterIngressProfile(_Model): """Ingress profile for the container service cluster. @@ -8010,10 +5551,6 @@ class ManagedClusterIngressProfile(_Model): :ivar gateway_api: Settings for the managed Gateway API installation. :vartype gateway_api: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration - :ivar application_load_balancer: Settings for the managed Application Load Balancer - installation. - :vartype application_load_balancer: - ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer """ web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = rest_field( @@ -8027,10 +5564,6 @@ class ManagedClusterIngressProfile(_Model): name="gatewayAPI", visibility=["read", "create", "update", "delete", "query"] ) """Settings for the managed Gateway API installation.""" - application_load_balancer: Optional["_models.ManagedClusterIngressProfileApplicationLoadBalancer"] = rest_field( - name="applicationLoadBalancer", visibility=["read", "create", "update", "delete", "query"] - ) - """Settings for the managed Application Load Balancer installation.""" @overload def __init__( @@ -8038,42 +5571,6 @@ def __init__( *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, gateway_api: Optional["_models.ManagedClusterIngressProfileGatewayConfiguration"] = None, - application_load_balancer: Optional["_models.ManagedClusterIngressProfileApplicationLoadBalancer"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterIngressProfileApplicationLoadBalancer(_Model): # pylint: disable=name-too-long - """Application Load Balancer settings for the ingress profile. - - :ivar enabled: Whether to enable Application Load Balancer. - :vartype enabled: bool - :ivar identity: Managed identity of the Application Load Balancer add-on. This is the identity - that should be granted permissions to manage the associated Application Gateway for Containers - resource. - :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable Application Load Balancer.""" - identity: Optional["_models.UserAssignedIdentity"] = rest_field(visibility=["read"]) - """Managed identity of the Application Load Balancer add-on. This is the identity that should be - granted permissions to manage the associated Application Gateway for Containers resource.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, ) -> None: ... @overload @@ -8181,11 +5678,6 @@ class ManagedClusterIngressProfileWebAppRouting(_Model): # pylint: disable=name `_ for more instructions. :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity - :ivar default_domain: Configuration for the Default Domain. This is a unique, autogenerated - domain that comes with a signed TLS Certificate allowing for secure HTTPS. See `the Default - Domain documentation `_ for more instructions. - :vartype default_domain: - ~azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile """ enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -8215,12 +5707,6 @@ class ManagedClusterIngressProfileWebAppRouting(_Model): # pylint: disable=name Azure Key Vault. See `this overview of the add-on `_ for more instructions.""" - default_domain: Optional["_models.ManagedClusterIngressDefaultDomainProfile"] = rest_field( - name="defaultDomain", visibility=["read", "create", "update", "delete", "query"] - ) - """Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a - signed TLS Certificate allowing for secure HTTPS. See `the Default Domain documentation - `_ for more instructions.""" @overload def __init__( @@ -8230,7 +5716,6 @@ def __init__( gateway_api_implementations: Optional["_models.ManagedClusterWebAppRoutingGatewayAPIImplementations"] = None, dns_zone_resource_ids: Optional[list[str]] = None, nginx: Optional["_models.ManagedClusterIngressProfileNginx"] = None, - default_domain: Optional["_models.ManagedClusterIngressDefaultDomainProfile"] = None, ) -> None: ... @overload @@ -8272,10 +5757,6 @@ class ManagedClusterLoadBalancerProfile(_Model): :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.models.BackendPoolType - :ivar cluster_service_load_balancer_health_probe_mode: The health probing behavior for External - Traffic Policy Cluster services. Known values are: "ServiceNodePort" and "Shared". - :vartype cluster_service_load_balancer_health_probe_mode: str or - ~azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode """ managed_outbound_i_ps: Optional["_models.ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = rest_field( @@ -8313,13 +5794,6 @@ class ManagedClusterLoadBalancerProfile(_Model): ) """The type of the managed inbound Load Balancer BackendPool. Known values are: \"NodeIPConfiguration\" and \"NodeIP\".""" - cluster_service_load_balancer_health_probe_mode: Optional[ - Union[str, "_models.ClusterServiceLoadBalancerHealthProbeMode"] - ] = rest_field( - name="clusterServiceLoadBalancerHealthProbeMode", visibility=["read", "create", "update", "delete", "query"] - ) - """The health probing behavior for External Traffic Policy Cluster services. Known values are: - \"ServiceNodePort\" and \"Shared\".""" @overload def __init__( @@ -8332,9 +5806,6 @@ def __init__( idle_timeout_in_minutes: Optional[int] = None, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Optional[Union[str, "_models.BackendPoolType"]] = None, - cluster_service_load_balancer_health_probe_mode: Optional[ - Union[str, "_models.ClusterServiceLoadBalancerHealthProbeMode"] - ] = None, ) -> None: ... @overload @@ -8454,26 +5925,17 @@ class ManagedClusterManagedOutboundIPProfile(_Model): :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 - :ivar count_i_pv6: The desired number of IPv6 outbound IPs created/managed by Azure. Allowed - values must be in the range of 1 to 16 (inclusive). - :vartype count_i_pv6: int """ count: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """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.""" - count_i_pv6: Optional[int] = rest_field( - name="countIPv6", visibility=["read", "create", "update", "delete", "query"] - ) - """The desired number of IPv6 outbound IPs created/managed by Azure. Allowed values must be in the - range of 1 to 16 (inclusive).""" @overload def __init__( self, *, count: Optional[int] = None, - count_i_pv6: Optional[int] = None, ) -> None: ... @overload @@ -8518,117 +5980,39 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class ManagedClusterNATGatewayProfile(_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.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.models.ResourceReference] - :ivar outbound_ip_prefixes: Desired outbound IP Prefix resources for the managed NAT Gateway. - Only compatible with NAT Gateway V2. - :vartype outbound_ip_prefixes: - ~azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIpPrefixes - :ivar outbound_i_ps: Desired outbound IP resources for the managed NAT Gateway. - :vartype outbound_i_ps: - ~azure.mgmt.containerservice.models.ManagedClusterNATGatewayProfileOutboundIPs - :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 - """ - - managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = rest_field( - name="managedOutboundIPProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Profile of the managed outbound IP resources of the cluster NAT gateway.""" - effective_outbound_i_ps: Optional[list["_models.ResourceReference"]] = rest_field( - name="effectiveOutboundIPs", visibility=["read"] - ) - """The effective outbound IP resources of the cluster NAT gateway.""" - outbound_ip_prefixes: Optional["_models.ManagedClusterNATGatewayProfileOutboundIpPrefixes"] = rest_field( - name="outboundIPPrefixes", visibility=["read", "create", "update", "delete", "query"] - ) - """Desired outbound IP Prefix resources for the managed NAT Gateway. Only compatible with NAT - Gateway V2.""" - outbound_i_ps: Optional["_models.ManagedClusterNATGatewayProfileOutboundIPs"] = rest_field( - name="outboundIPs", visibility=["read", "create", "update", "delete", "query"] - ) - """Desired outbound IP resources for the managed NAT Gateway.""" - idle_timeout_in_minutes: Optional[int] = rest_field( - name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] - ) - """Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 - (inclusive). The default value is 4 minutes.""" - - @overload - def __init__( - self, - *, - managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, - outbound_ip_prefixes: Optional["_models.ManagedClusterNATGatewayProfileOutboundIpPrefixes"] = None, - outbound_i_ps: Optional["_models.ManagedClusterNATGatewayProfileOutboundIPs"] = None, - idle_timeout_in_minutes: Optional[int] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterNATGatewayProfileOutboundIpPrefixes(_Model): # pylint: disable=name-too-long - """ManagedClusterNATGatewayProfileOutboundIpPrefixes. - - :ivar public_ip_prefixes: A list of public IP prefix resources. - :vartype public_ip_prefixes: list[str] - """ - - public_ip_prefixes: Optional[list[str]] = rest_field( - name="publicIPPrefixes", visibility=["read", "create", "update", "delete", "query"] - ) - """A list of public IP prefix resources.""" - - @overload - def __init__( - self, - *, - public_ip_prefixes: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterNATGatewayProfileOutboundIPs(_Model): # pylint: disable=name-too-long - """ManagedClusterNATGatewayProfileOutboundIPs. + """Profile of the managed cluster NAT gateway. - :ivar public_i_ps: A list of public IP resources. - :vartype public_i_ps: list[str] + :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.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.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 """ - public_i_ps: Optional[list[str]] = rest_field( - name="publicIPs", visibility=["read", "create", "update", "delete", "query"] + managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = rest_field( + name="managedOutboundIPProfile", visibility=["read", "create", "update", "delete", "query"] ) - """A list of public IP resources.""" + """Profile of the managed outbound IP resources of the cluster NAT gateway.""" + effective_outbound_i_ps: Optional[list["_models.ResourceReference"]] = rest_field( + name="effectiveOutboundIPs", visibility=["read"] + ) + """The effective outbound IP resources of the cluster NAT gateway.""" + idle_timeout_in_minutes: Optional[int] = rest_field( + name="idleTimeoutInMinutes", visibility=["read", "create", "update", "delete", "query"] + ) + """Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 + (inclusive). The default value is 4 minutes.""" @overload def __init__( self, *, - public_i_ps: Optional[list[str]] = None, + managed_outbound_ip_profile: Optional["_models.ManagedClusterManagedOutboundIPProfile"] = None, + idle_timeout_in_minutes: Optional[int] = None, ) -> None: ... @overload @@ -9049,8 +6433,6 @@ class ManagedClusterPoolUpgradeProfile(_Model): :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - :ivar components_by_releases: List of components grouped by kubernetes major.minor version. - :vartype components_by_releases: list[~azure.mgmt.containerservice.models.ComponentsByRelease] """ kubernetes_version: str = rest_field( @@ -9068,10 +6450,6 @@ class ManagedClusterPoolUpgradeProfile(_Model): visibility=["read", "create", "update", "delete", "query"] ) """List of orchestrator types and versions available for upgrade.""" - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = rest_field( - name="componentsByReleases", visibility=["read", "create", "update", "delete", "query"] - ) - """List of components grouped by kubernetes major.minor version.""" @overload def __init__( @@ -9081,7 +6459,6 @@ def __init__( os_type: Union[str, "_models.OSType"], name: Optional[str] = None, upgrades: Optional[list["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, ) -> None: ... @overload @@ -9102,8 +6479,6 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_Model): # pylint: disable=n :vartype kubernetes_version: str :ivar is_preview: Whether the Kubernetes version is currently in preview. :vartype is_preview: bool - :ivar is_out_of_support: Whether the Kubernetes version is out of support. - :vartype is_out_of_support: bool """ kubernetes_version: Optional[str] = rest_field( @@ -9114,10 +6489,6 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_Model): # pylint: disable=n name="isPreview", visibility=["read", "create", "update", "delete", "query"] ) """Whether the Kubernetes version is currently in preview.""" - is_out_of_support: Optional[bool] = rest_field( - name="isOutOfSupport", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the Kubernetes version is out of support.""" @overload def __init__( @@ -9125,7 +6496,6 @@ def __init__( *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, - is_out_of_support: Optional[bool] = None, ) -> None: ... @overload @@ -9146,9 +6516,6 @@ class ManagedClusterProperties(_Model): :vartype provisioning_state: str :ivar power_state: The Power State of the cluster. :vartype power_state: ~azure.mgmt.containerservice.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.models.CreationData :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int :ivar kubernetes_version: The version of Kubernetes specified by the user. Both patch version @@ -9214,11 +6581,6 @@ class ManagedClusterProperties(_Model): :ivar support_plan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: "KubernetesOfficial" and "AKSLongTermSupport". :vartype support_plan: str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan - :ivar enable_namespace_resources: Enable namespace as Azure resource. 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.models.ContainerServiceNetworkProfile :ivar aad_profile: The Azure Active Directory configuration. @@ -9259,7 +6621,7 @@ class ManagedClusterProperties(_Model): :ivar ingress_profile: Ingress profile for the managed cluster. :vartype ingress_profile: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfile :ivar public_network_access: PublicNetworkAccess of the managedCluster. Allow or deny public - network access for AKS. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". + network access for AKS. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.containerservice.models.PublicNetworkAccess :ivar workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. :vartype workload_auto_scaler_profile: @@ -9283,21 +6645,11 @@ class ManagedClusterProperties(_Model): cluster. :vartype ai_toolchain_operator_profile: ~azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile - :ivar scheduler_profile: Profile of the pod scheduler configuration. - :vartype scheduler_profile: ~azure.mgmt.containerservice.models.SchedulerProfile :ivar hosted_system_profile: Settings for hosted system addons. For more information, see `https://aka.ms/aks/automatic/systemcomponents `_. :vartype hosted_system_profile: ~azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile - :ivar health_monitor_profile: Health monitor profile for the managed cluster. - :vartype health_monitor_profile: - ~azure.mgmt.containerservice.models.ManagedClusterHealthMonitorProfile - :ivar control_plane_scaling_profile: Profile for providing scaled and performance guaranteed - control plane capacity to deliver consistent performance under high workload. Requires - Kubernetes version 1.33.0 or later. - :vartype control_plane_scaling_profile: - ~azure.mgmt.containerservice.models.ManagedClusterControlPlaneScalingProfile :ivar status: Contains read-only information about the Managed Cluster. :vartype status: ~azure.mgmt.containerservice.models.ManagedClusterStatus """ @@ -9306,11 +6658,6 @@ class ManagedClusterProperties(_Model): """The current provisioning state.""" power_state: Optional["_models.PowerState"] = rest_field(name="powerState", visibility=["read"]) """The Power State of the cluster.""" - creation_data: Optional["_models.CreationData"] = rest_field( - name="creationData", visibility=["read", "create", "update", "delete", "query"] - ) - """CreationData to be used to specify the source Snapshot ID if the cluster will be - created/upgraded using a snapshot.""" max_agent_pools: Optional[int] = rest_field(name="maxAgentPools", visibility=["read"]) """The max number of agent pools for the managed cluster.""" kubernetes_version: Optional[str] = rest_field( @@ -9396,12 +6743,6 @@ class ManagedClusterProperties(_Model): ) """The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: \"KubernetesOfficial\" and \"AKSLongTermSupport\".""" - enable_namespace_resources: Optional[bool] = rest_field( - name="enableNamespaceResources", visibility=["read", "create", "update", "delete", "query"] - ) - """Enable namespace as Azure resource. 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.""" network_profile: Optional["_models.ContainerServiceNetworkProfile"] = rest_field( name="networkProfile", visibility=["read", "create", "update", "delete", "query"] ) @@ -9470,7 +6811,7 @@ class ManagedClusterProperties(_Model): name="publicNetworkAccess", visibility=["read", "create", "update", "delete", "query"] ) """PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS. Known - values are: \"Enabled\", \"Disabled\", and \"SecuredByPerimeter\".""" + values are: \"Enabled\" and \"Disabled\".""" workload_auto_scaler_profile: Optional["_models.ManagedClusterWorkloadAutoScalerProfile"] = rest_field( name="workloadAutoScalerProfile", visibility=["read", "create", "update", "delete", "query"] ) @@ -9502,25 +6843,12 @@ class ManagedClusterProperties(_Model): name="aiToolchainOperatorProfile", visibility=["read", "create", "update", "delete", "query"] ) """AI toolchain operator settings that apply to the whole cluster.""" - scheduler_profile: Optional["_models.SchedulerProfile"] = rest_field( - name="schedulerProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Profile of the pod scheduler configuration.""" hosted_system_profile: Optional["_models.ManagedClusterHostedSystemProfile"] = rest_field( name="hostedSystemProfile", visibility=["read", "create", "update", "delete", "query"] ) """Settings for hosted system addons. For more information, see `https://aka.ms/aks/automatic/systemcomponents `_.""" - health_monitor_profile: Optional["_models.ManagedClusterHealthMonitorProfile"] = rest_field( - name="healthMonitorProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Health monitor profile for the managed cluster.""" - control_plane_scaling_profile: Optional["_models.ManagedClusterControlPlaneScalingProfile"] = rest_field( - name="controlPlaneScalingProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Profile for providing scaled and performance guaranteed control plane capacity to deliver - consistent performance under high workload. Requires Kubernetes version 1.33.0 or later.""" status: Optional["_models.ManagedClusterStatus"] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) @@ -9530,7 +6858,6 @@ class ManagedClusterProperties(_Model): def __init__( # pylint: disable=too-many-locals self, *, - creation_data: Optional["_models.CreationData"] = None, kubernetes_version: Optional[str] = None, dns_prefix: Optional[str] = None, fqdn_subdomain: Optional[str] = None, @@ -9545,7 +6872,6 @@ def __init__( # pylint: disable=too-many-locals node_resource_group_profile: Optional["_models.ManagedClusterNodeResourceGroupProfile"] = None, enable_rbac: Optional[bool] = None, support_plan: Optional[Union[str, "_models.KubernetesSupportPlan"]] = 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, @@ -9568,10 +6894,7 @@ def __init__( # pylint: disable=too-many-locals node_provisioning_profile: Optional["_models.ManagedClusterNodeProvisioningProfile"] = None, bootstrap_profile: Optional["_models.ManagedClusterBootstrapProfile"] = None, ai_toolchain_operator_profile: Optional["_models.ManagedClusterAIToolchainOperatorProfile"] = None, - scheduler_profile: Optional["_models.SchedulerProfile"] = None, hosted_system_profile: Optional["_models.ManagedClusterHostedSystemProfile"] = None, - health_monitor_profile: Optional["_models.ManagedClusterHealthMonitorProfile"] = None, - control_plane_scaling_profile: Optional["_models.ManagedClusterControlPlaneScalingProfile"] = None, status: Optional["_models.ManagedClusterStatus"] = None, ) -> None: ... @@ -9825,31 +7148,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterPropertiesForSnapshot(_Model): - """managed cluster properties for snapshot, these properties are read only. - - :ivar kubernetes_version: The current kubernetes version. - :vartype kubernetes_version: str - :ivar sku: The current managed cluster sku. - :vartype sku: ~azure.mgmt.containerservice.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.models.NetworkProfileForSnapshot - """ - - kubernetes_version: Optional[str] = rest_field(name="kubernetesVersion", visibility=["read"]) - """The current kubernetes version.""" - sku: Optional["_models.ManagedClusterSKU"] = rest_field(visibility=["read"]) - """The current managed cluster sku.""" - enable_rbac: Optional[bool] = rest_field(name="enableRbac", visibility=["read"]) - """Whether the cluster has enabled Kubernetes Role-Based Access Control or not.""" - network_profile: Optional["_models.NetworkProfileForSnapshot"] = rest_field( - name="networkProfile", visibility=["read"] - ) - """The current network profile.""" - - class ManagedClusterSecurityProfile(_Model): """Security profile for the container service cluster. @@ -9859,12 +7157,6 @@ class ManagedClusterSecurityProfile(_Model): `_ settings for the security profile. :vartype azure_key_vault_kms: ~azure.mgmt.containerservice.models.AzureKeyVaultKms - :ivar kubernetes_resource_object_encryption_profile: Encryption at rest of Kubernetes resource - objects. More information on this can be found under - `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_. - :vartype kubernetes_resource_object_encryption_profile: - ~azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile :ivar workload_identity: Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure cloud resources securely with Azure AD. See `https://aka.ms/aks/wi `_ for more details. @@ -9873,24 +7165,10 @@ class ManagedClusterSecurityProfile(_Model): :ivar image_cleaner: Image Cleaner settings for the security profile. :vartype image_cleaner: ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner - :ivar image_integrity: Image integrity is a feature that works with Azure Policy to verify - image integrity by signature. This will not have any effect unless Azure Policy is applied to - enforce image signatures. See `https://aka.ms/aks/image-integrity - `_ for how to use this feature via policy. - :vartype image_integrity: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity - :ivar node_restriction: `Node Restriction - `_ - settings for the security profile. - :vartype node_restriction: - ~azure.mgmt.containerservice.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 all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. :vartype custom_ca_trust_certificates: list[bytes] - :ivar service_account_image_pull_profile: Defines service account based image pull settings. - :vartype service_account_image_pull_profile: - ~azure.mgmt.containerservice.models.ServiceAccountImagePullProfile """ defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = rest_field( @@ -9903,14 +7181,6 @@ class ManagedClusterSecurityProfile(_Model): """Azure Key Vault `key management service `_ settings for the security profile.""" - kubernetes_resource_object_encryption_profile: Optional["_models.KubernetesResourceObjectEncryptionProfile"] = ( - rest_field( - name="kubernetesResourceObjectEncryptionProfile", visibility=["read", "create", "update", "delete", "query"] - ) - ) - """Encryption at rest of Kubernetes resource objects. More information on this can be found under - `https://aka.ms/aks/kubernetesResourceObjectEncryption - `_.""" workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = rest_field( name="workloadIdentity", visibility=["read", "create", "update", "delete", "query"] ) @@ -9921,29 +7191,12 @@ class ManagedClusterSecurityProfile(_Model): name="imageCleaner", visibility=["read", "create", "update", "delete", "query"] ) """Image Cleaner settings for the security profile.""" - image_integrity: Optional["_models.ManagedClusterSecurityProfileImageIntegrity"] = rest_field( - name="imageIntegrity", visibility=["read", "create", "update", "delete", "query"] - ) - """Image integrity is a feature that works with Azure Policy to verify image integrity by - signature. This will not have any effect unless Azure Policy is applied to enforce image - signatures. See `https://aka.ms/aks/image-integrity `_ for - how to use this feature via policy.""" - node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = rest_field( - name="nodeRestriction", visibility=["read", "create", "update", "delete", "query"] - ) - """`Node Restriction - `_ - settings for the security profile.""" custom_ca_trust_certificates: Optional[list[bytes]] = rest_field( name="customCATrustCertificates", visibility=["read", "create", "update", "delete", "query"], format="base64" ) """A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_.""" - service_account_image_pull_profile: Optional["_models.ServiceAccountImagePullProfile"] = rest_field( - name="serviceAccountImagePullProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Defines service account based image pull settings.""" @overload def __init__( @@ -9951,15 +7204,9 @@ def __init__( *, defender: Optional["_models.ManagedClusterSecurityProfileDefender"] = None, azure_key_vault_kms: Optional["_models.AzureKeyVaultKms"] = None, - kubernetes_resource_object_encryption_profile: Optional[ - "_models.KubernetesResourceObjectEncryptionProfile" - ] = None, workload_identity: Optional["_models.ManagedClusterSecurityProfileWorkloadIdentity"] = None, image_cleaner: Optional["_models.ManagedClusterSecurityProfileImageCleaner"] = None, - image_integrity: Optional["_models.ManagedClusterSecurityProfileImageIntegrity"] = None, - node_restriction: Optional["_models.ManagedClusterSecurityProfileNodeRestriction"] = None, custom_ca_trust_certificates: Optional[list[bytes]] = None, - service_account_image_pull_profile: Optional["_models.ServiceAccountImagePullProfile"] = None, ) -> None: ... @overload @@ -9985,12 +7232,6 @@ class ManagedClusterSecurityProfileDefender(_Model): security profile. :vartype security_monitoring: ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring - :ivar security_gating: Microsoft Defender settings for security gating, validates container - images eligibility for deployment based on Defender for Containers security findings. Using - Admission Controller, it either audits or prevents the deployment of images that do not meet - security standards. - :vartype security_gating: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating """ log_analytics_workspace_resource_id: Optional[str] = rest_field( @@ -10003,12 +7244,6 @@ class ManagedClusterSecurityProfileDefender(_Model): name="securityMonitoring", visibility=["read", "create", "update", "delete", "query"] ) """Microsoft Defender threat detection for Cloud settings for the security profile.""" - security_gating: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityGating"] = rest_field( - name="securityGating", visibility=["read", "create", "update", "delete", "query"] - ) - """Microsoft Defender settings for security gating, validates container images eligibility for - deployment based on Defender for Containers security findings. Using Admission Controller, it - either audits or prevents the deployment of images that do not meet security standards.""" @overload def __init__( @@ -10016,108 +7251,6 @@ def __init__( *, log_analytics_workspace_resource_id: Optional[str] = None, security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - security_gating: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityGating"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterSecurityProfileDefenderSecurityGating(_Model): # pylint: disable=name-too-long - """Microsoft Defender settings for security gating, validates container images eligibility for - deployment based on Defender for Containers security findings. Using Admission Controller, it - either audits or prevents the deployment of images that do not meet security standards. - - :ivar enabled: Whether to enable Defender security gating. When enabled, the gating feature - will scan container images and audit or block the deployment of images that do not meet - security standards according to the configured security rules. - :vartype enabled: bool - :ivar identities: List of identities that the admission controller will make use of in order to - pull security artifacts from the registry. These are the same identities used by the cluster to - pull container images. Each identity provided should have federated identity credential - attached to it. - :vartype identities: - list[~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem] - :ivar allow_secret_access: In use only while registry access granted by secret rather than - managed identity. Set whether to grant the Defender gating agent access to the cluster's - secrets for pulling images from registries. If secret access is denied and the registry - requires pull secrets, the add-on will not perform any image validation. Default value is - false. - :vartype allow_secret_access: bool - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable Defender security gating. When enabled, the gating feature will scan - container images and audit or block the deployment of images that do not meet security - standards according to the configured security rules.""" - identities: Optional[list["_models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem"]] = ( - rest_field(visibility=["read", "create", "update", "delete", "query"]) - ) - """List of identities that the admission controller will make use of in order to pull security - artifacts from the registry. These are the same identities used by the cluster to pull - container images. Each identity provided should have federated identity credential attached to - it.""" - allow_secret_access: Optional[bool] = rest_field( - name="allowSecretAccess", visibility=["read", "create", "update", "delete", "query"] - ) - """In use only while registry access granted by secret rather than managed identity. Set whether - to grant the Defender gating agent access to the cluster's secrets for pulling images from - registries. If secret access is denied and the registry requires pull secrets, the add-on will - not perform any image validation. Default value is false.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - identities: Optional[list["_models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem"]] = None, - allow_secret_access: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem(_Model): # pylint: disable=name-too-long - """Identity information used by Defender security gating to access container registries. - - :ivar azure_container_registry: The container registry for which the identity will be used; the - identity specified here should have a federated identity credential attached to it. - :vartype azure_container_registry: str - :ivar identity: The identity object used to access the registry. - :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity - """ - - azure_container_registry: Optional[str] = rest_field( - name="azureContainerRegistry", visibility=["read", "create", "update", "delete", "query"] - ) - """The container registry for which the identity will be used; the identity specified here should - have a federated identity credential attached to it.""" - identity: Optional["_models.UserAssignedIdentity"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The identity object used to access the registry.""" - - @overload - def __init__( - self, - *, - azure_container_registry: Optional[str] = None, - identity: Optional["_models.UserAssignedIdentity"] = None, ) -> None: ... @overload @@ -10195,62 +7328,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ManagedClusterSecurityProfileImageIntegrity(_Model): # pylint: disable=name-too-long - """Image integrity related settings for the security profile. - - :ivar enabled: Whether to enable image integrity. The default value is false. - :vartype enabled: bool - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable image integrity. The default value is false.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterSecurityProfileNodeRestriction(_Model): # pylint: disable=name-too-long - """Node Restriction settings for the security profile. - - :ivar enabled: Whether to enable Node Restriction. - :vartype enabled: bool - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Whether to enable Node Restriction.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ManagedClusterSecurityProfileWorkloadIdentity(_Model): # pylint: disable=name-too-long """Workload identity settings for the security profile. @@ -10307,156 +7384,40 @@ def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterSKU(_Model): - """The SKU of a Managed Cluster. - - :ivar name: The name of a managed cluster SKU. Known values are: "Base" and "Automatic". - :vartype name: str or ~azure.mgmt.containerservice.models.ManagedClusterSKUName - :ivar tier: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See - `AKS Pricing Tier `_ for - more details. Known values are: "Premium", "Standard", and "Free". - :vartype tier: str or ~azure.mgmt.containerservice.models.ManagedClusterSKUTier - """ - - name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The name of a managed cluster SKU. Known values are: \"Base\" and \"Automatic\".""" - tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The tier of a managed cluster SKU. If not specified, the default is 'Free'. See `AKS Pricing - Tier `_ for more details. - Known values are: \"Premium\", \"Standard\", and \"Free\".""" - - @overload - def __init__( - self, - *, - name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, - tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ManagedClusterSnapshot(TrackedResource): - """A managed cluster snapshot resource. - - :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.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 properties: Properties of a managed cluster snapshot. - :vartype properties: ~azure.mgmt.containerservice.models.ManagedClusterSnapshotProperties - """ - - properties: Optional["_models.ManagedClusterSnapshotProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Properties of a managed cluster snapshot.""" - - __flattened_items = ["creation_data", "snapshot_type", "managed_cluster_properties_read_only"] - - @overload - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - properties: Optional["_models.ManagedClusterSnapshotProperties"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - _flattened_input = {k: kwargs.pop(k) for k in kwargs.keys() & self.__flattened_items} - super().__init__(*args, **kwargs) - for k, v in _flattened_input.items(): - setattr(self, k, v) - - def __getattr__(self, name: str) -> Any: - if name in self.__flattened_items: - if self.properties is None: - return None - return getattr(self.properties, name) - raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'") - - def __setattr__(self, key: str, value: Any) -> None: - if key in self.__flattened_items: - if self.properties is None: - self.properties = self._attr_to_rest_field["properties"]._class_type() - setattr(self.properties, key, value) - else: - super().__setattr__(key, value) + """ + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) -class ManagedClusterSnapshotProperties(_Model): - """Properties for a managed cluster snapshot. - :ivar creation_data: CreationData to be used to specify the source resource ID to create this - snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.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.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.models.ManagedClusterPropertiesForSnapshot +class ManagedClusterSKU(_Model): + """The SKU of a Managed Cluster. + + :ivar name: The name of a managed cluster SKU. Known values are: "Base" and "Automatic". + :vartype name: str or ~azure.mgmt.containerservice.models.ManagedClusterSKUName + :ivar tier: The tier of a managed cluster SKU. If not specified, the default is 'Free'. See + `AKS Pricing Tier `_ for + more details. Known values are: "Premium", "Standard", and "Free". + :vartype tier: str or ~azure.mgmt.containerservice.models.ManagedClusterSKUTier """ - creation_data: Optional["_models.CreationData"] = rest_field( - name="creationData", visibility=["read", "create", "update", "delete", "query"] - ) - """CreationData to be used to specify the source resource ID to create this snapshot.""" - snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = rest_field( - name="snapshotType", visibility=["read", "create", "update", "delete", "query"] + name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and - \"ManagedCluster\".""" - managed_cluster_properties_read_only: Optional["_models.ManagedClusterPropertiesForSnapshot"] = rest_field( - name="managedClusterPropertiesReadOnly", visibility=["read"] + """The name of a managed cluster SKU. Known values are: \"Base\" and \"Automatic\".""" + tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] ) - """What the properties will be showed when getting managed cluster snapshot. Those properties are - read-only.""" + """The tier of a managed cluster SKU. If not specified, the default is 'Free'. See `AKS Pricing + Tier `_ for more details. + Known values are: \"Premium\", \"Standard\", and \"Free\".""" @overload def __init__( self, *, - creation_data: Optional["_models.CreationData"] = None, - snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = None, + name: Optional[Union[str, "_models.ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "_models.ManagedClusterSKUTier"]] = None, ) -> None: ... @overload @@ -10600,21 +7561,16 @@ class ManagedClusterStorageProfileDiskCSIDriver(_Model): # pylint: disable=name :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 """ enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Whether to enable AzureDisk CSI Driver. The default value is true.""" - version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The version of AzureDisk CSI Driver. The default value is v1.""" @overload def __init__( self, *, enabled: Optional[bool] = None, - version: Optional[str] = None, ) -> None: ... @overload @@ -10978,25 +7934,16 @@ class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler(_Model): # p :ivar enabled: Whether to enable VPA. Default value is false. Required. :vartype enabled: bool - :ivar addon_autoscaling: Whether VPA add-on is enabled and configured to scale AKS-managed - add-ons. Known values are: "Enabled" and "Disabled". - :vartype addon_autoscaling: str or ~azure.mgmt.containerservice.models.AddonAutoscaling """ enabled: bool = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Whether to enable VPA. Default value is false. Required.""" - addon_autoscaling: Optional[Union[str, "_models.AddonAutoscaling"]] = rest_field( - name="addonAutoscaling", visibility=["read", "create", "update", "delete", "query"] - ) - """Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. Known values are: - \"Enabled\" and \"Disabled\".""" @overload def __init__( self, *, enabled: bool, - addon_autoscaling: Optional[Union[str, "_models.AddonAutoscaling"]] = None, ) -> None: ... @overload @@ -11117,162 +8064,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class MeshMembership(ProxyResource): - """Mesh membership of a managed cluster. - - :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.models.SystemData - :ivar properties: Mesh membership properties of a managed cluster. - :vartype properties: ~azure.mgmt.containerservice.models.MeshMembershipProperties - :ivar managed_by: The fully qualified resource ID of the resource that manages this resource. - Indicates if this resource is managed by another Azure resource. If this is present, complete - mode deployment will not delete the resource if it is removed from the template since it is - managed by another resource. - :vartype managed_by: str - :ivar e_tag: If eTag is provided in the response body, it may also be provided as a header per - the normal etag convention. Entity tags are used for comparing two or more entities from the - same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match - (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. - :vartype e_tag: str - """ - - properties: Optional["_models.MeshMembershipProperties"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Mesh membership properties of a managed cluster.""" - managed_by: Optional[str] = rest_field(name="managedBy", visibility=["read", "create", "update"]) - """The fully qualified resource ID of the resource that manages this resource. Indicates if this - resource is managed by another Azure resource. If this is present, complete mode deployment - will not delete the resource if it is removed from the template since it is managed by another - resource.""" - e_tag: Optional[str] = rest_field(name="eTag", visibility=["read"]) - """If eTag is provided in the response body, it may also be provided as a header per the normal - etag convention. Entity tags are used for comparing two or more entities from the same - requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section - 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.""" - - @overload - def __init__( - self, - *, - properties: Optional["_models.MeshMembershipProperties"] = None, - managed_by: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MeshMembershipPrivateConnectProfile(_Model): - """Private connect profile for mesh membership. - - :ivar private_ip_address: The private IP address of the member cluster private FQDN. This is a - read-only property populated by the service. - :vartype private_ip_address: str - :ivar subnet_resource_id: The delegated subnet resource ID. Customer can provide their own - subnet, or AKS will allocate one if not specified. When providing your own subnet, the minimum - required size is /28. - :vartype subnet_resource_id: str - """ - - private_ip_address: Optional[str] = rest_field(name="privateIpAddress", visibility=["read"]) - """The private IP address of the member cluster private FQDN. This is a read-only property - populated by the service.""" - subnet_resource_id: Optional[str] = rest_field( - name="subnetResourceId", visibility=["read", "create", "update", "delete", "query"] - ) - """The delegated subnet resource ID. Customer can provide their own subnet, or AKS will allocate - one if not specified. When providing your own subnet, the minimum required size is /28.""" - - @overload - def __init__( - self, - *, - subnet_resource_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class MeshMembershipProperties(_Model): - """Mesh membership properties of a managed cluster. - - :ivar provisioning_state: The current provisioning state of the Mesh Membership. Known values - are: "Canceled", "Creating", "Deleting", "Failed", "Succeeded", and "Updating". - :vartype provisioning_state: str or - ~azure.mgmt.containerservice.models.MeshMembershipProvisioningState - :ivar private_connect_profile: Profile for configuring private connectivity between the mesh - control plane and member clusters. When configured, communication between the mesh control - plane and this member cluster occurs over private network instead of public networks. Visit - `https://aka.ms/applink `_ for more information. - :vartype private_connect_profile: - ~azure.mgmt.containerservice.models.MeshMembershipPrivateConnectProfile - :ivar managed_mesh_id: The ARM resource id for the managed mesh member. This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. - Visit `https://aka.ms/applink `_ for more information. Required. - :vartype managed_mesh_id: str - """ - - provisioning_state: Optional[Union[str, "_models.MeshMembershipProvisioningState"]] = rest_field( - name="provisioningState", visibility=["read"] - ) - """The current provisioning state of the Mesh Membership. Known values are: \"Canceled\", - \"Creating\", \"Deleting\", \"Failed\", \"Succeeded\", and \"Updating\".""" - private_connect_profile: Optional["_models.MeshMembershipPrivateConnectProfile"] = rest_field( - name="privateConnectProfile", visibility=["read", "create", "update", "delete", "query"] - ) - """Profile for configuring private connectivity between the mesh control plane and member - clusters. When configured, communication between the mesh control plane and this member cluster - occurs over private network instead of public networks. Visit `https://aka.ms/applink - `_ for more information.""" - managed_mesh_id: str = rest_field(name="managedMeshID", visibility=["read", "create", "update", "delete", "query"]) - """The ARM resource id for the managed mesh member. This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. - Visit `https://aka.ms/applink `_ for more information. Required.""" - - @overload - def __init__( - self, - *, - managed_mesh_id: str, - private_connect_profile: Optional["_models.MeshMembershipPrivateConnectProfile"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class MeshRevision(_Model): """Holds information on upgrades and compatibility for given major.minor mesh release. @@ -11557,262 +8348,31 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class NetworkPolicies(_Model): """Default network policy of the namespace, specifying ingress and egress rules. - :ivar ingress: Enum representing different network policy rules. Known values are: "DenyAll", - "AllowAll", and "AllowSameNamespace". - :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule - :ivar egress: Enum representing different network policy rules. Known values are: "DenyAll", - "AllowAll", and "AllowSameNamespace". - :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule - """ - - ingress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", - and \"AllowSameNamespace\".""" - egress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", - and \"AllowSameNamespace\".""" - - @overload - def __init__( - self, - *, - ingress: Optional[Union[str, "_models.PolicyRule"]] = None, - egress: Optional[Union[str, "_models.PolicyRule"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class NetworkProfileForSnapshot(_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.models.NetworkPlugin - :ivar network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "overlay" - :vartype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode - :ivar network_policy: networkPolicy for managed cluster snapshot. Known values are: "none", - "calico", "azure", and "cilium". - :vartype network_policy: str or ~azure.mgmt.containerservice.models.NetworkPolicy - :ivar network_mode: networkMode for managed cluster snapshot. Known values are: "transparent" - and "bridge". - :vartype network_mode: str or ~azure.mgmt.containerservice.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.models.LoadBalancerSku - """ - - network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = rest_field( - name="networkPlugin", visibility=["read", "create", "update", "delete", "query"] - ) - """networkPlugin for managed cluster snapshot. Known values are: \"azure\", \"kubenet\", and - \"none\".""" - network_plugin_mode: Optional[Union[str, "_models.NetworkPluginMode"]] = rest_field( - name="networkPluginMode", visibility=["read", "create", "update", "delete", "query"] - ) - """NetworkPluginMode for managed cluster snapshot. \"overlay\"""" - network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = rest_field( - name="networkPolicy", visibility=["read", "create", "update", "delete", "query"] - ) - """networkPolicy for managed cluster snapshot. Known values are: \"none\", \"calico\", \"azure\", - and \"cilium\".""" - network_mode: Optional[Union[str, "_models.NetworkMode"]] = rest_field( - name="networkMode", visibility=["read", "create", "update", "delete", "query"] - ) - """networkMode for managed cluster snapshot. Known values are: \"transparent\" and \"bridge\".""" - load_balancer_sku: Optional[Union[str, "_models.LoadBalancerSku"]] = rest_field( - name="loadBalancerSku", visibility=["read", "create", "update", "delete", "query"] - ) - """loadBalancerSku for managed cluster snapshot. Known values are: \"standard\" and \"basic\".""" - - @overload - def __init__( - self, - *, - network_plugin: Optional[Union[str, "_models.NetworkPlugin"]] = None, - 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, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class NodeImageVersion(_Model): - """node image version profile for given major.minor.patch release. - - :ivar os: The operating system of the node image. Example: AKSUbuntu. - :vartype os: str - :ivar sku: The SKU or flavor of the node image. Example: 2004gen2containerd. - :vartype sku: str - :ivar version: major.minor.patch version of the node image version release. Example: - 2024.02.02. - :vartype version: str - :ivar full_name: The OS + SKU + version of the node image. Example: - AKSUbuntu-1804gen2containerd-2024.02.02. - :vartype full_name: str - """ - - os: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The operating system of the node image. Example: AKSUbuntu.""" - sku: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """The SKU or flavor of the node image. Example: 2004gen2containerd.""" - version: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """major.minor.patch version of the node image version release. Example: 2024.02.02.""" - full_name: Optional[str] = rest_field(name="fullName", visibility=["read", "create", "update", "delete", "query"]) - """The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02.""" - - @overload - def __init__( - self, - *, - os: Optional[str] = None, - sku: Optional[str] = None, - version: Optional[str] = None, - full_name: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class NvidiaGPUProfile(_Model): - """NVIDIA-specific GPU settings. - - :ivar management_mode: The Managed GPU experience installs additional components, such as the - Data Center GPU Manager (DCGM) metrics for monitoring, on top of the GPU driver for you. For - more details of what is installed, check out aka.ms/aks/managed-gpu. Known values are: - "Unmanaged" and "Managed". - :vartype management_mode: str or ~azure.mgmt.containerservice.models.ManagementMode - :ivar mig_strategy: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed - MIG support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. - When not specified, the default is None. Known values are: "None", "Single", and "Mixed". - :vartype mig_strategy: str or ~azure.mgmt.containerservice.models.MigStrategy - """ - - management_mode: Optional[Union[str, "_models.ManagementMode"]] = rest_field( - name="managementMode", visibility=["read", "create", "update", "delete", "query"] - ) - """The Managed GPU experience installs additional components, such as the Data Center GPU Manager - (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is - installed, check out aka.ms/aks/managed-gpu. Known values are: \"Unmanaged\" and \"Managed\".""" - mig_strategy: Optional[Union[str, "_models.MigStrategy"]] = rest_field( - name="migStrategy", visibility=["read", "create", "update", "delete", "query"] - ) - """Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more - information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, - the default is None. Known values are: \"None\", \"Single\", and \"Mixed\".""" - - @overload - def __init__( - self, - *, - management_mode: Optional[Union[str, "_models.ManagementMode"]] = None, - mig_strategy: Optional[Union[str, "_models.MigStrategy"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class OperationStatusResult(_Model): - """The current status of an async operation. - - :ivar id: Fully qualified ID for the async operation. - :vartype id: str - :ivar name: Name of the async operation. - :vartype name: str - :ivar status: Operation status. Required. - :vartype status: str - :ivar percent_complete: Percent of the operation that is complete. - :vartype percent_complete: float - :ivar start_time: The start time of the operation. - :vartype start_time: ~datetime.datetime - :ivar end_time: The end time of the operation. - :vartype end_time: ~datetime.datetime - :ivar operations: The operations list. - :vartype operations: list[~azure.mgmt.containerservice.models.OperationStatusResult] - :ivar error: If present, details of the operation error. - :vartype error: ~azure.mgmt.containerservice.models.ErrorDetail - :ivar resource_id: Fully qualified ID of the resource against which the original async - operation was started. - :vartype resource_id: str + :ivar ingress: Enum representing different network policy rules. Known values are: "DenyAll", + "AllowAll", and "AllowSameNamespace". + :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule + :ivar egress: Enum representing different network policy rules. Known values are: "DenyAll", + "AllowAll", and "AllowSameNamespace". + :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule """ - id: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Fully qualified ID for the async operation.""" - name: Optional[str] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Name of the async operation.""" - status: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Operation status. Required.""" - percent_complete: Optional[float] = rest_field( - name="percentComplete", visibility=["read", "create", "update", "delete", "query"] - ) - """Percent of the operation that is complete.""" - start_time: Optional[datetime.datetime] = rest_field( - name="startTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The start time of the operation.""" - end_time: Optional[datetime.datetime] = rest_field( - name="endTime", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" - ) - """The end time of the operation.""" - operations: Optional[list["_models.OperationStatusResult"]] = rest_field( + ingress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) - """The operations list.""" - error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """If present, details of the operation error.""" - resource_id: Optional[str] = rest_field(name="resourceId", visibility=["read"]) - """Fully qualified ID of the resource against which the original async operation was started.""" + """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", + and \"AllowSameNamespace\".""" + egress: Optional[Union[str, "_models.PolicyRule"]] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """Enum representing different network policy rules. Known values are: \"DenyAll\", \"AllowAll\", + and \"AllowSameNamespace\".""" @overload def __init__( self, *, - status: str, - id: Optional[str] = None, # pylint: disable=redefined-builtin - name: Optional[str] = None, - percent_complete: Optional[float] = None, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - operations: Optional[list["_models.OperationStatusResult"]] = None, - error: Optional["_models.ErrorDetail"] = None, + ingress: Optional[Union[str, "_models.PolicyRule"]] = None, + egress: Optional[Union[str, "_models.PolicyRule"]] = None, ) -> None: ... @overload @@ -12017,39 +8577,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class PreparedImageSpecificationProfile(_Model): - """Settings to determine the prepared image specification used to provision nodes in a pool. - - :ivar prepared_image_specification_id: The resource ID of the prepared image specification - resource to use. This can include a version. Omitting the version will use the latest version - of the prepared image specification. - :vartype prepared_image_specification_id: str - """ - - prepared_image_specification_id: Optional[str] = rest_field( - name="preparedImageSpecificationId", visibility=["read", "create", "update", "delete", "query"] - ) - """The resource ID of the prepared image specification resource to use. This can include a - version. Omitting the version will use the latest version of the prepared image specification.""" - - @overload - def __init__( - self, - *, - prepared_image_specification_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class PrivateEndpoint(_Model): """Private endpoint which a connection belongs to. @@ -12342,37 +8869,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class RebalanceLoadBalancersRequestBody(_Model): - """The names of the load balancers to rebalance. If set to empty, all load balancers will be - rebalanced. - - :ivar load_balancer_names: The load balancer names list. - :vartype load_balancer_names: list[str] - """ - - load_balancer_names: Optional[list[str]] = rest_field( - name="loadBalancerNames", visibility=["read", "create", "update", "delete", "query"] - ) - """The load balancer names list.""" - - @overload - def __init__( - self, - *, - load_balancer_names: Optional[list[str]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class RelativeMonthlySchedule(_Model): """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. @@ -12519,222 +9015,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class ResourceSku(_Model): - """Describes an available Compute SKU. - - :ivar resource_type: The type of resource the SKU applies to. - :vartype resource_type: str - :ivar name: The name of SKU. - :vartype name: str - :ivar tier: Specifies the tier of virtual machines in a scale set.

Possible - Values:

**Standard**

**Basic**. - :vartype tier: str - :ivar size: The Size of the SKU. - :vartype size: str - :ivar family: The Family of this particular SKU. - :vartype family: str - :ivar kind: The Kind of resources that are supported in this SKU. - :vartype kind: str - :ivar capacity: Specifies the number of virtual machines in the scale set. - :vartype capacity: ~azure.mgmt.containerservice.models.ResourceSkuCapacity - :ivar locations: The set of locations that the SKU is available. - :vartype locations: list[str] - :ivar location_info: A list of locations and availability zones in those locations where the - SKU is available. - :vartype location_info: list[~azure.mgmt.containerservice.models.ResourceSkuLocationInfo] - :ivar api_versions: The api versions that support this SKU. - :vartype api_versions: list[str] - :ivar costs: Metadata for retrieving price info. - :vartype costs: list[~azure.mgmt.containerservice.models.ResourceSkuCosts] - :ivar capabilities: A name value pair to describe the capability. - :vartype capabilities: list[~azure.mgmt.containerservice.models.ResourceSkuCapabilities] - :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if - there are no restrictions. - :vartype restrictions: list[~azure.mgmt.containerservice.models.ResourceSkuRestrictions] - """ - - resource_type: Optional[str] = rest_field(name="resourceType", visibility=["read"]) - """The type of resource the SKU applies to.""" - name: Optional[str] = rest_field(visibility=["read"]) - """The name of SKU.""" - tier: Optional[str] = rest_field(visibility=["read"]) - """Specifies the tier of virtual machines in a scale set.

Possible Values:

- **Standard**

**Basic**.""" - size: Optional[str] = rest_field(visibility=["read"]) - """The Size of the SKU.""" - family: Optional[str] = rest_field(visibility=["read"]) - """The Family of this particular SKU.""" - kind: Optional[str] = rest_field(visibility=["read"]) - """The Kind of resources that are supported in this SKU.""" - capacity: Optional["_models.ResourceSkuCapacity"] = rest_field(visibility=["read"]) - """Specifies the number of virtual machines in the scale set.""" - locations: Optional[list[str]] = rest_field(visibility=["read"]) - """The set of locations that the SKU is available.""" - location_info: Optional[list["_models.ResourceSkuLocationInfo"]] = rest_field( - name="locationInfo", visibility=["read"] - ) - """A list of locations and availability zones in those locations where the SKU is available.""" - api_versions: Optional[list[str]] = rest_field(name="apiVersions", visibility=["read"]) - """The api versions that support this SKU.""" - costs: Optional[list["_models.ResourceSkuCosts"]] = rest_field(visibility=["read"]) - """Metadata for retrieving price info.""" - capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"]) - """A name value pair to describe the capability.""" - restrictions: Optional[list["_models.ResourceSkuRestrictions"]] = rest_field(visibility=["read"]) - """The restrictions because of which SKU cannot be used. This is empty if there are no - restrictions.""" - - -class ResourceSkuCapabilities(_Model): - """Describes The SKU capabilities object. - - :ivar name: An invariant to describe the feature. - :vartype name: str - :ivar value: An invariant if the feature is measured by quantity. - :vartype value: str - """ - - name: Optional[str] = rest_field(visibility=["read"]) - """An invariant to describe the feature.""" - value: Optional[str] = rest_field(visibility=["read"]) - """An invariant if the feature is measured by quantity.""" - - -class ResourceSkuCapacity(_Model): - """Describes scaling information of a SKU. - - :ivar minimum: The minimum capacity. - :vartype minimum: int - :ivar maximum: The maximum capacity that can be set. - :vartype maximum: int - :ivar default: The default capacity. - :vartype default: int - :ivar scale_type: The scale type applicable to the sku. Known values are: "Automatic", - "Manual", and "None". - :vartype scale_type: str or ~azure.mgmt.containerservice.models.ResourceSkuCapacityScaleType - """ - - minimum: Optional[int] = rest_field(visibility=["read"]) - """The minimum capacity.""" - maximum: Optional[int] = rest_field(visibility=["read"]) - """The maximum capacity that can be set.""" - default: Optional[int] = rest_field(visibility=["read"]) - """The default capacity.""" - scale_type: Optional[Union[str, "_models.ResourceSkuCapacityScaleType"]] = rest_field( - name="scaleType", visibility=["read"] - ) - """The scale type applicable to the sku. Known values are: \"Automatic\", \"Manual\", and - \"None\".""" - - -class ResourceSkuCosts(_Model): - """Describes metadata for retrieving price info. - - :ivar meter_id: Used for querying price from commerce. - :vartype meter_id: str - :ivar quantity: The multiplier is needed to extend the base metered cost. - :vartype quantity: int - :ivar extended_unit: An invariant to show the extended unit. - :vartype extended_unit: str - """ - - meter_id: Optional[str] = rest_field(name="meterID", visibility=["read"]) - """Used for querying price from commerce.""" - quantity: Optional[int] = rest_field(visibility=["read"]) - """The multiplier is needed to extend the base metered cost.""" - extended_unit: Optional[str] = rest_field(name="extendedUnit", visibility=["read"]) - """An invariant to show the extended unit.""" - - -class ResourceSkuLocationInfo(_Model): - """Describes an available Compute SKU Location Information. - - :ivar location: Location of the SKU. - :vartype location: str - :ivar zones: List of availability zones where the SKU is supported. - :vartype zones: list[str] - :ivar zone_details: Details of capabilities available to a SKU in specific zones. - :vartype zone_details: list[~azure.mgmt.containerservice.models.ResourceSkuZoneDetails] - :ivar extended_locations: The names of extended locations. - :vartype extended_locations: list[str] - :ivar type: The type of the extended location. "EdgeZone" - :vartype type: str or ~azure.mgmt.containerservice.models.ExtendedLocationTypes - """ - - location: Optional[str] = rest_field(visibility=["read"]) - """Location of the SKU.""" - zones: Optional[list[str]] = rest_field(visibility=["read"]) - """List of availability zones where the SKU is supported.""" - zone_details: Optional[list["_models.ResourceSkuZoneDetails"]] = rest_field(name="zoneDetails", visibility=["read"]) - """Details of capabilities available to a SKU in specific zones.""" - extended_locations: Optional[list[str]] = rest_field(name="extendedLocations", visibility=["read"]) - """The names of extended locations.""" - type: Optional[Union[str, "_models.ExtendedLocationTypes"]] = rest_field(visibility=["read"]) - """The type of the extended location. \"EdgeZone\"""" - - -class ResourceSkuRestrictionInfo(_Model): - """Describes an available Compute SKU Restriction Information. - - :ivar locations: Locations where the SKU is restricted. - :vartype locations: list[str] - :ivar zones: List of availability zones where the SKU is restricted. - :vartype zones: list[str] - """ - - locations: Optional[list[str]] = rest_field(visibility=["read"]) - """Locations where the SKU is restricted.""" - zones: Optional[list[str]] = rest_field(visibility=["read"]) - """List of availability zones where the SKU is restricted.""" - - -class ResourceSkuRestrictions(_Model): - """Describes scaling information of a SKU. - - :ivar type: The type of restrictions. Known values are: "Location" and "Zone". - :vartype type: str or ~azure.mgmt.containerservice.models.ResourceSkuRestrictionsType - :ivar values_property: The value of restrictions. If the restriction type is set to location. - This would be different locations where the SKU is restricted. - :vartype values_property: list[str] - :ivar restriction_info: The information about the restriction where the SKU cannot be used. - :vartype restriction_info: ~azure.mgmt.containerservice.models.ResourceSkuRestrictionInfo - :ivar reason_code: The reason for restriction. Known values are: "QuotaId" and - "NotAvailableForSubscription". - :vartype reason_code: str or - ~azure.mgmt.containerservice.models.ResourceSkuRestrictionsReasonCode - """ - - type: Optional[Union[str, "_models.ResourceSkuRestrictionsType"]] = rest_field(visibility=["read"]) - """The type of restrictions. Known values are: \"Location\" and \"Zone\".""" - values_property: Optional[list[str]] = rest_field(name="values", visibility=["read"], original_tsp_name="values") - """The value of restrictions. If the restriction type is set to location. This would be different - locations where the SKU is restricted.""" - restriction_info: Optional["_models.ResourceSkuRestrictionInfo"] = rest_field( - name="restrictionInfo", visibility=["read"] - ) - """The information about the restriction where the SKU cannot be used.""" - reason_code: Optional[Union[str, "_models.ResourceSkuRestrictionsReasonCode"]] = rest_field( - name="reasonCode", visibility=["read"] - ) - """The reason for restriction. Known values are: \"QuotaId\" and \"NotAvailableForSubscription\".""" - - -class ResourceSkuZoneDetails(_Model): - """Describes The zonal capabilities of a SKU. - - :ivar name: The set of zones that the SKU is available in with the specified capabilities. - :vartype name: list[str] - :ivar capabilities: A list of capabilities that are available for the SKU in the specified list - of zones. - :vartype capabilities: list[~azure.mgmt.containerservice.models.ResourceSkuCapabilities] - """ - - name: Optional[list[str]] = rest_field(visibility=["read"]) - """The set of zones that the SKU is available in with the specified capabilities.""" - capabilities: Optional[list["_models.ResourceSkuCapabilities"]] = rest_field(visibility=["read"]) - """A list of capabilities that are available for the SKU in the specified list of zones.""" - - class RunCommandRequest(_Model): """A run command request. @@ -12829,93 +9109,23 @@ def __setattr__(self, key: str, value: Any) -> None: super().__setattr__(key, value) -class SafeguardsAvailableVersion(ProxyResource): - """Available Safeguards Version. - - :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.models.SystemData - :ivar properties: Whether the version is default or not and support info. Required. - :vartype properties: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties - """ - - properties: "_models.SafeguardsAvailableVersionsProperties" = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Whether the version is default or not and support info. Required.""" - - @overload - def __init__( - self, - *, - properties: "_models.SafeguardsAvailableVersionsProperties", - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class SafeguardsAvailableVersionsProperties(_Model): - """Whether the version is default or not and support info. - - :ivar is_default_version: Whether this is the default version. - :vartype is_default_version: bool - :ivar support: Whether the version is preview or stable. Known values are: "Preview" and - "Stable". - :vartype support: str or ~azure.mgmt.containerservice.models.SafeguardsSupport - """ - - is_default_version: Optional[bool] = rest_field(name="isDefaultVersion", visibility=["read"]) - """Whether this is the default version.""" - support: Optional[Union[str, "_models.SafeguardsSupport"]] = rest_field(visibility=["read"]) - """Whether the version is preview or stable. Known values are: \"Preview\" and \"Stable\".""" - - class ScaleProfile(_Model): """Specifications on how to scale a VirtualMachines agent pool. :ivar manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. :vartype manual: list[~azure.mgmt.containerservice.models.ManualScaleProfile] - :ivar autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a - predefined size range. Each profile targets a specific VM SKU and is evaluated independently. - Scaling decisions across profiles are governed by the cluster autoscaler expander, configurable - via ``ManagedCluster.properties.autoScalerProfile.expander``. - :vartype autoscale: list[~azure.mgmt.containerservice.models.AutoScaleProfile] """ manual: Optional[list["_models.ManualScaleProfile"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) """Specifications on how to scale the VirtualMachines agent pool to a fixed size.""" - autoscale: Optional[list["_models.AutoScaleProfile"]] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size - range. Each profile targets a specific VM SKU and is evaluated independently. Scaling decisions - across profiles are governed by the cluster autoscaler expander, configurable via - ``ManagedCluster.properties.autoScalerProfile.expander``.""" @overload def __init__( self, *, manual: Optional[list["_models.ManualScaleProfile"]] = None, - autoscale: Optional[list["_models.AutoScaleProfile"]] = None, ) -> None: ... @overload @@ -12980,150 +9190,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class SchedulerInstanceProfile(_Model): - """The scheduler profile for a single scheduler instance. - - :ivar scheduler_config_mode: The config customization mode for this scheduler instance. Known - values are: "Default" and "ManagedByCRD". - :vartype scheduler_config_mode: str or ~azure.mgmt.containerservice.models.SchedulerConfigMode - """ - - scheduler_config_mode: Optional[Union[str, "_models.SchedulerConfigMode"]] = rest_field( - name="schedulerConfigMode", visibility=["read", "create", "update", "delete", "query"] - ) - """The config customization mode for this scheduler instance. Known values are: \"Default\" and - \"ManagedByCRD\".""" - - @overload - def __init__( - self, - *, - scheduler_config_mode: Optional[Union[str, "_models.SchedulerConfigMode"]] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class SchedulerProfile(_Model): - """The pod scheduler profile for the cluster. - - :ivar scheduler_instance_profiles: Mapping of each scheduler instance to its profile. - :vartype scheduler_instance_profiles: - ~azure.mgmt.containerservice.models.SchedulerProfileSchedulerInstanceProfiles - """ - - scheduler_instance_profiles: Optional["_models.SchedulerProfileSchedulerInstanceProfiles"] = rest_field( - name="schedulerInstanceProfiles", visibility=["read", "create", "update", "delete", "query"] - ) - """Mapping of each scheduler instance to its profile.""" - - @overload - def __init__( - self, - *, - scheduler_instance_profiles: Optional["_models.SchedulerProfileSchedulerInstanceProfiles"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class SchedulerProfileSchedulerInstanceProfiles(_Model): # pylint: disable=name-too-long - """Mapping of each scheduler instance to its profile. - - :ivar upstream: The scheduler profile for the upstream scheduler instance. - :vartype upstream: ~azure.mgmt.containerservice.models.SchedulerInstanceProfile - """ - - upstream: Optional["_models.SchedulerInstanceProfile"] = rest_field( - visibility=["read", "create", "update", "delete", "query"] - ) - """The scheduler profile for the upstream scheduler instance.""" - - @overload - def __init__( - self, - *, - upstream: Optional["_models.SchedulerInstanceProfile"] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - -class ServiceAccountImagePullProfile(_Model): - """Profile for configuring image pull authentication to use service account scoped managed - identities for authentication instead of node scoped managed identity (kubelet identity) for - authentication to Azure Container Registry. For more information, refer to - `https://aka.ms/aks/identity-binding/acr-image-pull/docs - `_. - - :ivar enabled: Indicates whether service account based image pull is enabled, for which - identity bindings are required for the managed identity to be used for authentication. For more - information, refer to `https://aka.ms/aks/identity-binding-docs - `_. - :vartype enabled: bool - :ivar default_managed_identity_id: Optional. The default managed identity resource ID used for - image pulls at the cluster level. When configured, this identity is used if a Pod’s service - account does not explicitly specify an identity for pulling images. If not configured and no - identity is specified at service account level, image will be pulled via anonymous - authentication. - :vartype default_managed_identity_id: str - """ - - enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) - """Indicates whether service account based image pull is enabled, for which identity bindings are - required for the managed identity to be used for authentication. For more information, refer to - `https://aka.ms/aks/identity-binding-docs `_.""" - default_managed_identity_id: Optional[str] = rest_field( - name="defaultManagedIdentityId", visibility=["read", "create", "update", "delete", "query"] - ) - """Optional. The default managed identity resource ID used for image pulls at the cluster level. - When configured, this identity is used if a Pod’s service account does not explicitly specify - an identity for pulling images. If not configured and no identity is specified at service - account level, image will be pulled via anonymous authentication.""" - - @overload - def __init__( - self, - *, - enabled: Optional[bool] = None, - default_managed_identity_id: Optional[str] = None, - ) -> None: ... - - @overload - def __init__(self, mapping: Mapping[str, Any]) -> None: - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: - super().__init__(*args, **kwargs) - - class ServiceMeshProfile(_Model): """Service mesh profile for a managed cluster. @@ -13239,8 +9305,7 @@ class SnapshotProperties(_Model): :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.models.CreationData - :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: - "NodePool" and "ManagedCluster". + :ivar snapshot_type: The type of a snapshot. The default is NodePool. "NodePool" :vartype snapshot_type: str or ~azure.mgmt.containerservice.models.SnapshotType :ivar kubernetes_version: The version of Kubernetes. :vartype kubernetes_version: str @@ -13251,9 +9316,9 @@ class SnapshotProperties(_Model): :vartype os_type: str or ~azure.mgmt.containerservice.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", "AzureLinux", "AzureLinux3", "Mariner", - "Flatcar", "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", - "WindowsAnnual", and "Ubuntu2404". + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", "Windows2025", "Ubuntu2404", and + "AzureContainerLinux". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar vm_size: The size of the VM. :vartype vm_size: str @@ -13268,8 +9333,7 @@ class SnapshotProperties(_Model): snapshot_type: Optional[Union[str, "_models.SnapshotType"]] = rest_field( name="snapshotType", visibility=["read", "create", "update", "delete", "query"] ) - """The type of a snapshot. The default is NodePool. Known values are: \"NodePool\" and - \"ManagedCluster\".""" + """The type of a snapshot. The default is NodePool. \"NodePool\"""" kubernetes_version: Optional[str] = rest_field(name="kubernetesVersion", visibility=["read"]) """The version of Kubernetes.""" node_image_version: Optional[str] = rest_field(name="nodeImageVersion", visibility=["read"]) @@ -13279,9 +9343,9 @@ class SnapshotProperties(_Model): os_sku: Optional[Union[str, "_models.OSSKU"]] = rest_field(name="osSku", visibility=["read"]) """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\", \"AzureLinux\", \"AzureLinux3\", \"Mariner\", - \"Flatcar\", \"CBLMariner\", \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", - \"WindowsAnnual\", and \"Ubuntu2404\".""" + is Windows. Known values are: \"Ubuntu\", \"AzureLinux\", \"AzureLinux3\", \"CBLMariner\", + \"Windows2019\", \"Windows2022\", \"Ubuntu2204\", \"Windows2025\", \"Ubuntu2404\", and + \"AzureContainerLinux\".""" vm_size: Optional[str] = rest_field(name="vmSize", visibility=["read"]) """The size of the VM.""" enable_fips: Optional[bool] = rest_field(name="enableFIPS", visibility=["read"]) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py index 49ff26d86c61..c93b651bf54b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/__init__.py @@ -19,19 +19,11 @@ from ._operations import MachinesOperations # type: ignore from ._operations import PrivateEndpointConnectionsOperations # type: ignore from ._operations import SnapshotsOperations # type: ignore -from ._operations import ManagedClusterSnapshotsOperations # type: ignore from ._operations import TrustedAccessRoleBindingsOperations # type: ignore -from ._operations import LoadBalancersOperations # type: ignore -from ._operations import IdentityBindingsOperations # type: ignore -from ._operations import JWTAuthenticatorsOperations # type: ignore -from ._operations import MeshMembershipsOperations # type: ignore from ._operations import Operations # type: ignore -from ._operations import OperationStatusResultOperations # type: ignore from ._operations import PrivateLinkResourcesOperations # type: ignore from ._operations import ResolvePrivateLinkServiceIdOperations # type: ignore from ._operations import TrustedAccessRolesOperations # type: ignore -from ._operations import ContainerServiceOperations # type: ignore -from ._operations import VmSkusOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -45,19 +37,11 @@ "MachinesOperations", "PrivateEndpointConnectionsOperations", "SnapshotsOperations", - "ManagedClusterSnapshotsOperations", "TrustedAccessRoleBindingsOperations", - "LoadBalancersOperations", - "IdentityBindingsOperations", - "JWTAuthenticatorsOperations", - "MeshMembershipsOperations", "Operations", - "OperationStatusResultOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", "TrustedAccessRolesOperations", - "ContainerServiceOperations", - "VmSkusOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py index 26064c0935b1..54a912e22e9f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operations.py @@ -38,7 +38,6 @@ from .._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._utils.serialization import Deserializer, Serializer from .._utils.utils import prep_if_match, prep_if_none_match -from .._validation import api_version_validation JSON = MutableMapping[str, Any] T = TypeVar("T") @@ -55,7 +54,7 @@ def build_agent_pools_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,7 +91,7 @@ def build_agent_pools_create_or_update_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +136,7 @@ def build_agent_pools_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}" path_format_arguments = { @@ -173,7 +172,7 @@ def build_agent_pools_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -200,7 +199,7 @@ def build_agent_pools_abort_latest_operation_request( # pylint: disable=name-to ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort" path_format_arguments = { @@ -218,29 +217,6 @@ def build_agent_pools_abort_latest_operation_request( # pylint: disable=name-to return HttpRequest(method="POST", url=_url, params=_params, **kwargs) -def build_agent_pools_complete_upgrade_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="POST", url=_url, params=_params, **kwargs) - - def build_agent_pools_delete_machines_request( # pylint: disable=name-too-long resource_group_name: str, resource_name: str, agent_pool_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -248,7 +224,7 @@ def build_agent_pools_delete_machines_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" path_format_arguments = { @@ -276,7 +252,7 @@ def build_agent_pools_upgrade_node_image_version_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -305,7 +281,7 @@ def build_agent_pools_get_available_agent_pool_versions_request( # pylint: disa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -333,7 +309,7 @@ def build_agent_pools_get_upgrade_profile_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -362,7 +338,7 @@ def build_managed_clusters_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -397,7 +373,7 @@ def build_managed_clusters_create_or_update_request( # pylint: disable=name-too _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -440,7 +416,7 @@ def build_managed_clusters_update_tags_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -475,7 +451,6 @@ def build_managed_clusters_delete_request( resource_name: str, subscription_id: str, *, - ignore_pod_disruption_budget: Optional[bool] = None, etag: Optional[str] = None, match_condition: Optional[MatchConditions] = None, **kwargs: Any @@ -483,7 +458,7 @@ def build_managed_clusters_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}" path_format_arguments = { @@ -496,10 +471,6 @@ def build_managed_clusters_delete_request( # 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 if_match = prep_if_match(etag, match_condition) @@ -518,7 +489,7 @@ def build_managed_clusters_list_by_resource_group_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -543,7 +514,7 @@ def build_managed_clusters_list_request(subscription_id: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -569,7 +540,7 @@ def build_managed_clusters_get_access_profile_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -603,7 +574,7 @@ def build_managed_clusters_list_cluster_admin_credentials_request( # pylint: di _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -639,7 +610,7 @@ def build_managed_clusters_list_cluster_user_credentials_request( # pylint: dis _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -676,7 +647,7 @@ def build_managed_clusters_list_cluster_monitoring_user_credentials_request( # _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -707,7 +678,7 @@ def build_managed_clusters_reset_service_principal_profile_request( # pylint: d _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile" path_format_arguments = { @@ -735,7 +706,7 @@ def build_managed_clusters_reset_aad_profile_request( # pylint: disable=name-to _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile" path_format_arguments = { @@ -761,7 +732,7 @@ def build_managed_clusters_rotate_cluster_certificates_request( # pylint: disab ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates" path_format_arguments = { @@ -783,7 +754,7 @@ def build_managed_clusters_abort_latest_operation_request( # pylint: disable=na ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort" path_format_arguments = { @@ -805,7 +776,7 @@ def build_managed_clusters_rotate_service_account_signing_keys_request( # pylin ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" path_format_arguments = { @@ -827,7 +798,7 @@ def build_managed_clusters_stop_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" path_format_arguments = { @@ -849,7 +820,7 @@ def build_managed_clusters_start_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" path_format_arguments = { @@ -873,7 +844,7 @@ def build_managed_clusters_run_command_request( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -903,7 +874,7 @@ def build_managed_clusters_get_command_result_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -932,7 +903,7 @@ def build_managed_clusters_list_outbound_network_dependencies_endpoints_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -954,41 +925,13 @@ def build_managed_clusters_list_outbound_network_dependencies_endpoints_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_clusters_rebalance_load_balancers_request( # pylint: disable=name-too-long - 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 {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) - - def build_managed_clusters_get_upgrade_profile_request( # pylint: disable=name-too-long 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1010,127 +953,13 @@ def build_managed_clusters_get_upgrade_profile_request( # pylint: disable=name- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_clusters_get_guardrails_versions_request( # pylint: disable=name-too-long - location: str, version: 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - "version": _SERIALIZER.url("version", version, "str"), - } - - _url: str = _url.format(**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_managed_clusters_list_guardrails_versions_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**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_managed_clusters_get_safeguards_versions_request( # pylint: disable=name-too-long - location: str, version: 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - "version": _SERIALIZER.url("version", version, "str"), - } - - _url: str = _url.format(**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_managed_clusters_list_safeguards_versions_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**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_managed_clusters_get_mesh_revision_profile_request( # pylint: disable=name-too-long location: str, mode: 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1158,7 +987,7 @@ def build_managed_clusters_list_mesh_revision_profiles_request( # pylint: disab _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1187,7 +1016,7 @@ def build_managed_clusters_get_mesh_upgrade_profile_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1216,7 +1045,7 @@ def build_managed_clusters_list_mesh_upgrade_profiles_request( # pylint: disabl _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1244,7 +1073,7 @@ def build_managed_clusters_list_kubernetes_versions_request( # pylint: disable= _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1273,7 +1102,7 @@ def build_maintenance_configurations_get_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1303,7 +1132,7 @@ def build_maintenance_configurations_create_or_update_request( # pylint: disabl _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1333,7 +1162,7 @@ def build_maintenance_configurations_delete_request( # pylint: disable=name-too ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" path_format_arguments = { @@ -1357,7 +1186,7 @@ def build_maintenance_configurations_list_by_managed_cluster_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1385,7 +1214,7 @@ def build_managed_namespaces_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1415,7 +1244,7 @@ def build_managed_namespaces_create_or_update_request( # pylint: disable=name-t _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1447,7 +1276,7 @@ def build_managed_namespaces_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1477,7 +1306,7 @@ def build_managed_namespaces_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName}" path_format_arguments = { @@ -1501,7 +1330,7 @@ def build_managed_namespaces_list_by_managed_cluster_request( # pylint: disable _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1529,7 +1358,7 @@ def build_managed_namespaces_list_credential_request( # pylint: disable=name-to _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1563,7 +1392,7 @@ def build_machines_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1587,60 +1416,13 @@ def build_machines_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_machines_create_or_update_request( - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - subscription_id: str, - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), - "machineName": _SERIALIZER.url("machine_name", machine_name, "str"), - } - - _url: str = _url.format(**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") - if_match = prep_if_match(etag, match_condition) - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if_none_match = prep_if_none_match(etag, match_condition) - if if_none_match is not None: - _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") - - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) - - def build_machines_list_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1673,7 +1455,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1709,7 +1491,7 @@ def build_private_endpoint_connections_update_request( # pylint: disable=name-t _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1745,7 +1527,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}" path_format_arguments = { @@ -1771,7 +1553,7 @@ def build_private_endpoint_connections_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1799,7 +1581,7 @@ def build_snapshots_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1828,7 +1610,7 @@ def build_snapshots_create_or_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1859,7 +1641,7 @@ def build_snapshots_update_tags_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1888,7 +1670,7 @@ def build_snapshots_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" path_format_arguments = { @@ -1911,7 +1693,7 @@ def build_snapshots_list_by_resource_group_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1936,7 +1718,7 @@ def build_snapshots_list_request(subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1956,21 +1738,28 @@ def build_snapshots_list_request(subscription_id: str, **kwargs: Any) -> HttpReq return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_cluster_snapshots_get_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too-long + 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -1984,22 +1773,29 @@ def build_managed_cluster_snapshots_get_request( # pylint: disable=name-too-lon return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_cluster_snapshots_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +def build_trusted_access_role_bindings_create_or_update_request( # pylint: disable=name-too-long + 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 {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2015,22 +1811,25 @@ def build_managed_cluster_snapshots_create_or_update_request( # pylint: disable return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_cluster_snapshots_update_tags_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +def build_trusted_access_role_bindings_delete_request( # pylint: disable=name-too-long + 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 {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "trustedAccessRoleBindingName": _SERIALIZER.url( + "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2038,22 +1837,20 @@ def build_managed_cluster_snapshots_update_tags_request( # pylint: disable=name # 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) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) -def build_managed_cluster_snapshots_delete_request( # pylint: disable=name-too-long +def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too-long 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) + accept = _headers.pop("Accept", "application/json") + # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -2065,52 +1862,21 @@ def build_managed_cluster_snapshots_delete_request( # pylint: disable=name-too- # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_managed_cluster_snapshots_list_by_resource_group_request( # pylint: disable=name-too-long - resource_group_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: + +def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - } - - _url: str = _url.format(**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_managed_cluster_snapshots_list_request( # pylint: disable=name-too-long - subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore + _url = "/providers/Microsoft.ContainerService/operations" # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") @@ -2121,28 +1887,21 @@ def build_managed_cluster_snapshots_list_request( # pylint: disable=name-too-lo return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any +def build_private_link_resources_list_request( # pylint: disable=name-too-long + 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2156,29 +1915,22 @@ def build_trusted_access_role_bindings_get_request( # pylint: disable=name-too- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any +def build_resolve_private_link_service_id_post_request( # pylint: disable=name-too-long + 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 {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2191,53 +1943,23 @@ def build_trusted_access_role_bindings_create_or_update_request( # pylint: disa _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_trusted_access_role_bindings_delete_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - trusted_access_role_binding_name: str, - subscription_id: str, - **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "trustedAccessRoleBindingName": _SERIALIZER.url( - "trusted_access_role_binding_name", trusted_access_role_binding_name, "str" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: +def build_trusted_access_roles_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + _url = ( + "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "location": _SERIALIZER.url("location", location, "str"), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -2251,5371 +1973,146 @@ def build_trusted_access_role_bindings_list_request( # pylint: disable=name-too return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_load_balancers_get_request( - resource_group_name: str, resource_name: str, load_balancer_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") +class AgentPoolsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`agent_pools` attribute. + """ - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @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. -def build_load_balancers_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + :param resource_group_name: The name of the resource group. The name 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 + :return: AgentPool. The AgentPool is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPool + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), - } + cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) - _url: str = _url.format(**path_format_arguments) # type: ignore + _request = build_agent_pools_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=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - # 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") + response = pipeline_response.http_response - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPool, response.json()) -def build_load_balancers_delete_request( - resource_group_name: str, resource_name: str, load_balancer_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "loadBalancerName": _SERIALIZER.url("load_balancer_name", load_balancer_name, "str"), - } + return deserialized # type: ignore - _url: str = _url.format(**path_format_arguments) # type: ignore + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError + error_map.update(kwargs.pop("error_map", {}) or {}) - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore -def build_load_balancers_list_by_managed_cluster_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_identity_bindings_get_request( - resource_group_name: str, resource_name: str, identity_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), - } - - _url: str = _url.format(**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_identity_bindings_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, identity_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 {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), - } - - _url: str = _url.format(**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_identity_bindings_delete_request( - resource_group_name: str, resource_name: str, identity_binding_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "identityBindingName": _SERIALIZER.url("identity_binding_name", identity_binding_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_identity_bindings_list_by_managed_cluster_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_jwt_authenticators_get_request( - resource_group_name: str, resource_name: str, jwt_authenticator_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), - } - - _url: str = _url.format(**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_jwt_authenticators_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, jwt_authenticator_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), - } - - _url: str = _url.format(**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_jwt_authenticators_delete_request( - resource_group_name: str, resource_name: str, jwt_authenticator_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "jwtAuthenticatorName": _SERIALIZER.url("jwt_authenticator_name", jwt_authenticator_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_jwt_authenticators_list_by_managed_cluster_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_mesh_memberships_get_request( - resource_group_name: str, resource_name: str, mesh_membership_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), - } - - _url: str = _url.format(**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_mesh_memberships_create_or_update_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, mesh_membership_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), - } - - _url: str = _url.format(**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_mesh_memberships_delete_request( - resource_group_name: str, resource_name: str, mesh_membership_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "meshMembershipName": _SERIALIZER.url("mesh_membership_name", mesh_membership_name, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) - - -def build_mesh_memberships_list_by_managed_cluster_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_operations_list_request(**kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _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) - - -def build_operation_status_result_get_by_agent_pool_request( # pylint: disable=name-too-long - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - operation_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "agentPoolName": _SERIALIZER.url("agent_pool_name", agent_pool_name, "str"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), - } - - _url: str = _url.format(**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_operation_status_result_list_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_operation_status_result_get_request( # pylint: disable=name-too-long - resource_group_name: str, resource_name: str, operation_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str"), - } - - _url: str = _url.format(**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_private_link_resources_list_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_resolve_private_link_service_id_post_request( # pylint: disable=name-too-long - 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 {}) - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), - } - - _url: str = _url.format(**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_trusted_access_roles_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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = ( - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**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_container_service_list_node_image_versions_request( # pylint: disable=name-too-long - 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: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**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_vm_skus_list_request( - location: str, subscription_id: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2026-02-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/vmSkus" - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "location": _SERIALIZER.url("location", location, "str"), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - if include_extended_locations is not None: - _params["includeExtendedLocations"] = _SERIALIZER.query( - "include_extended_locations", include_extended_locations, "bool" - ) - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", 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.ContainerServiceClient`'s - :attr:`agent_pools` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @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. - - :param resource_group_name: The name of the resource group. The name 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 - :return: AgentPool. The AgentPool is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPool - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) - - _request = build_agent_pools_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPool, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - parameters: Union[_models.AgentPool, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_agent_pools_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, - etag=etag, - match_condition=match_condition, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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: JSON, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.AgentPool]: - """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 one of the following types: - AgentPool, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.AgentPool or JSON or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_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, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.AgentPool, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.AgentPool].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.AgentPool]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_agent_pools_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, - etag=etag, - match_condition=match_condition, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[None]: - """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 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. - :paramtype ignore_pod_disruption_budget: bool - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, - etag=etag, - match_condition=match_condition, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> ItemPaged["_models.AgentPool"]: - """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 - :return: An iterator like instance of AgentPool - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.AgentPool] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.AgentPool]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_agent_pools_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.AgentPool], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - def _abort_latest_operation_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_agent_pools_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _complete_upgrade_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_agent_pools_complete_upgrade_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_complete_upgrade( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Completes the upgrade of an agent pool. - - Completes the upgrade operation for the specified 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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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._complete_upgrade_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _delete_machines_initial( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: Union[_models.AgentPoolDeleteMachinesParameter, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(machines, (IOBase, bytes)): - _content = machines - else: - _content = json.dumps(machines, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_agent_pools_delete_machines_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_delete_machines( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: _models.AgentPoolDeleteMachinesParameter, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in 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 - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_delete_machines( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in 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 - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_delete_machines( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in 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 - :param machines: A list of machines from the agent pool to be deleted. Required. - :type machines: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_delete_machines( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machines: Union[_models.AgentPoolDeleteMachinesParameter, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Deletes specific machines in 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 - :param machines: A list of machines from the agent pool to be deleted. Is one of the following - types: AgentPoolDeleteMachinesParameter, JSON, IO[bytes] Required. - :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter or JSON or - IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[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_machines_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - machines=machines, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _upgrade_node_image_version_initial( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_agent_pools_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_upgrade_node_image_version( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> LROPoller[None]: - """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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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 - :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) - - _request = build_agent_pools_get_available_agent_pool_versions_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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 - :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_agent_pools_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -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.ContainerServiceClient`'s - :attr:`managed_clusters` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: - """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 - :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedCluster - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedCluster, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedCluster, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.ManagedCluster, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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 one of the following types: - ManagedCluster, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or JSON or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_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, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedCluster, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedCluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedCluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _update_tags_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_update_tags_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[_models.ManagedCluster]: - """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 one of - the following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_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, - etag=etag, - match_condition=match_condition, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedCluster, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedCluster].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedCluster]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @api_version_validation( - params_added_on={"2026-02-02-preview": ["ignore_pod_disruption_budget"]}, - api_versions_list=["2025-10-01", "2026-01-01", "2026-02-01", "2026-02-02-preview"], - ) - def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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, - etag=etag, - match_condition=match_condition, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - params_added_on={"2026-02-02-preview": ["ignore_pod_disruption_budget"]}, - api_versions_list=["2025-10-01", "2026-01-01", "2026-02-01", "2026-02-02-preview"], - ) - def begin_delete( - self, - resource_group_name: str, - resource_name: str, - *, - ignore_pod_disruption_budget: Optional[bool] = None, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, - **kwargs: Any - ) -> LROPoller[None]: - """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 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. - :paramtype ignore_pod_disruption_budget: bool - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, - etag=etag, - match_condition=match_condition, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: - """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 - :return: An iterator like instance of ManagedCluster - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedCluster], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: - """Gets a list of managed clusters in the specified subscription. - - :return: An iterator like instance of ManagedCluster - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedCluster], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @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 - :return: ManagedClusterAccessProfile. The ManagedClusterAccessProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterAccessProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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 server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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 server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :keyword 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. - :paramtype format: str or ~azure.mgmt.containerservice.models.Format - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name 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 server_fqdn: server fqdn type for credentials to be returned. Default value is None. - :paramtype server_fqdn: str - :return: CredentialResults. The CredentialResults is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.CredentialResults - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.CredentialResults, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _reset_service_principal_profile_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterServicePrincipalProfile, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_reset_service_principal_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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.models.ManagedClusterServicePrincipalProfile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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: JSON, - *, - 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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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[bytes], - *, - 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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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, JSON, IO[bytes]], - **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 one of the - following types: ManagedClusterServicePrincipalProfile, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile or - JSON or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[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( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _reset_aad_profile_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterAADProfile, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_reset_aad_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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.models.ManagedClusterAADProfile - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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: JSON, - *, - 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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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[bytes], - *, - 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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :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, JSON, IO[bytes]], - **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 one of the following - types: ManagedClusterAADProfile, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile or JSON or - IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[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( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _rotate_cluster_certificates_initial( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_rotate_cluster_certificates_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _abort_latest_operation_initial( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_abort_latest_operation_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_rotate_service_account_signing_keys_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_rotate_service_account_signing_keys( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> LROPoller[None]: - """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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_stop_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_start_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - def _run_command_initial( - self, - resource_group_name: str, - resource_name: str, - request_payload: Union[_models.RunCommandRequest, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(request_payload, (IOBase, bytes)): - _content = request_payload - else: - _content = json.dumps(request_payload, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_run_command_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @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.models.RunCommandRequest - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_run_command( - self, - resource_group_name: str, - resource_name: str, - request_payload: JSON, - *, - 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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_run_command( - self, - resource_group_name: str, - resource_name: str, - request_payload: IO[bytes], - *, - 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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **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 one of the following types: - RunCommandRequest, JSON, IO[bytes] Required. - :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest or JSON or - IO[bytes] - :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_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, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response_headers = {} - response = pipeline_response.http_response - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = _deserialize(_models.RunCommandResult, response.json()) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.RunCommandResult].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.RunCommandResult]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @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. - - :param resource_group_name: The name of the resource group. The name 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 - :return: RunCommandResult or None. The RunCommandResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.RunCommandResult or None - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) - - _request = build_managed_clusters_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = None - response_headers = {} - if response.status_code == 200: - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.RunCommandResult, response.json()) - - if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_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 - :return: An iterator like instance of OutboundEnvironmentEndpoint - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.OutboundEnvironmentEndpoint]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_outbound_network_dependencies_endpoints_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OutboundEnvironmentEndpoint], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _rebalance_load_balancers_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_managed_clusters_rebalance_load_balancers_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: _models.RebalanceLoadBalancersRequestBody, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Rebalance nodes across specific load balancers. - - :param resource_group_name: The name of the resource group. The name 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 names of the load balancers to be rebalanced. If set to empty, all load - balancers will be rebalanced. Is one of the following types: RebalanceLoadBalancersRequestBody, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or JSON - or IO[bytes] - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[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._rebalance_load_balancers_initial( - resource_group_name=resource_group_name, - resource_name=resource_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @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. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_upgrade_profile_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> _models.GuardrailsAvailableVersion: - """Gets supported Guardrails version in the specified subscription and location. - - Contains Guardrails version along with its support info and whether it is a default version. - - :param location: The name of the Azure region. Required. - :type location: str - :param version: Safeguards version. Required. - :type version: str - :return: GuardrailsAvailableVersion. The GuardrailsAvailableVersion is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersion - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_guardrails_versions_request( - location=location, - version=version, + _request = build_agent_pools_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, + etag=etag, + match_condition=match_condition, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -7625,19 +2122,18 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -7645,314 +2141,261 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.GuardrailsAvailableVersion, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_guardrails_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.GuardrailsAvailableVersion"]: - """Gets a list of supported Guardrails versions in the specified subscription and location. - - Contains list of Guardrails version along with its support info and whether it is a default - version. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of GuardrailsAvailableVersion - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.GuardrailsAvailableVersion]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_guardrails_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.GuardrailsAvailableVersion], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") ) - 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) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - return pipeline_response + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - return ItemPaged(get_next, extract_data) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - @distributed_trace - def get_safeguards_versions(self, location: str, version: str, **kwargs: Any) -> _models.SafeguardsAvailableVersion: - """Gets supported Safeguards version in the specified subscription and location. + return deserialized # type: ignore - Contains Safeguards version along with its support info and whether it is a default version. + @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", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. - :param location: The name of the Azure region. Required. - :type location: str - :param version: Safeguards version. Required. - :type version: str - :return: SafeguardsAvailableVersion. The SafeguardsAvailableVersion is compatible with + :param resource_group_name: The name of the resource group. The name 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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_managed_clusters_get_safeguards_versions_request( - location=location, - version=version, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.SafeguardsAvailableVersion, response.json()) + :param resource_group_name: The name of the resource group. The name 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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. - return deserialized # type: ignore + :param resource_group_name: The name of the resource group. The name 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[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def list_safeguards_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.SafeguardsAvailableVersion"]: - """Gets a list of supported Safeguards versions in the specified subscription and location. - - Contains list of Safeguards version along with its support info and whether it is a default - version. + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + parameters: Union[_models.AgentPool, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.AgentPool]: + """Creates or updates an agent pool in the specified managed cluster. - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of SafeguardsAvailableVersion - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] + :param resource_group_name: The name of the resource group. The name 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 one of the following types: + AgentPool, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.AgentPool or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns AgentPool. The AgentPool is compatible with + MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.SafeguardsAvailableVersion]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_safeguards_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.SafeguardsAvailableVersion], - deserialized.get("value", []), + 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, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + def get_long_running_output(pipeline_response): response = pipeline_response.http_response + deserialized = _deserialize(_models.AgentPool, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: - """Gets a mesh revision profile for a specified mesh in the specified location. + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - Contains extra metadata on the revision, including supported revisions, cluster compatibility - and available upgrades. + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.AgentPool].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.AgentPool]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) - :param location: The name of the Azure region. Required. - :type location: str - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_revision_profile_request( - location=location, - mode=mode, + _request = build_agent_pools_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, + etag=etag, + match_condition=match_condition, api_version=self._config.api_version, headers=_headers, params=_params, @@ -7963,19 +2406,18 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -7983,33 +2425,119 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @distributed_trace - def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged["_models.MeshRevisionProfile"]: - """Lists mesh revision profiles for all meshes in the specified location. + def begin_delete( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + *, + ignore_pod_disruption_budget: Optional[bool] = None, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes an agent pool in the specified managed cluster. - Contains extra metadata on each revision, including supported revisions, cluster compatibility - and available upgrades. + :param resource_group_name: The name of the resource group. The name 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 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. + :paramtype ignore_pod_disruption_budget: bool + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of MeshRevisionProfile - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + ignore_pod_disruption_budget=ignore_pod_disruption_budget, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> ItemPaged["_models.AgentPool"]: + """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 + :return: An iterator like instance of AgentPool + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.AgentPool]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -8022,8 +2550,9 @@ def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged def prepare_request(next_link=None): if not next_link: - _request = build_managed_clusters_list_mesh_revision_profiles_request( - location=location, + _request = build_agent_pools_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8061,7 +2590,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshRevisionProfile], + List[_models.AgentPool], deserialized.get("value", []), ) if cls: @@ -8089,23 +2618,9 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - @distributed_trace - def get_mesh_upgrade_profile( - self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any - ) -> _models.MeshUpgradeProfile: - """Gets available upgrades for a service mesh in 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 - :param mode: The mode of the mesh. Required. - :type mode: str - :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _abort_latest_operation_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8117,12 +2632,12 @@ def get_mesh_upgrade_profile( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_get_mesh_upgrade_profile_request( + _request = build_agent_pools_abort_latest_operation_request( resource_group_name=resource_group_name, resource_name=resource_name, - mode=mode, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8134,149 +2649,114 @@ def get_mesh_upgrade_profile( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_mesh_upgrade_profiles( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.MeshUpgradeProfile"]: - """Lists available upgrades for all service meshes in a specific 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 - :return: An iterator like instance of MeshUpgradeProfile - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_clusters_list_mesh_upgrade_profiles_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.MeshUpgradeProfile], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") ) - response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore @distributed_trace - def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: - """Gets a list of supported Kubernetes versions in the specified subscription. + 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. - Contains extra metadata on the version, including supported patch versions, capabilities, - available upgrades, and details on preview status of the version. + 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 location: The name of the Azure region. Required. - :type location: str - :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult + :param resource_group_name: The name of the resource group. The name 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 + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _delete_machines_initial( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: Union[_models.AgentPoolDeleteMachinesParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8285,15 +2765,27 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_managed_clusters_list_kubernetes_versions_request( - location=location, + content_type = content_type or "application/json" + _content = None + if isinstance(machines, (IOBase, bytes)): + _content = machines + else: + _content = json.dumps(machines, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_agent_pools_delete_machines_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -8303,19 +2795,18 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8323,53 +2814,187 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) + response_headers = {} + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: _models.AgentPoolDeleteMachinesParameter, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. -class MaintenanceConfigurationsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name 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 machines: A list of machines from the agent pool to be deleted. Required. + :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`maintenance_configurations` attribute. - """ + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in an agent pool. - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param resource_group_name: The name of the resource group. The name 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 machines: A list of machines from the agent pool to be deleted. Required. + :type machines: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in 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 + :param machines: A list of machines from the agent pool to be deleted. Required. + :type machines: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ @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. + def begin_delete_machines( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + machines: Union[_models.AgentPoolDeleteMachinesParameter, JSON, IO[bytes]], + **kwargs: Any + ) -> LROPoller[None]: + """Deletes specific machines in 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 config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :param machines: A list of machines from the agent pool to be deleted. Is one of the following + types: AgentPoolDeleteMachinesParameter, JSON, IO[bytes] Required. + :type machines: ~azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter or JSON or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[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_machines_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machines=machines, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _upgrade_node_image_version_initial( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -8381,12 +3006,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_get_request( + _request = build_agent_pools_upgrade_node_image_version_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8398,19 +3023,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8418,138 +3042,106 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @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. + @distributed_trace + def begin_upgrade_node_image_version( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> LROPoller[None]: + """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 config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + 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, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - :param resource_group_name: The name of the resource group. The name 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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } - :param resource_group_name: The name of the resource group. The name 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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration - :raises ~azure.core.exceptions.HttpResponseError: - """ + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - config_name: str, - parameters: Union[_models.MaintenanceConfiguration, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.MaintenanceConfiguration: - """Creates or updates a maintenance configuration in the specified managed cluster. + 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 - :param config_name: The name of the maintenance configuration. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :param parameters: The maintenance configuration to create or update. Is one of the following - types: MaintenanceConfiguration, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or JSON or - IO[bytes] - :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + :return: AgentPoolAvailableVersions. The AgentPoolAvailableVersions is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.models.AgentPoolAvailableVersions :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8560,27 +3152,16 @@ def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_create_or_update_request( + _request = build_agent_pools_get_available_agent_pool_versions_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -8597,7 +3178,7 @@ def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -8613,7 +3194,7 @@ def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) + deserialized = _deserialize(_models.AgentPoolAvailableVersions, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -8621,21 +3202,20 @@ def create_or_update( return deserialized # type: ignore @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. + 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. :param resource_group_name: The name of the resource group. The name 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. Supported values are 'default', - 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. - :type config_name: str - :return: None - :rtype: None + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: AgentPoolUpgradeProfile. The AgentPoolUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.AgentPoolUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -8649,12 +3229,12 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) - _request = build_maintenance_configurations_delete_request( + _request = build_agent_pools_get_upgrade_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, - config_name=config_name, + agent_pool_name=agent_pool_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -8665,14 +3245,20 @@ def delete( # pylint: disable=inconsistent-return-statements } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8680,163 +3266,428 @@ def delete( # pylint: disable=inconsistent-return-statements ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.AgentPoolUpgradeProfile, response.json()) + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +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.ContainerServiceClient`'s + :attr:`managed_clusters` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = 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 - ) -> ItemPaged["_models.MaintenanceConfiguration"]: - """Gets a list of maintenance configurations in the specified managed cluster. + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedCluster: + """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 - :return: An iterator like instance of MaintenanceConfiguration - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] + :return: ManagedCluster. The ManagedCluster is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedCluster :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.ManagedCluster, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + def _create_or_update_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedCluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} - _request = build_maintenance_configurations_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - return _request + _request = build_managed_clusters_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.MaintenanceConfiguration], - deserialized.get("value", []), + response_headers = {} + if response.status_code == 201: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - def get_next(next_link=None): - _request = prepare_request(next_link) + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + return deserialized # type: ignore - return pipeline_response + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: _models.ManagedCluster, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. - return ItemPaged(get_next, extract_data) + :param resource_group_name: The name of the resource group. The name 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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. -class ManagedNamespacesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + :param resource_group_name: The name of the resource group. The name 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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`managed_namespaces` attribute. - """ + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """Creates or updates a managed cluster. - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + :param resource_group_name: The name of the resource group. The name 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[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> _models.ManagedNamespace: - """Gets the specified namespace of a managed cluster. + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedCluster, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :param parameters: The managed cluster to create or update. Is one of the following types: + ManagedCluster, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedCluster or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_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, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedCluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedCluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedCluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _update_tags_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.TagsObject, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_namespaces_get_request( + _request = build_managed_clusters_update_tags_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, + etag=etag, + match_condition=match_condition, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -8846,19 +3697,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -8866,22 +3716,218 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - def _create_or_update_initial( + @overload + def begin_update_tags( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """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.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 etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """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[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.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, JSON, IO[bytes]], + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, + **kwargs: Any + ) -> LROPoller[_models.ManagedCluster]: + """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 one of + the following types: TagsObject, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns ManagedCluster. The ManagedCluster is compatible + with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedCluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_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, + etag=etag, + match_condition=match_condition, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedCluster, response.json()) + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.ManagedCluster].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.ManagedCluster]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + *, + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -8890,29 +3936,26 @@ def _create_or_update_initial( 409: ResourceExistsError, 304: ResourceNotModifiedError, } + if match_condition == MatchConditions.IfNotModified: + error_map[412] = ResourceModifiedError + elif match_condition == MatchConditions.IfPresent: + error_map[412] = ResourceNotFoundError + elif match_condition == MatchConditions.IfMissing: + error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - _request = build_managed_namespaces_create_or_update_request( + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_managed_clusters_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, - content_type=content_type, + etag=etag, + match_condition=match_condition, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -8929,7 +3972,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -8942,10 +3985,11 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: + if response.status_code == 202: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -8955,302 +3999,283 @@ def _create_or_update_initial( return deserialized # type: ignore - @overload - def begin_create_or_update( + @distributed_trace + def begin_delete( self, resource_group_name: str, resource_name: str, - managed_namespace_name: str, - parameters: _models.ManagedNamespace, *, - content_type: str = "application/json", + etag: Optional[str] = None, + match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + ) -> LROPoller[None]: + """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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is + None. + :paramtype etag: str + :keyword match_condition: The match condition to use upon the etag. Default value is None. + :paramtype match_condition: ~azure.core.MatchConditions + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + etag=etag, + match_condition=match_condition, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] - :raises ~azure.core.exceptions.HttpResponseError: - """ + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: + """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 - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + :return: An iterator like instance of ManagedCluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.ManagedNamespace]: - """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can - configure aspects like resource quotas, network ingress/egress policies, and more. See - aka.ms/aks/managed-namespaces for more details. + cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: The namespace to create or update. Is one of the following types: - ManagedNamespace, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or JSON or IO[bytes] - :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] + error_map: MutableMapping = { + 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_managed_clusters_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedCluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedCluster"]: + """Gets a list of managed clusters in the specified subscription. + + :return: An iterator like instance of ManagedCluster + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = 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, - managed_namespace_name=managed_namespace_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.ManagedNamespace, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + cls: ClsType[List[_models.ManagedCluster]] = kwargs.pop("cls", None) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } + error_map.update(kwargs.pop("error_map", {}) or {}) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.ManagedNamespace].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.ManagedNamespace]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + def prepare_request(next_link=None): + if not next_link: - @overload - def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: _models.TagsObject, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + _request = build_managed_clusters_list_request( + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - @overload - def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + return _request - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedCluster], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - @overload - def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + def get_next(next_link=None): + _request = prepare_request(next_link) - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Required. - :type parameters: IO[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace - :raises ~azure.core.exceptions.HttpResponseError: - """ + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) @distributed_trace - def update( - self, - resource_group_name: str, - resource_name: str, - managed_namespace_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedNamespace: - """Updates tags on a managed namespace. + 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :param parameters: Parameters supplied to the patch namespace operation, we only support patch - tags for now. Is one of the following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace + :param role_name: The name of the role for managed cluster accessProfile resource. Required. + :type role_name: str + :return: ManagedClusterAccessProfile. The ManagedClusterAccessProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterAccessProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -9259,29 +4284,19 @@ def update( 409: ResourceExistsError, 304: ResourceNotModifiedError, } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + error_map.update(kwargs.pop("error_map", {}) or {}) - _request = build_managed_namespaces_update_request( + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_access_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, + role_name=role_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -9314,16 +4329,30 @@ def update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedNamespace, response.json()) + deserialized = _deserialize(_models.ManagedClusterAccessProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - def _delete_initial( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> Iterator[bytes]: + @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. + + :param resource_group_name: The name of the resource group. The name 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 server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -9335,13 +4364,13 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - _request = build_managed_namespaces_delete_request( + _request = build_managed_clusters_list_cluster_admin_credentials_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, api_version=self._config.api_version, headers=_headers, params=_params, @@ -9352,18 +4381,19 @@ def _delete_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -9371,103 +4401,44 @@ def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @distributed_trace - def begin_delete( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a namespace. - - :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - managed_namespace_name=managed_namespace_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.ManagedNamespace"]: - """Gets a list of managed namespaces in the specified managed cluster. + 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. :param resource_group_name: The name of the resource group. The name is case insensitive. Required. :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :return: An iterator like instance of ManagedNamespace - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] + :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str + :keyword 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. + :paramtype format: str or ~azure.mgmt.containerservice.models.Format + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) - error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -9476,90 +4447,70 @@ def list_by_managed_cluster( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_managed_namespaces_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - return _request + _request = build_managed_clusters_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=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedNamespace], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore @distributed_trace - def list_credential( - self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + 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 credentials of a namespace. + """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 managed_namespace_name: The name of the managed namespace. Required. - :type managed_namespace_name: str + :keyword server_fqdn: server fqdn type for credentials to be returned. Default value is None. + :paramtype server_fqdn: str :return: CredentialResults. The CredentialResults is compatible with MutableMapping :rtype: ~azure.mgmt.containerservice.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: @@ -9577,11 +4528,11 @@ def list_credential( cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) - _request = build_managed_namespaces_list_credential_request( + _request = build_managed_clusters_list_cluster_monitoring_user_credentials_request( resource_group_name=resource_group_name, resource_name=resource_name, - managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, + server_fqdn=server_fqdn, api_version=self._config.api_version, headers=_headers, params=_params, @@ -9622,43 +4573,13 @@ def list_credential( return deserialized # type: ignore - -class MachinesOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`machines` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any - ) -> _models.Machine: - """Get a specific machine in the specified 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 - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :return: Machine. The Machine is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Machine - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _reset_service_principal_profile_initial( + self, + resource_group_name: str, + resource_name: str, + parameters: Union[_models.ManagedClusterServicePrincipalProfile, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -9667,18 +4588,26 @@ def get( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_machines_get_request( + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_reset_service_principal_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -9688,19 +4617,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -9708,44 +4636,182 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Machine, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "machine_name", - "content_type", - "accept", - "etag", - "match_condition", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _create_or_update_initial( + @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.models.ManagedClusterServicePrincipalProfile + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :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: JSON, + *, + 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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :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[bytes], + *, + 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[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns None + :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, JSON, IO[bytes]], + **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 one of the + following types: ManagedClusterServicePrincipalProfile, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile or + JSON or IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[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( + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _reset_aad_profile_initial( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, + parameters: Union[_models.ManagedClusterAADProfile, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -9754,12 +4820,6 @@ def _create_or_update_initial( 409: ResourceExistsError, 304: ResourceNotModifiedError, } - if match_condition == MatchConditions.IfNotModified: - error_map[412] = ResourceModifiedError - elif match_condition == MatchConditions.IfPresent: - error_map[412] = ResourceNotFoundError - elif match_condition == MatchConditions.IfMissing: - error_map[412] = ResourceExistsError error_map.update(kwargs.pop("error_map", {}) or {}) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -9775,14 +4835,10 @@ def _create_or_update_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_machines_create_or_update_request( + _request = build_managed_clusters_reset_aad_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, subscription_id=self._config.subscription_id, - etag=etag, - match_condition=match_condition, content_type=content_type, api_version=self._config.api_version, content=_content, @@ -9802,7 +4858,7 @@ def _create_or_update_initial( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -9815,10 +4871,8 @@ def _create_or_update_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -9829,200 +4883,138 @@ def _create_or_update_initial( return deserialized # type: ignore @overload - def begin_create_or_update( + def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: _models.Machine, + parameters: _models.ManagedClusterAADProfile, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. + ) -> 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 agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine + :param parameters: The AAD profile to set on the Managed Cluster. Required. + :type parameters: ~azure.mgmt.containerservice.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 etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machine_name: str, parameters: JSON, *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. + ) -> 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 agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machine_name: str, parameters: IO[bytes], *, content_type: str = "application/json", - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. + ) -> 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 agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Required. + :param parameters: The AAD profile to set on the Managed Cluster. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "machine_name", - "content_type", - "accept", - "etag", - "match_condition", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_create_or_update( + def begin_reset_aad_profile( self, resource_group_name: str, resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, JSON, IO[bytes]], - *, - etag: Optional[str] = None, - match_condition: Optional[MatchConditions] = None, + parameters: Union[_models.ManagedClusterAADProfile, JSON, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. + ) -> 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 agent_pool_name: The name of the agent pool. Required. - :type agent_pool_name: str - :param machine_name: Host name of the machine. Required. - :type machine_name: str - :param parameters: The machine to create or update. Is one of the following types: Machine, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine or JSON or IO[bytes] - :keyword etag: check if resource is changed. Set None to skip checking etag. Default value is - None. - :paramtype etag: str - :keyword match_condition: The match condition to use upon the etag. Default value is None. - :paramtype match_condition: ~azure.core.MatchConditions - :return: An instance of LROPoller that returns Machine. The Machine is compatible with - MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] + :param parameters: The AAD profile to set on the Managed Cluster. Is one of the following + types: ManagedClusterAADProfile, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterAADProfile or JSON or + IO[bytes] + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Machine] = kwargs.pop("cls", 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._create_or_update_initial( + raw_result = self._reset_aad_profile_initial( resource_group_name=resource_group_name, resource_name=resource_name, - agent_pool_name=agent_pool_name, - machine_name=machine_name, parameters=parameters, - etag=etag, - match_condition=match_condition, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -10032,12 +5024,9 @@ def begin_create_or_update( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.Machine, response.json()) + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + return cls(pipeline_response, None, {}) # type: ignore path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -10052,38 +5041,17 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.Machine].from_continuation_token( + return LROPoller[None].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.Machine]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any - ) -> ItemPaged["_models.Machine"]: - """Gets a list of machines in the specified 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 - :return: An iterator like instance of Machine - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + def _rotate_cluster_certificates_initial( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10092,118 +5060,121 @@ def list( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_machines_list_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.Machine], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - def get_next(next_link=None): - _request = prepare_request(next_link) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response + _request = build_managed_clusters_rotate_cluster_certificates_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + _decompress = kwargs.pop("decompress", True) + _stream = True + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - return pipeline_response + response = pipeline_response.http_response - return ItemPaged(get_next, extract_data) + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) -class PrivateEndpointConnectionsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. + deserialized = response.iter_bytes() if _decompress else response.iter_raw() - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`private_endpoint_connections` attribute. - """ + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + return deserialized # type: ignore @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. + def begin_rotate_cluster_certificates( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Rotates the certificates of a managed cluster. - To learn more about private clusters, see: - `https://docs.microsoft.com/azure/aks/private-clusters - `_. + 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 - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _abort_latest_operation_initial( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10215,12 +5186,11 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_get_request( + _request = build_managed_clusters_abort_latest_operation_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=self._config.api_version, headers=_headers, @@ -10232,19 +5202,18 @@ def get( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -10252,136 +5221,87 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.PrivateEndpointConnection - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update( - self, - resource_group_name: str, - resource_name: str, - private_endpoint_connection_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.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, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.PrivateEndpointConnection: - """Updates a private endpoint connection. + 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 - :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 one of the following types: - PrivateEndpointConnection, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or JSON or - IO[bytes] - :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10390,27 +5310,16 @@ def update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_update_request( + _request = build_managed_clusters_rotate_service_account_signing_keys_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, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -10420,19 +5329,18 @@ def update( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 201]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -10440,19 +5348,78 @@ def update( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - def _delete_initial( - self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any - ) -> Iterator[bytes]: + @distributed_trace + def begin_rotate_service_account_signing_keys( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> LROPoller[None]: + """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 + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10466,10 +5433,9 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_delete_request( + _request = build_managed_clusters_stop_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=self._config.api_version, headers=_headers, @@ -10488,7 +5454,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [202, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -10501,10 +5467,8 @@ def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 200: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -10515,18 +5479,20 @@ def _delete_initial( return deserialized # type: ignore @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. + 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 - :param private_endpoint_connection_name: The name of the private endpoint connection. Required. - :type private_endpoint_connection_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -10539,10 +5505,9 @@ def begin_delete( 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( + raw_result = self._stop_initial( resource_group_name=resource_group_name, resource_name=resource_name, - private_endpoint_connection_name=private_endpoint_connection_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -10576,26 +5541,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- ) return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - @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 - :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is - compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult - :raises ~azure.core.exceptions.HttpResponseError: - """ + def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10607,9 +5553,9 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_private_endpoint_connections_list_request( + _request = build_managed_clusters_start_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -10623,19 +5569,18 @@ def list( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [202, 204]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -10643,47 +5588,85 @@ def list( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - -class SnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`snapshots` attribute. - """ + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + + return deserialized # type: ignore @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.Snapshot: - """Gets a snapshot. + 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 - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + 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( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + def _run_command_initial( + self, + resource_group_name: str, + resource_name: str, + request_payload: Union[_models.RunCommandRequest, JSON, IO[bytes]], + **kwargs: Any + ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -10692,16 +5675,26 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_snapshots_get_request( + content_type = content_type or "application/json" + _content = None + if isinstance(request_payload, (IOBase, bytes)): + _content = request_payload + else: + _content = json.dumps(request_payload, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + + _request = build_managed_clusters_run_command_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, + content_type=content_type, api_version=self._config.api_version, + content=_content, headers=_headers, params=_params, ) @@ -10711,19 +5704,18 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if response.status_code not in [200, 202]: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -10731,117 +5723,213 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + response_headers = {} + if response.status_code == 202: + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = response.iter_bytes() if _decompress else response.iter_raw() if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore @overload - def create_or_update( + def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: _models.Snapshot, + request_payload: _models.RunCommandRequest, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> 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 parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot + :param request_payload: The run command request. Required. + :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: JSON, + request_payload: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> 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 parameters: The snapshot to create or update. Required. - :type parameters: JSON + :param request_payload: The run command request. Required. + :type request_payload: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: IO[bytes], + request_payload: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> 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 parameters: The snapshot to create or update. Required. - :type parameters: IO[bytes] + :param request_payload: The run command request. Required. + :type request_payload: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def create_or_update( + def begin_run_command( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.Snapshot, JSON, IO[bytes]], + request_payload: Union[_models.RunCommandRequest, JSON, IO[bytes]], **kwargs: Any - ) -> _models.Snapshot: - """Creates or updates a snapshot. + ) -> 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 one of the following types: + RunCommandRequest, JSON, IO[bytes] Required. + :type request_payload: ~azure.mgmt.containerservice.models.RunCommandRequest or JSON or + IO[bytes] + :return: An instance of LROPoller that returns RunCommandResult. The RunCommandResult is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.RunCommandResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_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, + content_type=content_type, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + raw_result.http_response.read() # type: ignore + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + + deserialized = _deserialize(_models.RunCommandResult, response.json()) + if cls: + return cls(pipeline_response, deserialized, response_headers) # type: ignore + return deserialized + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[_models.RunCommandResult].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.RunCommandResult]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + @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. :param resource_group_name: The name of the resource group. The name 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 one of the following types: Snapshot, - JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.Snapshot or JSON or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :param command_id: Id of the command. Required. + :type command_id: str + :return: RunCommandResult or None. The RunCommandResult is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.RunCommandResult or None :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -10852,26 +5940,17 @@ def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) - _request = build_snapshots_create_or_update_request( + _request = build_managed_clusters_get_command_result_request( resource_group_name=resource_group_name, resource_name=resource_name, + command_id=command_id, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -10888,7 +5967,7 @@ def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -10901,117 +5980,140 @@ def create_or_update( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.Snapshot, response.json()) + deserialized = None + response_headers = {} + if response.status_code == 200: + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.RunCommandResult, response.json()) + + if response.status_code == 202: + response_headers["location"] = self._deserialize("str", response.headers.get("location")) if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return cls(pipeline_response, deserialized, response_headers) # type: ignore return deserialized # type: ignore - @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. + @distributed_trace + def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_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 - :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: An iterator like instance of OutboundEnvironmentEndpoint + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - @overload - def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + cls: ClsType[List[_models.OutboundEnvironmentEndpoint]] = kwargs.pop("cls", None) - :param resource_group_name: The name of the resource group. The name 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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - @overload - def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + def prepare_request(next_link=None): + if not next_link: - :param resource_group_name: The name of the resource group. The name 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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + _request = build_managed_clusters_list_outbound_network_dependencies_endpoints_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OutboundEnvironmentEndpoint], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) @distributed_trace - def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.Snapshot: - """Updates tags on a snapshot. + def get_upgrade_profile( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> _models.ManagedClusterUpgradeProfile: + """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 - :param parameters: Parameters supplied to the Update snapshot Tags operation. Is one of the - following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: Snapshot. The Snapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.Snapshot + :return: ManagedClusterUpgradeProfile. The ManagedClusterUpgradeProfile is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedClusterUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11022,26 +6124,16 @@ def update_tags( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) - _request = build_snapshots_update_tags_request( + _request = build_managed_clusters_get_upgrade_profile_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -11074,7 +6166,7 @@ def update_tags( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.Snapshot, response.json()) + deserialized = _deserialize(_models.ManagedClusterUpgradeProfile, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -11082,18 +6174,18 @@ def update_tags( return deserialized # type: ignore @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> None: - """Deletes a snapshot. + def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _models.MeshRevisionProfile: + """Gets a mesh revision profile for a specified mesh in the specified location. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: None - :rtype: None + Contains extra metadata on the revision, including supported revisions, cluster compatibility + and available upgrades. + + :param location: The name of the Azure region. Required. + :type location: str + :param mode: The mode of the mesh. Required. + :type mode: str + :return: MeshRevisionProfile. The MeshRevisionProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshRevisionProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11107,11 +6199,11 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) - _request = build_snapshots_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_managed_clusters_get_mesh_revision_profile_request( + location=location, + mode=mode, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11122,14 +6214,20 @@ def delete( # pylint: disable=inconsistent-return-statements } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _stream = False + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) response = pipeline_response.http_response - if response.status_code not in [200, 204]: + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -11137,24 +6235,33 @@ def delete( # pylint: disable=inconsistent-return-statements ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MeshRevisionProfile, response.json()) + if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace - def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: - """Lists snapshots in the specified subscription and resource group. + def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged["_models.MeshRevisionProfile"]: + """Lists mesh revision profiles for all meshes in the specified location. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] + Contains extra metadata on each revision, including supported revisions, cluster compatibility + and available upgrades. + + :param location: The name of the Azure region. Required. + :type location: str + :return: An iterator like instance of MeshRevisionProfile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MeshRevisionProfile]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -11167,8 +6274,8 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite def prepare_request(next_link=None): if not next_link: - _request = build_snapshots_list_by_resource_group_request( - resource_group_name=resource_group_name, + _request = build_managed_clusters_list_mesh_revision_profiles_request( + location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11206,7 +6313,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Snapshot], + List[_models.MeshRevisionProfile], deserialized.get("value", []), ) if cls: @@ -11235,17 +6342,99 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - def list(self, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: - """Gets a list of snapshots in the specified subscription. + def get_mesh_upgrade_profile( + self, resource_group_name: str, resource_name: str, mode: str, **kwargs: Any + ) -> _models.MeshUpgradeProfile: + """Gets available upgrades for a service mesh in a cluster. - :return: An iterator like instance of Snapshot - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.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 mode: The mode of the mesh. Required. + :type mode: str + :return: MeshUpgradeProfile. The MeshUpgradeProfile is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MeshUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) + cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) + + _request = build_managed_clusters_get_mesh_upgrade_profile_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + mode=mode, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.MeshUpgradeProfile, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_mesh_upgrade_profiles( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.MeshUpgradeProfile"]: + """Lists available upgrades for all service meshes in a specific 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 + :return: An iterator like instance of MeshUpgradeProfile + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshUpgradeProfile] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.MeshUpgradeProfile]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -11258,7 +6447,9 @@ def list(self, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: def prepare_request(next_link=None): if not next_link: - _request = build_snapshots_list_request( + _request = build_managed_clusters_list_mesh_upgrade_profiles_request( + resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11296,7 +6487,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.Snapshot], + List[_models.MeshUpgradeProfile], deserialized.get("value", []), ) if cls: @@ -11324,42 +6515,18 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) - -class ManagedClusterSnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`managed_cluster_snapshots` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: - """Gets a managed cluster snapshot. + def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.KubernetesVersionListResult: + """Gets a list of supported Kubernetes versions in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + Contains extra metadata on the version, including supported patch versions, capabilities, + available upgrades, and details on preview status of the version. + + :param location: The name of the Azure region. Required. + :type location: str + :return: KubernetesVersionListResult. The KubernetesVersionListResult is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.KubernetesVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11373,11 +6540,10 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) - _request = build_managed_cluster_snapshots_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_managed_clusters_list_kubernetes_versions_request( + location=location, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11412,129 +6578,48 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + deserialized = _deserialize(_models.KubernetesVersionListResult, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @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. - - :param resource_group_name: The name of the resource group. The name 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.models.ManagedClusterSnapshot - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: JSON, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """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: JSON - :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """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[bytes] - :keyword content_type: Body Parameter content-type. Content type parameter for binary body. - Default value is "application/json". - :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ + +class MaintenanceConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`maintenance_configurations` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterSnapshot, JSON, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. + 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. :param resource_group_name: The name of the resource group. The name 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 one of the following - types: ManagedClusterSnapshot, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or JSON or - IO[bytes] - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11545,26 +6630,17 @@ def create_or_update( } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) - _request = build_managed_cluster_snapshots_create_or_update_request( + _request = build_maintenance_configurations_get_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, - content_type=content_type, api_version=self._config.api_version, - content=_content, headers=_headers, params=_params, ) @@ -11581,7 +6657,7 @@ def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -11597,7 +6673,7 @@ def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -11605,123 +6681,127 @@ def create_or_update( return deserialized # type: ignore @overload - def update_tags( + def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: _models.TagsObject, + config_name: str, + parameters: _models.MaintenanceConfiguration, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update_tags( + def create_or_update( self, resource_group_name: str, resource_name: str, + config_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def update_tags( + def create_or_update( self, resource_group_name: str, resource_name: str, + config_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def update_tags( + def create_or_update( self, resource_group_name: str, resource_name: str, - parameters: Union[_models.TagsObject, JSON, IO[bytes]], + config_name: str, + parameters: Union[_models.MaintenanceConfiguration, JSON, IO[bytes]], **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. + ) -> _models.MaintenanceConfiguration: + """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 parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is one of the following types: TagsObject, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] - :return: ManagedClusterSnapshot. The ManagedClusterSnapshot is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str + :param parameters: The maintenance configuration to create or update. Is one of the following + types: MaintenanceConfiguration, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.MaintenanceConfiguration or JSON or + IO[bytes] + :return: MaintenanceConfiguration. The MaintenanceConfiguration is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -11736,7 +6816,7 @@ def update_tags( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) + cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -11745,9 +6825,10 @@ def update_tags( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_managed_cluster_snapshots_update_tags_request( + _request = build_maintenance_configurations_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -11768,7 +6849,7 @@ def update_tags( response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -11784,7 +6865,7 @@ def update_tags( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.ManagedClusterSnapshot, response.json()) + deserialized = _deserialize(_models.MaintenanceConfiguration, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -11792,23 +6873,19 @@ def update_tags( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name"] - }, - api_versions_list=["2026-02-02-preview"], - ) def delete( # pylint: disable=inconsistent-return-statements - self, resource_group_name: str, resource_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, config_name: str, **kwargs: Any ) -> None: - """Deletes a managed cluster snapshot. + """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. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. + :type config_name: str :return: None :rtype: None :raises ~azure.core.exceptions.HttpResponseError: @@ -11826,9 +6903,10 @@ def delete( # pylint: disable=inconsistent-return-statements cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_managed_cluster_snapshots_delete_request( + _request = build_maintenance_configurations_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, + config_name=config_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11858,28 +6936,25 @@ def delete( # pylint: disable=inconsistent-return-statements return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={"2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_resource_group( - self, resource_group_name: str, **kwargs: Any - ) -> ItemPaged["_models.ManagedClusterSnapshot"]: - """Lists managed cluster snapshots in the specified subscription and resource group. + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.MaintenanceConfiguration"]: + """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 - :return: An iterator like instance of ManagedClusterSnapshot + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of MaintenanceConfiguration :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MaintenanceConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.MaintenanceConfiguration]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -11892,8 +6967,9 @@ def list_by_resource_group( def prepare_request(next_link=None): if not next_link: - _request = build_managed_cluster_snapshots_list_by_resource_group_request( + _request = build_maintenance_configurations_list_by_managed_cluster_request( resource_group_name=resource_group_name, + resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -11931,103 +7007,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.ManagedClusterSnapshot], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={"2026-02-02-preview": ["api_version", "subscription_id", "accept"]}, - api_versions_list=["2026-02-02-preview"], - ) - def list(self, **kwargs: Any) -> ItemPaged["_models.ManagedClusterSnapshot"]: - """Gets a list of managed cluster snapshots in the specified subscription. - - :return: An iterator like instance of ManagedClusterSnapshot - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ManagedClusterSnapshot]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_managed_cluster_snapshots_list_request( - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ManagedClusterSnapshot], + List[_models.MaintenanceConfiguration], deserialized.get("value", []), ) if cls: @@ -12056,14 +7036,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class TrustedAccessRoleBindingsOperations: +class ManagedNamespacesOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`trusted_access_role_bindings` attribute. + :attr:`managed_namespaces` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -12075,20 +7055,19 @@ def __init__(self, *args, **kwargs) -> None: @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. + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.ManagedNamespace: + """Gets the specified namespace 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 trusted_access_role_binding_name: The name of trusted access role binding. Required. - :type trusted_access_role_binding_name: str - :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with - MutableMapping - :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -12102,12 +7081,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) - _request = build_trusted_access_role_bindings_get_request( + _request = build_managed_namespaces_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -12142,7 +7121,7 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore @@ -12153,8 +7132,8 @@ def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -12173,15 +7152,15 @@ def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(trusted_access_role_binding, (IOBase, bytes)): - _content = trusted_access_role_binding + if isinstance(parameters, (IOBase, bytes)): + _content = parameters else: - _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_trusted_access_role_bindings_create_or_update_request( + _request = build_managed_namespaces_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -12233,30 +7212,31 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: _models.TrustedAccessRoleBinding, + managed_namespace_name: str, + parameters: _models.ManagedNamespace, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name 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.models.TrustedAccessRoleBinding + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -12265,30 +7245,31 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: JSON, + managed_namespace_name: str, + parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name 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: JSON + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -12297,30 +7278,31 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: IO[bytes], + managed_namespace_name: str, + parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """Create or update a trusted access role binding. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name 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[bytes] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -12329,176 +7311,44 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - trusted_access_role_binding_name: str, - trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], + managed_namespace_name: str, + parameters: Union[_models.ManagedNamespace, JSON, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.TrustedAccessRoleBinding]: - """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 one of the following - types: TrustedAccessRoleBinding, JSON, IO[bytes] Required. - :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding - or JSON or IO[bytes] - :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The - TrustedAccessRoleBinding is compatible with MutableMapping - :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.TrustedAccessRoleBinding] = 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, - trusted_access_role_binding_name=trusted_access_role_binding_name, - trusted_access_role_binding=trusted_access_role_binding, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.TrustedAccessRoleBinding]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_trusted_access_role_bindings_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=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def begin_delete( - self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Delete a trusted access role binding. + ) -> LROPoller[_models.ManagedNamespace]: + """Creates or updates a namespace managed by ARM for the specified managed cluster. Users can + configure aspects like resource quotas, network ingress/egress policies, and more. See + aka.ms/aks/managed-namespaces for more details. :param resource_group_name: The name of the resource group. The name 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 - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: The namespace to create or update. Is one of the following types: + ManagedNamespace, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.ManagedNamespace or JSON or IO[bytes] + :return: An instance of LROPoller that returns ManagedNamespace. The ManagedNamespace is + compatible with MutableMapping + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.ManagedNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} - cls: ClsType[None] = kwargs.pop("cls", None) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.ManagedNamespace] = 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( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - trusted_access_role_binding_name=trusted_access_role_binding_name, + managed_namespace_name=managed_namespace_name, + parameters=parameters, + content_type=content_type, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -12507,9 +7357,12 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: - return cls(pipeline_response, None, {}) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore + return deserialized path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), @@ -12524,349 +7377,132 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- else: polling_method = polling if cont_token: - return LROPoller[None].from_continuation_token( + return LROPoller[_models.ManagedNamespace].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore - - @distributed_trace - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.TrustedAccessRoleBinding"]: - """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 - :return: An iterator like instance of TrustedAccessRoleBinding - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_trusted_access_role_bindings_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.TrustedAccessRoleBinding], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class LoadBalancersOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`load_balancers` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def get( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> _models.LoadBalancer: - """Gets the specified load balancer. - - :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - - _request = build_load_balancers_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - load_balancer_name=load_balancer_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + return LROPoller[_models.ManagedNamespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.LoadBalancer, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - @overload - def create_or_update( + def update( self, resource_group_name: str, resource_name: str, - load_balancer_name: str, - parameters: _models.LoadBalancer, + managed_namespace_name: str, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def update( self, resource_group_name: str, resource_name: str, - load_balancer_name: str, + managed_namespace_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def create_or_update( + def update( self, resource_group_name: str, resource_name: str, - load_balancer_name: str, + managed_namespace_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Required. + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def create_or_update( + def update( self, resource_group_name: str, resource_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, JSON, IO[bytes]], + managed_namespace_name: str, + parameters: Union[_models.TagsObject, JSON, IO[bytes]], **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. + ) -> _models.ManagedNamespace: + """Updates tags on a managed namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str - :param parameters: The load balancer to create or update. Is one of the following types: - LoadBalancer, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or JSON or IO[bytes] - :return: LoadBalancer. The LoadBalancer is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is one of the following types: TagsObject, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] + :return: ManagedNamespace. The ManagedNamespace is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.ManagedNamespace :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -12881,7 +7517,7 @@ def create_or_update( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) + cls: ClsType[_models.ManagedNamespace] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -12890,10 +7526,10 @@ def create_or_update( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_load_balancers_create_or_update_request( + _request = build_managed_namespaces_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - load_balancer_name=load_balancer_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -12914,7 +7550,7 @@ def create_or_update( response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: if _stream: try: response.read() # Load the body in memory and close the socket @@ -12930,28 +7566,15 @@ def create_or_update( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.LoadBalancer, response.json()) + deserialized = _deserialize(_models.ManagedNamespace, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def _delete_initial( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -12966,10 +7589,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_load_balancers_delete_request( + _request = build_managed_namespaces_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - load_balancer_name=load_balancer_name, + managed_namespace_name=managed_namespace_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -13016,31 +7639,18 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "load_balancer_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def begin_delete( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes a load balancer in the specified managed cluster. + """Deletes a namespace. :param resource_group_name: The name of the resource group. The name 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 load_balancer_name: The name of the load balancer. Required. - :type load_balancer_name: str + :param managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -13056,7 +7666,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - load_balancer_name=load_balancer_name, + managed_namespace_name=managed_namespace_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -13065,57 +7675,322 @@ def begin_delete( raw_result.http_response.read() # type: ignore kwargs.pop("error_map", None) - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) # type: ignore + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller[None].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> ItemPaged["_models.ManagedNamespace"]: + """Gets a list of managed namespaces 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 + :return: An iterator like instance of ManagedNamespace + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[List[_models.ManagedNamespace]] = kwargs.pop("cls", None) + + error_map: MutableMapping = { + 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_managed_namespaces_list_by_managed_cluster_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.ManagedNamespace], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def list_credential( + self, resource_group_name: str, resource_name: str, managed_namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. + + :param resource_group_name: The name of the resource group. The name 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 managed_namespace_name: The name of the managed namespace. Required. + :type managed_namespace_name: str + :return: CredentialResults. The CredentialResults is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_managed_namespaces_list_credential_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + managed_namespace_name=managed_namespace_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.CredentialResults, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + +class MachinesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s + :attr:`machines` attribute. + """ + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, machine_name: str, **kwargs: Any + ) -> _models.Machine: + """Get a specific machine in the specified 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 + :param machine_name: Host name of the machine. Required. + :type machine_name: str + :return: Machine. The Machine is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Machine + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} + + cls: ClsType[_models.Machine] = kwargs.pop("cls", None) + _request = build_machines_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + machine_name=machine_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + deserialized = _deserialize(_models.Machine, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.LoadBalancer"]: - """Gets a list of load balancers in the specified managed cluster. + def list( + self, resource_group_name: str, resource_name: str, agent_pool_name: str, **kwargs: Any + ) -> ItemPaged["_models.Machine"]: + """Gets a list of machines in the specified 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 - :return: An iterator like instance of LoadBalancer - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] + :param agent_pool_name: The name of the agent pool. Required. + :type agent_pool_name: str + :return: An iterator like instance of Machine + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Machine] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.LoadBalancer]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Machine]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -13128,9 +8003,10 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_load_balancers_list_by_managed_cluster_request( + _request = build_machines_list_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=self._config.api_version, headers=_headers, @@ -13168,7 +8044,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.LoadBalancer], + List[_models.Machine], deserialized.get("value", []), ) if cls: @@ -13197,14 +8073,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class IdentityBindingsOperations: +class PrivateEndpointConnectionsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`identity_bindings` attribute. + :attr:`private_endpoint_connections` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -13215,34 +8091,25 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def get( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. + 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding. The IdentityBinding is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -13256,12 +8123,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) - _request = build_identity_bindings_get_request( + _request = build_private_endpoint_connections_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -13296,310 +8163,203 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.IdentityBinding, response.json()) + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _create_or_update_initial( - self, - resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, JSON, IO[bytes]], - **kwargs: Any - ) -> Iterator[bytes]: - error_map: MutableMapping = { - 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 = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - - _request = build_identity_bindings_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - content_type=content_type, - api_version=self._config.api_version, - content=_content, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = True - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - if response.status_code == 201: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - @overload - def begin_create_or_update( + def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: _models.IdentityBinding, + private_endpoint_connection_name: str, + parameters: _models.PrivateEndpointConnection, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding + :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.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + private_endpoint_connection_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. + :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: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, + private_endpoint_connection_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Required. + :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[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_create_or_update( + def update( self, resource_group_name: str, resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, JSON, IO[bytes]], + private_endpoint_connection_name: str, + parameters: Union[_models.PrivateEndpointConnection, JSON, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. + ) -> _models.PrivateEndpointConnection: + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :param parameters: The identity binding to create or update. Is one of the following types: - IdentityBinding, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or JSON or IO[bytes] - :return: An instance of LROPoller that returns IdentityBinding. The IdentityBinding is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] + :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 one of the following types: + PrivateEndpointConnection, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.PrivateEndpointConnection or JSON or + IO[bytes] + :return: PrivateEndpointConnection. The PrivateEndpointConnection is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = kwargs.pop("params", {}) or {} - - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.IdentityBinding] = 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, - identity_binding_name=identity_binding_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.IdentityBinding, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = kwargs.pop("params", {}) or {} + + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) + + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_private_endpoint_connections_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, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.IdentityBinding].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.IdentityBinding]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.PrivateEndpointConnection, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -13614,10 +8374,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_identity_bindings_delete_request( + _request = build_private_endpoint_connections_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -13636,7 +8396,7 @@ def _delete_initial( response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 204]: try: response.read() # Load the body in memory and close the socket except (StreamConsumedError, StreamClosedError): @@ -13649,11 +8409,10 @@ def _delete_initial( raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} - if response.status_code == 202: + if response.status_code == 200: response_headers["Azure-AsyncOperation"] = self._deserialize( "str", response.headers.get("Azure-AsyncOperation") ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) deserialized = response.iter_bytes() if _decompress else response.iter_raw() @@ -13664,31 +8423,18 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "identity_binding_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def begin_delete( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes an identity binding in the specified managed cluster. + """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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. Required. + :type private_endpoint_connection_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -13704,7 +8450,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - identity_binding_name=identity_binding_name, + private_endpoint_connection_name=private_endpoint_connection_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -13739,32 +8485,25 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( + def list( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. + ) -> _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 - :return: An iterator like instance of IdentityBinding - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] + :return: PrivateEndpointConnectionListResult. The PrivateEndpointConnectionListResult is + compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.IdentityBinding]] = kwargs.pop("cls", None) - error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -13773,86 +8512,64 @@ def list_by_managed_cluster( } error_map.update(kwargs.pop("error_map", {}) or {}) - def prepare_request(next_link=None): - if not next_link: - - _request = build_identity_bindings_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + _headers = kwargs.pop("headers", {}) or {} + _params = kwargs.pop("params", {}) or {} - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) + cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) - return _request + _request = build_private_endpoint_connections_list_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.IdentityBinding], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) - def get_next(next_link=None): - _request = prepare_request(next_link) + response = pipeline_response.http_response - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - response = pipeline_response.http_response + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.PrivateEndpointConnectionListResult, response.json()) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore - return ItemPaged(get_next, extract_data) + return deserialized # type: ignore -class JWTAuthenticatorsOperations: +class SnapshotsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`jwt_authenticators` attribute. + :attr:`snapshots` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -13863,34 +8580,16 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def get( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> _models.JWTAuthenticator: - """Gets the specified JWT authenticator of a managed cluster. + def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.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 - :param jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: JWTAuthenticator. The JWTAuthenticator is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -13904,12 +8603,11 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - _request = build_jwt_authenticators_get_request( + _request = build_snapshots_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -13941,39 +8639,119 @@ def get( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.JWTAuthenticator, response.json()) + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @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. + + :param resource_group_name: The name of the resource group. The name 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.models.Snapshot + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: JSON, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.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: JSON + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + @overload + def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Snapshot: + """Creates or updates a snapshot. - return deserialized # type: ignore + :param resource_group_name: The name of the resource group. The name 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[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _create_or_update_initial( + @distributed_trace + def create_or_update( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, JSON, IO[bytes]], + parameters: Union[_models.Snapshot, JSON, IO[bytes]], **kwargs: Any - ) -> Iterator[bytes]: + ) -> _models.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 one of the following types: Snapshot, + JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.Snapshot or JSON or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -13986,7 +8764,7 @@ def _create_or_update_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) content_type = content_type or "application/json" _content = None @@ -13995,10 +8773,9 @@ def _create_or_update_initial( else: _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_jwt_authenticators_create_or_update_request( + _request = build_snapshots_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -14012,7 +8789,7 @@ def _create_or_update_initial( _request.url = self._client.format_url(_request.url, **path_format_arguments) _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = kwargs.pop("stream", False) pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) @@ -14020,10 +8797,11 @@ def _create_or_update_initial( response = pipeline_response.http_response if response.status_code not in [200, 201]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass map_error(status_code=response.status_code, response=response, error_map=error_map) error = _failsafe_deserialize( _models.ErrorResponse, @@ -14031,225 +8809,201 @@ def _create_or_update_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 201: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() + else: + deserialized = _deserialize(_models.Snapshot, response.json()) if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore + return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore @overload - def begin_create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: _models.JWTAuthenticator, + parameters: _models.TagsObject, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, parameters: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. :type parameters: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, parameters: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Required. + :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. :type parameters: IO[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_create_or_update( + def update_tags( self, resource_group_name: str, resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, JSON, IO[bytes]], + parameters: Union[_models.TagsObject, JSON, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.JWTAuthenticator]: - """Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. + ) -> _models.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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :param parameters: The JWT authenticator to create or update. Is one of the following types: - JWTAuthenticator, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or JSON or IO[bytes] - :return: An instance of LROPoller that returns JWTAuthenticator. The JWTAuthenticator is - compatible with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] + :param parameters: Parameters supplied to the Update snapshot Tags operation. Is one of the + following types: TagsObject, JSON, IO[bytes] Required. + :type parameters: ~azure.mgmt.containerservice.models.TagsObject or JSON or IO[bytes] + :return: Snapshot. The Snapshot is compatible with MutableMapping + :rtype: ~azure.mgmt.containerservice.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ + error_map: MutableMapping = { + 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 = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.JWTAuthenticator] = 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, - jwt_authenticator_name=jwt_authenticator_name, - parameters=parameters, - content_type=content_type, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) + cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) - def get_long_running_output(pipeline_response): - response = pipeline_response.http_response - deserialized = _deserialize(_models.JWTAuthenticator, response.json()) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized + content_type = content_type or "application/json" + _content = None + if isinstance(parameters, (IOBase, bytes)): + _content = parameters + else: + _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _request = build_snapshots_update_tags_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + subscription_id=self._config.subscription_id, + content_type=content_type, + api_version=self._config.api_version, + content=_content, + headers=_headers, + params=_params, + ) path_format_arguments = { "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), } + _request.url = self._client.format_url(_request.url, **path_format_arguments) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + _decompress = kwargs.pop("decompress", True) + _stream = kwargs.pop("stream", False) + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + if _stream: + try: + response.read() # Load the body in memory and close the socket + except (StreamConsumedError, StreamClosedError): + pass + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if _stream: + deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - polling_method = polling - if cont_token: - return LROPoller[_models.JWTAuthenticator].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.JWTAuthenticator]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) + deserialized = _deserialize(_models.Snapshot, response.json()) - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def _delete_initial( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> Iterator[bytes]: + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> None: + """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 + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -14261,12 +9015,11 @@ def _delete_initial( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + cls: ClsType[None] = kwargs.pop("cls", None) - _request = build_jwt_authenticators_delete_request( + _request = build_snapshots_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14277,19 +9030,14 @@ def _delete_initial( } _request.url = self._client.format_url(_request.url, **path_format_arguments) - _decompress = kwargs.pop("decompress", True) - _stream = True + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access _request, stream=_stream, **kwargs ) - - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass + + 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) error = _failsafe_deserialize( _models.ErrorResponse, @@ -14297,122 +9045,115 @@ def _delete_initial( ) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - response_headers = {} - if response.status_code == 202: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) - - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore + return cls(pipeline_response, None, {}) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "jwt_authenticator_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def begin_delete( - self, resource_group_name: str, resource_name: str, jwt_authenticator_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a JWT authenticator and updates the managed cluster to apply the settings. + def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: + """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 - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - 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( - resource_group_name=resource_group_name, - resource_name=resource_name, - jwt_authenticator_name=jwt_authenticator_name, - cls=lambda x, y, z: x, - headers=_headers, - params=_params, - **kwargs - ) - raw_result.http_response.read() # type: ignore - kwargs.pop("error_map", None) - - def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements - if cls: - return cls(pipeline_response, None, {}) # type: ignore + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, } + error_map.update(kwargs.pop("error_map", {}) or {}) - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + def prepare_request(next_link=None): + if not next_link: + + _request = build_snapshots_list_by_resource_group_request( + resource_group_name=resource_group_name, + subscription_id=self._config.subscription_id, + api_version=self._config.api_version, + headers=_headers, + params=_params, + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + 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 + ) + path_format_arguments = { + "endpoint": self._serialize.url( + "self._config.base_url", self._config.base_url, "str", skip_quote=True + ), + } + _request.url = self._client.format_url(_request.url, **path_format_arguments) + + return _request + + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.Snapshot], + deserialized.get("value", []), ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[None].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) + + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore + 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) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.JWTAuthenticator"]: - """Gets a list of JWT authenticators in the specified managed cluster. + def list(self, **kwargs: Any) -> ItemPaged["_models.Snapshot"]: + """Gets a list of snapshots in the specified subscription. - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of JWTAuthenticator - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] + :return: An iterator like instance of Snapshot + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.JWTAuthenticator]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.Snapshot]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -14425,9 +9166,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_jwt_authenticators_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, + _request = build_snapshots_list_request( subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14465,7 +9204,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.JWTAuthenticator], + List[_models.Snapshot], deserialized.get("value", []), ) if cls: @@ -14494,14 +9233,14 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) -class MeshMembershipsOperations: +class TrustedAccessRoleBindingsOperations: """ .. warning:: **DO NOT** instantiate this class directly. Instead, you should access the following operations through :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`mesh_memberships` attribute. + :attr:`trusted_access_role_bindings` attribute. """ def __init__(self, *args, **kwargs) -> None: @@ -14512,34 +9251,21 @@ def __init__(self, *args, **kwargs) -> None: self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def get( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any - ) -> _models.MeshMembership: - """Gets the mesh membership of a managed cluster. + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any + ) -> _models.TrustedAccessRoleBinding: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: MeshMembership. The MeshMembership is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.MeshMembership + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str + :return: TrustedAccessRoleBinding. The TrustedAccessRoleBinding is compatible with + MutableMapping + :rtype: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -14553,12 +9279,12 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) - _request = build_mesh_memberships_get_request( + _request = build_trusted_access_role_bindings_get_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14593,34 +9319,19 @@ def get( if _stream: deserialized = response.iter_bytes() if _decompress else response.iter_raw() else: - deserialized = _deserialize(_models.MeshMembership, response.json()) + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def _create_or_update_initial( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, JSON, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -14639,15 +9350,15 @@ def _create_or_update_initial( content_type = content_type or "application/json" _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters + if isinstance(trusted_access_role_binding, (IOBase, bytes)): + _content = trusted_access_role_binding else: - _content = json.dumps(parameters, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore + _content = json.dumps(trusted_access_role_binding, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_mesh_memberships_create_or_update_request( + _request = build_trusted_access_role_bindings_create_or_update_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, content_type=content_type, api_version=self._config.api_version, @@ -14699,29 +9410,30 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: _models.MeshMembership, + trusted_access_role_binding_name: str, + trusted_access_role_binding: _models.TrustedAccessRoleBinding, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership + :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.models.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -14730,29 +9442,30 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: JSON, + trusted_access_role_binding_name: str, + trusted_access_role_binding: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: JSON + :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: JSON :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -14761,78 +9474,66 @@ def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: IO[bytes], + trusted_access_role_binding_name: str, + trusted_access_role_binding: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Required. - :type parameters: IO[bytes] + :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[bytes] :keyword content_type: Body Parameter content-type. Content type parameter for binary body. Default value is "application/json". :paramtype content_type: str - :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - "content_type", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def begin_create_or_update( self, resource_group_name: str, resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, JSON, IO[bytes]], + trusted_access_role_binding_name: str, + trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, JSON, IO[bytes]], **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. + ) -> LROPoller[_models.TrustedAccessRoleBinding]: + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :param parameters: The mesh membership to create or update. Is one of the following types: - MeshMembership, JSON, IO[bytes] Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or JSON or IO[bytes] - :return: An instance of LROPoller that returns MeshMembership. The MeshMembership is compatible - with MutableMapping - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] + :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 one of the following + types: TrustedAccessRoleBinding, JSON, IO[bytes] Required. + :type trusted_access_role_binding: ~azure.mgmt.containerservice.models.TrustedAccessRoleBinding + or JSON or IO[bytes] + :return: An instance of LROPoller that returns TrustedAccessRoleBinding. The + TrustedAccessRoleBinding is compatible with MutableMapping + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) + cls: ClsType[_models.TrustedAccessRoleBinding] = 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) @@ -14840,8 +9541,8 @@ def begin_create_or_update( raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - parameters=parameters, + trusted_access_role_binding_name=trusted_access_role_binding_name, + trusted_access_role_binding=trusted_access_role_binding, content_type=content_type, cls=lambda x, y, z: x, headers=_headers, @@ -14853,7 +9554,7 @@ def begin_create_or_update( def get_long_running_output(pipeline_response): response = pipeline_response.http_response - deserialized = _deserialize(_models.MeshMembership, response.json()) + deserialized = _deserialize(_models.TrustedAccessRoleBinding, response.json()) if cls: return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized @@ -14871,31 +9572,18 @@ def get_long_running_output(pipeline_response): else: polling_method = polling if cont_token: - return LROPoller[_models.MeshMembership].from_continuation_token( + return LROPoller[_models.TrustedAccessRoleBinding].from_continuation_token( polling_method=polling_method, continuation_token=cont_token, client=self._client, deserialization_callback=get_long_running_output, ) - return LROPoller[_models.MeshMembership]( + return LROPoller[_models.TrustedAccessRoleBinding]( self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def _delete_initial( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -14910,10 +9598,10 @@ def _delete_initial( cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_mesh_memberships_delete_request( + _request = build_trusted_access_role_bindings_delete_request( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, subscription_id=self._config.subscription_id, api_version=self._config.api_version, headers=_headers, @@ -14960,31 +9648,18 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "mesh_membership_name", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) def begin_delete( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any + self, resource_group_name: str, resource_name: str, trusted_access_role_binding_name: str, **kwargs: Any ) -> LROPoller[None]: - """Deletes the mesh membership of a managed cluster. + """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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str + :param trusted_access_role_binding_name: The name of trusted access role binding. Required. + :type trusted_access_role_binding_name: str :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -15000,7 +9675,7 @@ def begin_delete( raw_result = self._delete_initial( resource_group_name=resource_group_name, resource_name=resource_name, - mesh_membership_name=mesh_membership_name, + trusted_access_role_binding_name=trusted_access_role_binding_name, cls=lambda x, y, z: x, headers=_headers, params=_params, @@ -15035,31 +9710,25 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list_by_managed_cluster( + def list( self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.MeshMembership"]: - """Lists mesh memberships in a managed cluster. + ) -> ItemPaged["_models.TrustedAccessRoleBinding"]: + """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 - :return: An iterator like instance of MeshMembership - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshMembership] + :return: An iterator like instance of TrustedAccessRoleBinding + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = kwargs.pop("params", {}) or {} - cls: ClsType[List[_models.MeshMembership]] = kwargs.pop("cls", None) + cls: ClsType[List[_models.TrustedAccessRoleBinding]] = kwargs.pop("cls", None) error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -15072,7 +9741,7 @@ def list_by_managed_cluster( def prepare_request(next_link=None): if not next_link: - _request = build_mesh_memberships_list_by_managed_cluster_request( + _request = build_trusted_access_role_bindings_list_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -15112,7 +9781,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.MeshMembership], + List[_models.TrustedAccessRoleBinding], deserialized.get("value", []), ) if cls: @@ -15214,344 +9883,38 @@ def prepare_request(next_link=None): } _request.url = self._client.format_url(_request.url, **path_format_arguments) - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OperationValue], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class OperationStatusResultOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`operation_status_result` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "agent_pool_name", - "operation_id", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def get_by_agent_pool( - self, resource_group_name: str, resource_name: str, agent_pool_name: str, operation_id: str, **kwargs: Any - ) -> _models.OperationStatusResult: - """Get the status of a specific operation in the specified 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 - :param operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_operation_status_result_get_by_agent_pool_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - agent_pool_name=agent_pool_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.OperationStatusResult, response.json()) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": ["api_version", "subscription_id", "resource_group_name", "resource_name", "accept"] - }, - api_versions_list=["2026-02-02-preview"], - ) - def list( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.OperationStatusResult"]: - """Gets a list of operations in the specified managedCluster. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: An iterator like instance of OperationStatusResult - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.OperationStatusResult]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_operation_status_result_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.OperationStatusResult], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - @api_version_validation( - method_added_on="2026-02-02-preview", - params_added_on={ - "2026-02-02-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "resource_name", - "operation_id", - "accept", - ] - }, - api_versions_list=["2026-02-02-preview"], - ) - def get( - self, resource_group_name: str, resource_name: str, operation_id: str, **kwargs: Any - ) -> _models.OperationStatusResult: - """Get the status of a specific operation 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 operation_id: The ID of an ongoing async operation. Required. - :type operation_id: str - :return: OperationStatusResult. The OperationStatusResult is compatible with MutableMapping - :rtype: ~azure.mgmt.containerservice.models.OperationStatusResult - :raises ~azure.core.exceptions.HttpResponseError: - """ - error_map: MutableMapping = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_operation_status_result_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - _decompress = kwargs.pop("decompress", True) - _stream = kwargs.pop("stream", False) - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) + return _request - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = pipeline_response.http_response.json() + list_of_elem = _deserialize( + List[_models.OperationValue], + deserialized.get("value", []), + ) + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.get("nextLink") or None, iter(list_of_elem) - if response.status_code not in [200]: - if _stream: - try: - response.read() # Load the body in memory and close the socket - except (StreamConsumedError, StreamClosedError): - pass - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, + def get_next(next_link=None): + _request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + _request, stream=_stream, **kwargs ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response = pipeline_response.http_response - if _stream: - deserialized = response.iter_bytes() if _decompress else response.iter_raw() - else: - deserialized = _deserialize(_models.OperationStatusResult, response.json()) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = _failsafe_deserialize( + _models.ErrorResponse, + response, + ) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore + return pipeline_response - return deserialized # type: ignore + return ItemPaged(get_next, extract_data) class PrivateLinkResourcesOperations: @@ -15946,239 +10309,3 @@ def get_next(next_link=None): return pipeline_response return ItemPaged(get_next, extract_data) - - -class ContainerServiceOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`container_service` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list_node_image_versions(self, location: str, **kwargs: Any) -> ItemPaged["_models.NodeImageVersion"]: - """Gets a list of supported NodeImage versions in the specified subscription. - - Only returns the latest version of each node image. For example there may be an - AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is - visible in this list. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of NodeImageVersion - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.NodeImageVersion]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_container_service_list_node_image_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.NodeImageVersion], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - -class VmSkusOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`vm_skus` attribute. - """ - - def __init__(self, *args, **kwargs) -> None: - input_args = list(args) - self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") - self._config: ContainerServiceClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") - - @distributed_trace - def list( - self, location: str, *, include_extended_locations: Optional[bool] = None, **kwargs: Any - ) -> ItemPaged["_models.ResourceSku"]: - """Gets the list of VM SKUs accepted by AKS. - - Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS - will perform a best effort approach to provision the requested VM SKUs, but availability is not - guaranteed. - - :param location: The name of the Azure region. Required. - :type location: str - :keyword include_extended_locations: To Include Extended Locations information or not in the - response. Default value is None. - :paramtype include_extended_locations: bool - :return: An iterator like instance of ResourceSku - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ResourceSku] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} - - cls: ClsType[List[_models.ResourceSku]] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_vm_skus_list_request( - location=location, - subscription_id=self._config.subscription_id, - include_extended_locations=include_extended_locations, - api_version=self._config.api_version, - headers=_headers, - params=_params, - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - 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 - ) - path_format_arguments = { - "endpoint": self._serialize.url( - "self._config.base_url", self._config.base_url, "str", skip_quote=True - ), - } - _request.url = self._client.format_url(_request.url, **path_format_arguments) - - return _request - - def extract_data(pipeline_response): - deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize( - List[_models.ResourceSku], - deserialized.get("value", []), - ) - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.get("nextLink") or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize( - _models.ErrorResponse, - response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py index d3fca79ecff6..14db0d5b3f5d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py @@ -78,6 +78,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AdvancedNetworkingTransitEncryption.json +# x-ms-original-file: 2026-03-01/AdvancedNetworkingTransitEncryption.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py index cf60dd3d10d1..45cdcce63214 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/AgentPoolsAbortOperation.json +# x-ms-original-file: 2026-03-01/AgentPoolsAbortOperation.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py deleted file mode 100644 index afe7df4673db..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_complete_upgrade.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.agent_pools.begin_complete_upgrade( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCompleteUpgrade.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py index 2e75446cdf4b..ca098237432b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_crg.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python agent_pools_associate_crg.py + python agent_pools_create_crg.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsAssociate_CRG.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_CRG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py index 0860bd26a745..9adf3c2f79b0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py @@ -67,6 +67,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_CustomNodeConfig.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_CustomNodeConfig.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py index 1e0fbb4a2b00..64403438e249 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_DedicatedHostGroup.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_DedicatedHostGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py index 02cc2cb8cf25..0c57e9f49871 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableEncryptionAtHost.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_EnableEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py index b08a4f0e639d..1ef7925c26f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableFIPS.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_EnableFIPS.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py index 6ea4da0c4ab7..12e6874d8d08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableUltraSSD.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_EnableUltraSSD.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py index d4b605de1df6..7bbb93feec10 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Ephemeral.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_Ephemeral.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py index f72b3b1408e6..dabbae1af3ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_GPUMIG.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_GPUMIG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py index 1840d22b53ee..b8faaa83017f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_message_of_the_day.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_MessageOfTheDay.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_MessageOfTheDay.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py index 7828ed7194c4..b40207f2d1a0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_OSSKU.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_OSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py index ddb17bd3aeba..690aa3de6ea6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_PPG.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_PPG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py index 1d99d5baa34f..288f1457f6c2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Snapshot.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_Snapshot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py index c76b809c3407..f161bb8da202 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Spot.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_Spot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py index 7fcb8f84ae46..0ebbdbf5217d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_TypeVirtualMachines.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_TypeVirtualMachines.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py deleted file mode 100644 index 62051f64e870..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_type_virtual_machines_autoscale.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "nodeLabels": {"key1": "val1"}, - "nodeTaints": ["Key1=Value1:NoSchedule"], - "orchestratorVersion": "1.29.0", - "osType": "Linux", - "tags": {"name1": "val1"}, - "type": "VirtualMachines", - "virtualMachinesProfile": { - "scale": {"autoscale": [{"maxCount": 5, "minCount": 1, "size": "Standard_D2_v2"}]} - }, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py index 983307b61946..bb8e89f79d24 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Update.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py index 6a9d94511961..5e931b4f78e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WasmWasi.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_WasmWasi.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py index e77538bf4b3b..54fb75228240 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_disable_outbound_nat.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WindowsDisableOutboundNAT.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py index 672e5043e19e..e37debf8c9e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WindowsOSSKU.json +# x-ms-original-file: 2026-03-01/AgentPoolsCreate_WindowsOSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py index 409be684237c..bb43bbe8ab94 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/AgentPoolsDelete.json +# x-ms-original-file: 2026-03-01/AgentPoolsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py deleted file mode 100644 index e3f81a669470..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_delete_ignore_pod_disruption_budget.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.agent_pools.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/AgentPoolsDelete_IgnorePodDisruptionBudget.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py index 84f4f80e8e4b..dcf57f8bef4e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_machines.py @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/AgentPoolsDeleteMachines.json +# x-ms-original-file: 2026-03-01/AgentPoolsDeleteMachines.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py index 8a6c3bffb3f8..2779e887d2dd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsGet.json +# x-ms-original-file: 2026-03-01/AgentPoolsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py index 5511f17cf2d3..ccd0e7bb66a2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsGetAgentPoolAvailableVersions.json +# x-ms-original-file: 2026-03-01/AgentPoolsGetAgentPoolAvailableVersions.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py index 321bb88f865d..e307ab3a6be0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsGetUpgradeProfile.json +# x-ms-original-file: 2026-03-01/AgentPoolsGetUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py index 3a17085175f2..17090d02ed8c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/AgentPoolsList.json +# x-ms-original-file: 2026-03-01/AgentPoolsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py index e9790f15dfbf..61677fea4493 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPools_Start.json +# x-ms-original-file: 2026-03-01/AgentPools_Start.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py index d2c37a2ecd52..22ff89475127 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPools_Stop.json +# x-ms-original-file: 2026-03-01/AgentPools_Stop.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py index d3a53ca0ec69..02776ed81a18 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/AgentPools_Update.json +# x-ms-original-file: 2026-03-01/AgentPools_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py index 9969d1dbde42..6f5e2b7640ea 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/AgentPoolsUpgradeNodeImageVersion.json +# x-ms-original-file: 2026-03-01/AgentPoolsUpgradeNodeImageVersion.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py deleted file mode 100644 index 415d7fe7ed5a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python get_guardrails_versions.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.get_guardrails_versions( - location="location1", - version="v1.0.0", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/GetGuardrailsVersions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py deleted file mode 100644 index 4fe25418847f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python get_safeguards_versions.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.get_safeguards_versions( - location="location1", - version="v1.0.0", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/GetSafeguardsVersions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py deleted file mode 100644 index 1b8b6f851f05..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_create_or_update.py +++ /dev/null @@ -1,51 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python identity_bindings_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.identity_bindings.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - identity_binding_name="identitybinding1", - parameters={ - "properties": { - "managedIdentity": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" - } - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/IdentityBindings_Create_Or_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py deleted file mode 100644 index b753eb80b1ac..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python identity_bindings_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.identity_bindings.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - identity_binding_name="identitybinding1", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/IdentityBindings_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py deleted file mode 100644 index 8ae3fd8d82b1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python identity_bindings_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.identity_bindings.get( - resource_group_name="rg1", - resource_name="clustername1", - identity_binding_name="identitybinding1", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/IdentityBindings_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py deleted file mode 100644 index a10cedb081cf..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python identity_bindings_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.identity_bindings.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/IdentityBindings_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py deleted file mode 100644 index b43b2006341f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py +++ /dev/null @@ -1,66 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python jwt_authenticators_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.jwt_authenticators.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - jwt_authenticator_name="jwt1", - parameters={ - "properties": { - "claimMappings": { - "extra": [{"key": "example.com/extrakey", "valueExpression": "claims.customfield"}], - "groups": {"expression": "claims.groups.split(',').map(group, 'aks:jwt:' + group)"}, - "username": {"expression": "'aks:jwt:' + claims.sub"}, - }, - "claimValidationRules": [ - {"expression": "has(claims.sub)", "message": "Sub is required"}, - {"expression": "claims.sub != ''", "message": "Sub cannot be empty"}, - ], - "issuer": { - "audiences": ["https://example.com/audience1", "https://example.com/audience2"], - "url": "https://example.com", - }, - "userValidationRules": [ - { - "expression": "user.groups.all(group, group.startsWith('aks:jwt:admin:'))", - "message": "Must be in admin user group", - } - ], - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Create_Or_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py deleted file mode 100644 index 2bc2ca9b2cf6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python jwt_authenticators_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.jwt_authenticators.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - jwt_authenticator_name="jwt1", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py deleted file mode 100644 index 38ef4385a012..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python jwt_authenticators_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.jwt_authenticators.get( - resource_group_name="rg1", - resource_name="clustername1", - jwt_authenticator_name="jwt1", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py deleted file mode 100644 index 3d0e573981b5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python jwt_authenticators_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.jwt_authenticators.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py index 19f73a69882c..ce79a5181d08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/KubernetesVersions_List.json +# x-ms-original-file: 2026-03-01/KubernetesVersions_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py deleted file mode 100644 index ae188d429b5c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python list_available_container_service_vm_skus.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.vm_skus.list( - location="westus", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ListAvailableContainerServiceVmSkus.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py deleted file mode 100644 index cec39a055819..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_available_container_service_vm_skus_with_extended_locations.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python list_available_container_service_vm_skus_with_extended_locations.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.vm_skus.list( - location="westus", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ListAvailableContainerServiceVmSkusWithExtendedLocations.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py deleted file mode 100644 index 6b1ff8279955..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python list_guardrails_versions.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.list_guardrails_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ListGuardrailsVersions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py deleted file mode 100644 index 12188c8dd531..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python list_safeguards_versions.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.list_safeguards_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ListSafeguardsVersions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py deleted file mode 100644 index f0b9f3d28dfc..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python load_balancers_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.load_balancers.create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - load_balancer_name="kubernetes", - parameters={"properties": {"allowServicePlacement": True, "primaryAgentPoolName": "agentpool1"}}, - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/LoadBalancers_Create_Or_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py deleted file mode 100644 index 18add5def619..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python load_balancers_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.load_balancers.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - load_balancer_name="kubernetes", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/LoadBalancers_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py deleted file mode 100644 index 61bbd2f17f8a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python load_balancers_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.load_balancers.get( - resource_group_name="rg1", - resource_name="clustername1", - load_balancer_name="kubernetes", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/LoadBalancers_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py deleted file mode 100644 index 628f9ade7c06..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python load_balancers_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.load_balancers.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/LoadBalancers_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py deleted file mode 100644 index 66011a214d70..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python load_balancers_rebalance.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.managed_clusters.begin_rebalance_load_balancers( - resource_group_name="rg1", - resource_name="clustername1", - parameters={"loadBalancerNames": ["kubernetes"]}, - ).result() - - -# x-ms-original-file: 2026-02-02-preview/LoadBalancers_Rebalance.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py deleted file mode 100644 index f8a360963aaa..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python machine_create_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.machines.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - machine_name="machine1", - parameters={ - "properties": { - "hardware": {"vmSize": "Standard_DS1_v2"}, - "kubernetes": { - "kubeletDiskType": "OS", - "maxPods": 110, - "nodeLabels": {"key1": "val1"}, - "nodeTaints": ["Key1=Value1:NoSchedule"], - "orchestratorVersion": "1.30", - }, - "mode": "User", - "operatingSystem": {"enableFIPS": False, "osSKU": "Ubuntu", "osType": "Linux"}, - "priority": "Spot", - "tags": {"name1": "val1"}, - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/MachineCreate_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py index cdb32c6f98c4..2d9345f948a1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/MachineGet.json +# x-ms-original-file: 2026-03-01/MachineGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py index ef0b2819056c..551d1b3cd9bf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/MachineList.json +# x-ms-original-file: 2026-03-01/MachineList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py index 02f518ddf57a..e7dd093c2781 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +# x-ms-original-file: 2026-03-01/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py index 30e8f47d8ea3..1ca7fa54a120 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py @@ -37,6 +37,6 @@ def main(): ) -# x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsDelete_MaintenanceWindow.json +# x-ms-original-file: 2026-03-01/MaintenanceConfigurationsDelete_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py index 3fc53f6cf5dd..d2678eae3a40 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsGet_MaintenanceWindow.json +# x-ms-original-file: 2026-03-01/MaintenanceConfigurationsGet_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py index 862937b8bc51..ae18595339a2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsList_MaintenanceWindow.json +# x-ms-original-file: 2026-03-01/MaintenanceConfigurationsList_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py deleted file mode 100644 index fc4bf469a1b5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py +++ /dev/null @@ -1,52 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_cluster_snapshots.create_or_update( - resource_group_name="rg1", - resource_name="snapshot1", - parameters={ - "location": "westus", - "properties": { - "creationData": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1" - } - }, - "tags": {"key1": "val1", "key2": "val2"}, - }, - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py deleted file mode 100644 index afd4d2e2aac4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.managed_cluster_snapshots.delete( - resource_group_name="rg1", - resource_name="snapshot1", - ) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py deleted file mode 100644 index 1426e7605858..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_cluster_snapshots.get( - resource_group_name="rg1", - resource_name="snapshot1", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py deleted file mode 100644 index 6f60fd78447a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_cluster_snapshots.list() - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py deleted file mode 100644 index 3ed60302fdc6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_list_by_resource_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_cluster_snapshots.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py deleted file mode 100644 index f03566ec1245..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_cluster_snapshots_update_tags.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_cluster_snapshots.update_tags( - resource_group_name="rg1", - resource_name="snapshot1", - parameters={"tags": {"key2": "new-val2", "key3": "val3"}}, - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py index c81db551781a..47b0961eb476 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersAbortOperation.json +# x-ms-original-file: 2026-03-01/ManagedClustersAbortOperation.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py index 69e0a2dc17ea..5c938392ca41 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py @@ -75,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py index d194e8d75157..df7f6578273e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_service_mesh.py @@ -77,7 +77,13 @@ def main(): } }, "components": { - "egressGateways": [{"enabled": True, "name": "istioegress1"}], + "egressGateways": [ + { + "enabled": True, + "gatewayConfigurationName": "test-gateway-configuration", + "name": "test-istio-egress", + } + ], "ingressGateways": [{"enabled": True, "mode": "Internal"}], }, }, @@ -93,6 +99,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_AzureServiceMesh.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_AzureServiceMesh.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py deleted file mode 100644 index 92c79c929805..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_control_plane_scaling_profile.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_control_plane_scaling_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "controlPlaneScalingProfile": {"scalingSize": "H4"}, - "dnsPrefix": "dnsprefix1", - "kubernetesVersion": "1.33.0", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "networkPlugin": "azure", - "networkPluginMode": "overlay", - "outboundType": "loadBalancer", - }, - }, - "sku": {"name": "Base", "tier": "Standard"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_ControlPlaneScalingProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py index 5302d3ebc27a..16b88da25595 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_crg.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python managed_clusters_associate_crg.py + python managed_clusters_create_crg.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersAssociate_CRG.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_CRG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py index 33215312bb7f..381f566302b0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_custom_ca_trust_certificates.py @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_CustomCATrustCertificates.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_CustomCATrustCertificates.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py index 169591d7d302..66559558fdd9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DedicatedHostGroup.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_DedicatedHostGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py index 51fd5d1e8c95..f293a1b4ce59 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DisableRunCommand.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_DisableRunCommand.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py index 72cb9218d8fe..5c9206169488 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py @@ -87,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DualStackNetworking.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_DualStackNetworking.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py deleted file mode 100644 index 01cdd9e4685d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py +++ /dev/null @@ -1,75 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_enable_ai_toolchain_operator.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "aiToolchainOperatorProfile": {"enabled": True}, - "dnsPrefix": "dnsprefix1", - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "networkDataplane": "cilium", - "networkPlugin": "azure", - "networkPluginMode": "overlay", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableAIToolchainOperator.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py index debaffa4d331..a68b550998f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableEncryptionAtHost.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_EnableEncryptionAtHost.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py index cc91d23526f9..5a114263b0b4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableUltraSSD.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_EnableUltraSSD.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py index f792cd97242e..8eb6f5d52a46 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnabledFIPS.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_EnabledFIPS.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py index e7b3919073fc..531c7eb4dd38 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_GPUMIG.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_GPUMIG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py index 20bb23b40095..d85cfd221760 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_HTTPProxy.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_HTTPProxy.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py deleted file mode 100644 index e0d1c7550fcd..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py +++ /dev/null @@ -1,69 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_ingress_profile_application_load_balancer.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "dnsPrefix": "dnsprefix1", - "ingressProfile": {"applicationLoadBalancer": {"enabled": True}}, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_IngressProfile_ApplicationLoadBalancer.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py index e6b251feb611..4121e6e4d207 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_web_app_routing.py @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_IngressProfile_WebAppRouting.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_IngressProfile_WebAppRouting.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py index ba93a9bd5602..35f08a790b81 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_ManagedNATGateway.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_ManagedNATGateway.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py deleted file mode 100644 index 1ba6df4ccf9f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py +++ /dev/null @@ -1,69 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_mcsnapshot.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "agentPoolProfiles": [ - { - "count": 3, - "enableFIPS": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "creationData": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1" - }, - "dnsPrefix": "dnsprefix1", - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_MCSnapshot.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py deleted file mode 100644 index e6c37924bf6f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_node_auto_provisioning.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "dnsPrefix": "dnsprefix1", - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "networkDataplane": "cilium", - "networkPlugin": "azure", - "networkPluginMode": "overlay", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_NodeAutoProvisioning.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py index 67fc5ff407dc..a930d98ece5a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_NodePublicIPPrefix.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_NodePublicIPPrefix.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py index eb2550f99b19..bf4a13482090 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_OSSKU.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_OSSKU.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py index 8f1b8db24fa7..aee5bd54d3f4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PodIdentity.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_PodIdentity.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py index 4b0c3f3c6229..3d078f9633ae 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PPG.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_PPG.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py index c53cdc74ed8b..96ff4588c193 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Premium.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_Premium.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py index c06eb2a1fd92..5c648be7091a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py index 16573931870c..884a5823c177 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PrivateClusterPublicFQDN.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_PrivateClusterPublicFQDN.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py index 20f9fd3e1ca0..2cf8e1709f54 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py @@ -59,21 +59,9 @@ def main(): "securityProfile": { "defender": { "logAnalyticsWorkspaceResourceId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", - "securityGating": { - "allowSecretAccess": True, - "enabled": True, - "identities": [ - { - "azureContainerRegistry": "registry1", - "identity": { - "clientId": "client1", - "resourceId": "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME", - }, - } - ], - }, "securityMonitoring": {"enabled": True}, - } + }, + "workloadIdentity": {"enabled": True}, }, }, "sku": {"name": "Basic", "tier": "Free"}, @@ -83,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_SecurityProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_SecurityProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py index 386263fbfefe..b1197b00ed4a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Snapshot.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_Snapshot.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py index 0d85e073dc74..0295c517bb3a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py @@ -77,7 +77,7 @@ def main(): "outboundType": "loadBalancer", }, "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "upgradeSettings": {"overrideSettings": {"forceUpgrade": True, "until": "2022-11-01T13:00:00Z"}}, + "upgradeSettings": {"overrideSettings": {"forceUpgrade": False, "until": "2022-11-01T13:00:00Z"}}, "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, }, "sku": {"name": "Basic", "tier": "Free"}, @@ -87,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Update.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py index b5b89eec094d..74cd2aec1088 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWindowsGmsa.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_UpdateWindowsGmsa.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py index 32a46ec065ea..ab5f0b383fe1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithAHUB.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_UpdateWithAHUB.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py index 8ff959e893cf..7e26fa4df7c0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py deleted file mode 100644 index 2a23f99e9a03..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py +++ /dev/null @@ -1,77 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_update_with_enable_namespace_resources.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enableNamespaceResources": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py index 1b4d597322b9..4dc9d91f4164 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UserAssignedNATGateway.json +# x-ms-original-file: 2026-03-01/ManagedClustersCreate_UserAssignedNATGateway.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py deleted file mode 100644 index 0bcd3295723e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py +++ /dev/null @@ -1,73 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_virtual_machines.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableFIPS": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachines", - "vmSize": "Standard_DS2_v2", - } - ], - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_VirtualMachines.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py index 9b405fbb39a7..89efac7d47b8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersDelete.json +# x-ms-original-file: 2026-03-01/ManagedClustersDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py index 6d5abd494c0d..fcd80b82ef7a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersGet.json +# x-ms-original-file: 2026-03-01/ManagedClustersGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py index b99b62f6a4d0..d33d8bcf24bb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersGetAccessProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersGetAccessProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py index 4505c1ae78c5..2f4737fbd183 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_revision_profile.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersGet_MeshRevisionProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersGet_MeshRevisionProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py index a3577f1ff74c..c9a47d9364e3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_mesh_upgrade_profile.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersGet_MeshUpgradeProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersGet_MeshUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py index c7112382b0bd..e8bf9372afc4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersGetUpgradeProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersGetUpgradeProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py index a24e1bdc0d6a..0bc6dd663d1e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersList.json +# x-ms-original-file: 2026-03-01/ManagedClustersList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py index cda8d3bb1da3..8b18d27c8080 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersListByResourceGroup.json +# x-ms-original-file: 2026-03-01/ManagedClustersListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py index bf6d36d7c6f8..6f57e6a6ad46 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterAdminCredentials.json +# x-ms-original-file: 2026-03-01/ManagedClustersListClusterAdminCredentials.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py similarity index 89% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py index c712d1281e8c..064b8923568e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python managed_clusters_list_cluster_credential_result.py + python managed_clusters_list_cluster_monitoring_user_credentials.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterCredentialResult.json +# x-ms-original-file: 2026-03-01/ManagedClustersListClusterMonitoringUserCredentials.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py index 2e98e75dd559..7e0359ffb21c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterUserCredentials.json +# x-ms-original-file: 2026-03-01/ManagedClustersListClusterUserCredentials.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py index 85261629c480..fb5ec9aedf44 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_revision_profiles.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersList_MeshRevisionProfiles.json +# x-ms-original-file: 2026-03-01/ManagedClustersList_MeshRevisionProfiles.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py index 2a4b6d9ff715..0afc79f1ae7c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_mesh_upgrade_profiles.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersList_MeshUpgradeProfiles.json +# x-ms-original-file: 2026-03-01/ManagedClustersList_MeshUpgradeProfiles.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py index d47a0a34ea58..47daefe56436 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py @@ -42,6 +42,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersResetAADProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersResetAADProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py index 7b1f4f1f600a..61a2455b8be9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersResetServicePrincipalProfile.json +# x-ms-original-file: 2026-03-01/ManagedClustersResetServicePrincipalProfile.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py index 882fe1c20e62..e35eaa5f5eb8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersRotateClusterCertificates.json +# x-ms-original-file: 2026-03-01/ManagedClustersRotateClusterCertificates.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py index 77950ac1246d..3f2a062493e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersRotateServiceAccountSigningKeys.json +# x-ms-original-file: 2026-03-01/ManagedClustersRotateServiceAccountSigningKeys.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py index df25e06c7cbb..506d319c3590 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersStart.json +# x-ms-original-file: 2026-03-01/ManagedClustersStart.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py index 6fa999f4e82d..2886ade64b2e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedClustersStop.json +# x-ms-original-file: 2026-03-01/ManagedClustersStop.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py index 94c7518cc3b4..26aa19fba957 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedClustersUpdateTags.json +# x-ms-original-file: 2026-03-01/ManagedClustersUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py index 9cfeea9ba2a9..6d18f637eac9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_create_update.py @@ -55,6 +55,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesCreate_Update.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesCreate_Update.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py index b058b860760c..6a670599af82 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesDelete.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py index 83dc74428720..bbc99d3dd0b6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesGet.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py index 60d11f09282f..e31f91c38b32 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesList.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py index 41b79e270fb7..b82fd72b53c1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_list_credential_result.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesListCredentialResult.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesListCredentialResult.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py index a31ff01355cc..b994924fea28 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_namespaces_update_tags.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ManagedNamespacesUpdateTags.json +# x-ms-original-file: 2026-03-01/ManagedNamespacesUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py deleted file mode 100644 index c84edf20737f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_create_or_update.py +++ /dev/null @@ -1,49 +0,0 @@ -# pylint: disable=line-too-long,useless-suppression -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python mesh_memberships_create_or_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.mesh_memberships.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - mesh_membership_name="meshmembership1", - parameters={ - "properties": { - "managedMeshID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1" - } - }, - ).result() - print(response) - - -# x-ms-original-file: 2026-02-02-preview/MeshMemberships_CreateOrUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py deleted file mode 100644 index 01a3c89d41d8..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python mesh_memberships_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - client.mesh_memberships.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - mesh_membership_name="meshmembership1", - ).result() - - -# x-ms-original-file: 2026-02-02-preview/MeshMemberships_Delete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py deleted file mode 100644 index 930abe9b2b5c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python mesh_memberships_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.mesh_memberships.get( - resource_group_name="rg1", - resource_name="clustername1", - mesh_membership_name="meshmembership1", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/MeshMemberships_Get.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py deleted file mode 100644 index 364435a830e1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python mesh_memberships_list_by_managed_cluster.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.mesh_memberships.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/MeshMemberships_ListByManagedCluster.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py deleted file mode 100644 index 8cef0f33b3ef..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python node_image_versions_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.container_service.list_node_image_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/NodeImageVersions_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py index 21625780c899..136d70adc6c5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/Operation_List.json +# x-ms-original-file: 2026-03-01/Operation_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py deleted file mode 100644 index 4ea18858aaef..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python operation_status_result_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operation_status_result.get( - resource_group_name="rg1", - resource_name="clustername1", - operation_id="00000000-0000-0000-0000-000000000001", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/OperationStatusResultGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py deleted file mode 100644 index b6a120a68c25..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py +++ /dev/null @@ -1,44 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python operation_status_result_get_by_agent_pool.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operation_status_result.get_by_agent_pool( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - operation_id="00000000-0000-0000-0000-000000000001", - ) - print(response) - - -# x-ms-original-file: 2026-02-02-preview/OperationStatusResultGetByAgentPool.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py deleted file mode 100644 index 3061ed562df4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python operation_status_result_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operation_status_result.list( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: 2026-02-02-preview/OperationStatusResultList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py index 85e5a333a868..3b7f9ad7668d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/OutboundNetworkDependenciesEndpointsList.json +# x-ms-original-file: 2026-03-01/OutboundNetworkDependenciesEndpointsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py index bd18957069b6..83786721e9c6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsDelete.json +# x-ms-original-file: 2026-03-01/PrivateEndpointConnectionsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py index 5a732fc69e9f..8aec16372d5a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsGet.json +# x-ms-original-file: 2026-03-01/PrivateEndpointConnectionsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py index d9bf97412dc3..33171924f749 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsList.json +# x-ms-original-file: 2026-03-01/PrivateEndpointConnectionsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py index a1ea6d65e152..f89d1068018a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsUpdate.json +# x-ms-original-file: 2026-03-01/PrivateEndpointConnectionsUpdate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py index 8440f0aa81c4..a6f6b549a8bf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/PrivateLinkResourcesList.json +# x-ms-original-file: 2026-03-01/PrivateLinkResourcesList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py index 08ee997e5ba9..bc50f23bc329 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/ResolvePrivateLinkServiceId.json +# x-ms-original-file: 2026-03-01/ResolvePrivateLinkServiceId.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py index 480b3f8efa07..0cf386b1fc73 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/RunCommandRequest.json +# x-ms-original-file: 2026-03-01/RunCommandRequest.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py index b997c208ca08..f424731a4dbe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/RunCommandResultFailed.json +# x-ms-original-file: 2026-03-01/RunCommandResultFailed.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py index 5223f3c4801e..e493cb11412f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/RunCommandResultSucceed.json +# x-ms-original-file: 2026-03-01/RunCommandResultSucceed.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py index d47022cebbc0..6edf81d30960 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/SnapshotsCreate.json +# x-ms-original-file: 2026-03-01/SnapshotsCreate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py index 5982f0c8f20c..963d566b713b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: 2026-02-02-preview/SnapshotsDelete.json +# x-ms-original-file: 2026-03-01/SnapshotsDelete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py index 43145197b6d1..daf5e110c3aa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/SnapshotsGet.json +# x-ms-original-file: 2026-03-01/SnapshotsGet.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py index a5ab1410d8f4..cd8e7a3a1304 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/SnapshotsList.json +# x-ms-original-file: 2026-03-01/SnapshotsList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py index a53883d8b82f..f1b24d142c4f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/SnapshotsListByResourceGroup.json +# x-ms-original-file: 2026-03-01/SnapshotsListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py index 8931d0567e45..2e3bcf636fb3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/SnapshotsUpdateTags.json +# x-ms-original-file: 2026-03-01/SnapshotsUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py index bedfe5e666be..b89b2edadfdc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_create_or_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_CreateOrUpdate.json +# x-ms-original-file: 2026-03-01/TrustedAccessRoleBindings_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py index 76e638e5e845..8a169c4f24c8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_Delete.json +# x-ms-original-file: 2026-03-01/TrustedAccessRoleBindings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py index 9a554fb3d786..ba4432daaf85 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_Get.json +# x-ms-original-file: 2026-03-01/TrustedAccessRoleBindings_Get.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py index e50ce01a9d09..d63d35ebcfeb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_role_bindings_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_List.json +# x-ms-original-file: 2026-03-01/TrustedAccessRoleBindings_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py index f8eb90dc2a08..fb765407de34 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/trusted_access_roles_list.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2026-02-02-preview/TrustedAccessRoles_List.json +# x-ms-original-file: 2026-03-01/TrustedAccessRoles_List.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py index 5e763ad148fd..a700e82f8b30 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations.py @@ -52,15 +52,10 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, - "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -73,7 +68,6 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -151,7 +145,6 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -163,7 +156,6 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, - "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -184,26 +176,13 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, - "upgradeSettingsBlueGreen": { - "batchSoakDurationInMinutes": 0, - "drainBatchSize": "str", - "drainTimeoutInMinutes": 0, - "finalSoakDurationInMinutes": 0, - }, - "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], - "virtualMachinesProfile": { - "scale": { - "autoscale": [{"maxCount": 0, "minCount": 0, "size": "str"}], - "manual": [{"count": 0, "size": "str"}], - } - }, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, @@ -259,18 +238,6 @@ def test_agent_pools_begin_abort_latest_operation(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_agent_pools_begin_complete_upgrade(self, resource_group): - response = self.client.agent_pools.begin_complete_upgrade( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_agent_pools_begin_delete_machines(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py index 3ad71121b18d..e786e5695489 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py @@ -54,15 +54,10 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, - "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -75,7 +70,6 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -153,7 +147,6 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -165,7 +158,6 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, - "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -186,26 +178,13 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, - "upgradeSettingsBlueGreen": { - "batchSoakDurationInMinutes": 0, - "drainBatchSize": "str", - "drainTimeoutInMinutes": 0, - "finalSoakDurationInMinutes": 0, - }, - "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], - "virtualMachinesProfile": { - "scale": { - "autoscale": [{"maxCount": 0, "minCount": 0, "size": "str"}], - "manual": [{"count": 0, "size": "str"}], - } - }, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, @@ -266,20 +245,6 @@ async def test_agent_pools_begin_abort_latest_operation(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_agent_pools_begin_complete_upgrade(self, resource_group): - response = await ( - await self.client.agent_pools.begin_complete_upgrade( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_agent_pools_begin_delete_machines(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py deleted file mode 100644 index 3f92bd83cc82..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceContainerServiceOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_container_service_list_node_image_versions(self, resource_group): - response = self.client.container_service.list_node_image_versions( - location="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py deleted file mode 100644 index 69d36ecabe6d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceContainerServiceOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_container_service_list_node_image_versions(self, resource_group): - response = self.client.container_service.list_node_image_versions( - location="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py deleted file mode 100644 index 2464229a3578..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceIdentityBindingsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_identity_bindings_get(self, resource_group): - response = self.client.identity_bindings.get( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_identity_bindings_begin_create_or_update(self, resource_group): - response = self.client.identity_bindings.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - parameters={ - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "managedIdentity": {"resourceId": "str", "clientId": "str", "objectId": "str", "tenantId": "str"}, - "oidcIssuer": {"oidcIssuerUrl": "str"}, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_identity_bindings_begin_delete(self, resource_group): - response = self.client.identity_bindings.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_identity_bindings_list_by_managed_cluster(self, resource_group): - response = self.client.identity_bindings.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py deleted file mode 100644 index 79a1b1bf1a08..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_identity_bindings_operations_async.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceIdentityBindingsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_identity_bindings_get(self, resource_group): - response = await self.client.identity_bindings.get( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_identity_bindings_begin_create_or_update(self, resource_group): - response = await ( - await self.client.identity_bindings.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - parameters={ - "eTag": "str", - "id": "str", - "name": "str", - "properties": { - "managedIdentity": { - "resourceId": "str", - "clientId": "str", - "objectId": "str", - "tenantId": "str", - }, - "oidcIssuer": {"oidcIssuerUrl": "str"}, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_identity_bindings_begin_delete(self, resource_group): - response = await ( - await self.client.identity_bindings.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - identity_binding_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_identity_bindings_list_by_managed_cluster(self, resource_group): - response = self.client.identity_bindings.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py deleted file mode 100644 index 213f7d4ce6e2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceJWTAuthenticatorsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_jwt_authenticators_get(self, resource_group): - response = self.client.jwt_authenticators.get( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_jwt_authenticators_begin_create_or_update(self, resource_group): - response = self.client.jwt_authenticators.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - parameters={ - "properties": { - "claimMappings": { - "username": {"expression": "str"}, - "extra": [{"key": "str", "valueExpression": "str"}], - "groups": {"expression": "str"}, - "uid": {"expression": "str"}, - }, - "issuer": {"audiences": ["str"], "url": "str"}, - "claimValidationRules": [{"expression": "str", "message": "str"}], - "provisioningState": "str", - "userValidationRules": [{"expression": "str", "message": "str"}], - }, - "id": "str", - "name": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_jwt_authenticators_begin_delete(self, resource_group): - response = self.client.jwt_authenticators.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_jwt_authenticators_list_by_managed_cluster(self, resource_group): - response = self.client.jwt_authenticators.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py deleted file mode 100644 index 443ce317cca2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_jwt_authenticators_operations_async.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceJWTAuthenticatorsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_jwt_authenticators_get(self, resource_group): - response = await self.client.jwt_authenticators.get( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_jwt_authenticators_begin_create_or_update(self, resource_group): - response = await ( - await self.client.jwt_authenticators.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - parameters={ - "properties": { - "claimMappings": { - "username": {"expression": "str"}, - "extra": [{"key": "str", "valueExpression": "str"}], - "groups": {"expression": "str"}, - "uid": {"expression": "str"}, - }, - "issuer": {"audiences": ["str"], "url": "str"}, - "claimValidationRules": [{"expression": "str", "message": "str"}], - "provisioningState": "str", - "userValidationRules": [{"expression": "str", "message": "str"}], - }, - "id": "str", - "name": "str", - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_jwt_authenticators_begin_delete(self, resource_group): - response = await ( - await self.client.jwt_authenticators.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - jwt_authenticator_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_jwt_authenticators_list_by_managed_cluster(self, resource_group): - response = self.client.jwt_authenticators.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py deleted file mode 100644 index 6beca80132b4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py +++ /dev/null @@ -1,96 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceLoadBalancersOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_load_balancers_get(self, resource_group): - response = self.client.load_balancers.get( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_load_balancers_create_or_update(self, resource_group): - response = self.client.load_balancers.create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - parameters={ - "id": "str", - "name": "str", - "properties": { - "primaryAgentPoolName": "str", - "allowServicePlacement": bool, - "nodeSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - "provisioningState": "str", - "serviceLabelSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - "serviceNamespaceSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_load_balancers_begin_delete(self, resource_group): - response = self.client.load_balancers.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_load_balancers_list_by_managed_cluster(self, resource_group): - response = self.client.load_balancers.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py deleted file mode 100644 index 83971f7d7920..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py +++ /dev/null @@ -1,99 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceLoadBalancersOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_load_balancers_get(self, resource_group): - response = await self.client.load_balancers.get( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_load_balancers_create_or_update(self, resource_group): - response = await self.client.load_balancers.create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - parameters={ - "id": "str", - "name": "str", - "properties": { - "primaryAgentPoolName": "str", - "allowServicePlacement": bool, - "nodeSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - "provisioningState": "str", - "serviceLabelSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - "serviceNamespaceSelector": { - "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], - "matchLabels": ["str"], - }, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_load_balancers_begin_delete(self, resource_group): - response = await ( - await self.client.load_balancers.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - load_balancer_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_load_balancers_list_by_managed_cluster(self, resource_group): - response = self.client.load_balancers.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py index 58315bd64855..be1358fed58c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations.py @@ -31,181 +31,6 @@ def test_machines_get(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_machines_begin_create_or_update(self, resource_group): - response = self.client.machines.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - machine_name="str", - parameters={ - "id": "str", - "name": "str", - "properties": { - "billing": {"spotMaxPrice": 0.0}, - "eTag": "str", - "evictionPolicy": "str", - "hardware": { - "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, - "ultraSsdEnabled": bool, - "vmSize": "str", - }, - "kubernetes": { - "artifactStreamingProfile": {"enabled": bool}, - "currentOrchestratorVersion": "str", - "kubeletConfig": { - "allowedUnsafeSysctls": ["str"], - "containerLogMaxFiles": 0, - "containerLogMaxSizeMB": 0, - "cpuCfsQuota": bool, - "cpuCfsQuotaPeriod": "str", - "cpuManagerPolicy": "str", - "failSwapOn": bool, - "imageGcHighThreshold": 0, - "imageGcLowThreshold": 0, - "podMaxPids": 0, - "seccompDefault": "str", - "topologyManagerPolicy": "str", - }, - "kubeletDiskType": "str", - "maxPods": 0, - "nodeInitializationTaints": ["str"], - "nodeLabels": {"str": "str"}, - "nodeName": "str", - "nodeTaints": ["str"], - "orchestratorVersion": "str", - "workloadRuntime": "str", - }, - "localDNSProfile": { - "kubeDNSOverrides": { - "str": { - "cacheDurationInSeconds": 0, - "forwardDestination": "str", - "forwardPolicy": "str", - "maxConcurrent": 0, - "protocol": "str", - "queryLogging": "str", - "serveStale": "str", - "serveStaleDurationInSeconds": 0, - } - }, - "mode": "str", - "state": "str", - "vnetDNSOverrides": { - "str": { - "cacheDurationInSeconds": 0, - "forwardDestination": "str", - "forwardPolicy": "str", - "maxConcurrent": 0, - "protocol": "str", - "queryLogging": "str", - "serveStale": "str", - "serveStaleDurationInSeconds": 0, - } - }, - }, - "mode": "str", - "network": { - "enableNodePublicIP": bool, - "ipAddresses": [{"family": "str", "ip": "str"}], - "nodePublicIPPrefixID": "str", - "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], - "podSubnetID": "str", - "vnetSubnetID": "str", - }, - "nodeImageVersion": "str", - "operatingSystem": { - "enableFIPS": bool, - "linuxProfile": { - "linuxOSConfig": { - "swapFileSizeMB": 0, - "sysctls": { - "fsAioMaxNr": 0, - "fsFileMax": 0, - "fsInotifyMaxUserWatches": 0, - "fsNrOpen": 0, - "kernelThreadsMax": 0, - "netCoreNetdevMaxBacklog": 0, - "netCoreOptmemMax": 0, - "netCoreRmemDefault": 0, - "netCoreRmemMax": 0, - "netCoreSomaxconn": 0, - "netCoreWmemDefault": 0, - "netCoreWmemMax": 0, - "netIpv4IpLocalPortRange": "str", - "netIpv4NeighDefaultGcThresh1": 0, - "netIpv4NeighDefaultGcThresh2": 0, - "netIpv4NeighDefaultGcThresh3": 0, - "netIpv4TcpFinTimeout": 0, - "netIpv4TcpKeepaliveProbes": 0, - "netIpv4TcpKeepaliveTime": 0, - "netIpv4TcpMaxSynBacklog": 0, - "netIpv4TcpMaxTwBuckets": 0, - "netIpv4TcpTwReuse": bool, - "netIpv4TcpkeepaliveIntvl": 0, - "netNetfilterNfConntrackBuckets": 0, - "netNetfilterNfConntrackMax": 0, - "vmMaxMapCount": 0, - "vmSwappiness": 0, - "vmVfsCachePressure": 0, - }, - "transparentHugePageDefrag": "str", - "transparentHugePageEnabled": "str", - }, - "messageOfTheDay": "str", - }, - "osDiskSizeGB": 0, - "osDiskType": "str", - "osSKU": "str", - "osType": "str", - "windowsProfile": {"disableOutboundNat": bool}, - }, - "priority": "str", - "provisioningState": "str", - "resourceId": "str", - "security": { - "enableEncryptionAtHost": bool, - "enableSecureBoot": bool, - "enableVTPM": bool, - "sshAccess": "str", - }, - "status": { - "creationTimestamp": "2020-02-20 00:00:00", - "driftAction": "str", - "driftReason": "str", - "provisioningError": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "vmState": "str", - }, - "tags": {"str": "str"}, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - "zones": ["str"], - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_machines_list(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py index ba91a0b59808..05739238f386 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_machines_operations_async.py @@ -32,183 +32,6 @@ async def test_machines_get(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_machines_begin_create_or_update(self, resource_group): - response = await ( - await self.client.machines.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - machine_name="str", - parameters={ - "id": "str", - "name": "str", - "properties": { - "billing": {"spotMaxPrice": 0.0}, - "eTag": "str", - "evictionPolicy": "str", - "hardware": { - "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, - "ultraSsdEnabled": bool, - "vmSize": "str", - }, - "kubernetes": { - "artifactStreamingProfile": {"enabled": bool}, - "currentOrchestratorVersion": "str", - "kubeletConfig": { - "allowedUnsafeSysctls": ["str"], - "containerLogMaxFiles": 0, - "containerLogMaxSizeMB": 0, - "cpuCfsQuota": bool, - "cpuCfsQuotaPeriod": "str", - "cpuManagerPolicy": "str", - "failSwapOn": bool, - "imageGcHighThreshold": 0, - "imageGcLowThreshold": 0, - "podMaxPids": 0, - "seccompDefault": "str", - "topologyManagerPolicy": "str", - }, - "kubeletDiskType": "str", - "maxPods": 0, - "nodeInitializationTaints": ["str"], - "nodeLabels": {"str": "str"}, - "nodeName": "str", - "nodeTaints": ["str"], - "orchestratorVersion": "str", - "workloadRuntime": "str", - }, - "localDNSProfile": { - "kubeDNSOverrides": { - "str": { - "cacheDurationInSeconds": 0, - "forwardDestination": "str", - "forwardPolicy": "str", - "maxConcurrent": 0, - "protocol": "str", - "queryLogging": "str", - "serveStale": "str", - "serveStaleDurationInSeconds": 0, - } - }, - "mode": "str", - "state": "str", - "vnetDNSOverrides": { - "str": { - "cacheDurationInSeconds": 0, - "forwardDestination": "str", - "forwardPolicy": "str", - "maxConcurrent": 0, - "protocol": "str", - "queryLogging": "str", - "serveStale": "str", - "serveStaleDurationInSeconds": 0, - } - }, - }, - "mode": "str", - "network": { - "enableNodePublicIP": bool, - "ipAddresses": [{"family": "str", "ip": "str"}], - "nodePublicIPPrefixID": "str", - "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], - "podSubnetID": "str", - "vnetSubnetID": "str", - }, - "nodeImageVersion": "str", - "operatingSystem": { - "enableFIPS": bool, - "linuxProfile": { - "linuxOSConfig": { - "swapFileSizeMB": 0, - "sysctls": { - "fsAioMaxNr": 0, - "fsFileMax": 0, - "fsInotifyMaxUserWatches": 0, - "fsNrOpen": 0, - "kernelThreadsMax": 0, - "netCoreNetdevMaxBacklog": 0, - "netCoreOptmemMax": 0, - "netCoreRmemDefault": 0, - "netCoreRmemMax": 0, - "netCoreSomaxconn": 0, - "netCoreWmemDefault": 0, - "netCoreWmemMax": 0, - "netIpv4IpLocalPortRange": "str", - "netIpv4NeighDefaultGcThresh1": 0, - "netIpv4NeighDefaultGcThresh2": 0, - "netIpv4NeighDefaultGcThresh3": 0, - "netIpv4TcpFinTimeout": 0, - "netIpv4TcpKeepaliveProbes": 0, - "netIpv4TcpKeepaliveTime": 0, - "netIpv4TcpMaxSynBacklog": 0, - "netIpv4TcpMaxTwBuckets": 0, - "netIpv4TcpTwReuse": bool, - "netIpv4TcpkeepaliveIntvl": 0, - "netNetfilterNfConntrackBuckets": 0, - "netNetfilterNfConntrackMax": 0, - "vmMaxMapCount": 0, - "vmSwappiness": 0, - "vmVfsCachePressure": 0, - }, - "transparentHugePageDefrag": "str", - "transparentHugePageEnabled": "str", - }, - "messageOfTheDay": "str", - }, - "osDiskSizeGB": 0, - "osDiskType": "str", - "osSKU": "str", - "osType": "str", - "windowsProfile": {"disableOutboundNat": bool}, - }, - "priority": "str", - "provisioningState": "str", - "resourceId": "str", - "security": { - "enableEncryptionAtHost": bool, - "enableSecureBoot": bool, - "enableVTPM": bool, - "sshAccess": "str", - }, - "status": { - "creationTimestamp": "2020-02-20 00:00:00", - "driftAction": "str", - "driftReason": "str", - "provisioningError": { - "additionalInfo": [{"info": {}, "type": "str"}], - "code": "str", - "details": [...], - "message": "str", - "target": "str", - }, - "vmState": "str", - }, - "tags": {"str": "str"}, - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - "zones": ["str"], - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_machines_list(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py deleted file mode 100644 index d02b777d78c1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceManagedClusterSnapshotsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_get(self, resource_group): - response = self.client.managed_cluster_snapshots.get( - resource_group_name=resource_group.name, - resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_create_or_update(self, resource_group): - response = self.client.managed_cluster_snapshots.create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - parameters={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "creationData": {"sourceResourceId": "str"}, - "managedClusterPropertiesReadOnly": { - "enableRbac": bool, - "kubernetesVersion": "str", - "networkProfile": { - "loadBalancerSku": "str", - "networkMode": "str", - "networkPlugin": "str", - "networkPluginMode": "str", - "networkPolicy": "str", - }, - "sku": {"name": "str", "tier": "str"}, - }, - "snapshotType": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_update_tags(self, resource_group): - response = self.client.managed_cluster_snapshots.update_tags( - resource_group_name=resource_group.name, - resource_name="str", - parameters={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_delete(self, resource_group): - response = self.client.managed_cluster_snapshots.delete( - resource_group_name=resource_group.name, - resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): - response = self.client.managed_cluster_snapshots.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_cluster_snapshots_list(self, resource_group): - response = self.client.managed_cluster_snapshots.list() - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py deleted file mode 100644 index 3c60017f23e4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py +++ /dev/null @@ -1,114 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceManagedClusterSnapshotsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_get(self, resource_group): - response = await self.client.managed_cluster_snapshots.get( - resource_group_name=resource_group.name, - resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_create_or_update(self, resource_group): - response = await self.client.managed_cluster_snapshots.create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - parameters={ - "location": "str", - "id": "str", - "name": "str", - "properties": { - "creationData": {"sourceResourceId": "str"}, - "managedClusterPropertiesReadOnly": { - "enableRbac": bool, - "kubernetesVersion": "str", - "networkProfile": { - "loadBalancerSku": "str", - "networkMode": "str", - "networkPlugin": "str", - "networkPluginMode": "str", - "networkPolicy": "str", - }, - "sku": {"name": "str", "tier": "str"}, - }, - "snapshotType": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "tags": {"str": "str"}, - "type": "str", - }, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_update_tags(self, resource_group): - response = await self.client.managed_cluster_snapshots.update_tags( - resource_group_name=resource_group.name, - resource_name="str", - parameters={"tags": {"str": "str"}}, - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_delete(self, resource_group): - response = await self.client.managed_cluster_snapshots.delete( - resource_group_name=resource_group.name, - resource_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): - response = self.client.managed_cluster_snapshots.list_by_resource_group( - resource_group_name=resource_group.name, - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_cluster_snapshots_list(self, resource_group): - response = self.client.managed_cluster_snapshots.list() - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py index 0c94c8de8a9b..d4129b07bb58 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations.py @@ -82,15 +82,10 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, - "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -103,7 +98,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -181,7 +175,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -193,7 +186,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, - "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -214,26 +206,13 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, - "upgradeSettingsBlueGreen": { - "batchSoakDurationInMinutes": 0, - "drainBatchSize": "str", - "drainTimeoutInMinutes": 0, - "finalSoakDurationInMinutes": 0, - }, - "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], - "virtualMachinesProfile": { - "scale": { - "autoscale": [{"maxCount": 0, "minCount": 0, "size": "str"}], - "manual": [{"count": 0, "size": "str"}], - } - }, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, @@ -274,44 +253,23 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "autoUpgradeProfile": {"nodeOSUpgradeChannel": "str", "upgradeChannel": "str"}, "azureMonitorProfile": { - "appMonitoring": { - "autoInstrumentation": {"enabled": bool}, - "openTelemetryLogsAndTraces": {"enabled": bool, "grpcPort": 0, "httpPort": 0}, - "openTelemetryMetrics": {"enabled": bool, "grpcPort": 0, "httpPort": 0}, - }, - "containerInsights": { - "containerNetworkLogs": "str", - "disableCustomMetrics": bool, - "disablePrometheusMetricsScraping": bool, - "enabled": bool, - "logAnalyticsWorkspaceResourceId": "str", - "syslogPort": 0, - }, + "appMonitoring": {"autoInstrumentation": {"enabled": bool}}, "metrics": { "enabled": bool, - "controlPlane": {"enabled": bool}, "kubeStateMetrics": {"metricAnnotationsAllowList": "str", "metricLabelsAllowlist": "str"}, }, }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "str", "containerRegistryId": "str"}, - "controlPlaneScalingProfile": {"scalingSize": "str"}, - "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", - "enableNamespaceResources": bool, "enableRBAC": bool, "fqdn": "str", "fqdnSubdomain": "str", - "healthMonitorProfile": { - "enableContinuousControlPlaneAndAddonMonitor": bool, - "enableOnDemandMonitor": bool, - }, "hostedSystemProfile": {"enabled": bool, "nodeSubnetID": "str", "systemNodeSubnetID": "str"}, "httpProxyConfig": { - "effectiveNoProxy": ["str"], "enabled": bool, "httpProxy": "str", "httpsProxy": "str", @@ -320,13 +278,8 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "identityProfile": {"str": {"clientId": "str", "objectId": "str", "resourceId": "str"}}, "ingressProfile": { - "applicationLoadBalancer": { - "enabled": bool, - "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, - }, "gatewayAPI": {"installation": "str"}, "webAppRouting": { - "defaultDomain": {"domainName": "str", "enabled": bool}, "dnsZoneResourceIds": ["str"], "enabled": bool, "gatewayAPIImplementations": {"appRoutingIstio": {"mode": "str"}}, @@ -351,20 +304,9 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "dnsServiceIP": "str", "ipFamilies": ["str"], - "kubeProxyConfig": { - "enabled": bool, - "ipvsConfig": { - "scheduler": "str", - "tcpFinTimeoutSeconds": 0, - "tcpTimeoutSeconds": 0, - "udpTimeoutSeconds": 0, - }, - "mode": "str", - }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "str", - "clusterServiceLoadBalancerHealthProbeMode": "str", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 0, @@ -376,9 +318,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "natGatewayProfile": { "effectiveOutboundIPs": [{"id": "str"}], "idleTimeoutInMinutes": 0, - "managedOutboundIPProfile": {"count": 0, "countIPv6": 0}, - "outboundIPPrefixes": {"publicIPPrefixes": ["str"]}, - "outboundIPs": {"publicIPs": ["str"]}, + "managedOutboundIPProfile": {"count": 0}, }, "networkDataplane": "str", "networkMode": "str", @@ -388,7 +328,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "str", "podCidr": "str", "podCidrs": ["str"], - "podLinkLocalAccess": "str", "serviceCidr": "str", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, @@ -433,7 +372,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "resourceUID": "str", - "schedulerProfile": {"schedulerInstanceProfiles": {"upstream": {"schedulerConfigMode": "str"}}}, "securityProfile": { "azureKeyVaultKms": { "enabled": bool, @@ -442,25 +380,8 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "keyVaultResourceId": "str", }, "customCATrustCertificates": [bytes("bytes", encoding="utf-8")], - "defender": { - "logAnalyticsWorkspaceResourceId": "str", - "securityGating": { - "allowSecretAccess": bool, - "enabled": bool, - "identities": [ - { - "azureContainerRegistry": "str", - "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, - } - ], - }, - "securityMonitoring": {"enabled": bool}, - }, + "defender": {"logAnalyticsWorkspaceResourceId": "str", "securityMonitoring": {"enabled": bool}}, "imageCleaner": {"enabled": bool, "intervalHours": 0}, - "imageIntegrity": {"enabled": bool}, - "kubernetesResourceObjectEncryptionProfile": {"infrastructureEncryption": "str"}, - "nodeRestriction": {"enabled": bool}, - "serviceAccountImagePullProfile": {"defaultManagedIdentityId": "str", "enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -502,7 +423,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "storageProfile": { "blobCSIDriver": {"enabled": bool}, - "diskCSIDriver": {"enabled": bool, "version": "str"}, + "diskCSIDriver": {"enabled": bool}, "fileCSIDriver": {"enabled": bool}, "snapshotController": {"enabled": bool}, }, @@ -517,7 +438,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": bool, "addonAutoscaling": "str"}, + "verticalPodAutoscaler": {"enabled": bool}, }, }, "sku": {"name": "str", "tier": "str"}, @@ -745,18 +666,6 @@ def test_managed_clusters_list_outbound_network_dependencies_endpoints(self, res # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_clusters_begin_rebalance_load_balancers(self, resource_group): - response = self.client.managed_clusters.begin_rebalance_load_balancers( - resource_group_name=resource_group.name, - resource_name="str", - parameters={"loadBalancerNames": ["str"]}, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_clusters_get_upgrade_profile(self, resource_group): @@ -768,48 +677,6 @@ def test_managed_clusters_get_upgrade_profile(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_clusters_get_guardrails_versions(self, resource_group): - response = self.client.managed_clusters.get_guardrails_versions( - location="str", - version="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_clusters_list_guardrails_versions(self, resource_group): - response = self.client.managed_clusters.list_guardrails_versions( - location="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_clusters_get_safeguards_versions(self, resource_group): - response = self.client.managed_clusters.get_safeguards_versions( - location="str", - version="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_managed_clusters_list_safeguards_versions(self, resource_group): - response = self.client.managed_clusters.list_safeguards_versions( - location="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_managed_clusters_get_mesh_revision_profile(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py index 5e71ce7dfd39..1bc5be21b25d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_clusters_operations_async.py @@ -89,15 +89,10 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, - "enableOSDiskFullCaching": bool, "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 0}, "gpuInstanceProfile": "str", - "gpuProfile": { - "driver": "str", - "driverType": "str", - "nvidia": {"managementMode": "str", "migStrategy": "str"}, - }, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -110,7 +105,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -188,7 +182,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -200,7 +193,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, - "preparedImageSpecificationProfile": {"preparedImageSpecificationId": "str"}, "provisioningState": "str", "proximityPlacementGroupID": "str", "scaleDownMode": "str", @@ -221,26 +213,13 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, "undrainableNodeBehavior": "str", }, - "upgradeSettingsBlueGreen": { - "batchSoakDurationInMinutes": 0, - "drainBatchSize": "str", - "drainTimeoutInMinutes": 0, - "finalSoakDurationInMinutes": 0, - }, - "upgradeStrategy": "str", "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], - "virtualMachinesProfile": { - "scale": { - "autoscale": [{"maxCount": 0, "minCount": 0, "size": "str"}], - "manual": [{"count": 0, "size": "str"}], - } - }, + "virtualMachinesProfile": {"scale": {"manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, @@ -281,22 +260,9 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "autoUpgradeProfile": {"nodeOSUpgradeChannel": "str", "upgradeChannel": "str"}, "azureMonitorProfile": { - "appMonitoring": { - "autoInstrumentation": {"enabled": bool}, - "openTelemetryLogsAndTraces": {"enabled": bool, "grpcPort": 0, "httpPort": 0}, - "openTelemetryMetrics": {"enabled": bool, "grpcPort": 0, "httpPort": 0}, - }, - "containerInsights": { - "containerNetworkLogs": "str", - "disableCustomMetrics": bool, - "disablePrometheusMetricsScraping": bool, - "enabled": bool, - "logAnalyticsWorkspaceResourceId": "str", - "syslogPort": 0, - }, + "appMonitoring": {"autoInstrumentation": {"enabled": bool}}, "metrics": { "enabled": bool, - "controlPlane": {"enabled": bool}, "kubeStateMetrics": { "metricAnnotationsAllowList": "str", "metricLabelsAllowlist": "str", @@ -305,23 +271,15 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "str", "containerRegistryId": "str"}, - "controlPlaneScalingProfile": {"scalingSize": "str"}, - "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", - "enableNamespaceResources": bool, "enableRBAC": bool, "fqdn": "str", "fqdnSubdomain": "str", - "healthMonitorProfile": { - "enableContinuousControlPlaneAndAddonMonitor": bool, - "enableOnDemandMonitor": bool, - }, "hostedSystemProfile": {"enabled": bool, "nodeSubnetID": "str", "systemNodeSubnetID": "str"}, "httpProxyConfig": { - "effectiveNoProxy": ["str"], "enabled": bool, "httpProxy": "str", "httpsProxy": "str", @@ -330,13 +288,8 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "identityProfile": {"str": {"clientId": "str", "objectId": "str", "resourceId": "str"}}, "ingressProfile": { - "applicationLoadBalancer": { - "enabled": bool, - "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, - }, "gatewayAPI": {"installation": "str"}, "webAppRouting": { - "defaultDomain": {"domainName": "str", "enabled": bool}, "dnsZoneResourceIds": ["str"], "enabled": bool, "gatewayAPIImplementations": {"appRoutingIstio": {"mode": "str"}}, @@ -361,20 +314,9 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "dnsServiceIP": "str", "ipFamilies": ["str"], - "kubeProxyConfig": { - "enabled": bool, - "ipvsConfig": { - "scheduler": "str", - "tcpFinTimeoutSeconds": 0, - "tcpTimeoutSeconds": 0, - "udpTimeoutSeconds": 0, - }, - "mode": "str", - }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "str", - "clusterServiceLoadBalancerHealthProbeMode": "str", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 0, @@ -386,9 +328,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "natGatewayProfile": { "effectiveOutboundIPs": [{"id": "str"}], "idleTimeoutInMinutes": 0, - "managedOutboundIPProfile": {"count": 0, "countIPv6": 0}, - "outboundIPPrefixes": {"publicIPPrefixes": ["str"]}, - "outboundIPs": {"publicIPs": ["str"]}, + "managedOutboundIPProfile": {"count": 0}, }, "networkDataplane": "str", "networkMode": "str", @@ -398,7 +338,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "str", "podCidr": "str", "podCidrs": ["str"], - "podLinkLocalAccess": "str", "serviceCidr": "str", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, @@ -448,7 +387,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "resourceUID": "str", - "schedulerProfile": {"schedulerInstanceProfiles": {"upstream": {"schedulerConfigMode": "str"}}}, "securityProfile": { "azureKeyVaultKms": { "enabled": bool, @@ -459,23 +397,9 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "customCATrustCertificates": [bytes("bytes", encoding="utf-8")], "defender": { "logAnalyticsWorkspaceResourceId": "str", - "securityGating": { - "allowSecretAccess": bool, - "enabled": bool, - "identities": [ - { - "azureContainerRegistry": "str", - "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, - } - ], - }, "securityMonitoring": {"enabled": bool}, }, "imageCleaner": {"enabled": bool, "intervalHours": 0}, - "imageIntegrity": {"enabled": bool}, - "kubernetesResourceObjectEncryptionProfile": {"infrastructureEncryption": "str"}, - "nodeRestriction": {"enabled": bool}, - "serviceAccountImagePullProfile": {"defaultManagedIdentityId": "str", "enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -517,7 +441,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "storageProfile": { "blobCSIDriver": {"enabled": bool}, - "diskCSIDriver": {"enabled": bool, "version": "str"}, + "diskCSIDriver": {"enabled": bool}, "fileCSIDriver": {"enabled": bool}, "snapshotController": {"enabled": bool}, }, @@ -532,7 +456,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": bool, "addonAutoscaling": "str"}, + "verticalPodAutoscaler": {"enabled": bool}, }, }, "sku": {"name": "str", "tier": "str"}, @@ -781,20 +705,6 @@ async def test_managed_clusters_list_outbound_network_dependencies_endpoints(sel # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_clusters_begin_rebalance_load_balancers(self, resource_group): - response = await ( - await self.client.managed_clusters.begin_rebalance_load_balancers( - resource_group_name=resource_group.name, - resource_name="str", - parameters={"loadBalancerNames": ["str"]}, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_clusters_get_upgrade_profile(self, resource_group): @@ -806,48 +716,6 @@ async def test_managed_clusters_get_upgrade_profile(self, resource_group): # please add some check logic here by yourself # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_clusters_get_guardrails_versions(self, resource_group): - response = await self.client.managed_clusters.get_guardrails_versions( - location="str", - version="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_clusters_list_guardrails_versions(self, resource_group): - response = self.client.managed_clusters.list_guardrails_versions( - location="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_clusters_get_safeguards_versions(self, resource_group): - response = await self.client.managed_clusters.get_safeguards_versions( - location="str", - version="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_managed_clusters_list_safeguards_versions(self, resource_group): - response = self.client.managed_clusters.list_safeguards_versions( - location="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_managed_clusters_get_mesh_revision_profile(self, resource_group): diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py deleted file mode 100644 index 556954334154..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceMeshMembershipsOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_mesh_memberships_get(self, resource_group): - response = self.client.mesh_memberships.get( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_mesh_memberships_begin_create_or_update(self, resource_group): - response = self.client.mesh_memberships.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - parameters={ - "eTag": "str", - "id": "str", - "managedBy": "str", - "name": "str", - "properties": { - "managedMeshID": "str", - "privateConnectProfile": {"privateIpAddress": "str", "subnetResourceId": "str"}, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_mesh_memberships_begin_delete(self, resource_group): - response = self.client.mesh_memberships.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_mesh_memberships_list_by_managed_cluster(self, resource_group): - response = self.client.mesh_memberships.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py deleted file mode 100644 index 87c7b2cd23d9..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_mesh_memberships_operations_async.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceMeshMembershipsOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_mesh_memberships_get(self, resource_group): - response = await self.client.mesh_memberships.get( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_mesh_memberships_begin_create_or_update(self, resource_group): - response = await ( - await self.client.mesh_memberships.begin_create_or_update( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - parameters={ - "eTag": "str", - "id": "str", - "managedBy": "str", - "name": "str", - "properties": { - "managedMeshID": "str", - "privateConnectProfile": {"privateIpAddress": "str", "subnetResourceId": "str"}, - "provisioningState": "str", - }, - "systemData": { - "createdAt": "2020-02-20 00:00:00", - "createdBy": "str", - "createdByType": "str", - "lastModifiedAt": "2020-02-20 00:00:00", - "lastModifiedBy": "str", - "lastModifiedByType": "str", - }, - "type": "str", - }, - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_mesh_memberships_begin_delete(self, resource_group): - response = await ( - await self.client.mesh_memberships.begin_delete( - resource_group_name=resource_group.name, - resource_name="str", - mesh_membership_name="str", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_mesh_memberships_list_by_managed_cluster(self, resource_group): - response = self.client.mesh_memberships.list_by_managed_cluster( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py deleted file mode 100644 index 638e238e522f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceOperationStatusResultOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_operation_status_result_get_by_agent_pool(self, resource_group): - response = self.client.operation_status_result.get_by_agent_pool( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - operation_id="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_operation_status_result_list(self, resource_group): - response = self.client.operation_status_result.list( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_operation_status_result_get(self, resource_group): - response = self.client.operation_status_result.get( - resource_group_name=resource_group.name, - resource_name="str", - operation_id="str", - ) - - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py deleted file mode 100644 index 1ca784249fbe..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceOperationStatusResultOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_operation_status_result_get_by_agent_pool(self, resource_group): - response = await self.client.operation_status_result.get_by_agent_pool( - resource_group_name=resource_group.name, - resource_name="str", - agent_pool_name="str", - operation_id="str", - ) - - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_operation_status_result_list(self, resource_group): - response = self.client.operation_status_result.list( - resource_group_name=resource_group.name, - resource_name="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_operation_status_result_get(self, resource_group): - response = await self.client.operation_status_result.get( - resource_group_name=resource_group.name, - resource_name="str", - operation_id="str", - ) - - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py deleted file mode 100644 index a4936ed3c7e4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceVmSkusOperations(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy - def test_vm_skus_list(self, resource_group): - response = self.client.vm_skus.list( - location="str", - ) - result = [r for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py deleted file mode 100644 index 0b59f282b641..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_vm_skus_operations_async.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient - -from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer -from devtools_testutils.aio import recorded_by_proxy_async - -AZURE_LOCATION = "eastus" - - -@pytest.mark.skip("you may need to update the auto-generated test case before run it") -class TestContainerServiceVmSkusOperationsAsync(AzureMgmtRecordedTestCase): - def setup_method(self, method): - self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) - - @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) - @recorded_by_proxy_async - async def test_vm_skus_list(self, resource_group): - response = self.client.vm_skus.list( - location="str", - ) - result = [r async for r in response] - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml b/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml index 6ae88b9cd507..7c6413562dd3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml +++ b/sdk/containerservice/azure-mgmt-containerservice/pyproject.toml @@ -13,7 +13,7 @@ authors = [ description = "Microsoft Azure Containerservice Management Client Library for Python" license = "MIT" classifiers = [ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", @@ -78,7 +78,7 @@ verifytypes = false package_name = "azure-mgmt-containerservice" package_pprint_name = "Container Service Management" package_doc_id = "container-service" -is_stable = false +is_stable = true sample_link = "" title = "ContainerServiceClient" package_nspkg = "azure-mgmt-nspkg" diff --git a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml index e3fa89986eb1..caa6898c5e07 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: 84d3ee44165575ed56740413fa1346ed0a65e4e1 +commit: 0e3000dfffe6c32c8ed124140dd972dafae67cfa repo: Azure/azure-rest-api-specs additionalDirectories: From 7110420afcf4ecd51bcafe064743c33a77599e5e Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Sat, 9 May 2026 03:56:11 +0000 Subject: [PATCH 2/2] Configurations: 'specification/containerservice/resource-manager/Microsoft.ContainerService/aks/tspconfig.yaml', API Version: 2026-03-01, SDK Release Type: stable, and CommitSHA: 'e393681748e363e5165b1cb59fef025ac96cd27f' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6274242 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- sdk/containerservice/azure-mgmt-containerservice/_metadata.json | 2 +- .../azure-mgmt-containerservice/tsp-location.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json index be1614524fcf..c9cd5ef838fe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json @@ -3,7 +3,7 @@ "apiVersions": { "Microsoft.ContainerService": "2026-03-01" }, - "commit": "0e3000dfffe6c32c8ed124140dd972dafae67cfa", + "commit": "e393681748e363e5165b1cb59fef025ac96cd27f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks", "emitterVersion": "0.61.3" diff --git a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml index caa6898c5e07..4aff97cf42cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-mgmt-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: 0e3000dfffe6c32c8ed124140dd972dafae67cfa +commit: e393681748e363e5165b1cb59fef025ac96cd27f repo: Azure/azure-rest-api-specs additionalDirectories: