From 3e0fa104bf646a78f69aa86abde2f0c3f4f1d4d5 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 19 Nov 2025 01:21:47 +0000 Subject: [PATCH] code and test --- .../azure-mgmt-containerservice/CHANGELOG.md | 6 + .../_metadata.json | 4 +- .../apiview-properties.json | 180 +- .../mgmt/containerservice/_configuration.py | 6 +- .../_container_service_client.py | 60 +- .../azure/mgmt/containerservice/_version.py | 2 +- .../containerservice/aio/_configuration.py | 6 +- .../aio/_container_service_client.py | 63 +- .../aio/operations/__init__.py | 22 +- .../aio/operations/_agent_pools_operations.py | 126 +- .../_container_service_operations.py | 141 - .../_identity_bindings_operations.py | 580 -- .../_jwt_authenticators_operations.py | 587 -- .../operations/_load_balancers_operations.py | 499 -- .../aio/operations/_machines_operations.py | 278 +- .../_maintenance_configurations_operations.py | 15 +- .../_managed_cluster_snapshots_operations.py | 634 -- .../_managed_clusters_operations.py | 569 +- .../_mesh_memberships_operations.py | 555 -- .../_operation_status_result_operations.py | 286 - .../mgmt/containerservice/models/__init__.py | 184 +- .../models/_container_service_client_enums.py | 381 +- .../containerservice/models/_models_py3.py | 5224 +++-------------- .../containerservice/operations/__init__.py | 22 +- .../operations/_agent_pools_operations.py | 186 +- .../_container_service_operations.py | 170 - .../_identity_bindings_operations.py | 763 --- .../_jwt_authenticators_operations.py | 767 --- .../operations/_load_balancers_operations.py | 682 --- .../operations/_machines_operations.py | 340 +- .../_maintenance_configurations_operations.py | 23 +- .../_managed_cluster_snapshots_operations.py | 851 --- .../_managed_clusters_operations.py | 865 +-- .../_managed_namespaces_operations.py | 12 +- .../_mesh_memberships_operations.py | 738 --- .../_operation_status_result_operations.py | 413 -- .../operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 8 +- .../_private_link_resources_operations.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- .../operations/_snapshots_operations.py | 12 +- ...trusted_access_role_bindings_operations.py | 8 +- .../_trusted_access_roles_operations.py | 2 +- .../advanced_networking_transit_encryption.py | 84 - .../agent_pools_abort_operation.py | 2 +- .../agent_pools_complete_upgrade.py | 43 - ...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 | 4 +- .../agent_pools_create_spot.py | 2 +- ...gent_pools_create_type_virtual_machines.py | 2 +- ..._create_type_virtual_machines_autoscale.py | 57 - .../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 | 43 - .../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 | 43 - .../get_safeguards_versions.py | 43 - .../identity_bindings_create_or_update.py | 51 - .../identity_bindings_delete.py | 43 - .../identity_bindings_get.py | 44 - .../identity_bindings_list.py | 44 - .../jwt_authenticators_create_or_update.py | 67 - .../jwt_authenticators_delete.py | 43 - .../jwt_authenticators_list.py | 44 - .../kubernetes_versions_list.py | 2 +- .../list_guardrails_versions.py | 43 - .../list_safeguards_versions.py | 43 - .../load_balancers_create_or_update.py | 45 - .../load_balancers_delete.py | 43 - .../generated_samples/load_balancers_list.py | 44 - .../load_balancers_rebalance.py | 43 - .../machine_create_update.py | 62 - .../generated_samples/machine_get.py | 4 +- .../generated_samples/machine_list.py | 4 +- ...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 | 42 - .../managed_cluster_snapshots_get.py | 43 - .../managed_cluster_snapshots_list.py | 41 - ...luster_snapshots_list_by_resource_group.py | 43 - .../managed_cluster_snapshots_update_tags.py | 44 - .../managed_clusters_abort_operation.py | 2 +- ..._create_azure_keyvault_secrets_provider.py | 4 +- ...aged_clusters_create_azure_service_mesh.py | 12 +- ..._crg.py => managed_clusters_create_crg.py} | 6 +- ...ers_create_custom_ca_trust_certificates.py | 4 +- ...ed_clusters_create_dedicated_host_group.py | 4 +- ...ged_clusters_create_disable_run_command.py | 2 +- ...d_clusters_create_dual_stack_networking.py | 6 +- ...ers_create_enable_ai_toolchain_operator.py | 76 - ...usters_create_enable_encryption_at_host.py | 4 +- ...anaged_clusters_create_enable_ultra_ssd.py | 4 +- .../managed_clusters_create_enabled_fips.py | 4 +- .../managed_clusters_create_gpumig.py | 4 +- .../managed_clusters_create_httpproxy.py | 4 +- ...gress_profile_application_load_balancer.py | 70 - ..._create_ingress_profile_web_app_routing.py | 2 +- ...ged_clusters_create_managed_nat_gateway.py | 4 +- .../managed_clusters_create_mcsnapshot.py | 69 - ..._clusters_create_node_auto_provisioning.py | 75 - ...d_clusters_create_node_public_ip_prefix.py | 4 +- .../managed_clusters_create_ossku.py | 4 +- .../managed_clusters_create_pod_identity.py | 4 +- .../managed_clusters_create_ppg.py | 4 +- .../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 | 6 +- .../managed_clusters_create_update.py | 8 +- ...ged_clusters_create_update_windows_gmsa.py | 6 +- ...anaged_clusters_create_update_with_ahub.py | 6 +- ...rs_create_update_with_enable_azure_rbac.py | 4 +- ..._update_with_enable_namespace_resources.py | 77 - ...usters_create_user_assigned_nat_gateway.py | 4 +- ...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 +- ...lusters_list_cluster_admin_credentials.py} | 4 +- ...st_cluster_monitoring_user_credentials.py} | 7 +- ...clusters_list_cluster_user_credentials.py} | 7 +- ...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 | 43 - .../generated_samples/mesh_memberships_get.py | 44 - ...esh_memberships_list_by_managed_cluster.py | 44 - .../node_image_versions_list.py | 43 - .../generated_samples/operation_list.py | 2 +- .../operation_status_result_get.py | 44 - ...eration_status_result_get_by_agent_pool.py | 45 - .../operation_status_result_list.py | 44 - ...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 | 53 +- ...er_service_agent_pools_operations_async.py | 55 +- ...t_container_service_machines_operations.py | 132 +- ...ainer_service_machines_operations_async.py | 134 +- ...e_maintenance_configurations_operations.py | 8 +- ...tenance_configurations_operations_async.py | 8 +- ...ner_service_managed_clusters_operations.py | 221 +- ...rvice_managed_clusters_operations_async.py | 213 +- ...r_service_managed_namespaces_operations.py | 12 +- ...ice_managed_namespaces_operations_async.py | 12 +- .../test_container_service_operations.py | 2 +- ...test_container_service_operations_async.py | 2 +- ...private_endpoint_connections_operations.py | 8 +- ...e_endpoint_connections_operations_async.py | 8 +- ...rvice_private_link_resources_operations.py | 2 +- ...private_link_resources_operations_async.py | 2 +- ...olve_private_link_service_id_operations.py | 2 +- ...rivate_link_service_id_operations_async.py | 2 +- ..._container_service_snapshots_operations.py | 12 +- ...iner_service_snapshots_operations_async.py | 12 +- ...trusted_access_role_bindings_operations.py | 8 +- ...d_access_role_bindings_operations_async.py | 8 +- ...service_trusted_access_roles_operations.py | 2 +- ...e_trusted_access_roles_operations_async.py | 2 +- .../pyproject.toml | 4 +- 221 files changed, 1355 insertions(+), 18206 deletions(-) delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_container_service_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_identity_bindings_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_jwt_authenticators_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_load_balancers_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_cluster_snapshots_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_mesh_memberships_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operation_status_result_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_container_service_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_identity_bindings_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_jwt_authenticators_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_load_balancers_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_cluster_snapshots_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_mesh_memberships_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operation_status_result_operations.py delete mode 100644 sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.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} (93%) 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_list.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_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 rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{managed_clusters_associate_crg.py => managed_clusters_create_crg.py} (93%) 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_admin_credentials.py} (89%) rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{load_balancers_get.py => managed_clusters_list_cluster_monitoring_user_credentials.py} (84%) rename sdk/containerservice/azure-mgmt-containerservice/generated_samples/{jwt_authenticators_get.py => managed_clusters_list_cluster_user_credentials.py} (85%) 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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md index 9d7f0c29f2d4..5adba94d390b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 40.2.0 (2025-12-21) + +### Features Added + + - Enum `OSSKU` added member `UBUNTU2404` + ## 41.0.0b2 (2025-11-17) ### Features Added diff --git a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json index ffd921ee46ca..258c67b6f358 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_metadata.json @@ -1,11 +1,11 @@ { - "commit": "33fc84305793ee529921aabe0a72b7fad67c197d", + "commit": "9d71a0267f114124a00995a91b5883df96d5746f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ "@autorest/python@6.42.0", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-preview-2025-09 --use=@autorest/python@6.42.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.42.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md" } \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json index ff91ccaba55f..e1f2cd1c0418 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json +++ b/sdk/containerservice/azure-mgmt-containerservice/apiview-properties.json @@ -4,36 +4,26 @@ "azure.mgmt.containerservice.models.AbsoluteMonthlySchedule": null, "azure.mgmt.containerservice.models.AdvancedNetworking": null, "azure.mgmt.containerservice.models.AdvancedNetworkingObservability": null, - "azure.mgmt.containerservice.models.AdvancedNetworkingPerformance": null, "azure.mgmt.containerservice.models.AdvancedNetworkingSecurity": null, - "azure.mgmt.containerservice.models.AdvancedNetworkingSecurityTransitEncryption": null, "azure.mgmt.containerservice.models.SubResource": null, "azure.mgmt.containerservice.models.AgentPool": null, - "azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile": null, "azure.mgmt.containerservice.models.AgentPoolAvailableVersions": null, "azure.mgmt.containerservice.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem": null, - "azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings": null, "azure.mgmt.containerservice.models.AgentPoolDeleteMachinesParameter": null, "azure.mgmt.containerservice.models.AgentPoolGatewayProfile": null, "azure.mgmt.containerservice.models.AgentPoolListResult": null, "azure.mgmt.containerservice.models.AgentPoolNetworkProfile": null, - "azure.mgmt.containerservice.models.AgentPoolRecentlyUsedVersion": null, "azure.mgmt.containerservice.models.AgentPoolSecurityProfile": null, "azure.mgmt.containerservice.models.AgentPoolStatus": null, "azure.mgmt.containerservice.models.AgentPoolUpgradeProfile": null, "azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem": null, "azure.mgmt.containerservice.models.AgentPoolUpgradeSettings": null, "azure.mgmt.containerservice.models.AgentPoolWindowsProfile": null, - "azure.mgmt.containerservice.models.AutoScaleProfile": null, "azure.mgmt.containerservice.models.AzureKeyVaultKms": null, "azure.mgmt.containerservice.models.ClusterUpgradeSettings": null, "azure.mgmt.containerservice.models.CompatibleVersions": null, - "azure.mgmt.containerservice.models.Component": null, - "azure.mgmt.containerservice.models.ComponentsByRelease": null, "azure.mgmt.containerservice.models.ContainerServiceLinuxProfile": null, "azure.mgmt.containerservice.models.ContainerServiceNetworkProfile": null, - "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig": null, - "azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig": null, "azure.mgmt.containerservice.models.ContainerServiceSshConfiguration": null, "azure.mgmt.containerservice.models.ContainerServiceSshPublicKey": null, "azure.mgmt.containerservice.models.CreationData": null, @@ -49,16 +39,6 @@ "azure.mgmt.containerservice.models.ErrorResponse": null, "azure.mgmt.containerservice.models.ExtendedLocation": null, "azure.mgmt.containerservice.models.GPUProfile": null, - "azure.mgmt.containerservice.models.Resource": null, - "azure.mgmt.containerservice.models.GuardrailsAvailableVersion": null, - "azure.mgmt.containerservice.models.GuardrailsAvailableVersionsList": null, - "azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties": null, - "azure.mgmt.containerservice.models.ProxyResource": null, - "azure.mgmt.containerservice.models.IdentityBinding": null, - "azure.mgmt.containerservice.models.IdentityBindingListResult": null, - "azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile": null, - "azure.mgmt.containerservice.models.IdentityBindingOidcIssuerProfile": null, - "azure.mgmt.containerservice.models.IdentityBindingProperties": null, "azure.mgmt.containerservice.models.IPTag": null, "azure.mgmt.containerservice.models.IstioCertificateAuthority": null, "azure.mgmt.containerservice.models.IstioComponents": null, @@ -66,40 +46,23 @@ "azure.mgmt.containerservice.models.IstioIngressGateway": null, "azure.mgmt.containerservice.models.IstioPluginCertificateAuthority": null, "azure.mgmt.containerservice.models.IstioServiceMesh": null, - "azure.mgmt.containerservice.models.JWTAuthenticator": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorIssuer": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorListResult": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorProperties": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule": null, "azure.mgmt.containerservice.models.KubeletConfig": null, "azure.mgmt.containerservice.models.KubernetesPatchVersion": null, - "azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile": null, "azure.mgmt.containerservice.models.KubernetesVersion": null, "azure.mgmt.containerservice.models.KubernetesVersionCapabilities": null, "azure.mgmt.containerservice.models.KubernetesVersionListResult": null, - "azure.mgmt.containerservice.models.LabelSelector": null, - "azure.mgmt.containerservice.models.LabelSelectorRequirement": null, "azure.mgmt.containerservice.models.LinuxOSConfig": null, - "azure.mgmt.containerservice.models.LoadBalancer": null, - "azure.mgmt.containerservice.models.LoadBalancerListResult": null, "azure.mgmt.containerservice.models.LocalDNSOverride": null, "azure.mgmt.containerservice.models.LocalDNSProfile": null, "azure.mgmt.containerservice.models.Machine": null, - "azure.mgmt.containerservice.models.MachineHardwareProfile": null, "azure.mgmt.containerservice.models.MachineIpAddress": null, - "azure.mgmt.containerservice.models.MachineKubernetesProfile": null, "azure.mgmt.containerservice.models.MachineListResult": null, "azure.mgmt.containerservice.models.MachineNetworkProperties": null, - "azure.mgmt.containerservice.models.MachineOSProfile": null, - "azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile": null, "azure.mgmt.containerservice.models.MachineProperties": null, - "azure.mgmt.containerservice.models.MachineStatus": null, "azure.mgmt.containerservice.models.MaintenanceConfiguration": null, "azure.mgmt.containerservice.models.MaintenanceConfigurationListResult": null, "azure.mgmt.containerservice.models.MaintenanceWindow": null, + "azure.mgmt.containerservice.models.Resource": null, "azure.mgmt.containerservice.models.TrackedResource": null, "azure.mgmt.containerservice.models.ManagedCluster": null, "azure.mgmt.containerservice.models.ManagedClusterAADProfile": null, @@ -113,22 +76,13 @@ "azure.mgmt.containerservice.models.ManagedClusterAPIServerAccessProfile": null, "azure.mgmt.containerservice.models.ManagedClusterAutoUpgradeProfile": null, "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile": null, - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring": null, - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation": null, - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs": null, - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics": null, - "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights": null, "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics": null, "azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics": null, "azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile": null, "azure.mgmt.containerservice.models.ManagedClusterCostAnalysis": null, - "azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile": null, "azure.mgmt.containerservice.models.ManagedClusterHTTPProxyConfig": null, "azure.mgmt.containerservice.models.ManagedClusterIdentity": null, - "azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile": null, "azure.mgmt.containerservice.models.ManagedClusterIngressProfile": null, - "azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer": null, - "azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration": null, "azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx": null, "azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting": null, "azure.mgmt.containerservice.models.ManagedClusterListResult": null, @@ -151,20 +105,13 @@ "azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfile": null, "azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem": null, "azure.mgmt.containerservice.models.ManagedClusterPropertiesAutoScalerProfile": null, - "azure.mgmt.containerservice.models.ManagedClusterPropertiesForSnapshot": null, "azure.mgmt.containerservice.models.ManagedClusterSecurityProfile": null, "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefender": null, - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating": null, - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem": null, "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring": null, "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner": null, - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity": null, - "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction": null, "azure.mgmt.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity": null, "azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile": null, "azure.mgmt.containerservice.models.ManagedClusterSKU": null, - "azure.mgmt.containerservice.models.ManagedClusterSnapshot": null, - "azure.mgmt.containerservice.models.ManagedClusterSnapshotListResult": null, "azure.mgmt.containerservice.models.ManagedClusterStaticEgressGatewayProfile": null, "azure.mgmt.containerservice.models.ManagedClusterStatus": null, "azure.mgmt.containerservice.models.ManagedClusterStorageProfile": null, @@ -181,10 +128,8 @@ "azure.mgmt.containerservice.models.ManagedNamespaceListResult": null, "azure.mgmt.containerservice.models.ManagedServiceIdentityUserAssignedIdentitiesValue": null, "azure.mgmt.containerservice.models.ManualScaleProfile": null, - "azure.mgmt.containerservice.models.MeshMembership": null, - "azure.mgmt.containerservice.models.MeshMembershipProperties": null, - "azure.mgmt.containerservice.models.MeshMembershipsListResult": null, "azure.mgmt.containerservice.models.MeshRevision": null, + "azure.mgmt.containerservice.models.ProxyResource": null, "azure.mgmt.containerservice.models.MeshRevisionProfile": null, "azure.mgmt.containerservice.models.MeshRevisionProfileList": null, "azure.mgmt.containerservice.models.MeshRevisionProfileProperties": null, @@ -193,13 +138,7 @@ "azure.mgmt.containerservice.models.MeshUpgradeProfileProperties": null, "azure.mgmt.containerservice.models.NamespaceProperties": null, "azure.mgmt.containerservice.models.NetworkPolicies": null, - "azure.mgmt.containerservice.models.NetworkProfileForSnapshot": null, - "azure.mgmt.containerservice.models.NodeCustomizationProfile": null, - "azure.mgmt.containerservice.models.NodeImageVersion": null, - "azure.mgmt.containerservice.models.NodeImageVersionsListResult": null, "azure.mgmt.containerservice.models.OperationListResult": null, - "azure.mgmt.containerservice.models.OperationStatusResult": null, - "azure.mgmt.containerservice.models.OperationStatusResultList": null, "azure.mgmt.containerservice.models.OperationValue": null, "azure.mgmt.containerservice.models.OutboundEnvironmentEndpoint": null, "azure.mgmt.containerservice.models.OutboundEnvironmentEndpointCollection": null, @@ -211,20 +150,13 @@ "azure.mgmt.containerservice.models.PrivateLinkResource": null, "azure.mgmt.containerservice.models.PrivateLinkResourcesListResult": null, "azure.mgmt.containerservice.models.PrivateLinkServiceConnectionState": null, - "azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody": null, "azure.mgmt.containerservice.models.RelativeMonthlySchedule": null, "azure.mgmt.containerservice.models.ResourceQuota": null, "azure.mgmt.containerservice.models.ResourceReference": null, "azure.mgmt.containerservice.models.RunCommandRequest": null, "azure.mgmt.containerservice.models.RunCommandResult": null, - "azure.mgmt.containerservice.models.SafeguardsAvailableVersion": null, - "azure.mgmt.containerservice.models.SafeguardsAvailableVersionsList": null, - "azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties": null, "azure.mgmt.containerservice.models.ScaleProfile": null, "azure.mgmt.containerservice.models.Schedule": null, - "azure.mgmt.containerservice.models.SchedulerInstanceProfile": null, - "azure.mgmt.containerservice.models.SchedulerProfile": null, - "azure.mgmt.containerservice.models.SchedulerProfileSchedulerInstanceProfiles": null, "azure.mgmt.containerservice.models.ServiceMeshProfile": null, "azure.mgmt.containerservice.models.Snapshot": null, "azure.mgmt.containerservice.models.SnapshotListResult": null, @@ -254,16 +186,13 @@ "azure.mgmt.containerservice.models.ScaleDownMode": null, "azure.mgmt.containerservice.models.AgentPoolType": null, "azure.mgmt.containerservice.models.AgentPoolMode": null, - "azure.mgmt.containerservice.models.UpgradeStrategy": null, "azure.mgmt.containerservice.models.UndrainableNodeBehavior": null, "azure.mgmt.containerservice.models.Code": null, "azure.mgmt.containerservice.models.ScaleSetPriority": null, "azure.mgmt.containerservice.models.ScaleSetEvictionPolicy": null, - "azure.mgmt.containerservice.models.SeccompDefault": null, "azure.mgmt.containerservice.models.GPUInstanceProfile": null, "azure.mgmt.containerservice.models.AgentPoolSSHAccess": null, "azure.mgmt.containerservice.models.GPUDriver": null, - "azure.mgmt.containerservice.models.DriverType": null, "azure.mgmt.containerservice.models.LocalDNSMode": null, "azure.mgmt.containerservice.models.LocalDNSState": null, "azure.mgmt.containerservice.models.LocalDNSQueryLogging": null, @@ -272,7 +201,7 @@ "azure.mgmt.containerservice.models.LocalDNSForwardPolicy": null, "azure.mgmt.containerservice.models.LocalDNSServeStale": null, "azure.mgmt.containerservice.models.ManagedClusterPodIdentityProvisioningState": null, - "azure.mgmt.containerservice.models.IPFamily": null, + "azure.mgmt.containerservice.models.IpFamily": null, "azure.mgmt.containerservice.models.IstioIngressGatewayMode": null, "azure.mgmt.containerservice.models.CreatedByType": null, "azure.mgmt.containerservice.models.ManagedClusterSKUName": null, @@ -286,49 +215,30 @@ "azure.mgmt.containerservice.models.NetworkPolicy": null, "azure.mgmt.containerservice.models.NetworkMode": null, "azure.mgmt.containerservice.models.NetworkDataplane": null, + "azure.mgmt.containerservice.models.AdvancedNetworkPolicies": null, "azure.mgmt.containerservice.models.OutboundType": null, "azure.mgmt.containerservice.models.LoadBalancerSku": null, "azure.mgmt.containerservice.models.BackendPoolType": null, - "azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode": null, - "azure.mgmt.containerservice.models.PodLinkLocalAccess": null, - "azure.mgmt.containerservice.models.Mode": null, - "azure.mgmt.containerservice.models.IpvsScheduler": null, - "azure.mgmt.containerservice.models.AdvancedNetworkPolicies": null, - "azure.mgmt.containerservice.models.TransitEncryptionType": null, - "azure.mgmt.containerservice.models.AccelerationMode": null, "azure.mgmt.containerservice.models.UpgradeChannel": null, "azure.mgmt.containerservice.models.NodeOSUpgradeChannel": null, "azure.mgmt.containerservice.models.Expander": null, "azure.mgmt.containerservice.models.KeyVaultNetworkAccessTypes": null, - "azure.mgmt.containerservice.models.InfrastructureEncryption": null, - "azure.mgmt.containerservice.models.ManagedGatewayType": null, "azure.mgmt.containerservice.models.NginxIngressControllerType": null, "azure.mgmt.containerservice.models.PublicNetworkAccess": null, - "azure.mgmt.containerservice.models.AddonAutoscaling": null, "azure.mgmt.containerservice.models.ServiceMeshMode": null, - "azure.mgmt.containerservice.models.ProxyRedirectionMechanism": null, "azure.mgmt.containerservice.models.NodeProvisioningMode": null, "azure.mgmt.containerservice.models.NodeProvisioningDefaultNodePools": null, "azure.mgmt.containerservice.models.ArtifactSource": null, - "azure.mgmt.containerservice.models.SchedulerConfigMode": null, "azure.mgmt.containerservice.models.WeekDay": null, "azure.mgmt.containerservice.models.Type": null, "azure.mgmt.containerservice.models.NamespaceProvisioningState": null, "azure.mgmt.containerservice.models.PolicyRule": null, "azure.mgmt.containerservice.models.AdoptionPolicy": null, "azure.mgmt.containerservice.models.DeletePolicy": null, - "azure.mgmt.containerservice.models.DriftAction": null, - "azure.mgmt.containerservice.models.VmState": null, "azure.mgmt.containerservice.models.PrivateEndpointConnectionProvisioningState": null, "azure.mgmt.containerservice.models.ConnectionStatus": null, "azure.mgmt.containerservice.models.SnapshotType": null, "azure.mgmt.containerservice.models.TrustedAccessRoleBindingProvisioningState": null, - "azure.mgmt.containerservice.models.GuardrailsSupport": null, - "azure.mgmt.containerservice.models.SafeguardsSupport": null, - "azure.mgmt.containerservice.models.Operator": null, - "azure.mgmt.containerservice.models.IdentityBindingProvisioningState": null, - "azure.mgmt.containerservice.models.JWTAuthenticatorProvisioningState": null, - "azure.mgmt.containerservice.models.MeshMembershipProvisioningState": null, "azure.mgmt.containerservice.models.Format": null, "azure.mgmt.containerservice.operations.Operations.list": null, "azure.mgmt.containerservice.aio.operations.Operations.list": null, @@ -360,10 +270,10 @@ "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_reset_service_principal_profile": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_reset_aad_profile": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_reset_aad_profile": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_abort_latest_operation": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_abort_latest_operation": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_rotate_cluster_certificates": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_rotate_cluster_certificates": null, + "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_abort_latest_operation": null, + "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_abort_latest_operation": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_rotate_service_account_signing_keys": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_rotate_service_account_signing_keys": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_stop": null, @@ -376,14 +286,6 @@ "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_command_result": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_outbound_network_dependencies_endpoints": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_guardrails_versions": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_guardrails_versions": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_guardrails_versions": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_guardrails_versions": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_safeguards_versions": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_safeguards_versions": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_safeguards_versions": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_safeguards_versions": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.list_mesh_revision_profiles": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_mesh_revision_profiles": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_mesh_revision_profile": null, @@ -392,10 +294,6 @@ "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.list_mesh_upgrade_profiles": null, "azure.mgmt.containerservice.operations.ManagedClustersOperations.get_mesh_upgrade_profile": null, "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.get_mesh_upgrade_profile": null, - "azure.mgmt.containerservice.operations.ManagedClustersOperations.begin_rebalance_load_balancers": null, - "azure.mgmt.containerservice.aio.operations.ManagedClustersOperations.begin_rebalance_load_balancers": null, - "azure.mgmt.containerservice.operations.ContainerServiceOperations.list_node_image_versions": null, - "azure.mgmt.containerservice.aio.operations.ContainerServiceOperations.list_node_image_versions": null, "azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations.list_by_managed_cluster": null, "azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations.list_by_managed_cluster": null, "azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations.get": null, @@ -428,20 +326,12 @@ "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_delete": null, "azure.mgmt.containerservice.operations.AgentPoolsOperations.get_upgrade_profile": null, "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.get_upgrade_profile": null, - "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_complete_upgrade": null, - "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_complete_upgrade": null, "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_delete_machines": null, "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_delete_machines": null, "azure.mgmt.containerservice.operations.AgentPoolsOperations.get_available_agent_pool_versions": null, "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.get_available_agent_pool_versions": null, "azure.mgmt.containerservice.operations.AgentPoolsOperations.begin_upgrade_node_image_version": null, "azure.mgmt.containerservice.aio.operations.AgentPoolsOperations.begin_upgrade_node_image_version": null, - "azure.mgmt.containerservice.operations.MachinesOperations.list": null, - "azure.mgmt.containerservice.aio.operations.MachinesOperations.list": null, - "azure.mgmt.containerservice.operations.MachinesOperations.get": null, - "azure.mgmt.containerservice.aio.operations.MachinesOperations.get": null, - "azure.mgmt.containerservice.operations.MachinesOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.aio.operations.MachinesOperations.begin_create_or_update": null, "azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations.list": null, "azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations.list": null, "azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations.get": null, @@ -454,12 +344,6 @@ "azure.mgmt.containerservice.aio.operations.PrivateLinkResourcesOperations.list": null, "azure.mgmt.containerservice.operations.ResolvePrivateLinkServiceIdOperations.post": null, "azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations.post": null, - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.list": null, - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.list": null, - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get": null, - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get": null, - "azure.mgmt.containerservice.operations.OperationStatusResultOperations.get_by_agent_pool": null, - "azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations.get_by_agent_pool": null, "azure.mgmt.containerservice.operations.SnapshotsOperations.list": null, "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.list": null, "azure.mgmt.containerservice.operations.SnapshotsOperations.list_by_resource_group": null, @@ -472,20 +356,6 @@ "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.update_tags": null, "azure.mgmt.containerservice.operations.SnapshotsOperations.delete": null, "azure.mgmt.containerservice.aio.operations.SnapshotsOperations.delete": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.list_by_resource_group": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.get": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.get": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.create_or_update": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.create_or_update": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.update_tags": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.update_tags": null, - "azure.mgmt.containerservice.operations.ManagedClusterSnapshotsOperations.delete": null, - "azure.mgmt.containerservice.aio.operations.ManagedClusterSnapshotsOperations.delete": null, - "azure.mgmt.containerservice.operations.TrustedAccessRolesOperations.list": null, - "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": null, "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.list": null, "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.list": null, "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.get": null, @@ -494,37 +364,11 @@ "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.begin_create_or_update": null, "azure.mgmt.containerservice.operations.TrustedAccessRoleBindingsOperations.begin_delete": null, "azure.mgmt.containerservice.aio.operations.TrustedAccessRoleBindingsOperations.begin_delete": null, - "azure.mgmt.containerservice.operations.LoadBalancersOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.operations.LoadBalancersOperations.get": null, - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.get": null, - "azure.mgmt.containerservice.operations.LoadBalancersOperations.create_or_update": null, - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.create_or_update": null, - "azure.mgmt.containerservice.operations.LoadBalancersOperations.begin_delete": null, - "azure.mgmt.containerservice.aio.operations.LoadBalancersOperations.begin_delete": null, - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.get": null, - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.get": null, - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.operations.IdentityBindingsOperations.begin_delete": null, - "azure.mgmt.containerservice.aio.operations.IdentityBindingsOperations.begin_delete": null, - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.get": null, - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.get": null, - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.operations.JWTAuthenticatorsOperations.begin_delete": null, - "azure.mgmt.containerservice.aio.operations.JWTAuthenticatorsOperations.begin_delete": null, - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.list_by_managed_cluster": null, - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.get": null, - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.get": null, - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_create_or_update": null, - "azure.mgmt.containerservice.operations.MeshMembershipsOperations.begin_delete": null, - "azure.mgmt.containerservice.aio.operations.MeshMembershipsOperations.begin_delete": null + "azure.mgmt.containerservice.operations.TrustedAccessRolesOperations.list": null, + "azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations.list": null, + "azure.mgmt.containerservice.operations.MachinesOperations.list": null, + "azure.mgmt.containerservice.aio.operations.MachinesOperations.list": null, + "azure.mgmt.containerservice.operations.MachinesOperations.get": null, + "azure.mgmt.containerservice.aio.operations.MachinesOperations.get": null } } \ No newline at end of file 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 d89db14361f1..2a018b2cb818 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_configuration.py @@ -31,8 +31,8 @@ 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: Api Version. Default value is "2025-09-02-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-10-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +43,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-09-02-preview") + api_version: str = kwargs.pop("api_version", "2025-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py index 29bc3b7c9a2e..b5b52bb48152 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py @@ -22,17 +22,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, @@ -54,8 +47,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :vartype operations: azure.mgmt.containerservice.operations.Operations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.operations.ManagedClustersOperations - :ivar container_service: ContainerServiceOperations operations - :vartype container_service: azure.mgmt.containerservice.operations.ContainerServiceOperations :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.operations.MaintenanceConfigurationsOperations @@ -63,8 +54,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :vartype managed_namespaces: azure.mgmt.containerservice.operations.ManagedNamespacesOperations :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.operations.AgentPoolsOperations - :ivar machines: MachinesOperations operations - :vartype machines: azure.mgmt.containerservice.operations.MachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.operations.PrivateEndpointConnectionsOperations @@ -74,28 +63,16 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.operations.ResolvePrivateLinkServiceIdOperations - :ivar operation_status_result: OperationStatusResultOperations operations - :vartype operation_status_result: - azure.mgmt.containerservice.operations.OperationStatusResultOperations :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_roles: TrustedAccessRolesOperations operations - :vartype trusted_access_roles: - azure.mgmt.containerservice.operations.TrustedAccessRolesOperations :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 trusted_access_roles: TrustedAccessRolesOperations operations + :vartype trusted_access_roles: + azure.mgmt.containerservice.operations.TrustedAccessRolesOperations + :ivar machines: MachinesOperations operations + :vartype machines: azure.mgmt.containerservice.operations.MachinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -105,8 +82,8 @@ 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: Api Version. Default value is "2025-09-02-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-10-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. @@ -162,9 +139,6 @@ def __init__( self.managed_clusters = ManagedClustersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.maintenance_configurations = MaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -172,7 +146,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) - self.machines = MachinesOperations(self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -182,29 +155,14 @@ def __init__( self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.trusted_access_roles = TrustedAccessRolesOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) - 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.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.machines = MachinesOperations(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/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py index 02ac7e20f5cd..0c7b9c7ab52d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "41.0.0b2" +VERSION = "40.2.0" 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 55c35a582fc5..f67b2db6f29f 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 @@ -31,8 +31,8 @@ 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: Api Version. Default value is "2025-09-02-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-10-01". Note that overriding this + default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +43,7 @@ def __init__( cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2025-09-02-preview") + api_version: str = kwargs.pop("api_version", "2025-10-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/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py index 148bab8a093a..40bf44c3044b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py @@ -22,17 +22,10 @@ from ._configuration import ContainerServiceClientConfiguration from .operations import ( AgentPoolsOperations, - ContainerServiceOperations, - IdentityBindingsOperations, - JWTAuthenticatorsOperations, - LoadBalancersOperations, MachinesOperations, MaintenanceConfigurationsOperations, - ManagedClusterSnapshotsOperations, ManagedClustersOperations, ManagedNamespacesOperations, - MeshMembershipsOperations, - OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -54,9 +47,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :vartype operations: azure.mgmt.containerservice.aio.operations.Operations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: azure.mgmt.containerservice.aio.operations.ManagedClustersOperations - :ivar container_service: ContainerServiceOperations operations - :vartype container_service: - azure.mgmt.containerservice.aio.operations.ContainerServiceOperations :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: azure.mgmt.containerservice.aio.operations.MaintenanceConfigurationsOperations @@ -65,8 +55,6 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes azure.mgmt.containerservice.aio.operations.ManagedNamespacesOperations :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: azure.mgmt.containerservice.aio.operations.AgentPoolsOperations - :ivar machines: MachinesOperations operations - :vartype machines: azure.mgmt.containerservice.aio.operations.MachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.containerservice.aio.operations.PrivateEndpointConnectionsOperations @@ -76,30 +64,16 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: azure.mgmt.containerservice.aio.operations.ResolvePrivateLinkServiceIdOperations - :ivar operation_status_result: OperationStatusResultOperations operations - :vartype operation_status_result: - azure.mgmt.containerservice.aio.operations.OperationStatusResultOperations :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_roles: TrustedAccessRolesOperations operations - :vartype trusted_access_roles: - azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations :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 trusted_access_roles: TrustedAccessRolesOperations operations + :vartype trusted_access_roles: + azure.mgmt.containerservice.aio.operations.TrustedAccessRolesOperations + :ivar machines: MachinesOperations operations + :vartype machines: azure.mgmt.containerservice.aio.operations.MachinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. @@ -109,8 +83,8 @@ 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: Api Version. Default value is "2025-09-02-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-10-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. @@ -168,9 +142,6 @@ def __init__( self.managed_clusters = ManagedClustersOperations( self._client, self._config, self._serialize, self._deserialize ) - self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.maintenance_configurations = MaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -178,7 +149,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.agent_pools = AgentPoolsOperations(self._client, self._config, self._serialize, self._deserialize) - self.machines = MachinesOperations(self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize ) @@ -188,29 +158,14 @@ def __init__( self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( self._client, self._config, self._serialize, self._deserialize ) - self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize) - self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize - ) - self.trusted_access_roles = TrustedAccessRolesOperations( - self._client, self._config, self._serialize, self._deserialize - ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( self._client, self._config, self._serialize, self._deserialize ) - 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.trusted_access_roles = TrustedAccessRolesOperations( self._client, self._config, self._serialize, self._deserialize ) + self.machines = MachinesOperations(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/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/__init__.py index 7f09a97cf023..70b2a677e7b0 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 @@ -14,23 +14,16 @@ from ._operations import Operations # type: ignore from ._managed_clusters_operations import ManagedClustersOperations # type: ignore -from ._container_service_operations import ContainerServiceOperations # type: ignore from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations # type: ignore from ._managed_namespaces_operations import ManagedNamespacesOperations # type: ignore from ._agent_pools_operations import AgentPoolsOperations # type: ignore -from ._machines_operations import MachinesOperations # type: ignore from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations # type: ignore -from ._operation_status_result_operations import OperationStatusResultOperations # type: ignore from ._snapshots_operations import SnapshotsOperations # type: ignore -from ._managed_cluster_snapshots_operations import ManagedClusterSnapshotsOperations # type: ignore -from ._trusted_access_roles_operations import TrustedAccessRolesOperations # type: ignore from ._trusted_access_role_bindings_operations import TrustedAccessRoleBindingsOperations # type: ignore -from ._load_balancers_operations import LoadBalancersOperations # type: ignore -from ._identity_bindings_operations import IdentityBindingsOperations # type: ignore -from ._jwt_authenticators_operations import JWTAuthenticatorsOperations # type: ignore -from ._mesh_memberships_operations import MeshMembershipsOperations # type: ignore +from ._trusted_access_roles_operations import TrustedAccessRolesOperations # type: ignore +from ._machines_operations import MachinesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -39,23 +32,16 @@ __all__ = [ "Operations", "ManagedClustersOperations", - "ContainerServiceOperations", "MaintenanceConfigurationsOperations", "ManagedNamespacesOperations", "AgentPoolsOperations", - "MachinesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", - "OperationStatusResultOperations", "SnapshotsOperations", - "ManagedClusterSnapshotsOperations", - "TrustedAccessRolesOperations", "TrustedAccessRoleBindingsOperations", - "LoadBalancersOperations", - "IdentityBindingsOperations", - "JWTAuthenticatorsOperations", - "MeshMembershipsOperations", + "TrustedAccessRolesOperations", + "MachinesOperations", ] __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/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_agent_pools_operations.py index 0bd284cbdb05..32e36defb7e7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_agent_pools_operations.py @@ -36,7 +36,6 @@ from ..._utils.serialization import Deserializer, Serializer from ...operations._agent_pools_operations import ( build_abort_latest_operation_request, - build_complete_upgrade_request, build_create_or_update_request, build_delete_machines_request, build_delete_request, @@ -142,7 +141,7 @@ async def begin_abort_latest_operation( Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - completes before cancellation can take place, an error is returned. + 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. @@ -802,129 +801,6 @@ async def get_upgrade_profile( return deserialized # type: ignore - 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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]: - 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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_container_service_operations.py deleted file mode 100644 index 64cd46b96d71..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_container_service_operations.py +++ /dev/null @@ -1,141 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._container_service_operations import build_list_node_image_versions_request -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -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. - """ - - models = _models - - 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 either NodeImageVersion or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NodeImageVersionsListResult] = 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_list_node_image_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("NodeImageVersionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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/aio/operations/_identity_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_identity_bindings_operations.py deleted file mode 100644 index 31f0265ad7c7..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_identity_bindings_operations.py +++ /dev/null @@ -1,580 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._identity_bindings_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_managed_cluster_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class IdentityBindingsOperations: - """ - .. 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. - """ - - models = _models - - 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_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. - - Gets a list of identity bindings 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 either IdentityBinding or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityBindingListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("IdentityBindingListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. - - Gets the specified Identity 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IdentityBinding", pipeline_response.http_response) - - 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, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityBinding") - - _request = build_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, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - identity_binding_name: str, - parameters: _models.IdentityBinding, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. - - Creates or updates an identity binding 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 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 - :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 either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - identity_binding_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. - - Creates or updates an identity binding 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 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: 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 either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. - - Creates or updates an identity binding 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 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 either a IdentityBinding type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or IO[bytes] - :return: An instance of AsyncLROPoller that returns either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - 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, - api_version=api_version, - 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_headers = {} - response = pipeline_response.http_response - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("IdentityBinding", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_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 - ) - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_binding_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, identity_binding_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an identity binding in the specified managed cluster. - - Deletes an identity binding 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - identity_binding_name=identity_binding_name, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_jwt_authenticators_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_jwt_authenticators_operations.py deleted file mode 100644 index a8b24d0069b3..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_jwt_authenticators_operations.py +++ /dev/null @@ -1,587 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._jwt_authenticators_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_managed_cluster_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class JWTAuthenticatorsOperations: - """ - .. 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. - """ - - models = _models - - 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_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. - - Gets a list of JWT authenticators 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 either JWTAuthenticator or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JWTAuthenticatorListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("JWTAuthenticatorListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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( - 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. - - Gets the specified JWT authenticator 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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: JWTAuthenticator or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JWTAuthenticator", pipeline_response.http_response) - - 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, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "JWTAuthenticator") - - _request = build_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, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - jwt_authenticator_name: str, - parameters: _models.JWTAuthenticator, - *, - 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 - :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 either JWTAuthenticator or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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: 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 either JWTAuthenticator or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 either a JWTAuthenticator type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or IO[bytes] - :return: An instance of AsyncLROPoller that returns either JWTAuthenticator or the result of - cls(response) - :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - 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, - api_version=api_version, - 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_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("JWTAuthenticator", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_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 - ) - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, jwt_authenticator_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, jwt_authenticator_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a JWT authenticator and updates the managed cluster to apply the settings. - - Deletes a JWT authenticator and updates the managed cluster to apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast( - AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_load_balancers_operations.py deleted file mode 100644 index 220e0717c8e5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_load_balancers_operations.py +++ /dev/null @@ -1,499 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._load_balancers_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_managed_cluster_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -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. - """ - - models = _models - - 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_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. - - Gets a list of load balancers 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 either LoadBalancer or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoadBalancerListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> _models.LoadBalancer: - """Gets the specified load balancer. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) - - 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. - - 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 or the result of cls(response) - :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: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. - - 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: 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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. - - 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. Is either a LoadBalancer type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or IO[bytes] - :return: LoadBalancer or the result of cls(response) - :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 = 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", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoadBalancer") - - _request = build_create_or_update_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=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) - - 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, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, load_balancer_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes a load balancer in the specified managed cluster. - - 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_machines_operations.py index 2ee23142b674..ed5c1c39eb3c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_machines_operations.py @@ -6,8 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Optional, TypeVar import urllib.parse from azure.core import AsyncPipelineClient @@ -18,22 +17,18 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, map_error, ) from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models from ..._utils.serialization import Deserializer, Serializer -from ...operations._machines_operations import build_create_or_update_request, build_get_request, build_list_request +from ...operations._machines_operations import build_get_request, build_list_request from .._configuration import ContainerServiceClientConfiguration T = TypeVar("T") @@ -167,7 +162,7 @@ async def get( :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. + :param machine_name: host name of the machine. Required. :type machine_name: str :return: Machine or the result of cls(response) :rtype: ~azure.mgmt.containerservice.models.Machine @@ -220,270 +215,3 @@ async def get( 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, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Machine") - - _request = build_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, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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 - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :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 either Machine or the result of - cls(response) - :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], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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] - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :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 either Machine or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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 either a Machine type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine or IO[bytes] - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :return: An instance of AsyncLROPoller that returns either Machine or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - 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, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - 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_headers = {} - response = pipeline_response.http_response - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("Machine", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_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 - ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_maintenance_configurations_operations.py index 36a64dc73d07..e11d52fc87fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_maintenance_configurations_operations.py @@ -165,7 +165,8 @@ async def get( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. :type config_name: str :return: MaintenanceConfiguration or the result of cls(response) :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration @@ -238,7 +239,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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: ~azure.mgmt.containerservice.models.MaintenanceConfiguration @@ -270,7 +272,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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] @@ -300,7 +303,8 @@ async def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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. Is either a MaintenanceConfiguration type or a IO[bytes] type. Required. @@ -379,7 +383,8 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. :type config_name: str :return: None or the result of cls(response) :rtype: None diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_cluster_snapshots_operations.py deleted file mode 100644 index 8ccf0d7a4c62..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_cluster_snapshots_operations.py +++ /dev/null @@ -1,634 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._managed_cluster_snapshots_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_resource_group_request, - build_list_request, - build_update_tags_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -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. - """ - - models = _models - - 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, **kwargs: Any) -> AsyncItemPaged["_models.ManagedClusterSnapshot"]: - """Gets a list of managed cluster snapshots in the specified subscription. - - Gets a list of managed cluster snapshots in the specified subscription. - - :return: An iterator like instance of either ManagedClusterSnapshot or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshotListResult] = 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_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - @distributed_trace - 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. - - 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 either ManagedClusterSnapshot or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshotListResult] = 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_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: - """Gets a managed cluster snapshot. - - Gets a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - 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. - - 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 or the result of cls(response) - :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: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. - - Creates or updates a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Required. - :type parameters: IO[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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterSnapshot, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. - - Creates or updates a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a - ManagedClusterSnapshot type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or IO[bytes] - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = 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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedClusterSnapshot") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - 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.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: ~azure.mgmt.containerservice.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: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :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.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: IO[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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or IO[bytes] - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = 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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagsObject") - - _request = build_update_tags_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - 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 managed cluster snapshot. - - Deletes a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: None or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_clusters_operations.py index a8f9eb56795c..69e06849da81 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_managed_clusters_operations.py @@ -40,24 +40,19 @@ build_delete_request, build_get_access_profile_request, build_get_command_result_request, - build_get_guardrails_versions_request, build_get_mesh_revision_profile_request, build_get_mesh_upgrade_profile_request, build_get_request, - build_get_safeguards_versions_request, build_get_upgrade_profile_request, build_list_by_resource_group_request, build_list_cluster_admin_credentials_request, build_list_cluster_monitoring_user_credentials_request, build_list_cluster_user_credentials_request, - build_list_guardrails_versions_request, build_list_kubernetes_versions_request, build_list_mesh_revision_profiles_request, build_list_mesh_upgrade_profiles_request, build_list_outbound_network_dependencies_endpoints_request, build_list_request, - build_list_safeguards_versions_request, - build_rebalance_load_balancers_request, build_reset_aad_profile_request, build_reset_service_principal_profile_request, build_rotate_cluster_certificates_request, @@ -1171,12 +1166,7 @@ def get_long_running_output(pipeline_response): ) async def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - if_match: Optional[str] = None, - ignore_pod_disruption_budget: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, resource_name: str, if_match: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -1197,7 +1187,6 @@ async def _delete_initial( resource_name=resource_name, subscription_id=self._config.subscription_id, if_match=if_match, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, api_version=api_version, headers=_headers, params=_params, @@ -1237,12 +1226,7 @@ async def _delete_initial( @distributed_trace_async async def begin_delete( - self, - resource_group_name: str, - resource_name: str, - if_match: Optional[str] = None, - ignore_pod_disruption_budget: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, resource_name: str, if_match: Optional[str] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a managed cluster. @@ -1256,9 +1240,6 @@ async def begin_delete( :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str - :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on - a node without considering Pod Disruption Budget. Default value is None. - :type ignore_pod_disruption_budget: bool :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -1276,7 +1257,6 @@ async def begin_delete( resource_group_name=resource_group_name, resource_name=resource_name, if_match=if_match, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -1714,7 +1694,7 @@ 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 - async def _abort_latest_operation_initial( + async def _rotate_cluster_certificates_initial( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -1731,7 +1711,7 @@ async def _abort_latest_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_abort_latest_operation_request( + _request = build_rotate_cluster_certificates_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -1763,10 +1743,7 @@ async def _abort_latest_operation_initial( response_headers = {} if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1776,14 +1753,13 @@ async def _abort_latest_operation_initial( return deserialized # type: ignore @distributed_trace_async - async def begin_abort_latest_operation( + async def begin_rotate_cluster_certificates( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Aborts last operation running on managed cluster. + """Rotates the certificates of a managed cluster. - Aborts the currently running operation on the managed cluster. The Managed Cluster will be - moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If - the operation completes before cancellation can take place, an error is returned. + 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. @@ -1803,7 +1779,7 @@ async def begin_abort_latest_operation( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._abort_latest_operation_initial( + raw_result = await self._rotate_cluster_certificates_initial( resource_group_name=resource_group_name, resource_name=resource_name, api_version=api_version, @@ -1836,7 +1812,7 @@ 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 - async def _rotate_cluster_certificates_initial( + async def _abort_latest_operation_initial( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: error_map: MutableMapping = { @@ -1853,7 +1829,7 @@ async def _rotate_cluster_certificates_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - _request = build_rotate_cluster_certificates_request( + _request = build_abort_latest_operation_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -1885,7 +1861,10 @@ async def _rotate_cluster_certificates_initial( response_headers = {} if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -1895,13 +1874,14 @@ async def _rotate_cluster_certificates_initial( return deserialized # type: ignore @distributed_trace_async - async def begin_rotate_cluster_certificates( + async def begin_abort_latest_operation( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Rotates the certificates of a managed cluster. + """Aborts last operation running on managed cluster. - See `Certificate rotation `_ for - more details about rotating managed cluster certificates. + 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. @@ -1921,7 +1901,7 @@ async def begin_rotate_cluster_certificates( lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) cont_token: Optional[str] = kwargs.pop("continuation_token", None) if cont_token is None: - raw_result = await self._rotate_cluster_certificates_initial( + raw_result = await self._abort_latest_operation_initial( resource_group_name=resource_group_name, resource_name=resource_name, api_version=api_version, @@ -2684,306 +2664,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) - @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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_get_guardrails_versions_request( - location=location, - version=version, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GuardrailsAvailableVersion", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - def list_guardrails_versions( - self, location: str, **kwargs: Any - ) -> AsyncItemPaged["_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 either GuardrailsAvailableVersion or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GuardrailsAvailableVersionsList] = 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_list_guardrails_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("GuardrailsAvailableVersionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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_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. - - :param location: The name of the Azure region. Required. - :type location: str - :param version: Safeguards version. Required. - :type version: str - :return: SafeguardsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_get_safeguards_versions_request( - location=location, - version=version, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SafeguardsAvailableVersion", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - 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. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of either SafeguardsAvailableVersion or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SafeguardsAvailableVersionsList] = 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_list_safeguards_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("SafeguardsAvailableVersionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - @distributed_trace def list_mesh_revision_profiles( self, location: str, **kwargs: Any @@ -3287,208 +2967,3 @@ async def get_mesh_upgrade_profile( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - - async def _rebalance_load_balancers_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "RebalanceLoadBalancersRequestBody") - - _request = build_rebalance_load_balancers_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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]: - 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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # 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. - - 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 AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_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. - - 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Rebalance nodes across specific load balancers. - - 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 either a RebalanceLoadBalancersRequestBody type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or - IO[bytes] - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_mesh_memberships_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_mesh_memberships_operations.py deleted file mode 100644 index a68288901ca9..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_mesh_memberships_operations.py +++ /dev/null @@ -1,555 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._mesh_memberships_operations import ( - build_create_or_update_request, - build_delete_request, - build_get_request, - build_list_by_managed_cluster_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -class MeshMembershipsOperations: - """ - .. 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. - """ - - models = _models - - 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_by_managed_cluster( - self, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.MeshMembership"]: - """Lists mesh memberships in a managed cluster. - - Lists mesh memberships in 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 either MeshMembership or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MeshMembershipsListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("MeshMembershipsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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( - self, resource_group_name: str, resource_name: str, mesh_membership_name: str, **kwargs: Any - ) -> _models.MeshMembership: - """Gets the mesh membership of a managed cluster. - - Gets the mesh membership 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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: MeshMembership or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.MeshMembership - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MeshMembership", pipeline_response.http_response) - - 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, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "MeshMembership") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: _models.MeshMembership, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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 - :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 either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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] - :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 either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace_async - async def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, IO[bytes]], - **kwargs: Any - ) -> AsyncLROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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 either a MeshMembership type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or IO[bytes] - :return: An instance of AsyncLROPoller that returns either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MeshMembership] = 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, - mesh_membership_name=mesh_membership_name, - parameters=parameters, - api_version=api_version, - 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): - deserialized = self._deserialize("MeshMembership", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[_models.MeshMembership].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return AsyncLROPoller[_models.MeshMembership]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - async def _delete_initial( - self, resource_group_name: str, resource_name: str, mesh_membership_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, mesh_membership_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the mesh membership of a managed cluster. - - Deletes the mesh membership 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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - mesh_membership_name=mesh_membership_name, - api_version=api_version, - 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 - - if polling is True: - polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) - else: - polling_method = polling - if cont_token: - return AsyncLROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operation_status_result_operations.py deleted file mode 100644 index 8a0e67f542dd..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/operations/_operation_status_result_operations.py +++ /dev/null @@ -1,286 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import AsyncPipelineClient -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.pipeline import PipelineResponse -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._utils.serialization import Deserializer, Serializer -from ...operations._operation_status_result_operations import ( - build_get_by_agent_pool_request, - build_get_request, - build_list_request, -) -from .._configuration import ContainerServiceClientConfiguration - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] -List = list - - -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. - """ - - models = _models - - 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, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> AsyncItemPaged["_models.OperationStatusResult"]: - """Gets a list of operations in the specified managedCluster. - - 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 either OperationStatusResult or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResultList] = 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_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OperationStatusResultList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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( - 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. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace_async - 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. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore 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 17d2140ab057..1a65b56f0130 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 @@ -17,35 +17,25 @@ AbsoluteMonthlySchedule, AdvancedNetworking, AdvancedNetworkingObservability, - AdvancedNetworkingPerformance, AdvancedNetworkingSecurity, - AdvancedNetworkingSecurityTransitEncryption, AgentPool, - AgentPoolArtifactStreamingProfile, AgentPoolAvailableVersions, AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, - AgentPoolBlueGreenUpgradeSettings, AgentPoolDeleteMachinesParameter, AgentPoolGatewayProfile, AgentPoolListResult, AgentPoolNetworkProfile, - AgentPoolRecentlyUsedVersion, AgentPoolSecurityProfile, AgentPoolStatus, AgentPoolUpgradeProfile, AgentPoolUpgradeProfilePropertiesUpgradesItem, AgentPoolUpgradeSettings, AgentPoolWindowsProfile, - AutoScaleProfile, AzureKeyVaultKms, ClusterUpgradeSettings, CompatibleVersions, - Component, - ComponentsByRelease, ContainerServiceLinuxProfile, ContainerServiceNetworkProfile, - ContainerServiceNetworkProfileKubeProxyConfig, - ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig, ContainerServiceSshConfiguration, ContainerServiceSshPublicKey, CreationData, @@ -61,52 +51,26 @@ ErrorResponse, ExtendedLocation, GPUProfile, - GuardrailsAvailableVersion, - GuardrailsAvailableVersionsList, - GuardrailsAvailableVersionsProperties, IPTag, - IdentityBinding, - IdentityBindingListResult, - IdentityBindingManagedIdentityProfile, - IdentityBindingOidcIssuerProfile, - IdentityBindingProperties, IstioCertificateAuthority, IstioComponents, IstioEgressGateway, IstioIngressGateway, IstioPluginCertificateAuthority, IstioServiceMesh, - JWTAuthenticator, - JWTAuthenticatorClaimMappingExpression, - JWTAuthenticatorClaimMappings, - JWTAuthenticatorExtraClaimMappingExpression, - JWTAuthenticatorIssuer, - JWTAuthenticatorListResult, - JWTAuthenticatorProperties, - JWTAuthenticatorValidationRule, KubeletConfig, KubernetesPatchVersion, - KubernetesResourceObjectEncryptionProfile, KubernetesVersion, KubernetesVersionCapabilities, KubernetesVersionListResult, - LabelSelector, - LabelSelectorRequirement, LinuxOSConfig, - LoadBalancer, - LoadBalancerListResult, LocalDNSOverride, LocalDNSProfile, Machine, - MachineHardwareProfile, MachineIpAddress, - MachineKubernetesProfile, MachineListResult, MachineNetworkProperties, - MachineOSProfile, - MachineOSProfileLinuxProfile, MachineProperties, - MachineStatus, MaintenanceConfiguration, MaintenanceConfigurationListResult, MaintenanceWindow, @@ -121,22 +85,13 @@ ManagedClusterAgentPoolProfileProperties, ManagedClusterAutoUpgradeProfile, ManagedClusterAzureMonitorProfile, - ManagedClusterAzureMonitorProfileAppMonitoring, - ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation, - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs, - ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics, - ManagedClusterAzureMonitorProfileContainerInsights, ManagedClusterAzureMonitorProfileKubeStateMetrics, ManagedClusterAzureMonitorProfileMetrics, ManagedClusterBootstrapProfile, ManagedClusterCostAnalysis, ManagedClusterHTTPProxyConfig, - ManagedClusterHostedSystemProfile, ManagedClusterIdentity, - ManagedClusterIngressDefaultDomainProfile, ManagedClusterIngressProfile, - ManagedClusterIngressProfileApplicationLoadBalancer, - ManagedClusterIngressProfileGatewayConfiguration, ManagedClusterIngressProfileNginx, ManagedClusterIngressProfileWebAppRouting, ManagedClusterListResult, @@ -159,20 +114,13 @@ ManagedClusterPoolUpgradeProfile, ManagedClusterPoolUpgradeProfileUpgradesItem, ManagedClusterPropertiesAutoScalerProfile, - ManagedClusterPropertiesForSnapshot, ManagedClusterSKU, ManagedClusterSecurityProfile, ManagedClusterSecurityProfileDefender, - ManagedClusterSecurityProfileDefenderSecurityGating, - ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem, ManagedClusterSecurityProfileDefenderSecurityMonitoring, ManagedClusterSecurityProfileImageCleaner, - ManagedClusterSecurityProfileImageIntegrity, - ManagedClusterSecurityProfileNodeRestriction, ManagedClusterSecurityProfileWorkloadIdentity, ManagedClusterServicePrincipalProfile, - ManagedClusterSnapshot, - ManagedClusterSnapshotListResult, ManagedClusterStaticEgressGatewayProfile, ManagedClusterStatus, ManagedClusterStorageProfile, @@ -189,9 +137,6 @@ ManagedNamespaceListResult, ManagedServiceIdentityUserAssignedIdentitiesValue, ManualScaleProfile, - MeshMembership, - MeshMembershipProperties, - MeshMembershipsListResult, MeshRevision, MeshRevisionProfile, MeshRevisionProfileList, @@ -201,13 +146,7 @@ MeshUpgradeProfileProperties, NamespaceProperties, NetworkPolicies, - NetworkProfileForSnapshot, - NodeCustomizationProfile, - NodeImageVersion, - NodeImageVersionsListResult, OperationListResult, - OperationStatusResult, - OperationStatusResultList, OperationValue, OutboundEnvironmentEndpoint, OutboundEnvironmentEndpointCollection, @@ -220,21 +159,14 @@ PrivateLinkResourcesListResult, PrivateLinkServiceConnectionState, ProxyResource, - RebalanceLoadBalancersRequestBody, RelativeMonthlySchedule, Resource, ResourceQuota, ResourceReference, RunCommandRequest, RunCommandResult, - SafeguardsAvailableVersion, - SafeguardsAvailableVersionsList, - SafeguardsAvailableVersionsProperties, ScaleProfile, Schedule, - SchedulerInstanceProfile, - SchedulerProfile, - SchedulerProfileSchedulerInstanceProfiles, ServiceMeshProfile, Snapshot, SnapshotListResult, @@ -259,8 +191,6 @@ ) from ._container_service_client_enums import ( # type: ignore - AccelerationMode, - AddonAutoscaling, AdoptionPolicy, AdvancedNetworkPolicies, AgentPoolMode, @@ -268,25 +198,17 @@ AgentPoolType, ArtifactSource, BackendPoolType, - ClusterServiceLoadBalancerHealthProbeMode, Code, ConnectionStatus, CreatedByType, DeletePolicy, - DriftAction, - DriverType, Expander, ExtendedLocationTypes, Format, GPUDriver, GPUInstanceProfile, - GuardrailsSupport, - IPFamily, - IdentityBindingProvisioningState, - InfrastructureEncryption, - IpvsScheduler, + IpFamily, IstioIngressGatewayMode, - JWTAuthenticatorProvisioningState, KeyVaultNetworkAccessTypes, KubeletDiskType, KubernetesSupportPlan, @@ -302,9 +224,6 @@ ManagedClusterPodIdentityProvisioningState, ManagedClusterSKUName, ManagedClusterSKUTier, - ManagedGatewayType, - MeshMembershipProvisioningState, - Mode, NamespaceProvisioningState, NetworkDataplane, NetworkMode, @@ -318,32 +237,23 @@ OSDiskType, OSSKU, OSType, - Operator, OutboundType, PodIPAllocationMode, - PodLinkLocalAccess, PolicyRule, PrivateEndpointConnectionProvisioningState, Protocol, - ProxyRedirectionMechanism, PublicNetworkAccess, ResourceIdentityType, RestrictionLevel, - SafeguardsSupport, ScaleDownMode, ScaleSetEvictionPolicy, ScaleSetPriority, - SchedulerConfigMode, - SeccompDefault, ServiceMeshMode, SnapshotType, - TransitEncryptionType, TrustedAccessRoleBindingProvisioningState, Type, UndrainableNodeBehavior, UpgradeChannel, - UpgradeStrategy, - VmState, WeekDay, WorkloadRuntime, ) @@ -355,35 +265,25 @@ "AbsoluteMonthlySchedule", "AdvancedNetworking", "AdvancedNetworkingObservability", - "AdvancedNetworkingPerformance", "AdvancedNetworkingSecurity", - "AdvancedNetworkingSecurityTransitEncryption", "AgentPool", - "AgentPoolArtifactStreamingProfile", "AgentPoolAvailableVersions", "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", - "AgentPoolBlueGreenUpgradeSettings", "AgentPoolDeleteMachinesParameter", "AgentPoolGatewayProfile", "AgentPoolListResult", "AgentPoolNetworkProfile", - "AgentPoolRecentlyUsedVersion", "AgentPoolSecurityProfile", "AgentPoolStatus", "AgentPoolUpgradeProfile", "AgentPoolUpgradeProfilePropertiesUpgradesItem", "AgentPoolUpgradeSettings", "AgentPoolWindowsProfile", - "AutoScaleProfile", "AzureKeyVaultKms", "ClusterUpgradeSettings", "CompatibleVersions", - "Component", - "ComponentsByRelease", "ContainerServiceLinuxProfile", "ContainerServiceNetworkProfile", - "ContainerServiceNetworkProfileKubeProxyConfig", - "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig", "ContainerServiceSshConfiguration", "ContainerServiceSshPublicKey", "CreationData", @@ -399,52 +299,26 @@ "ErrorResponse", "ExtendedLocation", "GPUProfile", - "GuardrailsAvailableVersion", - "GuardrailsAvailableVersionsList", - "GuardrailsAvailableVersionsProperties", "IPTag", - "IdentityBinding", - "IdentityBindingListResult", - "IdentityBindingManagedIdentityProfile", - "IdentityBindingOidcIssuerProfile", - "IdentityBindingProperties", "IstioCertificateAuthority", "IstioComponents", "IstioEgressGateway", "IstioIngressGateway", "IstioPluginCertificateAuthority", "IstioServiceMesh", - "JWTAuthenticator", - "JWTAuthenticatorClaimMappingExpression", - "JWTAuthenticatorClaimMappings", - "JWTAuthenticatorExtraClaimMappingExpression", - "JWTAuthenticatorIssuer", - "JWTAuthenticatorListResult", - "JWTAuthenticatorProperties", - "JWTAuthenticatorValidationRule", "KubeletConfig", "KubernetesPatchVersion", - "KubernetesResourceObjectEncryptionProfile", "KubernetesVersion", "KubernetesVersionCapabilities", "KubernetesVersionListResult", - "LabelSelector", - "LabelSelectorRequirement", "LinuxOSConfig", - "LoadBalancer", - "LoadBalancerListResult", "LocalDNSOverride", "LocalDNSProfile", "Machine", - "MachineHardwareProfile", "MachineIpAddress", - "MachineKubernetesProfile", "MachineListResult", "MachineNetworkProperties", - "MachineOSProfile", - "MachineOSProfileLinuxProfile", "MachineProperties", - "MachineStatus", "MaintenanceConfiguration", "MaintenanceConfigurationListResult", "MaintenanceWindow", @@ -459,22 +333,13 @@ "ManagedClusterAgentPoolProfileProperties", "ManagedClusterAutoUpgradeProfile", "ManagedClusterAzureMonitorProfile", - "ManagedClusterAzureMonitorProfileAppMonitoring", - "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", - "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", - "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", - "ManagedClusterAzureMonitorProfileContainerInsights", "ManagedClusterAzureMonitorProfileKubeStateMetrics", "ManagedClusterAzureMonitorProfileMetrics", "ManagedClusterBootstrapProfile", "ManagedClusterCostAnalysis", "ManagedClusterHTTPProxyConfig", - "ManagedClusterHostedSystemProfile", "ManagedClusterIdentity", - "ManagedClusterIngressDefaultDomainProfile", "ManagedClusterIngressProfile", - "ManagedClusterIngressProfileApplicationLoadBalancer", - "ManagedClusterIngressProfileGatewayConfiguration", "ManagedClusterIngressProfileNginx", "ManagedClusterIngressProfileWebAppRouting", "ManagedClusterListResult", @@ -497,20 +362,13 @@ "ManagedClusterPoolUpgradeProfile", "ManagedClusterPoolUpgradeProfileUpgradesItem", "ManagedClusterPropertiesAutoScalerProfile", - "ManagedClusterPropertiesForSnapshot", "ManagedClusterSKU", "ManagedClusterSecurityProfile", "ManagedClusterSecurityProfileDefender", - "ManagedClusterSecurityProfileDefenderSecurityGating", - "ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem", "ManagedClusterSecurityProfileDefenderSecurityMonitoring", "ManagedClusterSecurityProfileImageCleaner", - "ManagedClusterSecurityProfileImageIntegrity", - "ManagedClusterSecurityProfileNodeRestriction", "ManagedClusterSecurityProfileWorkloadIdentity", "ManagedClusterServicePrincipalProfile", - "ManagedClusterSnapshot", - "ManagedClusterSnapshotListResult", "ManagedClusterStaticEgressGatewayProfile", "ManagedClusterStatus", "ManagedClusterStorageProfile", @@ -527,9 +385,6 @@ "ManagedNamespaceListResult", "ManagedServiceIdentityUserAssignedIdentitiesValue", "ManualScaleProfile", - "MeshMembership", - "MeshMembershipProperties", - "MeshMembershipsListResult", "MeshRevision", "MeshRevisionProfile", "MeshRevisionProfileList", @@ -539,13 +394,7 @@ "MeshUpgradeProfileProperties", "NamespaceProperties", "NetworkPolicies", - "NetworkProfileForSnapshot", - "NodeCustomizationProfile", - "NodeImageVersion", - "NodeImageVersionsListResult", "OperationListResult", - "OperationStatusResult", - "OperationStatusResultList", "OperationValue", "OutboundEnvironmentEndpoint", "OutboundEnvironmentEndpointCollection", @@ -558,21 +407,14 @@ "PrivateLinkResourcesListResult", "PrivateLinkServiceConnectionState", "ProxyResource", - "RebalanceLoadBalancersRequestBody", "RelativeMonthlySchedule", "Resource", "ResourceQuota", "ResourceReference", "RunCommandRequest", "RunCommandResult", - "SafeguardsAvailableVersion", - "SafeguardsAvailableVersionsList", - "SafeguardsAvailableVersionsProperties", "ScaleProfile", "Schedule", - "SchedulerInstanceProfile", - "SchedulerProfile", - "SchedulerProfileSchedulerInstanceProfiles", "ServiceMeshProfile", "Snapshot", "SnapshotListResult", @@ -594,8 +436,6 @@ "VirtualMachinesProfile", "WeeklySchedule", "WindowsGmsaProfile", - "AccelerationMode", - "AddonAutoscaling", "AdoptionPolicy", "AdvancedNetworkPolicies", "AgentPoolMode", @@ -603,25 +443,17 @@ "AgentPoolType", "ArtifactSource", "BackendPoolType", - "ClusterServiceLoadBalancerHealthProbeMode", "Code", "ConnectionStatus", "CreatedByType", "DeletePolicy", - "DriftAction", - "DriverType", "Expander", "ExtendedLocationTypes", "Format", "GPUDriver", "GPUInstanceProfile", - "GuardrailsSupport", - "IPFamily", - "IdentityBindingProvisioningState", - "InfrastructureEncryption", - "IpvsScheduler", + "IpFamily", "IstioIngressGatewayMode", - "JWTAuthenticatorProvisioningState", "KeyVaultNetworkAccessTypes", "KubeletDiskType", "KubernetesSupportPlan", @@ -637,9 +469,6 @@ "ManagedClusterPodIdentityProvisioningState", "ManagedClusterSKUName", "ManagedClusterSKUTier", - "ManagedGatewayType", - "MeshMembershipProvisioningState", - "Mode", "NamespaceProvisioningState", "NetworkDataplane", "NetworkMode", @@ -653,32 +482,23 @@ "OSDiskType", "OSSKU", "OSType", - "Operator", "OutboundType", "PodIPAllocationMode", - "PodLinkLocalAccess", "PolicyRule", "PrivateEndpointConnectionProvisioningState", "Protocol", - "ProxyRedirectionMechanism", "PublicNetworkAccess", "ResourceIdentityType", "RestrictionLevel", - "SafeguardsSupport", "ScaleDownMode", "ScaleSetEvictionPolicy", "ScaleSetPriority", - "SchedulerConfigMode", - "SeccompDefault", "ServiceMeshMode", "SnapshotType", - "TransitEncryptionType", "TrustedAccessRoleBindingProvisioningState", "Type", "UndrainableNodeBehavior", "UpgradeChannel", - "UpgradeStrategy", - "VmState", "WeekDay", "WorkloadRuntime", ] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_container_service_client_enums.py index d4b6bc059e38..8218304f1ba6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_container_service_client_enums.py @@ -1,4 +1,4 @@ -# pylint: disable=line-too-long,useless-suppression,too-many-lines +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -11,29 +11,6 @@ from azure.core import CaseInsensitiveEnumMeta -class AccelerationMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Enable advanced network acceleration options. This allows users to configure acceleration using - BPF host routing. This can be enabled only with Cilium dataplane. If not specified, the default - value is None (no acceleration). The acceleration mode can be changed on a pre-existing - cluster. See https://aka.ms/acnsperformance for a detailed explanation. - """ - - BPF_VETH = "BpfVeth" - """Enable eBPF host routing with veth device mode.""" - NONE = "None" - """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.""" @@ -78,15 +55,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): @@ -95,11 +63,7 @@ class AgentPoolSSHAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): LOCAL_USER = "LocalUser" """Can SSH onto the node as a local user using private key.""" DISABLED = "Disabled" - """SSH service will be turned off on the node. More information can be found under - https://aka.ms/aks/ssh/disable""" - ENTRA_ID = "EntraId" - """SSH to node with EntraId integration. More information can be found under - https://aka.ms/aks/ssh/aad""" + """SSH service will be turned off on the node.""" class AgentPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -133,17 +97,6 @@ class BackendPoolType(str, Enum, metaclass=CaseInsensitiveEnumMeta): https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend.""" -class ClusterServiceLoadBalancerHealthProbeMode(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.""" @@ -181,32 +134,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 `_ @@ -268,65 +195,11 @@ class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): MIG7_G = "MIG7g" -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.""" +class IpFamily(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The IP version to use for cluster networking and IP assignment.""" I_PV4 = "IPv4" - """IPv4 family""" I_PV6 = "IPv6" - """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): @@ -338,23 +211,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 @@ -537,47 +393,6 @@ class ManagedClusterSKUTier(str, Enum, metaclass=CaseInsensitiveEnumMeta): for production use cases.""" -class ManagedGatewayType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Configuration for the managed Gateway API installation. If not specified, the default is - 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. - """ - - DISABLED = "Disabled" - """Gateway API CRDs will not be reconciled on your cluster.""" - STANDARD = "Standard" - """The latest Gateway CRD bundle from the standard channel that is compatible with your Kubernetes - version will be reconciled onto your cluster. See - https://gateway-api.sigs.k8s.io/concepts/versioning/ for more details.""" - - -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 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.""" @@ -624,16 +439,17 @@ class NetworkPlugin(str, Enum, metaclass=CaseInsensitiveEnumMeta): `_ for more information.""" NONE = "none" - """Do not use a network plugin. A custom CNI will need to be installed after cluster creation for - networking functionality.""" + """No CNI plugin is pre-installed. See `BYO CNI + `_ for more information.""" class NetworkPluginMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mode the network plugin should use.""" OVERLAY = "overlay" - """Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - Kubenet reference plugins host-local and bridge.""" + """Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure + Routing Domains rather than Kubenet's method of route tables. For more information visit + https://aka.ms/aks/azure-cni-overlay.""" class NetworkPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -675,8 +491,8 @@ class NginxIngressControllerType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to - either NodeImage or SecurityPatch at GA. + """Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is + NodeImage. """ NONE = "None" @@ -684,11 +500,16 @@ class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): you are responsible for your security updates""" UNMANAGED = "Unmanaged" """OS updates will be applied automatically through the OS built-in patching infrastructure. Newly - scaled in machines will be unpatched initially, and will be patched at some later time by the - OS's infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner - apply security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows - does not apply security patches automatically and so for them this option is equivalent to None - till further notice""" + scaled in machines will be unpatched initially and will be patched at some point by the OS's + infrastructure. Behavior of this option depends on the OS in question. Ubuntu and Mariner apply + security patches through unattended upgrade roughly once a day around 06:00 UTC. Windows does + not apply security patches automatically and so for them this option is equivalent to None till + further notice""" + NODE_IMAGE = "NodeImage" + """AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a + weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following + maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option + as AKS hosts the images.""" SECURITY_PATCH = "SecurityPatch" """AKS downloads and updates the nodes with tested security updates. These updates honor the maintenance window settings and produce a new VHD that is used on new nodes. On some occasions @@ -696,11 +517,6 @@ class NodeOSUpgradeChannel(str, Enum, metaclass=CaseInsensitiveEnumMeta): re-imaged to the newly produced VHD in order to apply the changes. This option incurs an extra cost of hosting the new Security Patch VHDs in your resource group for just in time consumption.""" - NODE_IMAGE = "NodeImage" - """AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes on a - weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following - maintenance windows and surge settings. No extra VHD cost is incurred when choosing this option - as AKS hosts the images.""" class NodeProvisioningDefaultNodePools(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -730,21 +546,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.""" - IN_ENUM = "In" - """The value of the key should be in the given list.""" - - 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 @@ -763,15 +564,13 @@ class OSDiskType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if - OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to - Windows2022 after Windows2019 is deprecated. + """Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The + default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType + is Windows. """ UBUNTU = "Ubuntu" """Use Ubuntu as the OS for node images.""" - MARINER = "Mariner" - """Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead.""" AZURE_LINUX = "AzureLinux" """Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information.""" @@ -780,11 +579,6 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): built by Microsoft, visit https://aka.ms/azurelinux for more information. For limitations, visit https://aka.ms/aks/node-images. For OS migration guidance, see https://aka.ms/aks/upgrade-os-version.""" - 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" @@ -793,21 +587,13 @@ class OSSKU(str, Enum, metaclass=CaseInsensitiveEnumMeta): WINDOWS2022 = "Windows2022" """Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa.""" - WINDOWS2025 = "Windows2025" - """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.""" UBUNTU2204 = "Ubuntu2204" """Use Ubuntu2204 as the OS for node images, however, Ubuntu 22.04 may not be supported for all - nodepools. For limitations and supported kubernetes versions, see see + nodepools. For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions""" 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 + nodepools. For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions""" @@ -864,18 +650,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.""" @@ -906,25 +680,11 @@ class Protocol(str, Enum, metaclass=CaseInsensitiveEnumMeta): """UDP protocol.""" -class ProxyRedirectionMechanism(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Mode of traffic redirection.""" - - INIT_CONTAINERS = "InitContainers" - """Istio will inject an init container into each pod to redirect traffic (requires NET_ADMIN and - NET_RAW).""" - CNI_CHAINING = "CNIChaining" - """Istio will install a chained CNI plugin to redirect traffic (recommended).""" - - class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS.""" ENABLED = "Enabled" - """Inbound/Outbound to the managedCluster is allowed.""" DISABLED = "Disabled" - """Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed.""" - SECURED_BY_PERIMETER = "SecuredByPerimeter" - """Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters.""" class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -945,7 +705,9 @@ class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): class RestrictionLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The restriction level applied to the cluster's node resource group.""" + """The restriction level applied to the cluster's node resource group. If not specified, the + default is 'Unrestricted'. + """ UNRESTRICTED = "Unrestricted" """All RBAC permissions are allowed on the managed node resource group""" @@ -953,16 +715,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 `_. @@ -999,28 +751,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.""" @@ -1035,21 +765,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): - """Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not - specified, the default value is None. - """ - - WIRE_GUARD = "WireGuard" - """Enable WireGuard encryption. Refer to - https://docs.cilium.io/en/latest/security/network/encryption-wireguard/ on use cases and - implementation details""" - NONE = "None" - """Disable Transit encryption""" class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1063,20 +778,18 @@ class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensi class Type(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The week index. Specifies on which instance of the allowed days specified in daysOfWeek the - maintenance occurs. - """ + """The week index. Specifies on which week of the month the dayOfWeek applies.""" FIRST = "First" - """First.""" + """First week of the month.""" SECOND = "Second" - """Second.""" + """Second week of the month.""" THIRD = "Third" - """Third.""" + """Third week of the month.""" FOURTH = "Fourth" - """Fourth.""" + """Fourth week of the month.""" LAST = "Last" - """Last.""" + """Last week of the month.""" class UndrainableNodeBehavior(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -1131,25 +844,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.""" @@ -1169,11 +863,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_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models_py3.py index 8525c435b0d5..9bcc668831df 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models/_models_py3.py @@ -64,18 +64,14 @@ class AdvancedNetworking(_serialization.Model): :ivar observability: Observability profile to enable advanced network metrics and flow logs with historical contexts. :vartype observability: ~azure.mgmt.containerservice.models.AdvancedNetworkingObservability - :ivar security: Security profile to enable security features on cilium-based cluster. + :ivar security: Security profile to enable security features on cilium based cluster. :vartype security: ~azure.mgmt.containerservice.models.AdvancedNetworkingSecurity - :ivar performance: Profile to enable performance-enhancing features on clusters that use Azure - CNI powered by Cilium. - :vartype performance: ~azure.mgmt.containerservice.models.AdvancedNetworkingPerformance """ _attribute_map = { "enabled": {"key": "enabled", "type": "bool"}, "observability": {"key": "observability", "type": "AdvancedNetworkingObservability"}, "security": {"key": "security", "type": "AdvancedNetworkingSecurity"}, - "performance": {"key": "performance", "type": "AdvancedNetworkingPerformance"}, } def __init__( @@ -84,7 +80,6 @@ def __init__( enabled: Optional[bool] = None, observability: Optional["_models.AdvancedNetworkingObservability"] = None, security: Optional["_models.AdvancedNetworkingSecurity"] = None, - performance: Optional["_models.AdvancedNetworkingPerformance"] = None, **kwargs: Any ) -> None: """ @@ -96,17 +91,13 @@ def __init__( :keyword observability: Observability profile to enable advanced network metrics and flow logs with historical contexts. :paramtype observability: ~azure.mgmt.containerservice.models.AdvancedNetworkingObservability - :keyword security: Security profile to enable security features on cilium-based cluster. + :keyword security: Security profile to enable security features on cilium based cluster. :paramtype security: ~azure.mgmt.containerservice.models.AdvancedNetworkingSecurity - :keyword performance: Profile to enable performance-enhancing features on clusters that use - Azure CNI powered by Cilium. - :paramtype performance: ~azure.mgmt.containerservice.models.AdvancedNetworkingPerformance """ super().__init__(**kwargs) self.enabled = enabled self.observability = observability self.security = security - self.performance = performance class AdvancedNetworkingObservability(_serialization.Model): @@ -132,40 +123,11 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: self.enabled = enabled -class AdvancedNetworkingPerformance(_serialization.Model): - """Profile to enable performance-enhancing features on clusters that use Azure CNI powered by - Cilium. - - :ivar acceleration_mode: Enable advanced network acceleration options. This allows users to - configure acceleration using BPF host routing. This can be enabled only with Cilium dataplane. - If not specified, the default value is None (no acceleration). The acceleration mode can be - changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed - explanation. Known values are: "BpfVeth" and "None". - :vartype acceleration_mode: str or ~azure.mgmt.containerservice.models.AccelerationMode - """ - - _attribute_map = { - "acceleration_mode": {"key": "accelerationMode", "type": "str"}, - } - - def __init__(self, *, acceleration_mode: Union[str, "_models.AccelerationMode"] = "None", **kwargs: Any) -> None: - """ - :keyword acceleration_mode: Enable advanced network acceleration options. This allows users to - configure acceleration using BPF host routing. This can be enabled only with Cilium dataplane. - If not specified, the default value is None (no acceleration). The acceleration mode can be - changed on a pre-existing cluster. See https://aka.ms/acnsperformance for a detailed - explanation. Known values are: "BpfVeth" and "None". - :paramtype acceleration_mode: str or ~azure.mgmt.containerservice.models.AccelerationMode - """ - super().__init__(**kwargs) - self.acceleration_mode = acceleration_mode - - class AdvancedNetworkingSecurity(_serialization.Model): - """Security profile to enable security features on cilium-based cluster. + """Security profile to enable security features on cilium based cluster. - :ivar enabled: Configure Advanced Networking Security features on Cilium clusters. See - individual fields for their default values. + :ivar enabled: This feature allows user to configure network policy based on DNS (FQDN) names. + It can be enabled only on cilium based clusters. If not specified, the default is false. :vartype enabled: bool :ivar advanced_network_policies: Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured @@ -175,16 +137,11 @@ class AdvancedNetworkingSecurity(_serialization.Model): to true. Known values are: "L7", "FQDN", and "None". :vartype advanced_network_policies: str or ~azure.mgmt.containerservice.models.AdvancedNetworkPolicies - :ivar transit_encryption: Encryption configuration for Cilium-based clusters. Once enabled all - traffic between Cilium managed pods will be encrypted when it leaves the node boundary. - :vartype transit_encryption: - ~azure.mgmt.containerservice.models.AdvancedNetworkingSecurityTransitEncryption """ _attribute_map = { "enabled": {"key": "enabled", "type": "bool"}, "advanced_network_policies": {"key": "advancedNetworkPolicies", "type": "str"}, - "transit_encryption": {"key": "transitEncryption", "type": "AdvancedNetworkingSecurityTransitEncryption"}, } def __init__( @@ -192,12 +149,11 @@ def __init__( *, enabled: Optional[bool] = None, advanced_network_policies: Optional[Union[str, "_models.AdvancedNetworkPolicies"]] = None, - transit_encryption: Optional["_models.AdvancedNetworkingSecurityTransitEncryption"] = None, **kwargs: Any ) -> None: """ - :keyword enabled: Configure Advanced Networking Security features on Cilium clusters. See - individual fields for their default values. + :keyword enabled: This feature allows user to configure network policy based on DNS (FQDN) + names. It can be enabled only on cilium based clusters. If not specified, the default is false. :paramtype enabled: bool :keyword advanced_network_policies: Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies themselves must be configured @@ -207,40 +163,10 @@ def __init__( to true. Known values are: "L7", "FQDN", and "None". :paramtype advanced_network_policies: str or ~azure.mgmt.containerservice.models.AdvancedNetworkPolicies - :keyword transit_encryption: Encryption configuration for Cilium-based clusters. Once enabled - all traffic between Cilium managed pods will be encrypted when it leaves the node boundary. - :paramtype transit_encryption: - ~azure.mgmt.containerservice.models.AdvancedNetworkingSecurityTransitEncryption """ super().__init__(**kwargs) self.enabled = enabled self.advanced_network_policies = advanced_network_policies - self.transit_encryption = transit_encryption - - -class AdvancedNetworkingSecurityTransitEncryption(_serialization.Model): # pylint: disable=name-too-long - """Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium - 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" and - "None". - :vartype type: str or ~azure.mgmt.containerservice.models.TransitEncryptionType - """ - - _attribute_map = { - "type": {"key": "type", "type": "str"}, - } - - def __init__(self, *, type: Optional[Union[str, "_models.TransitEncryptionType"]] = None, **kwargs: Any) -> None: - """ - :keyword 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" and - "None". - :paramtype type: str or ~azure.mgmt.containerservice.models.TransitEncryptionType - """ - super().__init__(**kwargs) - self.type = type class SubResource(_serialization.Model): @@ -317,7 +243,7 @@ class AgentPool(SubResource): 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 @@ -344,11 +270,10 @@ class AgentPool(SubResource): :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", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :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", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :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 @@ -365,37 +290,29 @@ class AgentPool(SubResource): :vartype type_properties_type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", 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 - and are supported. When is specified, the - latest supported patch version is chosen automatically. Updating the agent pool with the same - once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :vartype orchestrator_version: str - :ivar current_orchestrator_version: The version of Kubernetes running on the Agent Pool. If - orchestratorVersion was a fully specified version , this field will be - exactly equal to it. If orchestratorVersion was , this field will contain the full + :ivar current_orchestrator_version: The version of Kubernetes the Agent Pool is running. If + orchestratorVersion is a fully specified version , this field will be + exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_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 upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy is - set to Rolling. + :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 @@ -438,14 +355,6 @@ class AgentPool(SubResource): :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. @@ -478,35 +387,28 @@ class AgentPool(SubResource): For more information see `Azure dedicated hosts `_. :vartype host_group_id: str - :ivar windows_profile: The Windows agent pool's specific profile. - :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :ivar gpu_profile: The GPU settings of an agent pool. + :ivar gpu_profile: GPU settings for the Agent Pool. :vartype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :ivar virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :vartype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. :vartype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :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 - :ivar node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :vartype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile """ _validation = { @@ -516,6 +418,7 @@ class AgentPool(SubResource): "e_tag": {"readonly": True}, "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, "provisioning_state": {"readonly": True}, } @@ -546,12 +449,7 @@ class AgentPool(SubResource): "orchestrator_version": {"key": "properties.orchestratorVersion", "type": "str"}, "current_orchestrator_version": {"key": "properties.currentOrchestratorVersion", "type": "str"}, "node_image_version": {"key": "properties.nodeImageVersion", "type": "str"}, - "upgrade_strategy": {"key": "properties.upgradeStrategy", "type": "str"}, "upgrade_settings": {"key": "properties.upgradeSettings", "type": "AgentPoolUpgradeSettings"}, - "upgrade_settings_blue_green": { - "key": "properties.upgradeSettingsBlueGreen", - "type": "AgentPoolBlueGreenUpgradeSettings", - }, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "power_state": {"key": "properties.powerState", "type": "PowerState"}, "availability_zones": {"key": "properties.availabilityZones", "type": "[str]"}, @@ -563,7 +461,6 @@ class AgentPool(SubResource): "tags": {"key": "properties.tags", "type": "{str}"}, "node_labels": {"key": "properties.nodeLabels", "type": "{str}"}, "node_taints": {"key": "properties.nodeTaints", "type": "[str]"}, - "node_initialization_taints": {"key": "properties.nodeInitializationTaints", "type": "[str]"}, "proximity_placement_group_id": {"key": "properties.proximityPlacementGroupID", "type": "str"}, "kubelet_config": {"key": "properties.kubeletConfig", "type": "KubeletConfig"}, "linux_os_config": {"key": "properties.linuxOSConfig", "type": "LinuxOSConfig"}, @@ -574,26 +471,18 @@ class AgentPool(SubResource): "creation_data": {"key": "properties.creationData", "type": "CreationData"}, "capacity_reservation_group_id": {"key": "properties.capacityReservationGroupID", "type": "str"}, "host_group_id": {"key": "properties.hostGroupID", "type": "str"}, - "windows_profile": {"key": "properties.windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "properties.networkProfile", "type": "AgentPoolNetworkProfile"}, + "windows_profile": {"key": "properties.windowsProfile", "type": "AgentPoolWindowsProfile"}, "security_profile": {"key": "properties.securityProfile", "type": "AgentPoolSecurityProfile"}, "gpu_profile": {"key": "properties.gpuProfile", "type": "GPUProfile"}, - "artifact_streaming_profile": { - "key": "properties.artifactStreamingProfile", - "type": "AgentPoolArtifactStreamingProfile", - }, + "gateway_profile": {"key": "properties.gatewayProfile", "type": "AgentPoolGatewayProfile"}, "virtual_machines_profile": {"key": "properties.virtualMachinesProfile", "type": "VirtualMachinesProfile"}, "virtual_machine_nodes_status": { "key": "properties.virtualMachineNodesStatus", "type": "[VirtualMachineNodes]", }, - "gateway_profile": {"key": "properties.gatewayProfile", "type": "AgentPoolGatewayProfile"}, "status": {"key": "properties.status", "type": "AgentPoolStatus"}, "local_dns_profile": {"key": "properties.localDNSProfile", "type": "LocalDNSProfile"}, - "node_customization_profile": { - "key": "properties.nodeCustomizationProfile", - "type": "NodeCustomizationProfile", - }, } def __init__( # pylint: disable=too-many-locals @@ -619,10 +508,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, 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, @@ -633,7 +519,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, @@ -644,17 +529,15 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, gpu_profile: Optional["_models.GPUProfile"] = None, - artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, + gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, - gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - node_customization_profile: Optional["_models.NodeCustomizationProfile"] = None, **kwargs: Any ) -> None: """ @@ -682,7 +565,7 @@ def __init__( # pylint: disable=too-many-locals data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :paramtype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :keyword 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 @@ -710,11 +593,10 @@ def __init__( # pylint: disable=too-many-locals :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". :paramtype os_type: str or ~azure.mgmt.containerservice.models.OSType - :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is - Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be - changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :paramtype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int @@ -731,32 +613,22 @@ def __init__( # pylint: disable=too-many-locals :paramtype type_properties_type: str or ~azure.mgmt.containerservice.models.AgentPoolType :keyword mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and + "Gateway". :paramtype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :keyword 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. Updating the agent pool with the - same once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :paramtype orchestrator_version: str - :keyword node_image_version: The version of node image. - :paramtype node_image_version: str - :keyword upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :paramtype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :keyword upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy - is set to Rolling. + :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :keyword upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :paramtype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :keyword power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An @@ -799,14 +671,6 @@ def __init__( # pylint: disable=too-many-locals :keyword node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :paramtype node_taints: list[str] - :keyword 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-``. - :paramtype node_initialization_taints: list[str] :keyword proximity_placement_group_id: The ID for Proximity Placement Group. :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -840,35 +704,28 @@ def __init__( # pylint: disable=too-many-locals For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str - :keyword windows_profile: The Windows agent pool's specific profile. - :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :keyword gpu_profile: The GPU settings of an agent pool. + :keyword gpu_profile: GPU settings for the Agent Pool. :paramtype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :keyword virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :paramtype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. :paramtype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :keyword 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. :paramtype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :keyword node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :paramtype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile """ super().__init__(**kwargs) self.e_tag: Optional[str] = None @@ -893,10 +750,8 @@ def __init__( # pylint: disable=too-many-locals self.mode = mode self.orchestrator_version = orchestrator_version self.current_orchestrator_version: Optional[str] = None - self.node_image_version = node_image_version - self.upgrade_strategy = upgrade_strategy + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.upgrade_settings_blue_green = upgrade_settings_blue_green self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones @@ -908,7 +763,6 @@ def __init__( # pylint: disable=too-many-locals self.tags = tags self.node_labels = node_labels self.node_taints = node_taints - self.node_initialization_taints = node_initialization_taints self.proximity_placement_group_id = proximity_placement_group_id self.kubelet_config = kubelet_config self.linux_os_config = linux_os_config @@ -919,41 +773,15 @@ def __init__( # pylint: disable=too-many-locals self.creation_data = creation_data self.capacity_reservation_group_id = capacity_reservation_group_id self.host_group_id = host_group_id - self.windows_profile = windows_profile self.network_profile = network_profile + self.windows_profile = windows_profile self.security_profile = security_profile self.gpu_profile = gpu_profile - self.artifact_streaming_profile = artifact_streaming_profile + self.gateway_profile = gateway_profile self.virtual_machines_profile = virtual_machines_profile self.virtual_machine_nodes_status = virtual_machine_nodes_status - self.gateway_profile = gateway_profile self.status = status self.local_dns_profile = local_dns_profile - self.node_customization_profile = node_customization_profile - - -class AgentPoolArtifactStreamingProfile(_serialization.Model): - """AgentPoolArtifactStreamingProfile. - - :ivar enabled: Artifact streaming speeds up the cold-start of containers on a node through - on-demand image loading. To use this feature, container images must also enable artifact - streaming on ACR. If not specified, the default is false. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Artifact streaming speeds up the cold-start of containers on a node through - on-demand image loading. To use this feature, container images must also enable artifact - streaming on ACR. If not specified, the default is false. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled class AgentPoolAvailableVersions(_serialization.Model): @@ -1045,82 +873,6 @@ def __init__( self.is_preview = is_preview -class AgentPoolBlueGreenUpgradeSettings(_serialization.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 - """ - - _validation = { - "drain_timeout_in_minutes": {"maximum": 1440, "minimum": 1}, - "batch_soak_duration_in_minutes": {"maximum": 1440, "minimum": 0}, - "final_soak_duration_in_minutes": {"maximum": 10080, "minimum": 0}, - } - - _attribute_map = { - "drain_batch_size": {"key": "drainBatchSize", "type": "str"}, - "drain_timeout_in_minutes": {"key": "drainTimeoutInMinutes", "type": "int"}, - "batch_soak_duration_in_minutes": {"key": "batchSoakDurationInMinutes", "type": "int"}, - "final_soak_duration_in_minutes": {"key": "finalSoakDurationInMinutes", "type": "int"}, - } - - 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, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype drain_batch_size: str - :keyword 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. - :paramtype drain_timeout_in_minutes: int - :keyword 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. - :paramtype batch_soak_duration_in_minutes: int - :keyword 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. - :paramtype final_soak_duration_in_minutes: int - """ - super().__init__(**kwargs) - self.drain_batch_size = drain_batch_size - self.drain_timeout_in_minutes = drain_timeout_in_minutes - self.batch_soak_duration_in_minutes = batch_soak_duration_in_minutes - self.final_soak_duration_in_minutes = final_soak_duration_in_minutes - - class AgentPoolDeleteMachinesParameter(_serialization.Model): """Specifies a list of machine names from the agent pool to be deleted. @@ -1254,52 +1006,9 @@ def __init__( self.application_security_groups = application_security_groups -class AgentPoolRecentlyUsedVersion(_serialization.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 - """ - - _attribute_map = { - "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, - "node_image_version": {"key": "nodeImageVersion", "type": "str"}, - "timestamp": {"key": "timestamp", "type": "iso-8601"}, - } - - def __init__( - self, - *, - orchestrator_version: Optional[str] = None, - node_image_version: Optional[str] = None, - timestamp: Optional[datetime.datetime] = None, - **kwargs: Any - ) -> None: - """ - :keyword orchestrator_version: The Kubernetes version (major.minor.patch) available for - rollback. - :paramtype orchestrator_version: str - :keyword node_image_version: The node image version available for rollback. - :paramtype node_image_version: str - :keyword timestamp: The timestamp when this version was last used. - :paramtype timestamp: ~datetime.datetime - """ - super().__init__(**kwargs) - self.orchestrator_version = orchestrator_version - self.node_image_version = node_image_version - self.timestamp = timestamp - - class AgentPoolSecurityProfile(_serialization.Model): """The security settings of an agent pool. - :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_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. @@ -1308,26 +1017,26 @@ class AgentPoolSecurityProfile(_serialization.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" and + "Disabled". + :vartype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess """ _attribute_map = { - "ssh_access": {"key": "sshAccess", "type": "str"}, "enable_vtpm": {"key": "enableVTPM", "type": "bool"}, "enable_secure_boot": {"key": "enableSecureBoot", "type": "bool"}, + "ssh_access": {"key": "sshAccess", "type": "str"}, } def __init__( self, *, - ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = None, enable_vtpm: Optional[bool] = None, enable_secure_boot: Optional[bool] = None, + ssh_access: Optional[Union[str, "_models.AgentPoolSSHAccess"]] = None, **kwargs: Any ) -> None: """ - :keyword ssh_access: SSH access method of an agent pool. Known values are: "LocalUser", - "Disabled", and "EntraId". - :paramtype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess :keyword 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. @@ -1336,11 +1045,14 @@ def __init__( signed operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. :paramtype enable_secure_boot: bool + :keyword ssh_access: SSH access method of an agent pool. Known values are: "LocalUser" and + "Disabled". + :paramtype ssh_access: str or ~azure.mgmt.containerservice.models.AgentPoolSSHAccess """ super().__init__(**kwargs) - self.ssh_access = ssh_access self.enable_vtpm = enable_vtpm self.enable_secure_boot = enable_secure_boot + self.ssh_access = ssh_access class AgentPoolStatus(_serialization.Model): @@ -1388,11 +1100,6 @@ class AgentPoolUpgradeProfile(_serialization.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 """ @@ -1403,7 +1110,6 @@ class AgentPoolUpgradeProfile(_serialization.Model): "type": {"readonly": True}, "kubernetes_version": {"required": True}, "os_type": {"required": True}, - "recently_used_versions": {"readonly": True}, } _attribute_map = { @@ -1413,8 +1119,6 @@ class AgentPoolUpgradeProfile(_serialization.Model): "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, "os_type": {"key": "properties.osType", "type": "str"}, "upgrades": {"key": "properties.upgrades", "type": "[AgentPoolUpgradeProfilePropertiesUpgradesItem]"}, - "components_by_releases": {"key": "properties.componentsByReleases", "type": "[ComponentsByRelease]"}, - "recently_used_versions": {"key": "properties.recentlyUsedVersions", "type": "[AgentPoolRecentlyUsedVersion]"}, "latest_node_image_version": {"key": "properties.latestNodeImageVersion", "type": "str"}, } @@ -1424,7 +1128,6 @@ def __init__( kubernetes_version: str, os_type: Union[str, "_models.OSType"] = "Linux", upgrades: Optional[list["_models.AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, latest_node_image_version: Optional[str] = None, **kwargs: Any ) -> None: @@ -1437,9 +1140,6 @@ def __init__( :keyword upgrades: List of orchestrator types and versions available for upgrade. :paramtype upgrades: list[~azure.mgmt.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] - :keyword components_by_releases: List of components grouped by kubernetes major.minor version. - :paramtype components_by_releases: - list[~azure.mgmt.containerservice.models.ComponentsByRelease] :keyword latest_node_image_version: The latest AKS supported node image version. :paramtype latest_node_image_version: str """ @@ -1450,8 +1150,6 @@ def __init__( self.kubernetes_version = kubernetes_version self.os_type = os_type self.upgrades = upgrades - self.components_by_releases = components_by_releases - self.recently_used_versions: Optional[list["_models.AgentPoolRecentlyUsedVersion"]] = None self.latest_node_image_version = latest_node_image_version @@ -1462,40 +1160,29 @@ class AgentPoolUpgradeProfilePropertiesUpgradesItem(_serialization.Model): # py :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 """ _attribute_map = { "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, "is_preview": {"key": "isPreview", "type": "bool"}, - "is_out_of_support": {"key": "isOutOfSupport", "type": "bool"}, } def __init__( - self, - *, - kubernetes_version: Optional[str] = None, - is_preview: Optional[bool] = None, - is_out_of_support: Optional[bool] = None, - **kwargs: Any + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str :keyword is_preview: Whether the Kubernetes version is currently in preview. :paramtype is_preview: bool - :keyword is_out_of_support: Whether the Kubernetes version is out of support. - :paramtype is_out_of_support: bool """ super().__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview - self.is_out_of_support = is_out_of_support class AgentPoolUpgradeSettings(_serialization.Model): - """Settings for rolling upgrade on an agentpool. + """Settings for upgrading an agentpool. :ivar max_surge: The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is @@ -1504,14 +1191,6 @@ class AgentPoolUpgradeSettings(_serialization.Model): information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. :vartype max_surge: str - :ivar min_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). - If a percentage is specified, it is the percentage of the total agent pool size at the time of - the upgrade. For percentages, fractional nodes are rounded up. If node capacity constraints - prevent full surging, AKS would attempt a slower upgrade with fewer surge nodes. The upgrade - will proceed only if the available surge capacity meets or exceeds minSurge. If minSurge not - specified, the default is 50% of the maxSurge, for example, if maxSurge = 10%, the default is - 5%, if maxSurge = 10, the default is 5. - :vartype min_surge: str :ivar max_unavailable: The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at @@ -1519,14 +1198,6 @@ class AgentPoolUpgradeSettings(_serialization.Model): the default is 0. For more information, including best practices, see: 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 @@ -1552,9 +1223,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): _attribute_map = { "max_surge": {"key": "maxSurge", "type": "str"}, - "min_surge": {"key": "minSurge", "type": "str"}, "max_unavailable": {"key": "maxUnavailable", "type": "str"}, - "max_blocked_nodes": {"key": "maxBlockedNodes", "type": "str"}, "drain_timeout_in_minutes": {"key": "drainTimeoutInMinutes", "type": "int"}, "node_soak_duration_in_minutes": {"key": "nodeSoakDurationInMinutes", "type": "int"}, "undrainable_node_behavior": {"key": "undrainableNodeBehavior", "type": "str"}, @@ -1564,9 +1233,7 @@ def __init__( self, *, max_surge: Optional[str] = None, - min_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, @@ -1580,14 +1247,6 @@ def __init__( information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. :paramtype max_surge: str - :keyword min_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. - '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the - time of the upgrade. For percentages, fractional nodes are rounded up. If node capacity - constraints prevent full surging, AKS would attempt a slower upgrade with fewer surge nodes. - The upgrade will proceed only if the available surge capacity meets or exceeds minSurge. If - minSurge not specified, the default is 50% of the maxSurge, for example, if maxSurge = 10%, the - default is 5%, if maxSurge = 10, the default is 5. - :paramtype min_surge: str :keyword max_unavailable: The maximum number or percentage of nodes that can be simultaneously unavailable during upgrade. This can either be set to an integer (e.g. '1') or a percentage (e.g. '5%'). If a percentage is specified, it is the percentage of the total agent pool size at @@ -1595,14 +1254,6 @@ def __init__( the default is 0. For more information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. :paramtype max_unavailable: str - :keyword 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. - :paramtype max_blocked_nodes: str :keyword 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 @@ -1622,9 +1273,7 @@ def __init__( """ super().__init__(**kwargs) self.max_surge = max_surge - self.min_surge = min_surge self.max_unavailable = max_unavailable - self.max_blocked_nodes = max_blocked_nodes self.drain_timeout_in_minutes = drain_timeout_in_minutes self.node_soak_duration_in_minutes = node_soak_duration_in_minutes self.undrainable_node_behavior = undrainable_node_behavior @@ -1654,47 +1303,6 @@ def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any self.disable_outbound_nat = disable_outbound_nat -class AutoScaleProfile(_serialization.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 - """ - - _attribute_map = { - "size": {"key": "size", "type": "str"}, - "min_count": {"key": "minCount", "type": "int"}, - "max_count": {"key": "maxCount", "type": "int"}, - } - - def __init__( - self, - *, - size: Optional[str] = None, - min_count: Optional[int] = None, - max_count: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - 'Standard_E16s_v3' or 'Standard_D16s_v5'. - :paramtype size: str - :keyword min_count: The minimum number of nodes of the specified sizes. - :paramtype min_count: int - :keyword max_count: The maximum number of nodes of the specified sizes. - :paramtype max_count: int - """ - super().__init__(**kwargs) - self.size = size - self.min_count = min_count - self.max_count = max_count - - class AzureKeyVaultKms(_serialization.Model): """Azure Key Vault key management service settings for the security profile. @@ -1810,81 +1418,6 @@ def __init__(self, *, name: Optional[str] = None, versions: Optional[list[str]] self.versions = versions -class Component(_serialization.Model): - """Component. - - :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 - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - "version": {"key": "version", "type": "str"}, - "has_breaking_changes": {"key": "hasBreakingChanges", "type": "bool"}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - version: Optional[str] = None, - has_breaking_changes: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword name: Component name. - :paramtype name: str - :keyword version: Component version. - :paramtype version: str - :keyword 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. - :paramtype has_breaking_changes: bool - """ - super().__init__(**kwargs) - self.name = name - self.version = version - self.has_breaking_changes = has_breaking_changes - - -class ComponentsByRelease(_serialization.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] - """ - - _attribute_map = { - "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, - "components": {"key": "components", "type": "[Component]"}, - } - - def __init__( - self, - *, - kubernetes_version: Optional[str] = None, - components: Optional[list["_models.Component"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword kubernetes_version: The Kubernetes version (major.minor). - :paramtype kubernetes_version: str - :keyword components: components of current or upgraded Kubernetes version in the cluster. - :paramtype components: list[~azure.mgmt.containerservice.models.Component] - """ - super().__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.components = components - - class ContainerServiceLinuxProfile(_serialization.Model): """Profile for Linux VMs in the container service cluster. @@ -1924,8 +1457,7 @@ class ContainerServiceNetworkProfile(_serialization.Model): :ivar network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". :vartype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin - :ivar network_plugin_mode: Network plugin mode used for building the Kubernetes network. - "overlay" + :ivar network_plugin_mode: The mode the network plugin should use. "overlay" :vartype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode :ivar network_policy: Network policy used for building the Kubernetes network. Known values are: "none", "calico", "azure", and "cilium". @@ -1936,6 +1468,9 @@ class ContainerServiceNetworkProfile(_serialization.Model): :ivar network_dataplane: Network dataplane used in the Kubernetes cluster. Known values are: "azure" and "cilium". :vartype network_dataplane: str or ~azure.mgmt.containerservice.models.NetworkDataplane + :ivar advanced_networking: Advanced Networking profile for enabling observability and security + feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. + :vartype advanced_networking: ~azure.mgmt.containerservice.models.AdvancedNetworking :ivar pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :vartype pod_cidr: str :ivar service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must @@ -1976,21 +1511,7 @@ class ContainerServiceNetworkProfile(_serialization.Model): :ivar ip_families: 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. - :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\\ - :code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where :code:`` is represented by a :code:``-\\ :code:`` - string. Kubernetes version 1.23 would be '1-23'. - :vartype kube_proxy_config: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig - :ivar advanced_networking: Advanced Networking profile for enabling observability and security - feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. - :vartype advanced_networking: ~azure.mgmt.containerservice.models.AdvancedNetworking + :vartype ip_families: list[str or ~azure.mgmt.containerservice.models.IpFamily] """ _validation = { @@ -2007,6 +1528,7 @@ class ContainerServiceNetworkProfile(_serialization.Model): "network_policy": {"key": "networkPolicy", "type": "str"}, "network_mode": {"key": "networkMode", "type": "str"}, "network_dataplane": {"key": "networkDataplane", "type": "str"}, + "advanced_networking": {"key": "advancedNetworking", "type": "AdvancedNetworking"}, "pod_cidr": {"key": "podCidr", "type": "str"}, "service_cidr": {"key": "serviceCidr", "type": "str"}, "dns_service_ip": {"key": "dnsServiceIP", "type": "str"}, @@ -2021,9 +1543,6 @@ class ContainerServiceNetworkProfile(_serialization.Model): "pod_cidrs": {"key": "podCidrs", "type": "[str]"}, "service_cidrs": {"key": "serviceCidrs", "type": "[str]"}, "ip_families": {"key": "ipFamilies", "type": "[str]"}, - "pod_link_local_access": {"key": "podLinkLocalAccess", "type": "str"}, - "kube_proxy_config": {"key": "kubeProxyConfig", "type": "ContainerServiceNetworkProfileKubeProxyConfig"}, - "advanced_networking": {"key": "advancedNetworking", "type": "AdvancedNetworking"}, } def __init__( @@ -2034,6 +1553,7 @@ def __init__( network_policy: Optional[Union[str, "_models.NetworkPolicy"]] = None, network_mode: Optional[Union[str, "_models.NetworkMode"]] = None, network_dataplane: Optional[Union[str, "_models.NetworkDataplane"]] = None, + advanced_networking: Optional["_models.AdvancedNetworking"] = None, pod_cidr: str = "10.244.0.0/16", service_cidr: str = "10.0.0.0/16", dns_service_ip: str = "10.0.0.10", @@ -2044,18 +1564,14 @@ def __init__( static_egress_gateway_profile: Optional["_models.ManagedClusterStaticEgressGatewayProfile"] = None, 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, - advanced_networking: Optional["_models.AdvancedNetworking"] = None, + ip_families: Optional[list[Union[str, "_models.IpFamily"]]] = None, **kwargs: Any ) -> None: """ :keyword network_plugin: Network plugin used for building the Kubernetes network. Known values are: "azure", "kubenet", and "none". :paramtype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin - :keyword network_plugin_mode: Network plugin mode used for building the Kubernetes network. - "overlay" + :keyword network_plugin_mode: The mode the network plugin should use. "overlay" :paramtype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode :keyword network_policy: Network policy used for building the Kubernetes network. Known values are: "none", "calico", "azure", and "cilium". @@ -2066,6 +1582,9 @@ def __init__( :keyword network_dataplane: Network dataplane used in the Kubernetes cluster. Known values are: "azure" and "cilium". :paramtype network_dataplane: str or ~azure.mgmt.containerservice.models.NetworkDataplane + :keyword advanced_networking: Advanced Networking profile for enabling observability and + security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. + :paramtype advanced_networking: ~azure.mgmt.containerservice.models.AdvancedNetworking :keyword pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. :paramtype pod_cidr: str :keyword service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It @@ -2106,21 +1625,7 @@ def __init__( :keyword ip_families: 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. - :paramtype ip_families: list[str or ~azure.mgmt.containerservice.models.IPFamily] - :keyword 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". - :paramtype pod_link_local_access: str or ~azure.mgmt.containerservice.models.PodLinkLocalAccess - :keyword kube_proxy_config: Holds configuration customizations for kube-proxy. Any values not - defined will use the kube-proxy defaulting behavior. See https://v\\ - :code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where :code:`` is represented by a :code:``-\\ :code:`` - string. Kubernetes version 1.23 would be '1-23'. - :paramtype kube_proxy_config: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfig - :keyword advanced_networking: Advanced Networking profile for enabling observability and - security feature suite on a cluster. For more information see aka.ms/aksadvancednetworking. - :paramtype advanced_networking: ~azure.mgmt.containerservice.models.AdvancedNetworking + :paramtype ip_families: list[str or ~azure.mgmt.containerservice.models.IpFamily] """ super().__init__(**kwargs) self.network_plugin = network_plugin @@ -2128,6 +1633,7 @@ def __init__( self.network_policy = network_policy self.network_mode = network_mode self.network_dataplane = network_dataplane + self.advanced_networking = advanced_networking self.pod_cidr = pod_cidr self.service_cidr = service_cidr self.dns_service_ip = dns_service_ip @@ -2139,126 +1645,16 @@ def __init__( self.pod_cidrs = pod_cidrs self.service_cidrs = service_cidrs self.ip_families = ip_families - self.pod_link_local_access = pod_link_local_access - self.kube_proxy_config = kube_proxy_config - self.advanced_networking = advanced_networking -class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.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\\ - :code:``.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ - where :code:`` is represented by a :code:``-\\ :code:`` - string. Kubernetes version 1.23 would be '1-23'. +class ContainerServiceSshConfiguration(_serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. - :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 - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "mode": {"key": "mode", "type": "str"}, - "ipvs_config": {"key": "ipvsConfig", "type": "ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - mode: Optional[Union[str, "_models.Mode"]] = None, - ipvs_config: Optional["_models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig"] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' - exists, kube-proxy is enabled in AKS by default without these customizations). - :paramtype enabled: bool - :keyword mode: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). Known values - are: "IPTABLES", "IPVS", and "NFTABLES". - :paramtype mode: str or ~azure.mgmt.containerservice.models.Mode - :keyword ipvs_config: Holds configuration customizations for IPVS. May only be specified if - 'mode' is set to 'IPVS'. - :paramtype ipvs_config: - ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig - """ - super().__init__(**kwargs) - self.enabled = enabled - self.mode = mode - self.ipvs_config = ipvs_config - - -class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(_serialization.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 - """ - - _attribute_map = { - "scheduler": {"key": "scheduler", "type": "str"}, - "tcp_timeout_seconds": {"key": "tcpTimeoutSeconds", "type": "int"}, - "tcp_fin_timeout_seconds": {"key": "tcpFinTimeoutSeconds", "type": "int"}, - "udp_timeout_seconds": {"key": "udpTimeoutSeconds", "type": "int"}, - } - - def __init__( - self, - *, - scheduler: Optional[Union[str, "_models.IpvsScheduler"]] = None, - tcp_timeout_seconds: Optional[int] = None, - tcp_fin_timeout_seconds: Optional[int] = None, - udp_timeout_seconds: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword scheduler: IPVS scheduler, for more information please see - http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and - "LeastConnection". - :paramtype scheduler: str or ~azure.mgmt.containerservice.models.IpvsScheduler - :keyword tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. - Must be a positive integer value. - :paramtype tcp_timeout_seconds: int - :keyword tcp_fin_timeout_seconds: The timeout value used for IPVS TCP sessions after receiving - a FIN in seconds. Must be a positive integer value. - :paramtype tcp_fin_timeout_seconds: int - :keyword udp_timeout_seconds: The timeout value used for IPVS UDP packets in seconds. Must be a - positive integer value. - :paramtype udp_timeout_seconds: int - """ - super().__init__(**kwargs) - self.scheduler = scheduler - self.tcp_timeout_seconds = tcp_timeout_seconds - self.tcp_fin_timeout_seconds = tcp_fin_timeout_seconds - self.udp_timeout_seconds = udp_timeout_seconds - - -class ContainerServiceSshConfiguration(_serialization.Model): - """SSH configuration for Linux-based VMs running on Azure. - - All required parameters must be populated in order to send to server. - - :ivar public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A - maximum of 1 key may be specified. Required. - :vartype public_keys: list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] + All required parameters must be populated in order to send to server. + + :ivar public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A + maximum of 1 key may be specified. Required. + :vartype public_keys: list[~azure.mgmt.containerservice.models.ContainerServiceSshPublicKey] """ _validation = { @@ -2690,611 +2086,203 @@ def __init__( class GPUProfile(_serialization.Model): - """GPUProfile. + """GPU settings for the Agent Pool. :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 """ _attribute_map = { "driver": {"key": "driver", "type": "str"}, - "driver_type": {"key": "driverType", "type": "str"}, } - def __init__( - self, - *, - driver: Optional[Union[str, "_models.GPUDriver"]] = None, - driver_type: Optional[Union[str, "_models.DriverType"]] = None, - **kwargs: Any - ) -> None: + def __init__(self, *, driver: Optional[Union[str, "_models.GPUDriver"]] = None, **kwargs: Any) -> None: """ :keyword driver: Whether to install GPU drivers. When it's not specified, default is Install. Known values are: "Install" and "None". :paramtype driver: str or ~azure.mgmt.containerservice.models.GPUDriver - :keyword 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". - :paramtype driver_type: str or ~azure.mgmt.containerservice.models.DriverType """ super().__init__(**kwargs) self.driver = driver - self.driver_type = driver_type -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. +class IPTag(_serialization.Model): + """Contains the IPTag associated with the object. - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 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 """ - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - } - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, + "ip_tag_type": {"key": "ipTagType", "type": "str"}, + "tag": {"key": "tag", "type": "str"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. + :paramtype ip_tag_type: str + :keyword tag: The value of the IP tag associated with the public IP. Example: Internet. + :paramtype tag: str + """ super().__init__(**kwargs) - self.id: Optional[str] = None - self.name: Optional[str] = None - self.type: Optional[str] = None - self.system_data: Optional["_models.SystemData"] = None - - -class GuardrailsAvailableVersion(Resource): - """Available Guardrails Version. + self.ip_tag_type = ip_tag_type + self.tag = tag - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. +class IstioCertificateAuthority(_serialization.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 id: Fully qualified resource ID for the resource. E.g. - "/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 plugin: Plugin certificates information for Service Mesh. + :vartype plugin: ~azure.mgmt.containerservice.models.IstioPluginCertificateAuthority """ - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "properties": {"required": True}, + _attribute_map = { + "plugin": {"key": "plugin", "type": "IstioPluginCertificateAuthority"}, } + def __init__(self, *, plugin: Optional["_models.IstioPluginCertificateAuthority"] = None, **kwargs: Any) -> None: + """ + :keyword plugin: Plugin certificates information for Service Mesh. + :paramtype plugin: ~azure.mgmt.containerservice.models.IstioPluginCertificateAuthority + """ + super().__init__(**kwargs) + self.plugin = plugin + + +class IstioComponents(_serialization.Model): + """Istio components configuration. + + :ivar ingress_gateways: Istio ingress gateways. + :vartype ingress_gateways: list[~azure.mgmt.containerservice.models.IstioIngressGateway] + :ivar egress_gateways: Istio egress gateways. + :vartype egress_gateways: list[~azure.mgmt.containerservice.models.IstioEgressGateway] + """ + _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "GuardrailsAvailableVersionsProperties"}, + "ingress_gateways": {"key": "ingressGateways", "type": "[IstioIngressGateway]"}, + "egress_gateways": {"key": "egressGateways", "type": "[IstioEgressGateway]"}, } - def __init__(self, *, properties: "_models.GuardrailsAvailableVersionsProperties", **kwargs: Any) -> None: + def __init__( + self, + *, + ingress_gateways: Optional[list["_models.IstioIngressGateway"]] = None, + egress_gateways: Optional[list["_models.IstioEgressGateway"]] = None, + **kwargs: Any + ) -> None: """ - :keyword properties: Whether the version is default or not and support info. Required. - :paramtype properties: - ~azure.mgmt.containerservice.models.GuardrailsAvailableVersionsProperties + :keyword ingress_gateways: Istio ingress gateways. + :paramtype ingress_gateways: list[~azure.mgmt.containerservice.models.IstioIngressGateway] + :keyword egress_gateways: Istio egress gateways. + :paramtype egress_gateways: list[~azure.mgmt.containerservice.models.IstioEgressGateway] """ super().__init__(**kwargs) - self.properties = properties + self.ingress_gateways = ingress_gateways + self.egress_gateways = egress_gateways -class GuardrailsAvailableVersionsList(_serialization.Model): - """Hold values properties, which is array of GuardrailsVersions. +class IstioEgressGateway(_serialization.Model): + """Istio egress gateway configuration. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to server. - :ivar value: Array of AKS supported Guardrails versions. - :vartype value: list[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] - :ivar next_link: The URL to get the next Guardrails available version. - :vartype next_link: str + :ivar enabled: Whether to enable the egress gateway. Required. + :vartype enabled: bool + :ivar name: Name of the Istio add-on egress gateway. Required. + :vartype name: str + :ivar namespace: Namespace that the Istio add-on egress gateway should be deployed in. If + unspecified, the default is aks-istio-egress. + :vartype namespace: str + :ivar gateway_configuration_name: Name of the gateway configuration custom resource for the + Istio add-on egress gateway. Must be specified when enabling the Istio egress gateway. Must be + deployed in the same namespace that the Istio egress gateway will be deployed in. + :vartype gateway_configuration_name: str """ _validation = { - "next_link": {"readonly": True}, + "enabled": {"required": True}, + "name": {"required": True, "pattern": r"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"}, } _attribute_map = { - "value": {"key": "value", "type": "[GuardrailsAvailableVersion]"}, - "next_link": {"key": "nextLink", "type": "str"}, + "enabled": {"key": "enabled", "type": "bool"}, + "name": {"key": "name", "type": "str"}, + "namespace": {"key": "namespace", "type": "str"}, + "gateway_configuration_name": {"key": "gatewayConfigurationName", "type": "str"}, } - def __init__(self, *, value: Optional[list["_models.GuardrailsAvailableVersion"]] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + enabled: bool, + name: str, + namespace: Optional[str] = None, + gateway_configuration_name: Optional[str] = None, + **kwargs: Any + ) -> None: """ - :keyword value: Array of AKS supported Guardrails versions. - :paramtype value: list[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] + :keyword enabled: Whether to enable the egress gateway. Required. + :paramtype enabled: bool + :keyword name: Name of the Istio add-on egress gateway. Required. + :paramtype name: str + :keyword namespace: Namespace that the Istio add-on egress gateway should be deployed in. If + unspecified, the default is aks-istio-egress. + :paramtype namespace: str + :keyword gateway_configuration_name: Name of the gateway configuration custom resource for the + Istio add-on egress gateway. Must be specified when enabling the Istio egress gateway. Must be + deployed in the same namespace that the Istio egress gateway will be deployed in. + :paramtype gateway_configuration_name: str """ super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None + self.enabled = enabled + self.name = name + self.namespace = namespace + self.gateway_configuration_name = gateway_configuration_name -class GuardrailsAvailableVersionsProperties(_serialization.Model): - """Whether the version is default or not and support info. +class IstioIngressGateway(_serialization.Model): + """Istio ingress gateway configuration. For now, we support up to one external ingress gateway + named ``aks-istio-ingressgateway-external`` and one internal ingress gateway named + ``aks-istio-ingressgateway-internal``. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to server. - :ivar is_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 + :ivar mode: Mode of an ingress gateway. Required. Known values are: "External" and "Internal". + :vartype mode: str or ~azure.mgmt.containerservice.models.IstioIngressGatewayMode + :ivar enabled: Whether to enable the ingress gateway. Required. + :vartype enabled: bool """ _validation = { - "is_default_version": {"readonly": True}, - "support": {"readonly": True}, + "mode": {"required": True}, + "enabled": {"required": True}, } _attribute_map = { - "is_default_version": {"key": "isDefaultVersion", "type": "bool"}, - "support": {"key": "support", "type": "str"}, + "mode": {"key": "mode", "type": "str"}, + "enabled": {"key": "enabled", "type": "bool"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, mode: Union[str, "_models.IstioIngressGatewayMode"], enabled: bool, **kwargs: Any) -> None: + """ + :keyword mode: Mode of an ingress gateway. Required. Known values are: "External" and + "Internal". + :paramtype mode: str or ~azure.mgmt.containerservice.models.IstioIngressGatewayMode + :keyword enabled: Whether to enable the ingress gateway. Required. + :paramtype enabled: bool + """ super().__init__(**kwargs) - self.is_default_version: Optional[bool] = None - self.support: Optional[Union[str, "_models.GuardrailsSupport"]] = None - + self.mode = mode + self.enabled = enabled -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have - tags and a location. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 - """ - - -class IdentityBinding(ProxyResource): - """The IdentityBinding resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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: 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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "e_tag": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "IdentityBindingProperties"}, - "e_tag": {"key": "eTag", "type": "str"}, - } - - def __init__(self, *, properties: Optional["_models.IdentityBindingProperties"] = None, **kwargs: Any) -> None: - """ - :keyword properties: The resource-specific properties for this resource. - :paramtype properties: ~azure.mgmt.containerservice.models.IdentityBindingProperties - """ - super().__init__(**kwargs) - self.properties = properties - self.e_tag: Optional[str] = None - - -class IdentityBindingListResult(_serialization.Model): - """The response of a IdentityBinding list operation. - - All required parameters must be populated in order to send to server. - - :ivar value: The IdentityBinding items on this page. Required. - :vartype value: list[~azure.mgmt.containerservice.models.IdentityBinding] - :ivar next_link: The link to the next page of items. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[IdentityBinding]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__( - self, *, value: list["_models.IdentityBinding"], next_link: Optional[str] = None, **kwargs: Any - ) -> None: - """ - :keyword value: The IdentityBinding items on this page. Required. - :paramtype value: list[~azure.mgmt.containerservice.models.IdentityBinding] - :keyword next_link: The link to the next page of items. - :paramtype next_link: str - """ - super().__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class IdentityBindingManagedIdentityProfile(_serialization.Model): - """Managed identity profile for the identity binding. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :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 - """ - - _validation = { - "resource_id": {"required": True}, - "object_id": { - "readonly": True, - "max_length": 36, - "min_length": 36, - "pattern": r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - }, - "client_id": { - "readonly": True, - "max_length": 36, - "min_length": 36, - "pattern": r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - }, - "tenant_id": { - "readonly": True, - "max_length": 36, - "min_length": 36, - "pattern": r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", - }, - } - - _attribute_map = { - "resource_id": {"key": "resourceId", "type": "str"}, - "object_id": {"key": "objectId", "type": "str"}, - "client_id": {"key": "clientId", "type": "str"}, - "tenant_id": {"key": "tenantId", "type": "str"}, - } - - def __init__(self, *, resource_id: str, **kwargs: Any) -> None: - """ - :keyword resource_id: The resource ID of the managed identity. Required. - :paramtype resource_id: str - """ - super().__init__(**kwargs) - self.resource_id = resource_id - self.object_id: Optional[str] = None - self.client_id: Optional[str] = None - self.tenant_id: Optional[str] = None - - -class IdentityBindingOidcIssuerProfile(_serialization.Model): - """IdentityBinding OIDC issuer profile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar oidc_issuer_url: The OIDC issuer URL of the IdentityBinding. - :vartype oidc_issuer_url: str - """ - - _validation = { - "oidc_issuer_url": {"readonly": True}, - } - - _attribute_map = { - "oidc_issuer_url": {"key": "oidcIssuerUrl", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.oidc_issuer_url: Optional[str] = None - - -class IdentityBindingProperties(_serialization.Model): - """IdentityBinding properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :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 - """ - - _validation = { - "managed_identity": {"required": True}, - "oidc_issuer": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "managed_identity": {"key": "managedIdentity", "type": "IdentityBindingManagedIdentityProfile"}, - "oidc_issuer": {"key": "oidcIssuer", "type": "IdentityBindingOidcIssuerProfile"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - } - - def __init__(self, *, managed_identity: "_models.IdentityBindingManagedIdentityProfile", **kwargs: Any) -> None: - """ - :keyword managed_identity: Managed identity profile for the identity binding. Required. - :paramtype managed_identity: - ~azure.mgmt.containerservice.models.IdentityBindingManagedIdentityProfile - """ - super().__init__(**kwargs) - self.managed_identity = managed_identity - self.oidc_issuer: Optional["_models.IdentityBindingOidcIssuerProfile"] = None - self.provisioning_state: Optional[Union[str, "_models.IdentityBindingProvisioningState"]] = None - - -class IPTag(_serialization.Model): - """Contains the IPTag associated with the object. - - :ivar ip_tag_type: The IP tag type. Example: RoutingPreference. - :vartype ip_tag_type: str - :ivar tag: The value of the IP tag associated with the public IP. Example: Internet. - :vartype tag: str - """ - - _attribute_map = { - "ip_tag_type": {"key": "ipTagType", "type": "str"}, - "tag": {"key": "tag", "type": "str"}, - } - - def __init__(self, *, ip_tag_type: Optional[str] = None, tag: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword ip_tag_type: The IP tag type. Example: RoutingPreference. - :paramtype ip_tag_type: str - :keyword tag: The value of the IP tag associated with the public IP. Example: Internet. - :paramtype tag: str - """ - super().__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag - - -class IstioCertificateAuthority(_serialization.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 - """ - - _attribute_map = { - "plugin": {"key": "plugin", "type": "IstioPluginCertificateAuthority"}, - } - - def __init__(self, *, plugin: Optional["_models.IstioPluginCertificateAuthority"] = None, **kwargs: Any) -> None: - """ - :keyword plugin: Plugin certificates information for Service Mesh. - :paramtype plugin: ~azure.mgmt.containerservice.models.IstioPluginCertificateAuthority - """ - super().__init__(**kwargs) - self.plugin = plugin - - -class IstioComponents(_serialization.Model): - """Istio components configuration. - - :ivar ingress_gateways: Istio ingress gateways. - :vartype ingress_gateways: list[~azure.mgmt.containerservice.models.IstioIngressGateway] - :ivar egress_gateways: Istio egress gateways. - :vartype egress_gateways: list[~azure.mgmt.containerservice.models.IstioEgressGateway] - :ivar proxy_redirection_mechanism: Mode of traffic redirection. Known values are: - "InitContainers" and "CNIChaining". - :vartype proxy_redirection_mechanism: str or - ~azure.mgmt.containerservice.models.ProxyRedirectionMechanism - """ - - _attribute_map = { - "ingress_gateways": {"key": "ingressGateways", "type": "[IstioIngressGateway]"}, - "egress_gateways": {"key": "egressGateways", "type": "[IstioEgressGateway]"}, - "proxy_redirection_mechanism": {"key": "proxyRedirectionMechanism", "type": "str"}, - } - - def __init__( - self, - *, - ingress_gateways: Optional[list["_models.IstioIngressGateway"]] = None, - egress_gateways: Optional[list["_models.IstioEgressGateway"]] = None, - proxy_redirection_mechanism: Optional[Union[str, "_models.ProxyRedirectionMechanism"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ingress_gateways: Istio ingress gateways. - :paramtype ingress_gateways: list[~azure.mgmt.containerservice.models.IstioIngressGateway] - :keyword egress_gateways: Istio egress gateways. - :paramtype egress_gateways: list[~azure.mgmt.containerservice.models.IstioEgressGateway] - :keyword proxy_redirection_mechanism: Mode of traffic redirection. Known values are: - "InitContainers" and "CNIChaining". - :paramtype proxy_redirection_mechanism: str or - ~azure.mgmt.containerservice.models.ProxyRedirectionMechanism - """ - super().__init__(**kwargs) - self.ingress_gateways = ingress_gateways - self.egress_gateways = egress_gateways - self.proxy_redirection_mechanism = proxy_redirection_mechanism - - -class IstioEgressGateway(_serialization.Model): - """Istio egress gateway configuration. - - All required parameters must be populated in order to send to server. - - :ivar enabled: Whether to enable the egress gateway. Required. - :vartype enabled: bool - :ivar name: Name of the Istio add-on egress gateway. Required. - :vartype name: str - :ivar namespace: Namespace that the Istio add-on egress gateway should be deployed in. If - unspecified, the default is aks-istio-egress. - :vartype namespace: str - :ivar gateway_configuration_name: Name of the gateway configuration custom resource for the - Istio add-on egress gateway. Must be specified when enabling the Istio egress gateway. Must be - deployed in the same namespace that the Istio egress gateway will be deployed in. - :vartype gateway_configuration_name: str - """ - - _validation = { - "enabled": {"required": True}, - "name": {"required": True, "pattern": r"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"}, - } - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "name": {"key": "name", "type": "str"}, - "namespace": {"key": "namespace", "type": "str"}, - "gateway_configuration_name": {"key": "gatewayConfigurationName", "type": "str"}, - } - - def __init__( - self, - *, - enabled: bool, - name: str, - namespace: Optional[str] = None, - gateway_configuration_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword enabled: Whether to enable the egress gateway. Required. - :paramtype enabled: bool - :keyword name: Name of the Istio add-on egress gateway. Required. - :paramtype name: str - :keyword namespace: Namespace that the Istio add-on egress gateway should be deployed in. If - unspecified, the default is aks-istio-egress. - :paramtype namespace: str - :keyword gateway_configuration_name: Name of the gateway configuration custom resource for the - Istio add-on egress gateway. Must be specified when enabling the Istio egress gateway. Must be - deployed in the same namespace that the Istio egress gateway will be deployed in. - :paramtype gateway_configuration_name: str - """ - super().__init__(**kwargs) - self.enabled = enabled - self.name = name - self.namespace = namespace - self.gateway_configuration_name = gateway_configuration_name - - -class IstioIngressGateway(_serialization.Model): - """Istio ingress gateway configuration. For now, we support up to one external ingress gateway - named ``aks-istio-ingressgateway-external`` and one internal ingress gateway named - ``aks-istio-ingressgateway-internal``. - - All required parameters must be populated in order to send to server. - - :ivar mode: Mode of an ingress gateway. Required. Known values are: "External" and "Internal". - :vartype mode: str or ~azure.mgmt.containerservice.models.IstioIngressGatewayMode - :ivar enabled: Whether to enable the ingress gateway. Required. - :vartype enabled: bool - """ - - _validation = { - "mode": {"required": True}, - "enabled": {"required": True}, - } - - _attribute_map = { - "mode": {"key": "mode", "type": "str"}, - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, mode: Union[str, "_models.IstioIngressGatewayMode"], enabled: bool, **kwargs: Any) -> None: - """ - :keyword mode: Mode of an ingress gateway. Required. Known values are: "External" and - "Internal". - :paramtype mode: str or ~azure.mgmt.containerservice.models.IstioIngressGatewayMode - :keyword enabled: Whether to enable the ingress gateway. Required. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.mode = mode - self.enabled = enabled - - -class IstioPluginCertificateAuthority(_serialization.Model): - """Plugin certificates information for Service Mesh. +class IstioPluginCertificateAuthority(_serialization.Model): + """Plugin certificates information for Service Mesh. :ivar key_vault_id: The resource ID of the Key Vault. :vartype key_vault_id: str @@ -3375,385 +2363,26 @@ def __init__( self, *, components: Optional["_models.IstioComponents"] = None, - certificate_authority: Optional["_models.IstioCertificateAuthority"] = None, - revisions: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword components: Istio components configuration. - :paramtype components: ~azure.mgmt.containerservice.models.IstioComponents - :keyword certificate_authority: Istio Service Mesh Certificate Authority (CA) configuration. - For now, we only support plugin certificates as described here https://aka.ms/asm-plugin-ca. - :paramtype certificate_authority: ~azure.mgmt.containerservice.models.IstioCertificateAuthority - :keyword revisions: The list of revisions of the Istio control plane. When an upgrade is not in - progress, this holds one value. When canary upgrade is in progress, this can only hold two - consecutive values. For more information, see: - https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. - :paramtype revisions: list[str] - """ - super().__init__(**kwargs) - self.components = components - self.certificate_authority = certificate_authority - self.revisions = revisions - - -class JWTAuthenticator(ProxyResource): - """Configuration for JWT authenticator in the managed cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "properties": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "JWTAuthenticatorProperties"}, - } - - def __init__(self, *, properties: "_models.JWTAuthenticatorProperties", **kwargs: Any) -> None: - """ - :keyword 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. - :paramtype properties: ~azure.mgmt.containerservice.models.JWTAuthenticatorProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class JWTAuthenticatorClaimMappingExpression(_serialization.Model): - """The claim mapping expression for JWTAuthenticator. - - All required parameters must be populated in order to send to server. - - :ivar expression: The CEL expression used to access token claims. Required. - :vartype expression: str - """ - - _validation = { - "expression": {"required": True}, - } - - _attribute_map = { - "expression": {"key": "expression", "type": "str"}, - } - - def __init__(self, *, expression: str, **kwargs: Any) -> None: - """ - :keyword expression: The CEL expression used to access token claims. Required. - :paramtype expression: str - """ - super().__init__(**kwargs) - self.expression = expression - - -class JWTAuthenticatorClaimMappings(_serialization.Model): - """The claim mappings for JWTAuthenticator. - - All required parameters must be populated in order to send to server. - - :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] - """ - - _validation = { - "username": {"required": True}, - } - - _attribute_map = { - "username": {"key": "username", "type": "JWTAuthenticatorClaimMappingExpression"}, - "groups": {"key": "groups", "type": "JWTAuthenticatorClaimMappingExpression"}, - "uid": {"key": "uid", "type": "JWTAuthenticatorClaimMappingExpression"}, - "extra": {"key": "extra", "type": "[JWTAuthenticatorExtraClaimMappingExpression]"}, - } - - def __init__( - self, - *, - username: "_models.JWTAuthenticatorClaimMappingExpression", - groups: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, - uid: Optional["_models.JWTAuthenticatorClaimMappingExpression"] = None, - extra: Optional[list["_models.JWTAuthenticatorExtraClaimMappingExpression"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword username: The expression to extract username attribute from the token claims. - Required. - :paramtype username: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :keyword groups: The expression to extract groups attribute from the token claims. When not - provided, no groups are extracted from the token claims. - :paramtype groups: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :keyword uid: The expression to extract uid attribute from the token claims. When not provided, - no uid is extracted from the token claims. - :paramtype uid: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappingExpression - :keyword extra: The expression to extract extra attribute from the token claims. When not - provided, no extra attributes are extracted from the token claims. - :paramtype extra: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression] - """ - super().__init__(**kwargs) - self.username = username - self.groups = groups - self.uid = uid - self.extra = extra - - -class JWTAuthenticatorExtraClaimMappingExpression(_serialization.Model): # pylint: disable=name-too-long - """The extra claim mapping expression for JWTAuthenticator. - - All required parameters must be populated in order to send to server. - - :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 - """ - - _validation = { - "key": {"required": True}, - "value_expression": {"required": True}, - } - - _attribute_map = { - "key": {"key": "key", "type": "str"}, - "value_expression": {"key": "valueExpression", "type": "str"}, - } - - def __init__(self, *, key: str, value_expression: str, **kwargs: Any) -> None: - """ - :keyword key: The key of the extra attribute. Required. - :paramtype key: str - :keyword value_expression: The CEL expression used to extract the value of the extra attribute. - Required. - :paramtype value_expression: str - """ - super().__init__(**kwargs) - self.key = key - self.value_expression = value_expression - - -class JWTAuthenticatorIssuer(_serialization.Model): - """The OIDC issuer details for JWTAuthenticator. - - All required parameters must be populated in order to send to server. - - :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] - """ - - _validation = { - "url": {"required": True}, - "audiences": {"required": True, "min_items": 1}, - } - - _attribute_map = { - "url": {"key": "url", "type": "str"}, - "audiences": {"key": "audiences", "type": "[str]"}, - } - - def __init__(self, *, url: str, audiences: list[str], **kwargs: Any) -> None: - """ - :keyword 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. - :paramtype url: str - :keyword 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. - :paramtype audiences: list[str] - """ - super().__init__(**kwargs) - self.url = url - self.audiences = audiences - - -class JWTAuthenticatorListResult(_serialization.Model): - """The response from the List JWT authenticator operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar value: The list of JWT authenticators. Required. - :vartype value: list[~azure.mgmt.containerservice.models.JWTAuthenticator] - :ivar next_link: The URL to get the next set of JWT authenticator results. - :vartype next_link: str - """ - - _validation = { - "value": {"required": True}, - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[JWTAuthenticator]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: list["_models.JWTAuthenticator"], **kwargs: Any) -> None: - """ - :keyword value: The list of JWT authenticators. Required. - :paramtype value: list[~azure.mgmt.containerservice.models.JWTAuthenticator] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class JWTAuthenticatorProperties(_serialization.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. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :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] - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "issuer": {"required": True}, - "claim_mappings": {"required": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "issuer": {"key": "issuer", "type": "JWTAuthenticatorIssuer"}, - "claim_validation_rules": {"key": "claimValidationRules", "type": "[JWTAuthenticatorValidationRule]"}, - "claim_mappings": {"key": "claimMappings", "type": "JWTAuthenticatorClaimMappings"}, - "user_validation_rules": {"key": "userValidationRules", "type": "[JWTAuthenticatorValidationRule]"}, - } - - 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, - **kwargs: Any - ) -> None: - """ - :keyword issuer: The JWT OIDC issuer details. Required. - :paramtype issuer: ~azure.mgmt.containerservice.models.JWTAuthenticatorIssuer - :keyword 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. - :paramtype claim_validation_rules: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] - :keyword claim_mappings: The mappings that define how user attributes are extracted from the - token claims. Required. - :paramtype claim_mappings: ~azure.mgmt.containerservice.models.JWTAuthenticatorClaimMappings - :keyword 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. - :paramtype user_validation_rules: - list[~azure.mgmt.containerservice.models.JWTAuthenticatorValidationRule] - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.JWTAuthenticatorProvisioningState"]] = None - self.issuer = issuer - self.claim_validation_rules = claim_validation_rules - self.claim_mappings = claim_mappings - self.user_validation_rules = user_validation_rules - - -class JWTAuthenticatorValidationRule(_serialization.Model): - """The validation rule for JWTAuthenticator. - - All required parameters must be populated in order to send to server. - - :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 - """ - - _validation = { - "expression": {"required": True}, - } - - _attribute_map = { - "expression": {"key": "expression", "type": "str"}, - "message": {"key": "message", "type": "str"}, - } - - def __init__(self, *, expression: str, message: Optional[str] = None, **kwargs: Any) -> None: + certificate_authority: Optional["_models.IstioCertificateAuthority"] = None, + revisions: Optional[list[str]] = None, + **kwargs: Any + ) -> None: """ - :keyword expression: The CEL expression used to validate the claim or attribute. Required. - :paramtype expression: str - :keyword message: The validation error message. - :paramtype message: str + :keyword components: Istio components configuration. + :paramtype components: ~azure.mgmt.containerservice.models.IstioComponents + :keyword certificate_authority: Istio Service Mesh Certificate Authority (CA) configuration. + For now, we only support plugin certificates as described here https://aka.ms/asm-plugin-ca. + :paramtype certificate_authority: ~azure.mgmt.containerservice.models.IstioCertificateAuthority + :keyword revisions: The list of revisions of the Istio control plane. When an upgrade is not in + progress, this holds one value. When canary upgrade is in progress, this can only hold two + consecutive values. For more information, see: + https://learn.microsoft.com/en-us/azure/aks/istio-upgrade. + :paramtype revisions: list[str] """ super().__init__(**kwargs) - self.expression = expression - self.message = message + self.components = components + self.certificate_authority = certificate_authority + self.revisions = revisions class KubeletConfig(_serialization.Model): @@ -3797,10 +2426,6 @@ class KubeletConfig(_serialization.Model): :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 """ _validation = { @@ -3819,7 +2444,6 @@ class KubeletConfig(_serialization.Model): "container_log_max_size_mb": {"key": "containerLogMaxSizeMB", "type": "int"}, "container_log_max_files": {"key": "containerLogMaxFiles", "type": "int"}, "pod_max_pids": {"key": "podMaxPids", "type": "int"}, - "seccomp_default": {"key": "seccompDefault", "type": "str"}, } def __init__( @@ -3836,7 +2460,6 @@ def __init__( 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, **kwargs: Any ) -> None: """ @@ -3878,10 +2501,6 @@ def __init__( :paramtype container_log_max_files: int :keyword pod_max_pids: The maximum number of processes per pod. :paramtype pod_max_pids: int - :keyword 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". - :paramtype seccomp_default: str or ~azure.mgmt.containerservice.models.SeccompDefault """ super().__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy @@ -3895,7 +2514,6 @@ def __init__( self.container_log_max_size_mb = container_log_max_size_mb self.container_log_max_files = container_log_max_files self.pod_max_pids = pod_max_pids - self.seccomp_default = seccomp_default class KubernetesPatchVersion(_serialization.Model): @@ -3918,37 +2536,6 @@ def __init__(self, *, upgrades: Optional[list[str]] = None, **kwargs: Any) -> No self.upgrades = upgrades -class KubernetesResourceObjectEncryptionProfile(_serialization.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 - """ - - _attribute_map = { - "infrastructure_encryption": {"key": "infrastructureEncryption", "type": "str"}, - } - - def __init__( - self, *, infrastructure_encryption: Union[str, "_models.InfrastructureEncryption"] = "Disabled", **kwargs: Any - ) -> None: - """ - :keyword 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". - :paramtype infrastructure_encryption: str or - ~azure.mgmt.containerservice.models.InfrastructureEncryption - """ - super().__init__(**kwargs) - self.infrastructure_encryption = infrastructure_encryption - - class KubernetesVersion(_serialization.Model): """Kubernetes version profile for given major.minor release. @@ -4045,91 +2632,6 @@ def __init__(self, *, values: Optional[list["_models.KubernetesVersion"]] = None self.values = values -class LabelSelector(_serialization.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] - """ - - _attribute_map = { - "match_labels": {"key": "matchLabels", "type": "[str]"}, - "match_expressions": {"key": "matchExpressions", "type": "[LabelSelectorRequirement]"}, - } - - def __init__( - self, - *, - match_labels: Optional[list[str]] = None, - match_expressions: Optional[list["_models.LabelSelectorRequirement"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype match_labels: list[str] - :keyword match_expressions: matchExpressions is a list of label selector requirements. The - requirements are ANDed. - :paramtype match_expressions: - list[~azure.mgmt.containerservice.models.LabelSelectorRequirement] - """ - super().__init__(**kwargs) - self.match_labels = match_labels - self.match_expressions = match_expressions - - -class LabelSelectorRequirement(_serialization.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", "DoesNotExist", and "In". - :vartype operator: str or ~azure.mgmt.containerservice.models.Operator - :ivar values: values is an array of string values, the values array must be non-empty. - :vartype values: list[str] - """ - - _attribute_map = { - "key": {"key": "key", "type": "str"}, - "operator": {"key": "operator", "type": "str"}, - "values": {"key": "values", "type": "[str]"}, - } - - def __init__( - self, - *, - key: Optional[str] = None, - operator: Optional[Union[str, "_models.Operator"]] = None, - values: Optional[list[str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword key: key is the label key that the selector applies to. - :paramtype key: str - :keyword operator: operator represents a key's relationship to a set of values. Valid operators - are In and NotIn. Known values are: "In", "NotIn", "Exists", "DoesNotExist", and "In". - :paramtype operator: str or ~azure.mgmt.containerservice.models.Operator - :keyword values: values is an array of string values, the values array must be non-empty. - :paramtype values: list[str] - """ - super().__init__(**kwargs) - self.key = key - self.operator = operator - self.values = values - - class LinuxOSConfig(_serialization.Model): """OS configurations of Linux agent nodes. See `AKS custom node configuration `_ for more details. @@ -4191,140 +2693,6 @@ def __init__( self.swap_file_size_mb = swap_file_size_mb -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. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 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. - :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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "provisioning_state": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "primary_agent_pool_name": {"key": "properties.primaryAgentPoolName", "type": "str"}, - "allow_service_placement": {"key": "properties.allowServicePlacement", "type": "bool"}, - "service_label_selector": {"key": "properties.serviceLabelSelector", "type": "LabelSelector"}, - "service_namespace_selector": {"key": "properties.serviceNamespaceSelector", "type": "LabelSelector"}, - "node_selector": {"key": "properties.nodeSelector", "type": "LabelSelector"}, - "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, - } - - def __init__( - self, - *, - primary_agent_pool_name: Optional[str] = None, - 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, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype primary_agent_pool_name: str - :keyword 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. - :paramtype allow_service_placement: bool - :keyword service_label_selector: Only services that must match this selector can be placed on - this load balancer. - :paramtype service_label_selector: ~azure.mgmt.containerservice.models.LabelSelector - :keyword service_namespace_selector: Services created in namespaces that match the selector can - be placed on this load balancer. - :paramtype service_namespace_selector: ~azure.mgmt.containerservice.models.LabelSelector - :keyword node_selector: Nodes that match this selector will be possible members of this load - balancer. - :paramtype node_selector: ~azure.mgmt.containerservice.models.LabelSelector - """ - super().__init__(**kwargs) - self.primary_agent_pool_name = primary_agent_pool_name - self.allow_service_placement = allow_service_placement - self.service_label_selector = service_label_selector - self.service_namespace_selector = service_namespace_selector - self.node_selector = node_selector - self.provisioning_state: Optional[str] = None - - -class LoadBalancerListResult(_serialization.Model): - """The response from the List Load Balancers operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of Load Balancers. - :vartype value: list[~azure.mgmt.containerservice.models.LoadBalancer] - :ivar next_link: The URL to get the next set of load balancer results. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[LoadBalancer]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.LoadBalancer"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of Load Balancers. - :paramtype value: list[~azure.mgmt.containerservice.models.LoadBalancer] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - class LocalDNSOverride(_serialization.Model): """Overrides for localDNS profile. @@ -4479,9 +2847,9 @@ def __init__( class Machine(SubResource): - """A machine provides detailed information about its configuration and status. 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. + """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. Variables are only populated by the server, and will be ignored when sending a request. @@ -4502,6 +2870,8 @@ class Machine(SubResource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, + "zones": {"readonly": True}, + "properties": {"readonly": True}, } _attribute_map = { @@ -4512,68 +2882,11 @@ class Machine(SubResource): "properties": {"key": "properties", "type": "MachineProperties"}, } - def __init__( - self, - *, - zones: Optional[list[str]] = None, - properties: Optional["_models.MachineProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword zones: The Availability zone in which machine is located. - :paramtype zones: list[str] - :keyword properties: The properties of the machine. - :paramtype properties: ~azure.mgmt.containerservice.models.MachineProperties - """ - super().__init__(**kwargs) - self.zones = zones - self.properties = properties - - -class MachineHardwareProfile(_serialization.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 - """ - - _attribute_map = { - "vm_size": {"key": "vmSize", "type": "str"}, - "gpu_instance_profile": {"key": "gpuInstanceProfile", "type": "str"}, - "gpu_profile": {"key": "gpuProfile", "type": "GPUProfile"}, - } - - def __init__( - self, - *, - vm_size: Optional[str] = None, - gpu_instance_profile: Optional[Union[str, "_models.GPUInstanceProfile"]] = None, - gpu_profile: Optional["_models.GPUProfile"] = None, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype vm_size: str - :keyword gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance - profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and - "MIG7g". - :paramtype gpu_instance_profile: str or ~azure.mgmt.containerservice.models.GPUInstanceProfile - :keyword gpu_profile: The GPU settings of the machine. - :paramtype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - """ + def __init__(self, **kwargs: Any) -> None: + """ """ super().__init__(**kwargs) - self.vm_size = vm_size - self.gpu_instance_profile = gpu_instance_profile - self.gpu_profile = gpu_profile + self.zones: Optional[list[str]] = None + self.properties: Optional["_models.MachineProperties"] = None class MachineIpAddress(_serialization.Model): @@ -4583,145 +2896,26 @@ class MachineIpAddress(_serialization.Model): :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 + :vartype family: str or ~azure.mgmt.containerservice.models.IpFamily :ivar ip: IPv4 or IPv6 address of the machine. :vartype ip: str """ _validation = { - "family": {"readonly": True}, - "ip": {"readonly": True}, - } - - _attribute_map = { - "family": {"key": "family", "type": "str"}, - "ip": {"key": "ip", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.family: Optional[Union[str, "_models.IPFamily"]] = None - self.ip: Optional[str] = None - - -class MachineKubernetesProfile(_serialization.Model): - """The Kubernetes configurations used by the machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :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 - """ - - _validation = { - "current_orchestrator_version": {"readonly": True}, - "node_name": {"readonly": True}, - } - - _attribute_map = { - "node_labels": {"key": "nodeLabels", "type": "{str}"}, - "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, - "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, - "kubelet_disk_type": {"key": "kubeletDiskType", "type": "str"}, - "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, - "node_initialization_taints": {"key": "nodeInitializationTaints", "type": "[str]"}, - "node_taints": {"key": "nodeTaints", "type": "[str]"}, - "max_pods": {"key": "maxPods", "type": "int"}, - "node_name": {"key": "nodeName", "type": "str"}, - "workload_runtime": {"key": "workloadRuntime", "type": "str"}, - "artifact_streaming_profile": {"key": "artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile"}, - } - - 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, - **kwargs: Any - ) -> None: - """ - :keyword node_labels: The node labels on the machine. - :paramtype node_labels: dict[str, str] - :keyword 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. - :paramtype orchestrator_version: str - :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime - data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". - :paramtype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType - :keyword kubelet_config: The Kubelet configuration on the machine. - :paramtype kubelet_config: ~azure.mgmt.containerservice.models.KubeletConfig - :keyword 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-``. - :paramtype node_initialization_taints: list[str] - :keyword node_taints: The taints added to new node during machine create. For example, - key=value:NoSchedule. - :paramtype node_taints: list[str] - :keyword max_pods: The maximum number of pods that can run on a node. - :paramtype max_pods: int - :keyword workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". - :paramtype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime - :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile - """ + "family": {"readonly": True}, + "ip": {"readonly": True}, + } + + _attribute_map = { + "family": {"key": "family", "type": "str"}, + "ip": {"key": "ip", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ super().__init__(**kwargs) - self.node_labels = node_labels - self.orchestrator_version = orchestrator_version - self.current_orchestrator_version: Optional[str] = None - self.kubelet_disk_type = kubelet_disk_type - self.kubelet_config = kubelet_config - self.node_initialization_taints = node_initialization_taints - self.node_taints = node_taints - self.max_pods = max_pods - self.node_name: Optional[str] = None - self.workload_runtime = workload_runtime - self.artifact_streaming_profile = artifact_streaming_profile + self.family: Optional[Union[str, "_models.IpFamily"]] = None + self.ip: Optional[str] = None class MachineListResult(_serialization.Model): @@ -4729,10 +2923,10 @@ class MachineListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of Machines in cluster. - :vartype value: list[~azure.mgmt.containerservice.models.Machine] :ivar next_link: The URL to get the next set of machine results. :vartype next_link: str + :ivar value: The list of Machines in cluster. + :vartype value: list[~azure.mgmt.containerservice.models.Machine] """ _validation = { @@ -4740,8 +2934,8 @@ class MachineListResult(_serialization.Model): } _attribute_map = { - "value": {"key": "value", "type": "[Machine]"}, "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[Machine]"}, } def __init__(self, *, value: Optional[list["_models.Machine"]] = None, **kwargs: Any) -> None: @@ -4750,39 +2944,17 @@ def __init__(self, *, value: Optional[list["_models.Machine"]] = None, **kwargs: :paramtype value: list[~azure.mgmt.containerservice.models.Machine] """ super().__init__(**kwargs) - self.value = value self.next_link: Optional[str] = None + self.value = value class MachineNetworkProperties(_serialization.Model): - """The network properties of the machine. + """network properties of the machine. Variables are only populated by the server, and will be ignored when sending a request. :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] """ _validation = { @@ -4791,186 +2963,12 @@ class MachineNetworkProperties(_serialization.Model): _attribute_map = { "ip_addresses": {"key": "ipAddresses", "type": "[MachineIpAddress]"}, - "vnet_subnet_id": {"key": "vnetSubnetID", "type": "str"}, - "pod_subnet_id": {"key": "podSubnetID", "type": "str"}, - "enable_node_public_ip": {"key": "enableNodePublicIP", "type": "bool"}, - "node_public_ip_prefix_id": {"key": "nodePublicIPPrefixID", "type": "str"}, - "node_public_ip_tags": {"key": "nodePublicIPTags", "type": "[IPTag]"}, } - 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, - **kwargs: Any - ) -> None: - """ - :keyword 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}. - :paramtype vnet_subnet_id: str - :keyword 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}. - :paramtype pod_subnet_id: str - :keyword 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. - :paramtype enable_node_public_ip: bool - :keyword 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}. - :paramtype node_public_ip_prefix_id: str - :keyword node_public_ip_tags: IPTags of instance-level public IPs. - :paramtype node_public_ip_tags: list[~azure.mgmt.containerservice.models.IPTag] - """ + def __init__(self, **kwargs: Any) -> None: + """ """ super().__init__(**kwargs) self.ip_addresses: Optional[list["_models.MachineIpAddress"]] = None - self.vnet_subnet_id = vnet_subnet_id - self.pod_subnet_id = pod_subnet_id - self.enable_node_public_ip = enable_node_public_ip - self.node_public_ip_prefix_id = node_public_ip_prefix_id - self.node_public_ip_tags = node_public_ip_tags - - -class MachineOSProfile(_serialization.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", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", 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 - """ - - _validation = { - "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, - } - - _attribute_map = { - "os_type": {"key": "osType", "type": "str"}, - "os_sku": {"key": "osSKU", "type": "str"}, - "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, - "os_disk_type": {"key": "osDiskType", "type": "str"}, - "enable_fips": {"key": "enableFIPS", "type": "bool"}, - "linux_profile": {"key": "linuxProfile", "type": "MachineOSProfileLinuxProfile"}, - "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, - } - - def __init__( - self, - *, - os_type: Union[str, "_models.OSType"] = "Linux", - 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, - **kwargs: Any - ) -> None: - """ - :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" - and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.models.OSType - :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is - Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be - changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". - :paramtype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU - :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every - machine in the master/agent pool. If you specify 0, it will apply the default osDisk size - according to the vmSize specified. - :paramtype os_disk_size_gb: int - :keyword os_disk_type: The 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". - :paramtype os_disk_type: str or ~azure.mgmt.containerservice.models.OSDiskType - :keyword enable_fips: Whether to use a FIPS-enabled OS. - :paramtype enable_fips: bool - :keyword linux_profile: The Linux machine's specific profile. - :paramtype linux_profile: ~azure.mgmt.containerservice.models.MachineOSProfileLinuxProfile - :keyword windows_profile: The Windows machine's specific profile. - :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile - """ - super().__init__(**kwargs) - self.os_type = os_type - self.os_sku = os_sku - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type - self.enable_fips = enable_fips - self.linux_profile = linux_profile - self.windows_profile = windows_profile - - -class MachineOSProfileLinuxProfile(_serialization.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 - """ - - _attribute_map = { - "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, - "message_of_the_day": {"key": "messageOfTheDay", "type": "str"}, - } - - def __init__( - self, - *, - linux_os_config: Optional["_models.LinuxOSConfig"] = None, - message_of_the_day: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword linux_os_config: The OS configuration of Linux machine. - :paramtype linux_os_config: ~azure.mgmt.containerservice.models.LinuxOSConfig - :keyword 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). - :paramtype message_of_the_day: str - """ - super().__init__(**kwargs) - self.linux_os_config = linux_os_config - self.message_of_the_day = message_of_the_day class MachineProperties(_serialization.Model): @@ -4978,159 +2976,28 @@ class MachineProperties(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar network: The network properties of the machine. + :ivar network: network properties of the machine. :vartype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties - :ivar resource_id: Arm resource id of the machine. It can be used to GET underlying VM + :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.AgentPoolSecurityProfile - :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 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 """ _validation = { + "network": {"readonly": True}, "resource_id": {"readonly": True}, - "node_image_version": {"readonly": True}, - "provisioning_state": {"readonly": True}, - "e_tag": {"readonly": True}, - "status": {"readonly": True}, } _attribute_map = { "network": {"key": "network", "type": "MachineNetworkProperties"}, "resource_id": {"key": "resourceId", "type": "str"}, - "hardware": {"key": "hardware", "type": "MachineHardwareProfile"}, - "operating_system": {"key": "operatingSystem", "type": "MachineOSProfile"}, - "kubernetes": {"key": "kubernetes", "type": "MachineKubernetesProfile"}, - "mode": {"key": "mode", "type": "str"}, - "security": {"key": "security", "type": "AgentPoolSecurityProfile"}, - "priority": {"key": "priority", "type": "str"}, - "node_image_version": {"key": "nodeImageVersion", "type": "str"}, - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "tags": {"key": "tags", "type": "{str}"}, - "e_tag": {"key": "eTag", "type": "str"}, - "status": {"key": "status", "type": "MachineStatus"}, - } - - 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.AgentPoolSecurityProfile"] = None, - priority: Union[str, "_models.ScaleSetPriority"] = "Regular", - tags: Optional[dict[str, str]] = None, - **kwargs: Any - ) -> None: - """ - :keyword network: The network properties of the machine. - :paramtype network: ~azure.mgmt.containerservice.models.MachineNetworkProperties - :keyword hardware: The hardware and GPU settings of the machine. - :paramtype hardware: ~azure.mgmt.containerservice.models.MachineHardwareProfile - :keyword operating_system: The operating system and disk used by the machine. - :paramtype operating_system: ~azure.mgmt.containerservice.models.MachineOSProfile - :keyword kubernetes: The Kubernetes configurations used by the machine. - :paramtype kubernetes: ~azure.mgmt.containerservice.models.MachineKubernetesProfile - :keyword mode: Machine only allows 'System' and 'User' mode. Known values are: "System", - "User", "Gateway", "ManagedSystem", and "Machines". - :paramtype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode - :keyword security: The security settings of the machine. - :paramtype security: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :keyword priority: The priority for the machine. If not specified, the default is 'Regular'. - Known values are: "Spot" and "Regular". - :paramtype priority: str or ~azure.mgmt.containerservice.models.ScaleSetPriority - :keyword tags: The tags to be persisted on the machine. - :paramtype tags: dict[str, str] - """ - super().__init__(**kwargs) - self.network = network - self.resource_id: Optional[str] = None - self.hardware = hardware - self.operating_system = operating_system - self.kubernetes = kubernetes - self.mode = mode - self.security = security - self.priority = priority - self.node_image_version: Optional[str] = None - self.provisioning_state: Optional[str] = None - self.tags = tags - self.e_tag: Optional[str] = None - self.status: Optional["_models.MachineStatus"] = None - - -class MachineStatus(_serialization.Model): - """Contains read-only information about the machine. - - Variables are only populated by the server, and will be ignored when sending a request. - - :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 - """ - - _validation = { - "provisioning_error": {"readonly": True}, - "creation_timestamp": {"readonly": True}, - "drift_action": {"readonly": True}, - "drift_reason": {"readonly": True}, - "vm_state": {"readonly": True}, - } - - _attribute_map = { - "provisioning_error": {"key": "provisioningError", "type": "ErrorDetail"}, - "creation_timestamp": {"key": "creationTimestamp", "type": "iso-8601"}, - "drift_action": {"key": "driftAction", "type": "str"}, - "drift_reason": {"key": "driftReason", "type": "str"}, - "vm_state": {"key": "vmState", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provisioning_error: Optional["_models.ErrorDetail"] = None - self.creation_timestamp: Optional[datetime.datetime] = None - self.drift_action: Optional[Union[str, "_models.DriftAction"]] = None - self.drift_reason: Optional[str] = None - self.vm_state: Optional[Union[str, "_models.VmState"]] = None + self.network: Optional["_models.MachineNetworkProperties"] = None + self.resource_id: Optional[str] = None class MaintenanceConfiguration(SubResource): @@ -5308,12 +3175,53 @@ def __init__( :paramtype not_allowed_dates: list[~azure.mgmt.containerservice.models.DateSpan] """ super().__init__(**kwargs) - self.schedule = schedule - self.duration_hours = duration_hours - self.utc_offset = utc_offset - self.start_date = start_date - self.start_time = start_time - self.not_allowed_dates = not_allowed_dates + self.schedule = schedule + self.duration_hours = duration_hours + self.utc_offset = utc_offset + self.start_date = start_date + self.start_time = start_time + self.not_allowed_dates = not_allowed_dates + + +class Resource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None class TrackedResource(Resource): @@ -5410,19 +3318,22 @@ class ManagedCluster(TrackedResource): :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 the Managed Cluster is requested to run. - When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All - upgrades must be performed sequentially by major version number. For example, upgrades between - 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See - `upgrading an AKS cluster `_ for more - details. + :ivar kubernetes_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 + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. When you upgrade a + supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be + performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x + or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See `upgrading an AKS + cluster `_ for more details. :vartype kubernetes_version: str - :ivar current_kubernetes_version: The version of Kubernetes the Managed Cluster is running. + :ivar current_kubernetes_version: The version of Kubernetes the Managed Cluster is running. If + kubernetesVersion was a fully specified version , this field will be exactly + equal to it. If kubernetesVersion was , this field will contain the full + version being used. :vartype current_kubernetes_version: str :ivar dns_prefix: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. @@ -5464,7 +3375,7 @@ class ManagedCluster(TrackedResource): ~azure.mgmt.containerservice.models.ManagedClusterOIDCIssuerProfile :ivar node_resource_group: The name of the resource group containing agent pool nodes. :vartype node_resource_group: str - :ivar node_resource_group_profile: The node resource group configuration profile. + :ivar node_resource_group_profile: Profile of the node resource group configuration. :vartype node_resource_group_profile: ~azure.mgmt.containerservice.models.ManagedClusterNodeResourceGroupProfile :ivar enable_rbac: Whether to enable Kubernetes Role-Based Access Control. @@ -5472,11 +3383,6 @@ class ManagedCluster(TrackedResource): :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. @@ -5517,12 +3423,12 @@ class ManagedCluster(TrackedResource): :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: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfile - :ivar azure_monitor_profile: Prometheus addon profile for the container service cluster. + :ivar azure_monitor_profile: Azure Monitor addon profiles for monitoring the managed cluster. :vartype azure_monitor_profile: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile :ivar service_mesh_profile: Service mesh profile for a managed cluster. @@ -5532,21 +3438,15 @@ class ManagedCluster(TrackedResource): :vartype resource_uid: str :ivar metrics_profile: Optional cluster metrics configuration. :vartype metrics_profile: ~azure.mgmt.containerservice.models.ManagedClusterMetricsProfile - :ivar ai_toolchain_operator_profile: AI toolchain operator settings that apply to the whole - cluster. - :vartype ai_toolchain_operator_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile :ivar node_provisioning_profile: Node provisioning settings that apply to the whole cluster. :vartype node_provisioning_profile: ~azure.mgmt.containerservice.models.ManagedClusterNodeProvisioningProfile :ivar bootstrap_profile: Profile of the cluster bootstrap configuration. :vartype bootstrap_profile: ~azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile - :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 ai_toolchain_operator_profile: AI toolchain operator settings that apply to the whole + cluster. + :vartype ai_toolchain_operator_profile: + ~azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile :ivar status: Contains read-only information about the Managed Cluster. :vartype status: ~azure.mgmt.containerservice.models.ManagedClusterStatus """ @@ -5582,7 +3482,6 @@ class ManagedCluster(TrackedResource): "kind": {"key": "kind", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "power_state": {"key": "properties.powerState", "type": "PowerState"}, - "creation_data": {"key": "properties.creationData", "type": "CreationData"}, "max_agent_pools": {"key": "properties.maxAgentPools", "type": "int"}, "kubernetes_version": {"key": "properties.kubernetesVersion", "type": "str"}, "current_kubernetes_version": {"key": "properties.currentKubernetesVersion", "type": "str"}, @@ -5608,7 +3507,6 @@ class ManagedCluster(TrackedResource): }, "enable_rbac": {"key": "properties.enableRBAC", "type": "bool"}, "support_plan": {"key": "properties.supportPlan", "type": "str"}, - "enable_namespace_resources": {"key": "properties.enableNamespaceResources", "type": "bool"}, "network_profile": {"key": "properties.networkProfile", "type": "ContainerServiceNetworkProfile"}, "aad_profile": {"key": "properties.aadProfile", "type": "ManagedClusterAADProfile"}, "auto_upgrade_profile": {"key": "properties.autoUpgradeProfile", "type": "ManagedClusterAutoUpgradeProfile"}, @@ -5638,17 +3536,15 @@ class ManagedCluster(TrackedResource): "service_mesh_profile": {"key": "properties.serviceMeshProfile", "type": "ServiceMeshProfile"}, "resource_uid": {"key": "properties.resourceUID", "type": "str"}, "metrics_profile": {"key": "properties.metricsProfile", "type": "ManagedClusterMetricsProfile"}, - "ai_toolchain_operator_profile": { - "key": "properties.aiToolchainOperatorProfile", - "type": "ManagedClusterAIToolchainOperatorProfile", - }, "node_provisioning_profile": { "key": "properties.nodeProvisioningProfile", "type": "ManagedClusterNodeProvisioningProfile", }, "bootstrap_profile": {"key": "properties.bootstrapProfile", "type": "ManagedClusterBootstrapProfile"}, - "scheduler_profile": {"key": "properties.schedulerProfile", "type": "SchedulerProfile"}, - "hosted_system_profile": {"key": "properties.hostedSystemProfile", "type": "ManagedClusterHostedSystemProfile"}, + "ai_toolchain_operator_profile": { + "key": "properties.aiToolchainOperatorProfile", + "type": "ManagedClusterAIToolchainOperatorProfile", + }, "status": {"key": "properties.status", "type": "ManagedClusterStatus"}, } @@ -5661,7 +3557,6 @@ def __init__( # pylint: disable=too-many-locals extended_location: Optional["_models.ExtendedLocation"] = None, identity: Optional["_models.ManagedClusterIdentity"] = None, kind: Optional[str] = None, - creation_data: Optional["_models.CreationData"] = None, kubernetes_version: Optional[str] = None, dns_prefix: Optional[str] = None, fqdn_subdomain: Optional[str] = None, @@ -5676,7 +3571,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, @@ -5696,11 +3590,9 @@ def __init__( # pylint: disable=too-many-locals azure_monitor_profile: Optional["_models.ManagedClusterAzureMonitorProfile"] = None, service_mesh_profile: Optional["_models.ServiceMeshProfile"] = None, metrics_profile: Optional["_models.ManagedClusterMetricsProfile"] = None, - ai_toolchain_operator_profile: Optional["_models.ManagedClusterAIToolchainOperatorProfile"] = None, node_provisioning_profile: Optional["_models.ManagedClusterNodeProvisioningProfile"] = None, bootstrap_profile: Optional["_models.ManagedClusterBootstrapProfile"] = None, - scheduler_profile: Optional["_models.SchedulerProfile"] = None, - hosted_system_profile: Optional["_models.ManagedClusterHostedSystemProfile"] = None, + ai_toolchain_operator_profile: Optional["_models.ManagedClusterAIToolchainOperatorProfile"] = None, status: Optional["_models.ManagedClusterStatus"] = None, **kwargs: Any ) -> None: @@ -5718,15 +3610,15 @@ def __init__( # pylint: disable=too-many-locals :keyword kind: This is primarily used to expose different UI experiences in the portal for different kinds. :paramtype kind: str - :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the - cluster will be created/upgraded using a snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.models.CreationData - :keyword kubernetes_version: The version of Kubernetes the Managed Cluster is requested to run. - When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All - upgrades must be performed sequentially by major version number. For example, upgrades between - 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See - `upgrading an AKS cluster `_ for more - details. + :keyword kubernetes_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 + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. When you upgrade a + supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be + performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x + or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See `upgrading an AKS + cluster `_ for more details. :paramtype kubernetes_version: str :keyword dns_prefix: The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. @@ -5758,7 +3650,7 @@ def __init__( # pylint: disable=too-many-locals ~azure.mgmt.containerservice.models.ManagedClusterOIDCIssuerProfile :keyword node_resource_group: The name of the resource group containing agent pool nodes. :paramtype node_resource_group: str - :keyword node_resource_group_profile: The node resource group configuration profile. + :keyword node_resource_group_profile: Profile of the node resource group configuration. :paramtype node_resource_group_profile: ~azure.mgmt.containerservice.models.ManagedClusterNodeResourceGroupProfile :keyword enable_rbac: Whether to enable Kubernetes Role-Based Access Control. @@ -5766,11 +3658,6 @@ def __init__( # pylint: disable=too-many-locals :keyword support_plan: The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. Known values are: "KubernetesOfficial" and "AKSLongTermSupport". :paramtype support_plan: str or ~azure.mgmt.containerservice.models.KubernetesSupportPlan - :keyword 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. - :paramtype enable_namespace_resources: bool :keyword network_profile: The network configuration profile. :paramtype network_profile: ~azure.mgmt.containerservice.models.ContainerServiceNetworkProfile :keyword aad_profile: The Azure Active Directory configuration. @@ -5814,35 +3701,30 @@ def __init__( # pylint: disable=too-many-locals :keyword ingress_profile: Ingress profile for the managed cluster. :paramtype ingress_profile: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfile :keyword 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". :paramtype public_network_access: str or ~azure.mgmt.containerservice.models.PublicNetworkAccess :keyword workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. :paramtype workload_auto_scaler_profile: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfile - :keyword azure_monitor_profile: Prometheus addon profile for the container service cluster. + :keyword azure_monitor_profile: Azure Monitor addon profiles for monitoring the managed + cluster. :paramtype azure_monitor_profile: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfile :keyword service_mesh_profile: Service mesh profile for a managed cluster. :paramtype service_mesh_profile: ~azure.mgmt.containerservice.models.ServiceMeshProfile :keyword metrics_profile: Optional cluster metrics configuration. :paramtype metrics_profile: ~azure.mgmt.containerservice.models.ManagedClusterMetricsProfile - :keyword ai_toolchain_operator_profile: AI toolchain operator settings that apply to the whole - cluster. - :paramtype ai_toolchain_operator_profile: - ~azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile :keyword node_provisioning_profile: Node provisioning settings that apply to the whole cluster. :paramtype node_provisioning_profile: ~azure.mgmt.containerservice.models.ManagedClusterNodeProvisioningProfile :keyword bootstrap_profile: Profile of the cluster bootstrap configuration. :paramtype bootstrap_profile: ~azure.mgmt.containerservice.models.ManagedClusterBootstrapProfile - :keyword scheduler_profile: Profile of the pod scheduler configuration. - :paramtype scheduler_profile: ~azure.mgmt.containerservice.models.SchedulerProfile - :keyword hosted_system_profile: Settings for hosted system addons. For more information, see - https://aka.ms/aks/automatic/systemcomponents. - :paramtype hosted_system_profile: - ~azure.mgmt.containerservice.models.ManagedClusterHostedSystemProfile + :keyword ai_toolchain_operator_profile: AI toolchain operator settings that apply to the whole + cluster. + :paramtype ai_toolchain_operator_profile: + ~azure.mgmt.containerservice.models.ManagedClusterAIToolchainOperatorProfile :keyword status: Contains read-only information about the Managed Cluster. :paramtype status: ~azure.mgmt.containerservice.models.ManagedClusterStatus """ @@ -5854,7 +3736,6 @@ def __init__( # pylint: disable=too-many-locals self.kind = kind self.provisioning_state: Optional[str] = None self.power_state: Optional["_models.PowerState"] = None - self.creation_data = creation_data self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version self.current_kubernetes_version: Optional[str] = None @@ -5874,7 +3755,6 @@ def __init__( # pylint: disable=too-many-locals self.node_resource_group_profile = node_resource_group_profile self.enable_rbac = enable_rbac self.support_plan = support_plan - self.enable_namespace_resources = enable_namespace_resources self.network_profile = network_profile self.aad_profile = aad_profile self.auto_upgrade_profile = auto_upgrade_profile @@ -5895,11 +3775,9 @@ def __init__( # pylint: disable=too-many-locals self.service_mesh_profile = service_mesh_profile self.resource_uid: Optional[str] = None self.metrics_profile = metrics_profile - self.ai_toolchain_operator_profile = ai_toolchain_operator_profile self.node_provisioning_profile = node_provisioning_profile self.bootstrap_profile = bootstrap_profile - self.scheduler_profile = scheduler_profile - self.hosted_system_profile = hosted_system_profile + self.ai_toolchain_operator_profile = ai_toolchain_operator_profile self.status = status @@ -6168,7 +4046,7 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.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 @@ -6195,11 +4073,10 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :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", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :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", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :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 @@ -6216,37 +4093,29 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :vartype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", 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 - and are supported. When is specified, the - latest supported patch version is chosen automatically. Updating the agent pool with the same - once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :vartype orchestrator_version: str - :ivar current_orchestrator_version: The version of Kubernetes running on the Agent Pool. If - orchestratorVersion was a fully specified version , this field will be - exactly equal to it. If orchestratorVersion was , this field will contain the full + :ivar current_orchestrator_version: The version of Kubernetes the Agent Pool is running. If + orchestratorVersion is a fully specified version , this field will be + exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_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 upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy is - set to Rolling. + :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 @@ -6289,14 +4158,6 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.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. @@ -6329,41 +4190,35 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): For more information see `Azure dedicated hosts `_. :vartype host_group_id: str - :ivar windows_profile: The Windows agent pool's specific profile. - :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :ivar gpu_profile: The GPU settings of an agent pool. + :ivar gpu_profile: GPU settings for the Agent Pool. :vartype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :ivar virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :vartype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. :vartype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :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 - :ivar node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :vartype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile """ _validation = { "e_tag": {"readonly": True}, "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, "provisioning_state": {"readonly": True}, } @@ -6391,9 +4246,7 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, "node_image_version": {"key": "nodeImageVersion", "type": "str"}, - "upgrade_strategy": {"key": "upgradeStrategy", "type": "str"}, "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, - "upgrade_settings_blue_green": {"key": "upgradeSettingsBlueGreen", "type": "AgentPoolBlueGreenUpgradeSettings"}, "provisioning_state": {"key": "provisioningState", "type": "str"}, "power_state": {"key": "powerState", "type": "PowerState"}, "availability_zones": {"key": "availabilityZones", "type": "[str]"}, @@ -6405,7 +4258,6 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, "node_labels": {"key": "nodeLabels", "type": "{str}"}, "node_taints": {"key": "nodeTaints", "type": "[str]"}, - "node_initialization_taints": {"key": "nodeInitializationTaints", "type": "[str]"}, "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, @@ -6416,17 +4268,15 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): "creation_data": {"key": "creationData", "type": "CreationData"}, "capacity_reservation_group_id": {"key": "capacityReservationGroupID", "type": "str"}, "host_group_id": {"key": "hostGroupID", "type": "str"}, - "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, + "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "security_profile": {"key": "securityProfile", "type": "AgentPoolSecurityProfile"}, "gpu_profile": {"key": "gpuProfile", "type": "GPUProfile"}, - "artifact_streaming_profile": {"key": "artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile"}, + "gateway_profile": {"key": "gatewayProfile", "type": "AgentPoolGatewayProfile"}, "virtual_machines_profile": {"key": "virtualMachinesProfile", "type": "VirtualMachinesProfile"}, "virtual_machine_nodes_status": {"key": "virtualMachineNodesStatus", "type": "[VirtualMachineNodes]"}, - "gateway_profile": {"key": "gatewayProfile", "type": "AgentPoolGatewayProfile"}, "status": {"key": "status", "type": "AgentPoolStatus"}, "local_dns_profile": {"key": "localDNSProfile", "type": "LocalDNSProfile"}, - "node_customization_profile": {"key": "nodeCustomizationProfile", "type": "NodeCustomizationProfile"}, } def __init__( # pylint: disable=too-many-locals @@ -6452,10 +4302,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, 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, @@ -6466,7 +4313,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, @@ -6477,17 +4323,15 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, gpu_profile: Optional["_models.GPUProfile"] = None, - artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, + gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, - gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - node_customization_profile: Optional["_models.NodeCustomizationProfile"] = None, **kwargs: Any ) -> None: """ @@ -6515,7 +4359,7 @@ def __init__( # pylint: disable=too-many-locals data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :paramtype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :keyword 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 @@ -6543,11 +4387,10 @@ def __init__( # pylint: disable=too-many-locals :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". :paramtype os_type: str or ~azure.mgmt.containerservice.models.OSType - :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is - Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be - changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :paramtype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int @@ -6564,32 +4407,22 @@ def __init__( # pylint: disable=too-many-locals :paramtype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :keyword mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and + "Gateway". :paramtype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :keyword 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. Updating the agent pool with the - same once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :paramtype orchestrator_version: str - :keyword node_image_version: The version of node image. - :paramtype node_image_version: str - :keyword upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :paramtype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :keyword upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy - is set to Rolling. + :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :keyword upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :paramtype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :keyword power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An @@ -6632,14 +4465,6 @@ def __init__( # pylint: disable=too-many-locals :keyword node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :paramtype node_taints: list[str] - :keyword 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-``. - :paramtype node_initialization_taints: list[str] :keyword proximity_placement_group_id: The ID for Proximity Placement Group. :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -6673,35 +4498,28 @@ def __init__( # pylint: disable=too-many-locals For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str - :keyword windows_profile: The Windows agent pool's specific profile. - :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :keyword gpu_profile: The GPU settings of an agent pool. + :keyword gpu_profile: GPU settings for the Agent Pool. :paramtype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :keyword virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :paramtype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. :paramtype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :keyword 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. :paramtype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :keyword node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :paramtype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile """ super().__init__(**kwargs) self.e_tag: Optional[str] = None @@ -6726,10 +4544,8 @@ def __init__( # pylint: disable=too-many-locals self.mode = mode self.orchestrator_version = orchestrator_version self.current_orchestrator_version: Optional[str] = None - self.node_image_version = node_image_version - self.upgrade_strategy = upgrade_strategy + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.upgrade_settings_blue_green = upgrade_settings_blue_green self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones @@ -6741,7 +4557,6 @@ def __init__( # pylint: disable=too-many-locals self.tags = tags self.node_labels = node_labels self.node_taints = node_taints - self.node_initialization_taints = node_initialization_taints self.proximity_placement_group_id = proximity_placement_group_id self.kubelet_config = kubelet_config self.linux_os_config = linux_os_config @@ -6752,17 +4567,15 @@ def __init__( # pylint: disable=too-many-locals self.creation_data = creation_data self.capacity_reservation_group_id = capacity_reservation_group_id self.host_group_id = host_group_id - self.windows_profile = windows_profile self.network_profile = network_profile + self.windows_profile = windows_profile self.security_profile = security_profile self.gpu_profile = gpu_profile - self.artifact_streaming_profile = artifact_streaming_profile + self.gateway_profile = gateway_profile self.virtual_machines_profile = virtual_machines_profile self.virtual_machine_nodes_status = virtual_machine_nodes_status - self.gateway_profile = gateway_profile self.status = status self.local_dns_profile = local_dns_profile - self.node_customization_profile = node_customization_profile class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): @@ -6800,7 +4613,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 @@ -6827,11 +4640,10 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :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", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :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", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :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 @@ -6848,37 +4660,29 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :vartype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :ivar mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", 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 - and are supported. When is specified, the - latest supported patch version is chosen automatically. Updating the agent pool with the same - once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :vartype orchestrator_version: str - :ivar current_orchestrator_version: The version of Kubernetes running on the Agent Pool. If - orchestratorVersion was a fully specified version , this field will be - exactly equal to it. If orchestratorVersion was , this field will contain the full + :ivar current_orchestrator_version: The version of Kubernetes the Agent Pool is running. If + orchestratorVersion is a fully specified version , this field will be + exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. :vartype current_orchestrator_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str - :ivar upgrade_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 upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy is - set to Rolling. + :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 @@ -6921,14 +4725,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. @@ -6961,35 +4757,28 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): For more information see `Azure dedicated hosts `_. :vartype host_group_id: str - :ivar windows_profile: The Windows agent pool's specific profile. - :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :ivar windows_profile: The Windows agent pool's specific profile. + :vartype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :ivar gpu_profile: The GPU settings of an agent pool. + :ivar gpu_profile: GPU settings for the Agent Pool. :vartype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :ivar virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :vartype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :ivar gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :vartype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. :vartype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :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 - :ivar node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :vartype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile :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 @@ -6999,6 +4788,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "e_tag": {"readonly": True}, "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, "current_orchestrator_version": {"readonly": True}, + "node_image_version": {"readonly": True}, "provisioning_state": {"readonly": True}, "name": {"required": True, "pattern": r"^[a-z][a-z0-9]{0,11}$"}, } @@ -7027,9 +4817,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "orchestrator_version": {"key": "orchestratorVersion", "type": "str"}, "current_orchestrator_version": {"key": "currentOrchestratorVersion", "type": "str"}, "node_image_version": {"key": "nodeImageVersion", "type": "str"}, - "upgrade_strategy": {"key": "upgradeStrategy", "type": "str"}, "upgrade_settings": {"key": "upgradeSettings", "type": "AgentPoolUpgradeSettings"}, - "upgrade_settings_blue_green": {"key": "upgradeSettingsBlueGreen", "type": "AgentPoolBlueGreenUpgradeSettings"}, "provisioning_state": {"key": "provisioningState", "type": "str"}, "power_state": {"key": "powerState", "type": "PowerState"}, "availability_zones": {"key": "availabilityZones", "type": "[str]"}, @@ -7041,7 +4829,6 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "tags": {"key": "tags", "type": "{str}"}, "node_labels": {"key": "nodeLabels", "type": "{str}"}, "node_taints": {"key": "nodeTaints", "type": "[str]"}, - "node_initialization_taints": {"key": "nodeInitializationTaints", "type": "[str]"}, "proximity_placement_group_id": {"key": "proximityPlacementGroupID", "type": "str"}, "kubelet_config": {"key": "kubeletConfig", "type": "KubeletConfig"}, "linux_os_config": {"key": "linuxOSConfig", "type": "LinuxOSConfig"}, @@ -7052,17 +4839,15 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "creation_data": {"key": "creationData", "type": "CreationData"}, "capacity_reservation_group_id": {"key": "capacityReservationGroupID", "type": "str"}, "host_group_id": {"key": "hostGroupID", "type": "str"}, - "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, + "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "security_profile": {"key": "securityProfile", "type": "AgentPoolSecurityProfile"}, "gpu_profile": {"key": "gpuProfile", "type": "GPUProfile"}, - "artifact_streaming_profile": {"key": "artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile"}, + "gateway_profile": {"key": "gatewayProfile", "type": "AgentPoolGatewayProfile"}, "virtual_machines_profile": {"key": "virtualMachinesProfile", "type": "VirtualMachinesProfile"}, "virtual_machine_nodes_status": {"key": "virtualMachineNodesStatus", "type": "[VirtualMachineNodes]"}, - "gateway_profile": {"key": "gatewayProfile", "type": "AgentPoolGatewayProfile"}, "status": {"key": "status", "type": "AgentPoolStatus"}, "local_dns_profile": {"key": "localDNSProfile", "type": "LocalDNSProfile"}, - "node_customization_profile": {"key": "nodeCustomizationProfile", "type": "NodeCustomizationProfile"}, "name": {"key": "name", "type": "str"}, } @@ -7090,10 +4875,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, 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, @@ -7104,7 +4886,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, @@ -7115,17 +4896,15 @@ def __init__( # pylint: disable=too-many-locals creation_data: Optional["_models.CreationData"] = None, capacity_reservation_group_id: Optional[str] = None, host_group_id: Optional[str] = None, - windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, + windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, gpu_profile: Optional["_models.GPUProfile"] = None, - artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, + gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[list["_models.VirtualMachineNodes"]] = None, - gateway_profile: Optional["_models.AgentPoolGatewayProfile"] = None, status: Optional["_models.AgentPoolStatus"] = None, local_dns_profile: Optional["_models.LocalDNSProfile"] = None, - node_customization_profile: Optional["_models.NodeCustomizationProfile"] = None, **kwargs: Any ) -> None: """ @@ -7153,7 +4932,7 @@ def __init__( # pylint: disable=too-many-locals data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or ~azure.mgmt.containerservice.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: - "OCIContainer", "WasmWasi", "KataMshvVmIsolation", and "KataVmIsolation". + "OCIContainer", "WasmWasi", and "KataVmIsolation". :paramtype workload_runtime: str or ~azure.mgmt.containerservice.models.WorkloadRuntime :keyword 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 @@ -7181,11 +4960,10 @@ def __init__( # pylint: disable=too-many-locals :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". :paramtype os_type: str or ~azure.mgmt.containerservice.models.OSType - :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is - Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be - changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :keyword os_sku: Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType + is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= + 1.25 if OSType is Windows. Known values are: "Ubuntu", "AzureLinux", "AzureLinux3", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :paramtype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int @@ -7202,32 +4980,22 @@ def __init__( # pylint: disable=too-many-locals :paramtype type: str or ~azure.mgmt.containerservice.models.AgentPoolType :keyword mode: The mode of an agent pool. A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: - https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", - "Gateway", "ManagedSystem", and "Machines". + https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and + "Gateway". :paramtype mode: str or ~azure.mgmt.containerservice.models.AgentPoolMode :keyword 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. Updating the agent pool with the - same once it has been created will not trigger an upgrade, even if a newer patch - version is available. As a best practice, you should upgrade all node pools in an AKS cluster - to the same Kubernetes version. The node pool version must have the same major version as the - control plane. The node pool minor version must be within two minor versions of the control - plane version. The node pool version cannot be greater than the control plane version. For more - information see `upgrading a node pool + version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + is specified, the latest supported GA patch version is chosen automatically. + Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) + will not trigger an upgrade, even if a newer patch version is available. As a best practice, + you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node + pool version must have the same major version as the control plane. The node pool minor version + must be within two minor versions of the control plane version. The node pool version cannot be + greater than the control plane version. For more information see `upgrading a node pool `_. :paramtype orchestrator_version: str - :keyword node_image_version: The version of node image. - :paramtype node_image_version: str - :keyword upgrade_strategy: Defines the upgrade strategy for the agent pool. The default is - Rolling. Known values are: "Rolling" and "BlueGreen". - :paramtype upgrade_strategy: str or ~azure.mgmt.containerservice.models.UpgradeStrategy - :keyword upgrade_settings: Settings for upgrading the agentpool. Applies when upgrade strategy - is set to Rolling. + :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: ~azure.mgmt.containerservice.models.AgentPoolUpgradeSettings - :keyword upgrade_settings_blue_green: Settings for Blue-Green upgrade on the agentpool. Applies - when upgrade strategy is set to BlueGreen. - :paramtype upgrade_settings_blue_green: - ~azure.mgmt.containerservice.models.AgentPoolBlueGreenUpgradeSettings :keyword power_state: Whether the Agent Pool is running or stopped. When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An @@ -7270,14 +5038,6 @@ def __init__( # pylint: disable=too-many-locals :keyword node_taints: The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. :paramtype node_taints: list[str] - :keyword 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-``. - :paramtype node_initialization_taints: list[str] :keyword proximity_placement_group_id: The ID for Proximity Placement Group. :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. @@ -7311,35 +5071,28 @@ def __init__( # pylint: disable=too-many-locals For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str - :keyword windows_profile: The Windows agent pool's specific profile. - :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: ~azure.mgmt.containerservice.models.AgentPoolNetworkProfile + :keyword windows_profile: The Windows agent pool's specific profile. + :paramtype windows_profile: ~azure.mgmt.containerservice.models.AgentPoolWindowsProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: ~azure.mgmt.containerservice.models.AgentPoolSecurityProfile - :keyword gpu_profile: The GPU settings of an agent pool. + :keyword gpu_profile: GPU settings for the Agent Pool. :paramtype gpu_profile: ~azure.mgmt.containerservice.models.GPUProfile - :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. - :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.models.AgentPoolArtifactStreamingProfile + :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field + cannot be set if agent pool mode is not Gateway. + :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: ~azure.mgmt.containerservice.models.VirtualMachinesProfile :keyword virtual_machine_nodes_status: The status of nodes in a VirtualMachines agent pool. :paramtype virtual_machine_nodes_status: list[~azure.mgmt.containerservice.models.VirtualMachineNodes] - :keyword gateway_profile: Profile specific to a managed agent pool in Gateway mode. This field - cannot be set if agent pool mode is not Gateway. - :paramtype gateway_profile: ~azure.mgmt.containerservice.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. :paramtype status: ~azure.mgmt.containerservice.models.AgentPoolStatus :keyword 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. :paramtype local_dns_profile: ~azure.mgmt.containerservice.models.LocalDNSProfile - :keyword node_customization_profile: Settings to determine the node customization used to - provision nodes in a pool. - :paramtype node_customization_profile: - ~azure.mgmt.containerservice.models.NodeCustomizationProfile :keyword 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. :paramtype name: str @@ -7365,10 +5118,7 @@ def __init__( # pylint: disable=too-many-locals type=type, mode=mode, orchestrator_version=orchestrator_version, - node_image_version=node_image_version, - upgrade_strategy=upgrade_strategy, upgrade_settings=upgrade_settings, - upgrade_settings_blue_green=upgrade_settings_blue_green, power_state=power_state, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, @@ -7379,7 +5129,6 @@ def __init__( # pylint: disable=too-many-locals tags=tags, node_labels=node_labels, node_taints=node_taints, - node_initialization_taints=node_initialization_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, @@ -7390,17 +5139,15 @@ def __init__( # pylint: disable=too-many-locals creation_data=creation_data, capacity_reservation_group_id=capacity_reservation_group_id, host_group_id=host_group_id, - windows_profile=windows_profile, network_profile=network_profile, + windows_profile=windows_profile, security_profile=security_profile, gpu_profile=gpu_profile, - artifact_streaming_profile=artifact_streaming_profile, + gateway_profile=gateway_profile, virtual_machines_profile=virtual_machines_profile, virtual_machine_nodes_status=virtual_machine_nodes_status, - gateway_profile=gateway_profile, status=status, local_dns_profile=local_dns_profile, - node_customization_profile=node_customization_profile, **kwargs ) self.name = name @@ -7454,10 +5201,10 @@ class ManagedClusterAPIServerAccessProfile(_serialization.Model): :ivar disable_run_command: Whether to disable run command for the cluster or not. :vartype disable_run_command: bool :ivar enable_vnet_integration: Whether to enable apiserver vnet integration for the cluster or - not. + not. See aka.ms/AksVnetIntegration for more details. :vartype enable_vnet_integration: bool :ivar subnet_id: The subnet to be used when apiserver vnet integration is enabled. It is - required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to + required when creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. :vartype subnet_id: str """ @@ -7506,10 +5253,10 @@ def __init__( :keyword disable_run_command: Whether to disable run command for the cluster or not. :paramtype disable_run_command: bool :keyword enable_vnet_integration: Whether to enable apiserver vnet integration for the cluster - or not. + or not. See aka.ms/AksVnetIntegration for more details. :paramtype enable_vnet_integration: bool :keyword subnet_id: The subnet to be used when apiserver vnet integration is enabled. It is - required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to + required when creating a new cluster with BYO Vnet, or when updating an existing cluster to enable apiserver vnet integration. :paramtype subnet_id: str """ @@ -7523,348 +5270,93 @@ def __init__( self.subnet_id = subnet_id -class ManagedClusterAutoUpgradeProfile(_serialization.Model): - """Auto upgrade profile for a managed cluster. - - :ivar upgrade_channel: The upgrade channel for auto upgrade. The default is 'none'. For more - information see `setting the AKS cluster auto-upgrade channel - `_. Known values - are: "rapid", "stable", "patch", "node-image", and "none". - :vartype upgrade_channel: str or ~azure.mgmt.containerservice.models.UpgradeChannel - :ivar node_os_upgrade_channel: Manner in which the OS on your nodes is updated. The default is - Unmanaged, but may change to either NodeImage or SecurityPatch at GA. Known values are: "None", - "Unmanaged", "SecurityPatch", and "NodeImage". - :vartype node_os_upgrade_channel: str or - ~azure.mgmt.containerservice.models.NodeOSUpgradeChannel - """ - - _attribute_map = { - "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, - "node_os_upgrade_channel": {"key": "nodeOSUpgradeChannel", "type": "str"}, - } - - def __init__( - self, - *, - upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, - node_os_upgrade_channel: Optional[Union[str, "_models.NodeOSUpgradeChannel"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword upgrade_channel: The upgrade channel for auto upgrade. The default is 'none'. For more - information see `setting the AKS cluster auto-upgrade channel - `_. Known values - are: "rapid", "stable", "patch", "node-image", and "none". - :paramtype upgrade_channel: str or ~azure.mgmt.containerservice.models.UpgradeChannel - :keyword node_os_upgrade_channel: Manner in which the OS on your nodes is updated. The default - is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. Known values are: - "None", "Unmanaged", "SecurityPatch", and "NodeImage". - :paramtype node_os_upgrade_channel: str or - ~azure.mgmt.containerservice.models.NodeOSUpgradeChannel - """ - super().__init__(**kwargs) - self.upgrade_channel = upgrade_channel - self.node_os_upgrade_channel = node_os_upgrade_channel - - -class ManagedClusterAzureMonitorProfile(_serialization.Model): - """Prometheus addon profile for the container service cluster. - - :ivar metrics: Metrics profile for the prometheus service addon. - :vartype metrics: ~azure.mgmt.containerservice.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 - an overview. - :vartype app_monitoring: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring - """ - - _attribute_map = { - "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, - "container_insights": { - "key": "containerInsights", - "type": "ManagedClusterAzureMonitorProfileContainerInsights", - }, - "app_monitoring": {"key": "appMonitoring", "type": "ManagedClusterAzureMonitorProfileAppMonitoring"}, - } - - def __init__( - self, - *, - metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, - container_insights: Optional["_models.ManagedClusterAzureMonitorProfileContainerInsights"] = None, - app_monitoring: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoring"] = None, - **kwargs: Any - ) -> None: - """ - :keyword metrics: Metrics profile for the prometheus service addon. - :paramtype metrics: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics - :keyword container_insights: Azure Monitor Container Insights Profile for Kubernetes Events, - Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for - an overview. - :paramtype container_insights: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileContainerInsights - :keyword 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 - an overview. - :paramtype app_monitoring: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoring - """ - super().__init__(**kwargs) - self.metrics = metrics - self.container_insights = container_insights - self.app_monitoring = app_monitoring - - -class ManagedClusterAzureMonitorProfileAppMonitoring(_serialization.Model): # pylint: disable=name-too-long - """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. - - :ivar auto_instrumentation: Application Monitoring Auto Instrumentation for Kubernetes - Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based - SDKs to collect OpenTelemetry metrics, logs and traces of the application. See - 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 - Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application - using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for - an overview. - :vartype open_telemetry_metrics: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - :ivar open_telemetry_logs: Application Monitoring Open Telemetry Metrics Profile for Kubernetes - Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the - application using Azure Monitor OpenTelemetry based SDKs. See - aka.ms/AzureMonitorApplicationMonitoring for an overview. - :vartype open_telemetry_logs: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - """ - - _attribute_map = { - "auto_instrumentation": { - "key": "autoInstrumentation", - "type": "ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation", - }, - "open_telemetry_metrics": { - "key": "openTelemetryMetrics", - "type": "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics", - }, - "open_telemetry_logs": { - "key": "openTelemetryLogs", - "type": "ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs", - }, - } - - def __init__( - self, - *, - auto_instrumentation: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation" - ] = None, - open_telemetry_metrics: Optional[ - "_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics" - ] = None, - open_telemetry_logs: Optional["_models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs"] = None, - **kwargs: Any - ) -> None: - """ - :keyword auto_instrumentation: Application Monitoring Auto Instrumentation for Kubernetes - Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based - SDKs to collect OpenTelemetry metrics, logs and traces of the application. See - aka.ms/AzureMonitorApplicationMonitoring for an overview. - :paramtype auto_instrumentation: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - :keyword open_telemetry_metrics: Application Monitoring Open Telemetry Metrics Profile for - Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application - using Azure Monitor OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for - an overview. - :paramtype open_telemetry_metrics: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - :keyword open_telemetry_logs: Application Monitoring Open Telemetry Metrics Profile for - Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the - application using Azure Monitor OpenTelemetry based SDKs. See - aka.ms/AzureMonitorApplicationMonitoring for an overview. - :paramtype open_telemetry_logs: - ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - """ - super().__init__(**kwargs) - self.auto_instrumentation = auto_instrumentation - self.open_telemetry_metrics = open_telemetry_metrics - self.open_telemetry_logs = open_telemetry_logs - - -class ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation( - _serialization.Model -): # pylint: disable=name-too-long - """Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web - hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry - metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for - an overview. - - :ivar enabled: Indicates if Application Monitoring Auto Instrumentation is enabled or not. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Indicates if Application Monitoring Auto Instrumentation is enabled or not. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs( - _serialization.Model -): # pylint: disable=name-too-long - """Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs - and Traces. Collects OpenTelemetry logs and traces of the application using Azure Monitor - OpenTelemetry based SDKs. See 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 port: The Open Telemetry host port for Open Telemetry logs and traces. If not specified, - the default port is 28331. - :vartype port: int - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "port": {"key": "port", "type": "int"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, port: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled - or not. - :paramtype enabled: bool - :keyword port: The Open Telemetry host port for Open Telemetry logs and traces. If not - specified, the default port is 28331. - :paramtype port: int - """ - super().__init__(**kwargs) - self.enabled = enabled - self.port = port - - -class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics( - _serialization.Model -): # pylint: disable=name-too-long - """Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container - Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry - based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. +class ManagedClusterAutoUpgradeProfile(_serialization.Model): + """Auto upgrade profile for a managed cluster. - :ivar enabled: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - :vartype enabled: bool - :ivar port: The Open Telemetry host port for Open Telemetry metrics. If not specified, the - default port is 28333. - :vartype port: int + :ivar upgrade_channel: The upgrade channel for auto upgrade. The default is 'none'. For more + information see `setting the AKS cluster auto-upgrade channel + `_. Known values + are: "rapid", "stable", "patch", "node-image", and "none". + :vartype upgrade_channel: str or ~azure.mgmt.containerservice.models.UpgradeChannel + :ivar node_os_upgrade_channel: Node OS Upgrade Channel. Manner in which the OS on your nodes is + updated. The default is NodeImage. Known values are: "None", "Unmanaged", "NodeImage", and + "SecurityPatch". + :vartype node_os_upgrade_channel: str or + ~azure.mgmt.containerservice.models.NodeOSUpgradeChannel """ _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "port": {"key": "port", "type": "int"}, + "upgrade_channel": {"key": "upgradeChannel", "type": "str"}, + "node_os_upgrade_channel": {"key": "nodeOSUpgradeChannel", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, port: Optional[int] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "_models.UpgradeChannel"]] = None, + node_os_upgrade_channel: Optional[Union[str, "_models.NodeOSUpgradeChannel"]] = None, + **kwargs: Any + ) -> None: """ - :keyword enabled: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - :paramtype enabled: bool - :keyword port: The Open Telemetry host port for Open Telemetry metrics. If not specified, the - default port is 28333. - :paramtype port: int + :keyword upgrade_channel: The upgrade channel for auto upgrade. The default is 'none'. For more + information see `setting the AKS cluster auto-upgrade channel + `_. Known values + are: "rapid", "stable", "patch", "node-image", and "none". + :paramtype upgrade_channel: str or ~azure.mgmt.containerservice.models.UpgradeChannel + :keyword node_os_upgrade_channel: Node OS Upgrade Channel. Manner in which the OS on your nodes + is updated. The default is NodeImage. Known values are: "None", "Unmanaged", "NodeImage", and + "SecurityPatch". + :paramtype node_os_upgrade_channel: str or + ~azure.mgmt.containerservice.models.NodeOSUpgradeChannel """ super().__init__(**kwargs) - self.enabled = enabled - self.port = port + self.upgrade_channel = upgrade_channel + self.node_os_upgrade_channel = node_os_upgrade_channel -class ManagedClusterAzureMonitorProfileContainerInsights(_serialization.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 ManagedClusterAzureMonitorProfile(_serialization.Model): + """Azure Monitor addon profiles for monitoring the managed cluster. - :ivar enabled: Indicates if Azure Monitor Container Insights Logs Addon 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 metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. + Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace + and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. + :vartype metrics: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics """ _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "log_analytics_workspace_resource_id": {"key": "logAnalyticsWorkspaceResourceId", "type": "str"}, - "syslog_port": {"key": "syslogPort", "type": "int"}, - "disable_custom_metrics": {"key": "disableCustomMetrics", "type": "bool"}, - "disable_prometheus_metrics_scraping": {"key": "disablePrometheusMetricsScraping", "type": "bool"}, + "metrics": {"key": "metrics", "type": "ManagedClusterAzureMonitorProfileMetrics"}, } 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, - **kwargs: Any + self, *, metrics: Optional["_models.ManagedClusterAzureMonitorProfileMetrics"] = None, **kwargs: Any ) -> None: """ - :keyword enabled: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. - :paramtype enabled: bool - :keyword log_analytics_workspace_resource_id: Fully Qualified ARM Resource Id of Azure Log - Analytics Workspace for storing Azure Monitor Container Insights Logs. - :paramtype log_analytics_workspace_resource_id: str - :keyword syslog_port: The syslog host port. If not specified, the default port is 28330. - :paramtype syslog_port: int - :keyword 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. - :paramtype disable_custom_metrics: bool - :keyword 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. - :paramtype disable_prometheus_metrics_scraping: bool + :keyword metrics: Metrics profile for the Azure Monitor managed service for Prometheus addon. + Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace + and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. + :paramtype metrics: + ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileMetrics """ super().__init__(**kwargs) - self.enabled = enabled - self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id - self.syslog_port = syslog_port - self.disable_custom_metrics = disable_custom_metrics - self.disable_prometheus_metrics_scraping = disable_prometheus_metrics_scraping + self.metrics = metrics class ManagedClusterAzureMonitorProfileKubeStateMetrics(_serialization.Model): # pylint: disable=name-too-long - """Kube State Metrics for prometheus addon profile for the container service cluster. - - :ivar metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will be - used in the resource's labels metric. + """Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are + for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. + + :ivar metric_labels_allowlist: Comma-separated list of additional Kubernetes label keys that + will be used in the resource's labels metric (Example: + 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + resource name and namespace labels. :vartype metric_labels_allowlist: str - :ivar metric_annotations_allow_list: Comma-separated list of additional Kubernetes label keys - that will be used in the resource's labels metric. + :ivar metric_annotations_allow_list: Comma-separated list of Kubernetes annotation keys that + will be used in the resource's labels metric (Example: + 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric + contains only resource name and namespace labels. :vartype metric_annotations_allow_list: str """ @@ -7881,11 +5373,15 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword metric_labels_allowlist: Comma-separated list of Kubernetes annotations keys that will - be used in the resource's labels metric. + :keyword metric_labels_allowlist: Comma-separated list of additional Kubernetes label keys that + will be used in the resource's labels metric (Example: + 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only + resource name and namespace labels. :paramtype metric_labels_allowlist: str - :keyword metric_annotations_allow_list: Comma-separated list of additional Kubernetes label - keys that will be used in the resource's labels metric. + :keyword metric_annotations_allow_list: Comma-separated list of Kubernetes annotation keys that + will be used in the resource's labels metric (Example: + 'namespaces=[kubernetes.io/team,...],pods=[kubernetes.io/team],...'). By default the metric + contains only resource name and namespace labels. :paramtype metric_annotations_allow_list: str """ super().__init__(**kwargs) @@ -7894,14 +5390,20 @@ def __init__( class ManagedClusterAzureMonitorProfileMetrics(_serialization.Model): - """Metrics profile for the prometheus service addon. + """Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect + out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and + configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an + overview. All required parameters must be populated in order to send to server. - :ivar enabled: Whether to enable the Prometheus collector. Required. + :ivar enabled: Whether to enable or disable the Azure Managed Prometheus addon for Prometheus + monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling. + Required. :vartype enabled: bool - :ivar kube_state_metrics: Kube State Metrics for prometheus addon profile for the container - service cluster. + :ivar kube_state_metrics: Kube State Metrics profile for the Azure Managed Prometheus addon. + These optional settings are for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. :vartype kube_state_metrics: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics """ @@ -7923,10 +5425,13 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword enabled: Whether to enable the Prometheus collector. Required. + :keyword enabled: Whether to enable or disable the Azure Managed Prometheus addon for + Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and + disabling. Required. :paramtype enabled: bool - :keyword kube_state_metrics: Kube State Metrics for prometheus addon profile for the container - service cluster. + :keyword kube_state_metrics: Kube State Metrics profile for the Azure Managed Prometheus addon. + These optional settings are for the kube-state-metrics pod that is deployed with the addon. See + aka.ms/AzureManagedPrometheus-optional-parameters for details. :paramtype kube_state_metrics: ~azure.mgmt.containerservice.models.ManagedClusterAzureMonitorProfileKubeStateMetrics """ @@ -7997,58 +5502,24 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: self.enabled = enabled -class ManagedClusterHostedSystemProfile(_serialization.Model): - """Settings for hosted system addons. - - :ivar enabled: Whether to enable hosted system addons for the cluster. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Whether to enable hosted system addons for the cluster. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - class ManagedClusterHTTPProxyConfig(_serialization.Model): """Cluster HTTP proxy configuration. - Variables are only populated by the server, and will be ignored when sending a request. - :ivar http_proxy: The HTTP proxy server endpoint to use. :vartype http_proxy: str :ivar https_proxy: The HTTPS proxy server endpoint to use. :vartype https_proxy: str :ivar no_proxy: The endpoints that should not go through proxy. :vartype no_proxy: list[str] - :ivar effective_no_proxy: A read-only list of all endpoints for which traffic should not be - sent to the proxy. This list is a superset of noProxy and values injected by AKS. - :vartype effective_no_proxy: list[str] :ivar trusted_ca: Alternative CA cert to use for connecting to proxy servers. :vartype trusted_ca: str - :ivar enabled: Whether to enable HTTP proxy. When disabled, the specified proxy configuration - will be not be set on pods and nodes. - :vartype enabled: bool """ - _validation = { - "effective_no_proxy": {"readonly": True}, - } - _attribute_map = { "http_proxy": {"key": "httpProxy", "type": "str"}, "https_proxy": {"key": "httpsProxy", "type": "str"}, "no_proxy": {"key": "noProxy", "type": "[str]"}, - "effective_no_proxy": {"key": "effectiveNoProxy", "type": "[str]"}, "trusted_ca": {"key": "trustedCa", "type": "str"}, - "enabled": {"key": "enabled", "type": "bool"}, } def __init__( @@ -8058,7 +5529,6 @@ def __init__( https_proxy: Optional[str] = None, no_proxy: Optional[list[str]] = None, trusted_ca: Optional[str] = None, - enabled: Optional[bool] = None, **kwargs: Any ) -> None: """ @@ -8070,17 +5540,12 @@ def __init__( :paramtype no_proxy: list[str] :keyword trusted_ca: Alternative CA cert to use for connecting to proxy servers. :paramtype trusted_ca: str - :keyword enabled: Whether to enable HTTP proxy. When disabled, the specified proxy - configuration will be not be set on pods and nodes. - :paramtype enabled: bool """ super().__init__(**kwargs) self.http_proxy = http_proxy self.https_proxy = https_proxy self.no_proxy = no_proxy - self.effective_no_proxy: Optional[list[str]] = None self.trusted_ca = trusted_ca - self.enabled = enabled class ManagedClusterIdentity(_serialization.Model): @@ -8161,143 +5626,32 @@ def __init__( self.user_assigned_identities = user_assigned_identities -class ManagedClusterIngressDefaultDomainProfile(_serialization.Model): # pylint: disable=name-too-long - """ManagedClusterIngressDefaultDomainProfile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :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 - """ - - _validation = { - "domain_name": {"readonly": True}, - } - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "domain_name": {"key": "domainName", "type": "str"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Whether to enable Default Domain. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - self.domain_name: Optional[str] = None - - class ManagedClusterIngressProfile(_serialization.Model): """Ingress profile for the container service cluster. - :ivar gateway_api: Settings for the managed Gateway API installation. - :vartype gateway_api: - ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration - :ivar web_app_routing: Web App Routing settings for the ingress profile. + :ivar web_app_routing: App Routing settings for the ingress profile. You can find an overview + and onboarding guide for this feature at + https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. :vartype web_app_routing: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting - :ivar application_load_balancer: Settings for the managed Application Load Balancer - installation. - :vartype application_load_balancer: - ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer """ _attribute_map = { - "gateway_api": {"key": "gatewayAPI", "type": "ManagedClusterIngressProfileGatewayConfiguration"}, "web_app_routing": {"key": "webAppRouting", "type": "ManagedClusterIngressProfileWebAppRouting"}, - "application_load_balancer": { - "key": "applicationLoadBalancer", - "type": "ManagedClusterIngressProfileApplicationLoadBalancer", - }, } def __init__( - self, - *, - gateway_api: Optional["_models.ManagedClusterIngressProfileGatewayConfiguration"] = None, - web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, - application_load_balancer: Optional["_models.ManagedClusterIngressProfileApplicationLoadBalancer"] = None, - **kwargs: Any + self, *, web_app_routing: Optional["_models.ManagedClusterIngressProfileWebAppRouting"] = None, **kwargs: Any ) -> None: """ - :keyword gateway_api: Settings for the managed Gateway API installation. - :paramtype gateway_api: - ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileGatewayConfiguration - :keyword web_app_routing: Web App Routing settings for the ingress profile. + :keyword web_app_routing: App Routing settings for the ingress profile. You can find an + overview and onboarding guide for this feature at + https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. :paramtype web_app_routing: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileWebAppRouting - :keyword application_load_balancer: Settings for the managed Application Load Balancer - installation. - :paramtype application_load_balancer: - ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer """ super().__init__(**kwargs) - self.gateway_api = gateway_api self.web_app_routing = web_app_routing - self.application_load_balancer = application_load_balancer - - -class ManagedClusterIngressProfileApplicationLoadBalancer(_serialization.Model): # pylint: disable=name-too-long - """Application Load Balancer settings for the ingress profile. - - Variables are only populated by the server, and will be ignored when sending a request. - - :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 - """ - - _validation = { - "identity": {"readonly": True}, - } - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "identity": {"key": "identity", "type": "UserAssignedIdentity"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Whether to enable Application Load Balancer. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - self.identity: Optional["_models.UserAssignedIdentity"] = None - - -class ManagedClusterIngressProfileGatewayConfiguration(_serialization.Model): # pylint: disable=name-too-long - """ManagedClusterIngressProfileGatewayConfiguration. - - :ivar installation: Configuration for the managed Gateway API installation. If not specified, - the default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. Known values - are: "Disabled" and "Standard". - :vartype installation: str or ~azure.mgmt.containerservice.models.ManagedGatewayType - """ - - _attribute_map = { - "installation": {"key": "installation", "type": "str"}, - } - - def __init__( - self, *, installation: Optional[Union[str, "_models.ManagedGatewayType"]] = None, **kwargs: Any - ) -> None: - """ - :keyword installation: Configuration for the managed Gateway API installation. If not - specified, the default is 'Disabled'. See https://aka.ms/k8s-gateway-api for more details. - Known values are: "Disabled" and "Standard". - :paramtype installation: str or ~azure.mgmt.containerservice.models.ManagedGatewayType - """ - super().__init__(**kwargs) - self.installation = installation class ManagedClusterIngressProfileNginx(_serialization.Model): @@ -8330,28 +5684,23 @@ def __init__( class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): # pylint: disable=name-too-long - """Web App Routing settings for the ingress profile. + """Application Routing add-on settings for the ingress profile. Variables are only populated by the server, and will be ignored when sending a request. - :ivar enabled: Whether to enable Web App Routing. + :ivar enabled: Whether to enable the Application Routing add-on. :vartype enabled: bool - :ivar dns_zone_resource_ids: Resource IDs of the DNS zones to be associated with the Web App - Routing add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be - in different resource groups, but all public DNS zones must be in the same resource group and - all private DNS zones must be in the same resource group. + :ivar dns_zone_resource_ids: Resource IDs of the DNS zones to be associated with the + Application Routing add-on. Used only when Application Routing add-on is enabled. Public and + private DNS zones can be in different resource groups, but all public DNS zones must be in the + same resource group and all private DNS zones must be in the same resource group. :vartype dns_zone_resource_ids: list[str] :ivar nginx: Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. :vartype nginx: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx - :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 - :ivar identity: Managed identity of the Web Application Routing add-on. This is the identity - that should be granted permissions, for example, to manage the associated Azure DNS resource - and get certificates from Azure Key Vault. See `this overview of the add-on + :ivar identity: Managed identity of the Application Routing add-on. This is the identity that + should be granted permissions, for example, to manage the associated Azure DNS resource and get + certificates from Azure Key Vault. See `this overview of the add-on `_ for more instructions. :vartype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity @@ -8366,7 +5715,6 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): # pylint "enabled": {"key": "enabled", "type": "bool"}, "dns_zone_resource_ids": {"key": "dnsZoneResourceIds", "type": "[str]"}, "nginx": {"key": "nginx", "type": "ManagedClusterIngressProfileNginx"}, - "default_domain": {"key": "defaultDomain", "type": "ManagedClusterIngressDefaultDomainProfile"}, "identity": {"key": "identity", "type": "UserAssignedIdentity"}, } @@ -8376,31 +5724,24 @@ def __init__( enabled: Optional[bool] = None, dns_zone_resource_ids: Optional[list[str]] = None, nginx: Optional["_models.ManagedClusterIngressProfileNginx"] = None, - default_domain: Optional["_models.ManagedClusterIngressDefaultDomainProfile"] = None, **kwargs: Any ) -> None: """ - :keyword enabled: Whether to enable Web App Routing. + :keyword enabled: Whether to enable the Application Routing add-on. :paramtype enabled: bool - :keyword dns_zone_resource_ids: Resource IDs of the DNS zones to be associated with the Web App - Routing add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be - in different resource groups, but all public DNS zones must be in the same resource group and - all private DNS zones must be in the same resource group. + :keyword dns_zone_resource_ids: Resource IDs of the DNS zones to be associated with the + Application Routing add-on. Used only when Application Routing add-on is enabled. Public and + private DNS zones can be in different resource groups, but all public DNS zones must be in the + same resource group and all private DNS zones must be in the same resource group. :paramtype dns_zone_resource_ids: list[str] :keyword nginx: Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. :paramtype nginx: ~azure.mgmt.containerservice.models.ManagedClusterIngressProfileNginx - :keyword 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. - :paramtype default_domain: - ~azure.mgmt.containerservice.models.ManagedClusterIngressDefaultDomainProfile """ super().__init__(**kwargs) self.enabled = enabled self.dns_zone_resource_ids = dns_zone_resource_ids self.nginx = nginx - self.default_domain = default_domain self.identity: Optional["_models.UserAssignedIdentity"] = None @@ -8464,10 +5805,6 @@ class ManagedClusterLoadBalancerProfile(_serialization.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 """ _validation = { @@ -8491,10 +5828,6 @@ class ManagedClusterLoadBalancerProfile(_serialization.Model): "idle_timeout_in_minutes": {"key": "idleTimeoutInMinutes", "type": "int"}, "enable_multiple_standard_load_balancers": {"key": "enableMultipleStandardLoadBalancers", "type": "bool"}, "backend_pool_type": {"key": "backendPoolType", "type": "str"}, - "cluster_service_load_balancer_health_probe_mode": { - "key": "clusterServiceLoadBalancerHealthProbeMode", - "type": "str", - }, } def __init__( @@ -8507,9 +5840,6 @@ def __init__( idle_timeout_in_minutes: int = 30, enable_multiple_standard_load_balancers: Optional[bool] = None, backend_pool_type: Union[str, "_models.BackendPoolType"] = "NodeIPConfiguration", - cluster_service_load_balancer_health_probe_mode: Union[ - str, "_models.ClusterServiceLoadBalancerHealthProbeMode" - ] = "ServiceNodePort", **kwargs: Any ) -> None: """ @@ -8536,10 +5866,6 @@ def __init__( :keyword backend_pool_type: The type of the managed inbound Load Balancer BackendPool. Known values are: "NodeIPConfiguration" and "NodeIP". :paramtype backend_pool_type: str or ~azure.mgmt.containerservice.models.BackendPoolType - :keyword cluster_service_load_balancer_health_probe_mode: The health probing behavior for - External Traffic Policy Cluster services. Known values are: "ServiceNodePort" and "Shared". - :paramtype cluster_service_load_balancer_health_probe_mode: str or - ~azure.mgmt.containerservice.models.ClusterServiceLoadBalancerHealthProbeMode """ super().__init__(**kwargs) self.managed_outbound_i_ps = managed_outbound_i_ps @@ -8550,7 +5876,6 @@ def __init__( self.idle_timeout_in_minutes = idle_timeout_in_minutes self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers self.backend_pool_type = backend_pool_type - self.cluster_service_load_balancer_health_probe_mode = cluster_service_load_balancer_health_probe_mode class ManagedClusterLoadBalancerProfileManagedOutboundIPs(_serialization.Model): # pylint: disable=name-too-long @@ -8783,8 +6108,8 @@ def __init__( class ManagedClusterNodeResourceGroupProfile(_serialization.Model): """Node resource group lockdown profile for a managed cluster. - :ivar restriction_level: The restriction level applied to the cluster's node resource group. - Known values are: "Unrestricted" and "ReadOnly". + :ivar restriction_level: The restriction level applied to the cluster's node resource group. If + not specified, the default is 'Unrestricted'. Known values are: "Unrestricted" and "ReadOnly". :vartype restriction_level: str or ~azure.mgmt.containerservice.models.RestrictionLevel """ @@ -8797,7 +6122,8 @@ def __init__( ) -> None: """ :keyword restriction_level: The restriction level applied to the cluster's node resource group. - Known values are: "Unrestricted" and "ReadOnly". + If not specified, the default is 'Unrestricted'. Known values are: "Unrestricted" and + "ReadOnly". :paramtype restriction_level: str or ~azure.mgmt.containerservice.models.RestrictionLevel """ super().__init__(**kwargs) @@ -9128,8 +6454,6 @@ class ManagedClusterPoolUpgradeProfile(_serialization.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] """ _validation = { @@ -9142,7 +6466,6 @@ class ManagedClusterPoolUpgradeProfile(_serialization.Model): "name": {"key": "name", "type": "str"}, "os_type": {"key": "osType", "type": "str"}, "upgrades": {"key": "upgrades", "type": "[ManagedClusterPoolUpgradeProfileUpgradesItem]"}, - "components_by_releases": {"key": "componentsByReleases", "type": "[ComponentsByRelease]"}, } def __init__( @@ -9152,7 +6475,6 @@ def __init__( os_type: Union[str, "_models.OSType"] = "Linux", name: Optional[str] = None, upgrades: Optional[list["_models.ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, - components_by_releases: Optional[list["_models.ComponentsByRelease"]] = None, **kwargs: Any ) -> None: """ @@ -9166,16 +6488,12 @@ def __init__( :keyword upgrades: List of orchestrator types and versions available for upgrade. :paramtype upgrades: list[~azure.mgmt.containerservice.models.ManagedClusterPoolUpgradeProfileUpgradesItem] - :keyword components_by_releases: List of components grouped by kubernetes major.minor version. - :paramtype components_by_releases: - list[~azure.mgmt.containerservice.models.ComponentsByRelease] """ super().__init__(**kwargs) self.kubernetes_version = kubernetes_version self.name = name self.os_type = os_type self.upgrades = upgrades - self.components_by_releases = components_by_releases class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): # pylint: disable=name-too-long @@ -9185,36 +6503,25 @@ class ManagedClusterPoolUpgradeProfileUpgradesItem(_serialization.Model): # pyl :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 """ _attribute_map = { "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, "is_preview": {"key": "isPreview", "type": "bool"}, - "is_out_of_support": {"key": "isOutOfSupport", "type": "bool"}, } def __init__( - self, - *, - kubernetes_version: Optional[str] = None, - is_preview: Optional[bool] = None, - is_out_of_support: Optional[bool] = None, - **kwargs: Any + self, *, kubernetes_version: Optional[str] = None, is_preview: Optional[bool] = None, **kwargs: Any ) -> None: """ :keyword kubernetes_version: The Kubernetes version (major.minor.patch). :paramtype kubernetes_version: str :keyword is_preview: Whether the Kubernetes version is currently in preview. :paramtype is_preview: bool - :keyword is_out_of_support: Whether the Kubernetes version is out of support. - :paramtype is_out_of_support: bool """ super().__init__(**kwargs) self.kubernetes_version = kubernetes_version self.is_preview = is_preview - self.is_out_of_support = is_out_of_support class ManagedClusterPropertiesAutoScalerProfile(_serialization.Model): # pylint: disable=name-too-long @@ -9239,9 +6546,10 @@ class ManagedClusterPropertiesAutoScalerProfile(_serialization.Model): # pylint utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when making scaling down decisions. :vartype ignore_daemonsets_utilization: bool - :ivar expander: Type of node group expander to be used in scale up. Set to be deprecated, - please use 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', - 'priority', 'random'. Known values are: "least-waste", "most-pods", "priority", and "random". + :ivar expander: The expander to use when scaling up. If not specified, the default is 'random'. + See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". :vartype expander: str or ~azure.mgmt.containerservice.models.Expander :ivar max_empty_bulk_delete: The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10. @@ -9369,9 +6677,10 @@ def __init__( resource utilization for scaling down. If set to true, the resources used by daemonset will be taken into account when making scaling down decisions. :paramtype ignore_daemonsets_utilization: bool - :keyword expander: Type of node group expander to be used in scale up. Set to be deprecated, - please use 'expanders' flag in the future. Available values are: 'least-waste', 'most-pods', - 'priority', 'random'. Known values are: "least-waste", "most-pods", "priority", and "random". + :keyword expander: The expander to use when scaling up. If not specified, the default is + 'random'. See `expanders + `_ + for more information. Known values are: "least-waste", "most-pods", "priority", and "random". :paramtype expander: str or ~azure.mgmt.containerservice.models.Expander :keyword max_empty_bulk_delete: The maximum number of empty nodes that can be deleted at the same time. This must be a positive integer. The default is 10. @@ -9453,56 +6762,6 @@ def __init__( self.skip_nodes_with_system_pods = skip_nodes_with_system_pods -class ManagedClusterPropertiesForSnapshot(_serialization.Model): - """managed cluster properties for snapshot, these properties are read only. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar kubernetes_version: The current kubernetes version. - :vartype kubernetes_version: str - :ivar sku: The current managed cluster sku. - :vartype sku: ~azure.mgmt.containerservice.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 - """ - - _validation = { - "network_profile": {"readonly": True}, - } - - _attribute_map = { - "kubernetes_version": {"key": "kubernetesVersion", "type": "str"}, - "sku": {"key": "sku", "type": "ManagedClusterSKU"}, - "enable_rbac": {"key": "enableRbac", "type": "bool"}, - "network_profile": {"key": "networkProfile", "type": "NetworkProfileForSnapshot"}, - } - - def __init__( - self, - *, - kubernetes_version: Optional[str] = None, - sku: Optional["_models.ManagedClusterSKU"] = None, - enable_rbac: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword kubernetes_version: The current kubernetes version. - :paramtype kubernetes_version: str - :keyword sku: The current managed cluster sku. - :paramtype sku: ~azure.mgmt.containerservice.models.ManagedClusterSKU - :keyword enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or - not. - :paramtype enable_rbac: bool - """ - super().__init__(**kwargs) - self.kubernetes_version = kubernetes_version - self.sku = sku - self.enable_rbac = enable_rbac - self.network_profile: Optional["_models.NetworkProfileForSnapshot"] = None - - class ManagedClusterSecurityProfile(_serialization.Model): """Security profile for the container service cluster. @@ -9512,11 +6771,6 @@ class ManagedClusterSecurityProfile(_serialization.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. @@ -9525,17 +6779,6 @@ class ManagedClusterSecurityProfile(_serialization.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 `_. @@ -9549,14 +6792,8 @@ class ManagedClusterSecurityProfile(_serialization.Model): _attribute_map = { "defender": {"key": "defender", "type": "ManagedClusterSecurityProfileDefender"}, "azure_key_vault_kms": {"key": "azureKeyVaultKms", "type": "AzureKeyVaultKms"}, - "kubernetes_resource_object_encryption_profile": { - "key": "kubernetesResourceObjectEncryptionProfile", - "type": "KubernetesResourceObjectEncryptionProfile", - }, "workload_identity": {"key": "workloadIdentity", "type": "ManagedClusterSecurityProfileWorkloadIdentity"}, "image_cleaner": {"key": "imageCleaner", "type": "ManagedClusterSecurityProfileImageCleaner"}, - "image_integrity": {"key": "imageIntegrity", "type": "ManagedClusterSecurityProfileImageIntegrity"}, - "node_restriction": {"key": "nodeRestriction", "type": "ManagedClusterSecurityProfileNodeRestriction"}, "custom_ca_trust_certificates": {"key": "customCATrustCertificates", "type": "[bytearray]"}, } @@ -9565,13 +6802,8 @@ 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, **kwargs: Any ) -> None: @@ -9582,11 +6814,6 @@ def __init__( `_ settings for the security profile. :paramtype azure_key_vault_kms: ~azure.mgmt.containerservice.models.AzureKeyVaultKms - :keyword 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. - :paramtype kubernetes_resource_object_encryption_profile: - ~azure.mgmt.containerservice.models.KubernetesResourceObjectEncryptionProfile :keyword 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. @@ -9595,17 +6822,6 @@ def __init__( :keyword image_cleaner: Image Cleaner settings for the security profile. :paramtype image_cleaner: ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageCleaner - :keyword 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. - :paramtype image_integrity: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileImageIntegrity - :keyword node_restriction: `Node Restriction - `_ - settings for the security profile. - :paramtype node_restriction: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileNodeRestriction :keyword custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. @@ -9614,11 +6830,8 @@ def __init__( super().__init__(**kwargs) self.defender = defender self.azure_key_vault_kms = azure_key_vault_kms - self.kubernetes_resource_object_encryption_profile = kubernetes_resource_object_encryption_profile self.workload_identity = workload_identity self.image_cleaner = image_cleaner - self.image_integrity = image_integrity - self.node_restriction = node_restriction self.custom_ca_trust_certificates = custom_ca_trust_certificates @@ -9628,158 +6841,43 @@ class ManagedClusterSecurityProfileDefender(_serialization.Model): :ivar log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field - empty. - :vartype log_analytics_workspace_resource_id: str - :ivar security_monitoring: Microsoft Defender threat detection for Cloud settings for the - security profile. - :vartype security_monitoring: - ~azure.mgmt.containerservice.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 - """ - - _attribute_map = { - "log_analytics_workspace_resource_id": {"key": "logAnalyticsWorkspaceResourceId", "type": "str"}, - "security_monitoring": { - "key": "securityMonitoring", - "type": "ManagedClusterSecurityProfileDefenderSecurityMonitoring", - }, - "security_gating": {"key": "securityGating", "type": "ManagedClusterSecurityProfileDefenderSecurityGating"}, - } - - def __init__( - self, - *, - log_analytics_workspace_resource_id: Optional[str] = None, - security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, - security_gating: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityGating"] = None, - **kwargs: Any - ) -> None: - """ - :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be - associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required - and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field - empty. - :paramtype log_analytics_workspace_resource_id: str - :keyword security_monitoring: Microsoft Defender threat detection for Cloud settings for the - security profile. - :paramtype security_monitoring: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring - :keyword 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. - :paramtype security_gating: - ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating - """ - super().__init__(**kwargs) - self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id - self.security_monitoring = security_monitoring - self.security_gating = security_gating - - -class ManagedClusterSecurityProfileDefenderSecurityGating(_serialization.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 - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - "identities": { - "key": "identities", - "type": "[ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem]", - }, - "allow_secret_access": {"key": "allowSecretAccess", "type": "bool"}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - identities: Optional[list["_models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem"]] = None, - allow_secret_access: Optional[bool] = None, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype enabled: bool - :keyword 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. - :paramtype identities: - list[~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem] - :keyword 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. - :paramtype allow_secret_access: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - self.identities = identities - self.allow_secret_access = allow_secret_access - - -class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem( - _serialization.Model -): # pylint: disable=name-too-long - """ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. - - :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 + empty. + :vartype log_analytics_workspace_resource_id: str + :ivar security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :vartype security_monitoring: + ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring """ _attribute_map = { - "azure_container_registry": {"key": "azureContainerRegistry", "type": "str"}, - "identity": {"key": "identity", "type": "UserAssignedIdentity"}, + "log_analytics_workspace_resource_id": {"key": "logAnalyticsWorkspaceResourceId", "type": "str"}, + "security_monitoring": { + "key": "securityMonitoring", + "type": "ManagedClusterSecurityProfileDefenderSecurityMonitoring", + }, } def __init__( self, *, - azure_container_registry: Optional[str] = None, - identity: Optional["_models.UserAssignedIdentity"] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + security_monitoring: Optional["_models.ManagedClusterSecurityProfileDefenderSecurityMonitoring"] = None, **kwargs: Any ) -> None: """ - :keyword 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. - :paramtype azure_container_registry: str - :keyword identity: The identity object used to access the registry. - :paramtype identity: ~azure.mgmt.containerservice.models.UserAssignedIdentity + :keyword log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Microsoft Defender. When Microsoft Defender is enabled, this field is required + and must be a valid workspace resource ID. When Microsoft Defender is disabled, leave the field + empty. + :paramtype log_analytics_workspace_resource_id: str + :keyword security_monitoring: Microsoft Defender threat detection for Cloud settings for the + security profile. + :paramtype security_monitoring: + ~azure.mgmt.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring """ super().__init__(**kwargs) - self.azure_container_registry = azure_container_registry - self.identity = identity + self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id + self.security_monitoring = security_monitoring class ManagedClusterSecurityProfileDefenderSecurityMonitoring(_serialization.Model): # pylint: disable=name-too-long @@ -9829,46 +6927,6 @@ def __init__(self, *, enabled: Optional[bool] = None, interval_hours: Optional[i self.interval_hours = interval_hours -class ManagedClusterSecurityProfileImageIntegrity(_serialization.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 - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Whether to enable image integrity. The default value is false. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - -class ManagedClusterSecurityProfileNodeRestriction(_serialization.Model): # pylint: disable=name-too-long - """Node Restriction settings for the security profile. - - :ivar enabled: Whether to enable Node Restriction. - :vartype enabled: bool - """ - - _attribute_map = { - "enabled": {"key": "enabled", "type": "bool"}, - } - - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: - """ - :keyword enabled: Whether to enable Node Restriction. - :paramtype enabled: bool - """ - super().__init__(**kwargs) - self.enabled = enabled - - class ManagedClusterSecurityProfileWorkloadIdentity(_serialization.Model): # pylint: disable=name-too-long """Workload identity settings for the security profile. @@ -9958,121 +7016,6 @@ def __init__( self.tier = tier -class ManagedClusterSnapshot(TrackedResource): - """A managed cluster snapshot resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "location": {"required": True}, - "managed_cluster_properties_read_only": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "tags": {"key": "tags", "type": "{str}"}, - "location": {"key": "location", "type": "str"}, - "creation_data": {"key": "properties.creationData", "type": "CreationData"}, - "snapshot_type": {"key": "properties.snapshotType", "type": "str"}, - "managed_cluster_properties_read_only": { - "key": "properties.managedClusterPropertiesReadOnly", - "type": "ManagedClusterPropertiesForSnapshot", - }, - } - - def __init__( - self, - *, - location: str, - tags: Optional[dict[str, str]] = None, - creation_data: Optional["_models.CreationData"] = None, - snapshot_type: Union[str, "_models.SnapshotType"] = "NodePool", - **kwargs: Any - ) -> None: - """ - :keyword tags: Resource tags. - :paramtype tags: dict[str, str] - :keyword location: The geo-location where the resource lives. Required. - :paramtype location: str - :keyword creation_data: CreationData to be used to specify the source resource ID to create - this snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.models.CreationData - :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: - "NodePool" and "ManagedCluster". - :paramtype snapshot_type: str or ~azure.mgmt.containerservice.models.SnapshotType - """ - super().__init__(tags=tags, location=location, **kwargs) - self.creation_data = creation_data - self.snapshot_type = snapshot_type - self.managed_cluster_properties_read_only: Optional["_models.ManagedClusterPropertiesForSnapshot"] = None - - -class ManagedClusterSnapshotListResult(_serialization.Model): - """The response from the List Managed Cluster Snapshots operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of managed cluster snapshots. - :vartype value: list[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :ivar next_link: The URL to get the next set of managed cluster snapshot results. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[ManagedClusterSnapshot]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.ManagedClusterSnapshot"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of managed cluster snapshots. - :paramtype value: list[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - class ManagedClusterStaticEgressGatewayProfile(_serialization.Model): """The Static Egress Gateway addon configuration for the cluster. @@ -10198,25 +7141,19 @@ class ManagedClusterStorageProfileDiskCSIDriver(_serialization.Model): # pylint :ivar enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :vartype enabled: bool - :ivar version: The version of AzureDisk CSI Driver. The default value is v1. - :vartype version: str """ _attribute_map = { "enabled": {"key": "enabled", "type": "bool"}, - "version": {"key": "version", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, version: Optional[str] = None, **kwargs: Any) -> None: + def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: """ :keyword enabled: Whether to enable AzureDisk CSI Driver. The default value is true. :paramtype enabled: bool - :keyword version: The version of AzureDisk CSI Driver. The default value is v1. - :paramtype version: str """ super().__init__(**kwargs) self.enabled = enabled - self.version = version class ManagedClusterStorageProfileFileCSIDriver(_serialization.Model): # pylint: disable=name-too-long @@ -10416,7 +7353,8 @@ class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): :ivar keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. :vartype keda: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileKeda - :ivar vertical_pod_autoscaler: + :ivar vertical_pod_autoscaler: VPA (Vertical Pod Autoscaler) settings for the workload + auto-scaler profile. :vartype vertical_pod_autoscaler: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler """ @@ -10443,7 +7381,8 @@ def __init__( profile. :paramtype keda: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileKeda - :keyword vertical_pod_autoscaler: + :keyword vertical_pod_autoscaler: VPA (Vertical Pod Autoscaler) settings for the workload + auto-scaler profile. :paramtype vertical_pod_autoscaler: ~azure.mgmt.containerservice.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler """ @@ -10481,15 +7420,12 @@ def __init__(self, *, enabled: bool, **kwargs: Any) -> None: class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( _serialization.Model ): # pylint: disable=name-too-long - """ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. + """VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. All required parameters must be populated in order to send to server. - :ivar enabled: Whether to enable VPA add-on in cluster. Default value is false. Required. + :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 """ _validation = { @@ -10498,26 +7434,15 @@ class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( _attribute_map = { "enabled": {"key": "enabled", "type": "bool"}, - "addon_autoscaling": {"key": "addonAutoscaling", "type": "str"}, } - def __init__( - self, - *, - enabled: bool = False, - addon_autoscaling: Union[str, "_models.AddonAutoscaling"] = "Disabled", - **kwargs: Any - ) -> None: + def __init__(self, *, enabled: bool = False, **kwargs: Any) -> None: """ - :keyword enabled: Whether to enable VPA add-on in cluster. Default value is false. Required. + :keyword enabled: Whether to enable VPA. Default value is false. Required. :paramtype enabled: bool - :keyword addon_autoscaling: Whether VPA add-on is enabled and configured to scale AKS-managed - add-ons. Known values are: "Enabled" and "Disabled". - :paramtype addon_autoscaling: str or ~azure.mgmt.containerservice.models.AddonAutoscaling """ super().__init__(**kwargs) self.enabled = enabled - self.addon_autoscaling = addon_autoscaling class ManagedNamespace(SubResource): @@ -10650,171 +7575,32 @@ def __init__(self, **kwargs: Any) -> None: self.client_id: Optional[str] = None -class ManualScaleProfile(_serialization.Model): - """Specifications on number of machines. - - :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 count: Number of nodes. - :vartype count: int - """ - - _attribute_map = { - "size": {"key": "size", "type": "str"}, - "count": {"key": "count", "type": "int"}, - } - - def __init__(self, *, size: Optional[str] = None, count: Optional[int] = None, **kwargs: Any) -> None: - """ - :keyword size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', - 'Standard_E16s_v3' or 'Standard_D16s_v5'. - :paramtype size: str - :keyword count: Number of nodes. - :paramtype count: int - """ - super().__init__(**kwargs) - self.size = size - self.count = count - - -class MeshMembership(ProxyResource): - """Mesh membership of a managed cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 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: 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 properties: Mesh membership properties of a managed cluster. - :vartype properties: ~azure.mgmt.containerservice.models.MeshMembershipProperties - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "e_tag": {"readonly": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "managed_by": {"key": "managedBy", "type": "str"}, - "e_tag": {"key": "eTag", "type": "str"}, - "properties": {"key": "properties", "type": "MeshMembershipProperties"}, - } - - def __init__( - self, - *, - managed_by: Optional[str] = None, - properties: Optional["_models.MeshMembershipProperties"] = None, - **kwargs: Any - ) -> None: - """ - :keyword 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. - :paramtype managed_by: str - :keyword properties: Mesh membership properties of a managed cluster. - :paramtype properties: ~azure.mgmt.containerservice.models.MeshMembershipProperties - """ - super().__init__(**kwargs) - self.managed_by = managed_by - self.e_tag: Optional[str] = None - self.properties = properties - - -class MeshMembershipProperties(_serialization.Model): - """Mesh membership properties of a managed cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :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 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 - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "managed_mesh_id": {"required": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "managed_mesh_id": {"key": "managedMeshID", "type": "str"}, - } - - def __init__(self, *, managed_mesh_id: str, **kwargs: Any) -> None: - """ - :keyword 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. - :paramtype managed_mesh_id: str - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.MeshMembershipProvisioningState"]] = None - self.managed_mesh_id = managed_mesh_id - - -class MeshMembershipsListResult(_serialization.Model): - """The result of a request to list mesh memberships in a managed cluster. - - Variables are only populated by the server, and will be ignored when sending a request. +class ManualScaleProfile(_serialization.Model): + """Specifications on number of machines. - :ivar value: The list of mesh memberships. - :vartype value: list[~azure.mgmt.containerservice.models.MeshMembership] - :ivar next_link: The URL to get the next set of mesh membership results. - :vartype next_link: str + :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 count: Number of nodes. + :vartype count: int """ - _validation = { - "next_link": {"readonly": True}, - } - _attribute_map = { - "value": {"key": "value", "type": "[MeshMembership]"}, - "next_link": {"key": "nextLink", "type": "str"}, + "size": {"key": "size", "type": "str"}, + "count": {"key": "count", "type": "int"}, } - def __init__(self, *, value: Optional[list["_models.MeshMembership"]] = None, **kwargs: Any) -> None: + def __init__(self, *, size: Optional[str] = None, count: Optional[int] = None, **kwargs: Any) -> None: """ - :keyword value: The list of mesh memberships. - :paramtype value: list[~azure.mgmt.containerservice.models.MeshMembership] + :keyword size: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + 'Standard_E16s_v3' or 'Standard_D16s_v5'. + :paramtype size: str + :keyword count: Number of nodes. + :paramtype count: int """ super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None + self.size = size + self.count = count class MeshRevision(_serialization.Model): @@ -10858,6 +7644,26 @@ def __init__( self.compatible_with = compatible_with +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 + """ + + class MeshRevisionProfile(ProxyResource): """Mesh revision profile for a mesh. @@ -11063,415 +7869,135 @@ class NamespaceProperties(_serialization.Model): additive; if multiple resource quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied. :vartype default_resource_quota: ~azure.mgmt.containerservice.models.ResourceQuota - :ivar default_network_policy: The default network policy enforced upon the namespace. Customers - can have other Kubernetes network policy objects under the namespace. Network policies are - additive; if a policy or policies apply to a given pod for a given direction, the connections - allowed in that direction for the pod is the union of what all applicable policies allow. - :vartype default_network_policy: ~azure.mgmt.containerservice.models.NetworkPolicies - :ivar adoption_policy: Action if Kubernetes namespace with same name already exists. Known - values are: "Never", "IfIdentical", and "Always". - :vartype adoption_policy: str or ~azure.mgmt.containerservice.models.AdoptionPolicy - :ivar delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". - :vartype delete_policy: str or ~azure.mgmt.containerservice.models.DeletePolicy - """ - - _validation = { - "provisioning_state": {"readonly": True}, - "portal_fqdn": {"readonly": True}, - } - - _attribute_map = { - "provisioning_state": {"key": "provisioningState", "type": "str"}, - "labels": {"key": "labels", "type": "{str}"}, - "annotations": {"key": "annotations", "type": "{str}"}, - "portal_fqdn": {"key": "portalFqdn", "type": "str"}, - "default_resource_quota": {"key": "defaultResourceQuota", "type": "ResourceQuota"}, - "default_network_policy": {"key": "defaultNetworkPolicy", "type": "NetworkPolicies"}, - "adoption_policy": {"key": "adoptionPolicy", "type": "str"}, - "delete_policy": {"key": "deletePolicy", "type": "str"}, - } - - def __init__( - self, - *, - labels: Optional[dict[str, str]] = None, - annotations: Optional[dict[str, str]] = None, - default_resource_quota: Optional["_models.ResourceQuota"] = None, - default_network_policy: Optional["_models.NetworkPolicies"] = None, - adoption_policy: Optional[Union[str, "_models.AdoptionPolicy"]] = None, - delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword labels: The labels of managed namespace. - :paramtype labels: dict[str, str] - :keyword annotations: The annotations of managed namespace. - :paramtype annotations: dict[str, str] - :keyword default_resource_quota: The default resource quota enforced upon the namespace. - Customers can have other Kubernetes resource quota objects under the namespace. Resource quotas - are additive; if multiple resource quotas are applied to a given namespace, then the effective - limit will be one such that all quotas on the namespace can be satisfied. - :paramtype default_resource_quota: ~azure.mgmt.containerservice.models.ResourceQuota - :keyword default_network_policy: The default network policy enforced upon the namespace. - Customers can have other Kubernetes network policy objects under the namespace. Network - policies are additive; if a policy or policies apply to a given pod for a given direction, the - connections allowed in that direction for the pod is the union of what all applicable policies - allow. - :paramtype default_network_policy: ~azure.mgmt.containerservice.models.NetworkPolicies - :keyword adoption_policy: Action if Kubernetes namespace with same name already exists. Known - values are: "Never", "IfIdentical", and "Always". - :paramtype adoption_policy: str or ~azure.mgmt.containerservice.models.AdoptionPolicy - :keyword delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". - :paramtype delete_policy: str or ~azure.mgmt.containerservice.models.DeletePolicy - """ - super().__init__(**kwargs) - self.provisioning_state: Optional[Union[str, "_models.NamespaceProvisioningState"]] = None - self.labels = labels - self.annotations = annotations - self.portal_fqdn: Optional[str] = None - self.default_resource_quota = default_resource_quota - self.default_network_policy = default_network_policy - self.adoption_policy = adoption_policy - self.delete_policy = delete_policy - - -class NetworkPolicies(_serialization.Model): - """Default network policy of the namespace, specifying ingress and egress rules. - - :ivar ingress: Ingress policy for the network. Known values are: "DenyAll", "AllowAll", and - "AllowSameNamespace". - :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule - :ivar egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and - "AllowSameNamespace". - :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule - """ - - _attribute_map = { - "ingress": {"key": "ingress", "type": "str"}, - "egress": {"key": "egress", "type": "str"}, - } - - def __init__( - self, - *, - ingress: Optional[Union[str, "_models.PolicyRule"]] = None, - egress: Optional[Union[str, "_models.PolicyRule"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword ingress: Ingress policy for the network. Known values are: "DenyAll", "AllowAll", and - "AllowSameNamespace". - :paramtype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule - :keyword egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and - "AllowSameNamespace". - :paramtype egress: str or ~azure.mgmt.containerservice.models.PolicyRule - """ - super().__init__(**kwargs) - self.ingress = ingress - self.egress = egress - - -class NetworkProfileForSnapshot(_serialization.Model): - """network profile for managed cluster snapshot, these properties are read only. - - :ivar network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", - "kubenet", and "none". - :vartype network_plugin: str or ~azure.mgmt.containerservice.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 - """ - - _attribute_map = { - "network_plugin": {"key": "networkPlugin", "type": "str"}, - "network_plugin_mode": {"key": "networkPluginMode", "type": "str"}, - "network_policy": {"key": "networkPolicy", "type": "str"}, - "network_mode": {"key": "networkMode", "type": "str"}, - "load_balancer_sku": {"key": "loadBalancerSku", "type": "str"}, - } - - def __init__( - self, - *, - network_plugin: 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, - **kwargs: Any - ) -> None: - """ - :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", - "kubenet", and "none". - :paramtype network_plugin: str or ~azure.mgmt.containerservice.models.NetworkPlugin - :keyword network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "overlay" - :paramtype network_plugin_mode: str or ~azure.mgmt.containerservice.models.NetworkPluginMode - :keyword network_policy: networkPolicy for managed cluster snapshot. Known values are: "none", - "calico", "azure", and "cilium". - :paramtype network_policy: str or ~azure.mgmt.containerservice.models.NetworkPolicy - :keyword network_mode: networkMode for managed cluster snapshot. Known values are: - "transparent" and "bridge". - :paramtype network_mode: str or ~azure.mgmt.containerservice.models.NetworkMode - :keyword load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: - "standard" and "basic". - :paramtype load_balancer_sku: str or ~azure.mgmt.containerservice.models.LoadBalancerSku - """ - super().__init__(**kwargs) - self.network_plugin = network_plugin - self.network_plugin_mode = network_plugin_mode - self.network_policy = network_policy - self.network_mode = network_mode - self.load_balancer_sku = load_balancer_sku - - -class NodeCustomizationProfile(_serialization.Model): - """Settings to determine the node customization used to provision nodes in a pool. - - :ivar node_customization_id: The resource ID of the node customization resource to use. This - can be a version. Omitting the version will use the latest version of the node customization. - :vartype node_customization_id: str - """ - - _attribute_map = { - "node_customization_id": {"key": "nodeCustomizationId", "type": "str"}, - } - - def __init__(self, *, node_customization_id: Optional[str] = None, **kwargs: Any) -> None: - """ - :keyword node_customization_id: The resource ID of the node customization resource to use. This - can be a version. Omitting the version will use the latest version of the node customization. - :paramtype node_customization_id: str - """ - super().__init__(**kwargs) - self.node_customization_id = node_customization_id - - -class NodeImageVersion(_serialization.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 - """ - - _attribute_map = { - "os": {"key": "os", "type": "str"}, - "sku": {"key": "sku", "type": "str"}, - "version": {"key": "version", "type": "str"}, - "full_name": {"key": "fullName", "type": "str"}, - } - - def __init__( - self, - *, - os: Optional[str] = None, - sku: Optional[str] = None, - version: Optional[str] = None, - full_name: Optional[str] = None, - **kwargs: Any - ) -> None: - """ - :keyword os: The operating system of the node image. Example: AKSUbuntu. - :paramtype os: str - :keyword sku: The SKU or flavor of the node image. Example: 2004gen2containerd. - :paramtype sku: str - :keyword version: major.minor.patch version of the node image version release. Example: - 2024.02.02. - :paramtype version: str - :keyword full_name: The OS + SKU + version of the node image. Example: - AKSUbuntu-1804gen2containerd-2024.02.02. - :paramtype full_name: str - """ - super().__init__(**kwargs) - self.os = os - self.sku = sku - self.version = version - self.full_name = full_name - - -class NodeImageVersionsListResult(_serialization.Model): - """Holds an array NodeImageVersions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Array of AKS Node Image versions. - :vartype value: list[~azure.mgmt.containerservice.models.NodeImageVersion] - :ivar next_link: The URL to get the next set of machine results. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[NodeImageVersion]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.NodeImageVersion"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of AKS Node Image versions. - :paramtype value: list[~azure.mgmt.containerservice.models.NodeImageVersion] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class OperationListResult(_serialization.Model): - """The List Operation response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of operations. - :vartype value: list[~azure.mgmt.containerservice.models.OperationValue] + :ivar default_network_policy: The default network policy enforced upon the namespace. Customers + can have other Kubernetes network policy objects under the namespace. Network policies are + additive; if a policy or policies apply to a given pod for a given direction, the connections + allowed in that direction for the pod is the union of what all applicable policies allow. + :vartype default_network_policy: ~azure.mgmt.containerservice.models.NetworkPolicies + :ivar adoption_policy: Action if Kubernetes namespace with same name already exists. Known + values are: "Never", "IfIdentical", and "Always". + :vartype adoption_policy: str or ~azure.mgmt.containerservice.models.AdoptionPolicy + :ivar delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". + :vartype delete_policy: str or ~azure.mgmt.containerservice.models.DeletePolicy """ _validation = { - "value": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "portal_fqdn": {"readonly": True}, } _attribute_map = { - "value": {"key": "value", "type": "[OperationValue]"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "labels": {"key": "labels", "type": "{str}"}, + "annotations": {"key": "annotations", "type": "{str}"}, + "portal_fqdn": {"key": "portalFqdn", "type": "str"}, + "default_resource_quota": {"key": "defaultResourceQuota", "type": "ResourceQuota"}, + "default_network_policy": {"key": "defaultNetworkPolicy", "type": "NetworkPolicies"}, + "adoption_policy": {"key": "adoptionPolicy", "type": "str"}, + "delete_policy": {"key": "deletePolicy", "type": "str"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__( + self, + *, + labels: Optional[dict[str, str]] = None, + annotations: Optional[dict[str, str]] = None, + default_resource_quota: Optional["_models.ResourceQuota"] = None, + default_network_policy: Optional["_models.NetworkPolicies"] = None, + adoption_policy: Optional[Union[str, "_models.AdoptionPolicy"]] = None, + delete_policy: Optional[Union[str, "_models.DeletePolicy"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword labels: The labels of managed namespace. + :paramtype labels: dict[str, str] + :keyword annotations: The annotations of managed namespace. + :paramtype annotations: dict[str, str] + :keyword default_resource_quota: The default resource quota enforced upon the namespace. + Customers can have other Kubernetes resource quota objects under the namespace. Resource quotas + are additive; if multiple resource quotas are applied to a given namespace, then the effective + limit will be one such that all quotas on the namespace can be satisfied. + :paramtype default_resource_quota: ~azure.mgmt.containerservice.models.ResourceQuota + :keyword default_network_policy: The default network policy enforced upon the namespace. + Customers can have other Kubernetes network policy objects under the namespace. Network + policies are additive; if a policy or policies apply to a given pod for a given direction, the + connections allowed in that direction for the pod is the union of what all applicable policies + allow. + :paramtype default_network_policy: ~azure.mgmt.containerservice.models.NetworkPolicies + :keyword adoption_policy: Action if Kubernetes namespace with same name already exists. Known + values are: "Never", "IfIdentical", and "Always". + :paramtype adoption_policy: str or ~azure.mgmt.containerservice.models.AdoptionPolicy + :keyword delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". + :paramtype delete_policy: str or ~azure.mgmt.containerservice.models.DeletePolicy + """ super().__init__(**kwargs) - self.value: Optional[list["_models.OperationValue"]] = None - - -class OperationStatusResult(_serialization.Model): - """The current status of an async operation. + self.provisioning_state: Optional[Union[str, "_models.NamespaceProvisioningState"]] = None + self.labels = labels + self.annotations = annotations + self.portal_fqdn: Optional[str] = None + self.default_resource_quota = default_resource_quota + self.default_network_policy = default_network_policy + self.adoption_policy = adoption_policy + self.delete_policy = delete_policy - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to server. +class NetworkPolicies(_serialization.Model): + """Default network policy of the namespace, specifying ingress and egress rules. - :ivar id: Fully qualified ID for the async operation. - :vartype id: str - :ivar resource_id: Fully qualified ID of the resource against which the original async - operation was started. - :vartype resource_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 ingress: Ingress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :vartype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule + :ivar egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :vartype egress: str or ~azure.mgmt.containerservice.models.PolicyRule """ - _validation = { - "resource_id": {"readonly": True}, - "status": {"required": True}, - "percent_complete": {"maximum": 100, "minimum": 0}, - } - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "resource_id": {"key": "resourceId", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "status": {"key": "status", "type": "str"}, - "percent_complete": {"key": "percentComplete", "type": "float"}, - "start_time": {"key": "startTime", "type": "iso-8601"}, - "end_time": {"key": "endTime", "type": "iso-8601"}, - "operations": {"key": "operations", "type": "[OperationStatusResult]"}, - "error": {"key": "error", "type": "ErrorDetail"}, + "ingress": {"key": "ingress", "type": "str"}, + "egress": {"key": "egress", "type": "str"}, } 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, **kwargs: Any ) -> None: """ - :keyword id: Fully qualified ID for the async operation. - :paramtype id: str - :keyword name: Name of the async operation. - :paramtype name: str - :keyword status: Operation status. Required. - :paramtype status: str - :keyword percent_complete: Percent of the operation that is complete. - :paramtype percent_complete: float - :keyword start_time: The start time of the operation. - :paramtype start_time: ~datetime.datetime - :keyword end_time: The end time of the operation. - :paramtype end_time: ~datetime.datetime - :keyword operations: The operations list. - :paramtype operations: list[~azure.mgmt.containerservice.models.OperationStatusResult] - :keyword error: If present, details of the operation error. - :paramtype error: ~azure.mgmt.containerservice.models.ErrorDetail + :keyword ingress: Ingress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :paramtype ingress: str or ~azure.mgmt.containerservice.models.PolicyRule + :keyword egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :paramtype egress: str or ~azure.mgmt.containerservice.models.PolicyRule """ super().__init__(**kwargs) - self.id = id - self.resource_id: Optional[str] = None - self.name = name - self.status = status - self.percent_complete = percent_complete - self.start_time = start_time - self.end_time = end_time - self.operations = operations - self.error = error + self.ingress = ingress + self.egress = egress -class OperationStatusResultList(_serialization.Model): - """The operations list. It contains an URL link to get the next set of results. +class OperationListResult(_serialization.Model): + """The List Operation response. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of operations. - :vartype value: list[~azure.mgmt.containerservice.models.OperationStatusResult] - :ivar next_link: URL to get the next set of operation list results (if there are any). - :vartype next_link: str + :ivar value: The list of operations. + :vartype value: list[~azure.mgmt.containerservice.models.OperationValue] """ _validation = { "value": {"readonly": True}, - "next_link": {"readonly": True}, } _attribute_map = { - "value": {"key": "value", "type": "[OperationStatusResult]"}, - "next_link": {"key": "nextLink", "type": "str"}, + "value": {"key": "value", "type": "[OperationValue]"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value: Optional[list["_models.OperationStatusResult"]] = None - self.next_link: Optional[str] = None + self.value: Optional[list["_models.OperationValue"]] = None class OperationValue(_serialization.Model): @@ -11883,27 +8409,6 @@ def __init__( self.description = description -class RebalanceLoadBalancersRequestBody(_serialization.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] - """ - - _attribute_map = { - "load_balancer_names": {"key": "loadBalancerNames", "type": "[str]"}, - } - - def __init__(self, *, load_balancer_names: Optional[list[str]] = None, **kwargs: Any) -> None: - """ - :keyword load_balancer_names: The load balancer names list. - :paramtype load_balancer_names: list[str] - """ - super().__init__(**kwargs) - self.load_balancer_names = load_balancer_names - - class RelativeMonthlySchedule(_serialization.Model): """For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. @@ -11913,9 +8418,8 @@ class RelativeMonthlySchedule(_serialization.Model): :ivar interval_months: Specifies the number of months between each set of occurrences. Required. :vartype interval_months: int - :ivar week_index: The week index. Specifies on which instance of the allowed days specified in - daysOfWeek the maintenance occurs. Required. Known values are: "First", "Second", "Third", - "Fourth", and "Last". + :ivar week_index: The week index. Specifies on which week of the month the dayOfWeek applies. + Required. Known values are: "First", "Second", "Third", "Fourth", and "Last". :vartype week_index: str or ~azure.mgmt.containerservice.models.Type :ivar day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". @@ -11946,9 +8450,8 @@ def __init__( :keyword interval_months: Specifies the number of months between each set of occurrences. Required. :paramtype interval_months: int - :keyword week_index: The week index. Specifies on which instance of the allowed days specified - in daysOfWeek the maintenance occurs. Required. Known values are: "First", "Second", "Third", - "Fourth", and "Last". + :keyword week_index: The week index. Specifies on which week of the month the dayOfWeek + applies. Required. Known values are: "First", "Second", "Third", "Fourth", and "Last". :paramtype week_index: str or ~azure.mgmt.containerservice.models.Type :keyword day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and @@ -12143,145 +8646,24 @@ def __init__(self, **kwargs: Any) -> None: self.reason: Optional[str] = None -class SafeguardsAvailableVersion(Resource): - """Available Safeguards Version. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to server. - - :ivar id: Fully qualified resource ID for the resource. E.g. - "/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 - """ - - _validation = { - "id": {"readonly": True}, - "name": {"readonly": True}, - "type": {"readonly": True}, - "system_data": {"readonly": True}, - "properties": {"required": True}, - } - - _attribute_map = { - "id": {"key": "id", "type": "str"}, - "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, - "system_data": {"key": "systemData", "type": "SystemData"}, - "properties": {"key": "properties", "type": "SafeguardsAvailableVersionsProperties"}, - } - - def __init__(self, *, properties: "_models.SafeguardsAvailableVersionsProperties", **kwargs: Any) -> None: - """ - :keyword properties: Whether the version is default or not and support info. Required. - :paramtype properties: - ~azure.mgmt.containerservice.models.SafeguardsAvailableVersionsProperties - """ - super().__init__(**kwargs) - self.properties = properties - - -class SafeguardsAvailableVersionsList(_serialization.Model): - """Hold values properties, which is array of SafeguardsVersions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Array of AKS supported Safeguards versions. - :vartype value: list[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] - :ivar next_link: The URL to get the next Safeguards available version. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[SafeguardsAvailableVersion]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[list["_models.SafeguardsAvailableVersion"]] = None, **kwargs: Any) -> None: - """ - :keyword value: Array of AKS supported Safeguards versions. - :paramtype value: list[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] - """ - super().__init__(**kwargs) - self.value = value - self.next_link: Optional[str] = None - - -class SafeguardsAvailableVersionsProperties(_serialization.Model): - """Whether the version is default or not and support info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar is_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 - """ - - _validation = { - "is_default_version": {"readonly": True}, - "support": {"readonly": True}, - } - - _attribute_map = { - "is_default_version": {"key": "isDefaultVersion", "type": "bool"}, - "support": {"key": "support", "type": "str"}, - } - - def __init__(self, **kwargs: Any) -> None: - """ """ - super().__init__(**kwargs) - self.is_default_version: Optional[bool] = None - self.support: Optional[Union[str, "_models.SafeguardsSupport"]] = None - - class ScaleProfile(_serialization.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. - :vartype autoscale: ~azure.mgmt.containerservice.models.AutoScaleProfile """ _attribute_map = { "manual": {"key": "manual", "type": "[ManualScaleProfile]"}, - "autoscale": {"key": "autoscale", "type": "AutoScaleProfile"}, } - def __init__( - self, - *, - manual: Optional[list["_models.ManualScaleProfile"]] = None, - autoscale: Optional["_models.AutoScaleProfile"] = None, - **kwargs: Any - ) -> None: + def __init__(self, *, manual: Optional[list["_models.ManualScaleProfile"]] = None, **kwargs: Any) -> None: """ :keyword manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. :paramtype manual: list[~azure.mgmt.containerservice.models.ManualScaleProfile] - :keyword autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a - predefined size range. - :paramtype autoscale: ~azure.mgmt.containerservice.models.AutoScaleProfile """ super().__init__(**kwargs) self.manual = manual - self.autoscale = autoscale class Schedule(_serialization.Model): @@ -12336,81 +8718,6 @@ def __init__( self.relative_monthly = relative_monthly -class SchedulerInstanceProfile(_serialization.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 - """ - - _attribute_map = { - "scheduler_config_mode": {"key": "schedulerConfigMode", "type": "str"}, - } - - def __init__( - self, *, scheduler_config_mode: Optional[Union[str, "_models.SchedulerConfigMode"]] = None, **kwargs: Any - ) -> None: - """ - :keyword scheduler_config_mode: The config customization mode for this scheduler instance. - Known values are: "Default" and "ManagedByCRD". - :paramtype scheduler_config_mode: str or - ~azure.mgmt.containerservice.models.SchedulerConfigMode - """ - super().__init__(**kwargs) - self.scheduler_config_mode = scheduler_config_mode - - -class SchedulerProfile(_serialization.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 - """ - - _attribute_map = { - "scheduler_instance_profiles": { - "key": "schedulerInstanceProfiles", - "type": "SchedulerProfileSchedulerInstanceProfiles", - }, - } - - def __init__( - self, - *, - scheduler_instance_profiles: Optional["_models.SchedulerProfileSchedulerInstanceProfiles"] = None, - **kwargs: Any - ) -> None: - """ - :keyword scheduler_instance_profiles: Mapping of each scheduler instance to its profile. - :paramtype scheduler_instance_profiles: - ~azure.mgmt.containerservice.models.SchedulerProfileSchedulerInstanceProfiles - """ - super().__init__(**kwargs) - self.scheduler_instance_profiles = scheduler_instance_profiles - - -class SchedulerProfileSchedulerInstanceProfiles(_serialization.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 - """ - - _attribute_map = { - "upstream": {"key": "upstream", "type": "SchedulerInstanceProfile"}, - } - - def __init__(self, *, upstream: Optional["_models.SchedulerInstanceProfile"] = None, **kwargs: Any) -> None: - """ - :keyword upstream: The scheduler profile for the upstream scheduler instance. - :paramtype upstream: ~azure.mgmt.containerservice.models.SchedulerInstanceProfile - """ - super().__init__(**kwargs) - self.upstream = upstream - - class ServiceMeshProfile(_serialization.Model): """Service mesh profile for a managed cluster. @@ -12474,8 +8781,7 @@ class Snapshot(TrackedResource): :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 @@ -12484,11 +8790,10 @@ class Snapshot(TrackedResource): :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", "Mariner", - "AzureLinux", "AzureLinux3", "Flatcar", "CBLMariner", "Windows2019", "Windows2022", - "Windows2025", "WindowsAnnual", "Ubuntu2204", and "Ubuntu2404". + :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", + "CBLMariner", "Windows2019", "Windows2022", "Ubuntu2204", and "Ubuntu2404". :vartype os_sku: str or ~azure.mgmt.containerservice.models.OSSKU :ivar vm_size: The size of the VM. :vartype vm_size: str @@ -12544,8 +8849,7 @@ def __init__( :keyword creation_data: CreationData to be used to specify the source agent pool resource ID to create this snapshot. :paramtype creation_data: ~azure.mgmt.containerservice.models.CreationData - :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: - "NodePool" and "ManagedCluster". + :keyword snapshot_type: The type of a snapshot. The default is NodePool. "NodePool" :paramtype snapshot_type: str or ~azure.mgmt.containerservice.models.SnapshotType """ super().__init__(tags=tags, location=location, **kwargs) 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 7f09a97cf023..70b2a677e7b0 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 @@ -14,23 +14,16 @@ from ._operations import Operations # type: ignore from ._managed_clusters_operations import ManagedClustersOperations # type: ignore -from ._container_service_operations import ContainerServiceOperations # type: ignore from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations # type: ignore from ._managed_namespaces_operations import ManagedNamespacesOperations # type: ignore from ._agent_pools_operations import AgentPoolsOperations # type: ignore -from ._machines_operations import MachinesOperations # type: ignore from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations # type: ignore -from ._operation_status_result_operations import OperationStatusResultOperations # type: ignore from ._snapshots_operations import SnapshotsOperations # type: ignore -from ._managed_cluster_snapshots_operations import ManagedClusterSnapshotsOperations # type: ignore -from ._trusted_access_roles_operations import TrustedAccessRolesOperations # type: ignore from ._trusted_access_role_bindings_operations import TrustedAccessRoleBindingsOperations # type: ignore -from ._load_balancers_operations import LoadBalancersOperations # type: ignore -from ._identity_bindings_operations import IdentityBindingsOperations # type: ignore -from ._jwt_authenticators_operations import JWTAuthenticatorsOperations # type: ignore -from ._mesh_memberships_operations import MeshMembershipsOperations # type: ignore +from ._trusted_access_roles_operations import TrustedAccessRolesOperations # type: ignore +from ._machines_operations import MachinesOperations # type: ignore from ._patch import __all__ as _patch_all from ._patch import * @@ -39,23 +32,16 @@ __all__ = [ "Operations", "ManagedClustersOperations", - "ContainerServiceOperations", "MaintenanceConfigurationsOperations", "ManagedNamespacesOperations", "AgentPoolsOperations", - "MachinesOperations", "PrivateEndpointConnectionsOperations", "PrivateLinkResourcesOperations", "ResolvePrivateLinkServiceIdOperations", - "OperationStatusResultOperations", "SnapshotsOperations", - "ManagedClusterSnapshotsOperations", - "TrustedAccessRolesOperations", "TrustedAccessRoleBindingsOperations", - "LoadBalancersOperations", - "IdentityBindingsOperations", - "JWTAuthenticatorsOperations", - "MeshMembershipsOperations", + "TrustedAccessRolesOperations", + "MachinesOperations", ] __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/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_agent_pools_operations.py index fb070195d724..203a6ca90b7c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_agent_pools_operations.py @@ -49,7 +49,7 @@ def build_abort_latest_operation_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -92,7 +92,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -132,7 +132,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -182,7 +182,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -239,7 +239,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -288,7 +288,7 @@ def build_get_upgrade_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -325,56 +325,13 @@ def build_get_upgrade_profile_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_complete_upgrade_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "agentPoolName": _SERIALIZER.url( - "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" - ), - } - - _url: str = _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="POST", url=_url, params=_params, headers=_headers, **kwargs) - - def build_delete_machines_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -420,7 +377,7 @@ def build_get_available_agent_pool_versions_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -460,7 +417,7 @@ def build_upgrade_node_image_version_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -586,7 +543,7 @@ def begin_abort_latest_operation( Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation - completes before cancellation can take place, an error is returned. + 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. @@ -1243,129 +1200,6 @@ def get_upgrade_profile( return deserialized # type: ignore - 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_container_service_operations.py deleted file mode 100644 index 537c43df3c2c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_container_service_operations.py +++ /dev/null @@ -1,170 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_node_image_versions_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", min_length=1), - } - - _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) - - -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. - """ - - models = _models - - 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 either NodeImageVersion or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.NodeImageVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.NodeImageVersionsListResult] = 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_list_node_image_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("NodeImageVersionsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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/azure/mgmt/containerservice/operations/_identity_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_identity_bindings_operations.py deleted file mode 100644 index 42748bf293ca..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_identity_bindings_operations.py +++ /dev/null @@ -1,763 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_managed_cluster_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "identityBindingName": _SERIALIZER.url( - "identity_binding_name", - identity_binding_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,63}$", - ), - } - - _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_create_or_update_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", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "identityBindingName": _SERIALIZER.url( - "identity_binding_name", - identity_binding_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,63}$", - ), - } - - _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_delete_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "identityBindingName": _SERIALIZER.url( - "identity_binding_name", - identity_binding_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,63}$", - ), - } - - _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class IdentityBindingsOperations: - """ - .. 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. - """ - - models = _models - - 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.IdentityBinding"]: - """Gets a list of identity bindings in the specified managed cluster. - - Gets a list of identity bindings 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 either IdentityBinding or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityBindingListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("IdentityBindingListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, identity_binding_name: str, **kwargs: Any - ) -> _models.IdentityBinding: - """Gets the specified Identity Binding. - - Gets the specified Identity 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: IdentityBinding or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.IdentityBinding - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.IdentityBinding] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("IdentityBinding", pipeline_response.http_response) - - 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, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "IdentityBinding") - - _request = build_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, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - identity_binding_name: str, - parameters: _models.IdentityBinding, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. - - Creates or updates an identity binding 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 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 - :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 either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - identity_binding_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. - - Creates or updates an identity binding 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 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: 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 either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - identity_binding_name: str, - parameters: Union[_models.IdentityBinding, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.IdentityBinding]: - """Creates or updates an identity binding in the specified managed cluster. - - Creates or updates an identity binding 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 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 either a IdentityBinding type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.IdentityBinding or IO[bytes] - :return: An instance of LROPoller that returns either IdentityBinding or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.IdentityBinding] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - 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, - api_version=api_version, - 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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("IdentityBinding", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_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 - ) - - def _delete_initial( - self, resource_group_name: str, resource_name: str, identity_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - identity_binding_name=identity_binding_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, identity_binding_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes an identity binding in the specified managed cluster. - - Deletes an identity binding 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 identity_binding_name: The name of the identity binding. Required. - :type identity_binding_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - identity_binding_name=identity_binding_name, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_jwt_authenticators_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_jwt_authenticators_operations.py deleted file mode 100644 index dc1d2913959e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_jwt_authenticators_operations.py +++ /dev/null @@ -1,767 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_managed_cluster_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "jwtAuthenticatorName": _SERIALIZER.url( - "jwt_authenticator_name", - jwt_authenticator_name, - "str", - max_length=24, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,23}$", - ), - } - - _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_create_or_update_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", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "jwtAuthenticatorName": _SERIALIZER.url( - "jwt_authenticator_name", - jwt_authenticator_name, - "str", - max_length=24, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,23}$", - ), - } - - _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_delete_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "jwtAuthenticatorName": _SERIALIZER.url( - "jwt_authenticator_name", - jwt_authenticator_name, - "str", - max_length=24, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,23}$", - ), - } - - _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class JWTAuthenticatorsOperations: - """ - .. 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. - """ - - models = _models - - 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.JWTAuthenticator"]: - """Gets a list of JWT authenticators in the specified managed cluster. - - Gets a list of JWT authenticators 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 either JWTAuthenticator or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JWTAuthenticatorListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("JWTAuthenticatorListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - 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. - - Gets the specified JWT authenticator 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 jwt_authenticator_name: The name of the JWT authenticator. Required. - :type jwt_authenticator_name: str - :return: JWTAuthenticator or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.JWTAuthenticator - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.JWTAuthenticator] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("JWTAuthenticator", pipeline_response.http_response) - - 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, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "JWTAuthenticator") - - _request = build_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, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - jwt_authenticator_name: str, - parameters: _models.JWTAuthenticator, - *, - 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 - :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 either JWTAuthenticator or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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: 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 either JWTAuthenticator or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - jwt_authenticator_name: str, - parameters: Union[_models.JWTAuthenticator, 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. - - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to - apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 either a JWTAuthenticator type - or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.JWTAuthenticator or IO[bytes] - :return: An instance of LROPoller that returns either JWTAuthenticator or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.JWTAuthenticator] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - 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, - api_version=api_version, - 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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("JWTAuthenticator", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_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 - ) - - def _delete_initial( - self, resource_group_name: str, resource_name: str, jwt_authenticator_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, jwt_authenticator_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a JWT authenticator and updates the managed cluster to apply the settings. - - Deletes a JWT authenticator and updates the managed cluster to apply the settings. - - :param resource_group_name: The name of the resource group. The name is 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast( - PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) - ) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_load_balancers_operations.py deleted file mode 100644 index 3f09590828f0..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_load_balancers_operations.py +++ /dev/null @@ -1,682 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_managed_cluster_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "loadBalancerName": _SERIALIZER.url( - "load_balancer_name", - load_balancer_name, - "str", - max_length=12, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,11}$", - ), - } - - _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_create_or_update_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", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "loadBalancerName": _SERIALIZER.url( - "load_balancer_name", - load_balancer_name, - "str", - max_length=12, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,11}$", - ), - } - - _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_delete_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "loadBalancerName": _SERIALIZER.url( - "load_balancer_name", - load_balancer_name, - "str", - max_length=12, - min_length=1, - pattern=r"^[a-z][a-z0-9]{0,11}$", - ), - } - - _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -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. - """ - - models = _models - - 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.LoadBalancer"]: - """Gets a list of load balancers in the specified managed cluster. - - Gets a list of load balancers 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 either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.LoadBalancer] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoadBalancerListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("LoadBalancerListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get( - self, resource_group_name: str, resource_name: str, load_balancer_name: str, **kwargs: Any - ) -> _models.LoadBalancer: - """Gets the specified load balancer. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) - - 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, - 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. - - 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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - 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. - - 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: 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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.LoadBalancer - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - load_balancer_name: str, - parameters: Union[_models.LoadBalancer, IO[bytes]], - **kwargs: Any - ) -> _models.LoadBalancer: - """Creates or updates a load balancer in the specified managed cluster. - - 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. Is either a LoadBalancer type or a - IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.LoadBalancer or IO[bytes] - :return: LoadBalancer or the result of cls(response) - :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 = 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", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "LoadBalancer") - - _request = build_create_or_update_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=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("LoadBalancer", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - def _delete_initial( - self, resource_group_name: str, resource_name: str, load_balancer_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - if response.status_code == 204: - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, load_balancer_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes a load balancer in the specified managed cluster. - - 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 LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - load_balancer_name=load_balancer_name, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_machines_operations.py index 5698e1428647..48bbc9dc7862 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_machines_operations.py @@ -7,8 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, Optional, TypeVar import urllib.parse from azure.core import PipelineClient @@ -18,18 +17,14 @@ ResourceExistsError, ResourceNotFoundError, ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, map_error, ) from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.rest import HttpRequest, HttpResponse from azure.core.tracing.decorator import distributed_trace from azure.core.utils import case_insensitive_dict from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models from .._configuration import ContainerServiceClientConfiguration @@ -49,7 +44,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -122,7 +117,7 @@ def build_get_request( "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" ), "machineName": _SERIALIZER.url( - "machine_name", machine_name, "str", pattern=r"^[a-z][a-z0-9]{0,11}$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$" + "machine_name", machine_name, "str", pattern=r"^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$" ), } @@ -137,67 +132,6 @@ def build_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_or_update_request( - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - if_none_match: Optional[str] = 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", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "agentPoolName": _SERIALIZER.url( - "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" - ), - "machineName": _SERIALIZER.url( - "machine_name", machine_name, "str", pattern=r"^[a-z][a-z0-9]{0,11}$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,39}$" - ), - } - - _url: str = _url.format(**path_format_arguments) # type: ignore - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - if if_match is not None: - _headers["If-Match"] = _SERIALIZER.header("if_match", if_match, "str") - if if_none_match is not None: - _headers["If-None-Match"] = _SERIALIZER.header("if_none_match", if_none_match, "str") - 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) - - class MachinesOperations: """ .. warning:: @@ -324,7 +258,7 @@ def get( :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. + :param machine_name: host name of the machine. Required. :type machine_name: str :return: Machine or the result of cls(response) :rtype: ~azure.mgmt.containerservice.models.Machine @@ -377,267 +311,3 @@ def get( 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, - machine_name: str, - parameters: Union[_models.Machine, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "Machine") - - _request = build_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, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, - machine_name: str, - parameters: _models.Machine, - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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 - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :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 either Machine or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: IO[bytes], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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] - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :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 either Machine or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - agent_pool_name: str, - machine_name: str, - parameters: Union[_models.Machine, IO[bytes]], - if_match: Optional[str] = None, - if_none_match: Optional[str] = None, - **kwargs: Any - ) -> LROPoller[_models.Machine]: - """Creates or updates a machine in the specified agent pool. - - 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 either a Machine type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.Machine or IO[bytes] - :param if_match: The request should only proceed if an entity matches this string. Default - value is None. - :type if_match: str - :param if_none_match: The request should only proceed if no entity matches this string. Default - value is None. - :type if_none_match: str - :return: An instance of LROPoller that returns either Machine or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.Machine] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.Machine] = 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, - machine_name=machine_name, - parameters=parameters, - if_match=if_match, - if_none_match=if_none_match, - api_version=api_version, - 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["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = self._deserialize("Machine", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, response_headers) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.Machine].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 - ) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_maintenance_configurations_operations.py index 5f945d8b7d8d..5a1763a2421f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_maintenance_configurations_operations.py @@ -45,7 +45,7 @@ def build_list_by_managed_cluster_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,7 +85,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,7 +126,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -170,7 +170,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -328,7 +328,8 @@ def get( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. :type config_name: str :return: MaintenanceConfiguration or the result of cls(response) :rtype: ~azure.mgmt.containerservice.models.MaintenanceConfiguration @@ -401,7 +402,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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: ~azure.mgmt.containerservice.models.MaintenanceConfiguration @@ -433,7 +435,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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] @@ -463,7 +466,8 @@ def create_or_update( :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. 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. Is either a MaintenanceConfiguration type or a IO[bytes] type. Required. @@ -544,7 +548,8 @@ def delete( # pylint: disable=inconsistent-return-statements :type resource_group_name: str :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str - :param config_name: The name of the maintenance configuration. Required. + :param config_name: The name of the maintenance configuration. Supported values are 'default', + 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. Required. :type config_name: str :return: None or the result of cls(response) :rtype: None diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_cluster_snapshots_operations.py deleted file mode 100644 index 0c6af6643974..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_cluster_snapshots_operations.py +++ /dev/null @@ -1,851 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Optional, TypeVar, Union, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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 - - # Construct parameters - _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - } - - _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_get_request(resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_create_or_update_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_update_tags_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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="PATCH", url=_url, params=_params, headers=_headers, **kwargs) - - -def build_delete_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class ManagedClusterSnapshotsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.ContainerServiceClient`'s - :attr:`managed_cluster_snapshots` attribute. - """ - - models = _models - - 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, **kwargs: Any) -> ItemPaged["_models.ManagedClusterSnapshot"]: - """Gets a list of managed cluster snapshots in the specified subscription. - - Gets a list of managed cluster snapshots in the specified subscription. - - :return: An iterator like instance of either ManagedClusterSnapshot or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshotListResult] = 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_list_request( - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - 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. - - 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 either ManagedClusterSnapshot or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.ManagedClusterSnapshot] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshotListResult] = 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_list_by_resource_group_request( - resource_group_name=resource_group_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ManagedClusterSnapshotListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _models.ManagedClusterSnapshot: - """Gets a managed cluster snapshot. - - Gets a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - 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. - - 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 or the result of cls(response) - :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. - - 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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def create_or_update( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.ManagedClusterSnapshot, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Creates or updates a managed cluster snapshot. - - Creates or updates a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: The managed cluster snapshot to create or update. Is either a - ManagedClusterSnapshot type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot or IO[bytes] - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = 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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "ManagedClusterSnapshot") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # 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.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: ~azure.mgmt.containerservice.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: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Required. - :type parameters: IO[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 or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.ManagedClusterSnapshot - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def update_tags( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.TagsObject, IO[bytes]], - **kwargs: Any - ) -> _models.ManagedClusterSnapshot: - """Updates tags on a managed cluster snapshot. - - Updates tags on a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. - Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.TagsObject or IO[bytes] - :return: ManagedClusterSnapshot or the result of cls(response) - :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 = 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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) - - content_type = content_type or "application/json" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "TagsObject") - - _request = build_update_tags_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("ManagedClusterSnapshot", pipeline_response.http_response) - - 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 managed cluster snapshot. - - Deletes a managed cluster snapshot. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - Required. - :type resource_group_name: str - :param resource_name: The name of the managed cluster resource. Required. - :type resource_name: str - :return: None or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[None] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_clusters_operations.py index dc281ffe4ae9..e32ef0b8666d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_clusters_operations.py @@ -47,7 +47,7 @@ def build_list_kubernetes_versions_request(location: str, subscription_id: str, _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +75,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +101,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,7 +133,7 @@ def build_get_upgrade_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,7 +173,7 @@ def build_get_access_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -219,7 +219,7 @@ def build_list_cluster_admin_credentials_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -267,7 +267,7 @@ def build_list_cluster_user_credentials_request( # pylint: disable=name-too-lon _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -316,7 +316,7 @@ def build_list_cluster_monitoring_user_credentials_request( # pylint: disable=n _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -356,7 +356,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -402,7 +402,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -449,7 +449,7 @@ def build_update_tags_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -489,18 +489,12 @@ def build_update_tags_request( def build_delete_request( - resource_group_name: str, - resource_name: str, - subscription_id: str, - *, - if_match: Optional[str] = None, - ignore_pod_disruption_budget: Optional[bool] = None, - **kwargs: Any + resource_group_name: str, resource_name: str, subscription_id: str, *, if_match: Optional[str] = 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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -527,10 +521,6 @@ def build_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 if_match is not None: @@ -546,7 +536,7 @@ def build_reset_service_principal_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -589,7 +579,7 @@ def build_reset_aad_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -626,19 +616,19 @@ def build_reset_aad_profile_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_abort_latest_operation_request( +def build_rotate_cluster_certificates_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -666,19 +656,19 @@ def build_abort_latest_operation_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_rotate_cluster_certificates_request( # pylint: disable=name-too-long +def build_abort_latest_operation_request( resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -712,7 +702,7 @@ def build_rotate_service_account_signing_keys_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -752,7 +742,7 @@ def build_stop_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -792,7 +782,7 @@ def build_start_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -832,7 +822,7 @@ def build_run_command_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -875,7 +865,7 @@ def build_get_command_result_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -916,7 +906,7 @@ def build_list_outbound_network_dependencies_endpoints_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -950,131 +940,13 @@ def build_list_outbound_network_dependencies_endpoints_request( # pylint: disab return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_guardrails_versions_request( - 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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", min_length=1), - "version": _SERIALIZER.url("version", version, "str", max_length=24, min_length=1), - } - - _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_list_guardrails_versions_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", min_length=1), - } - - _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_get_safeguards_versions_request( - 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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", min_length=1), - "version": _SERIALIZER.url("version", version, "str", max_length=24, min_length=1), - } - - _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_list_safeguards_versions_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", min_length=1), - } - - _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_list_mesh_revision_profiles_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1104,7 +976,7 @@ def build_get_mesh_revision_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1142,7 +1014,7 @@ def build_list_mesh_upgrade_profiles_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1182,7 +1054,7 @@ def build_get_mesh_upgrade_profile_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1224,49 +1096,6 @@ def build_get_mesh_upgrade_profile_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_rebalance_load_balancers_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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) - - class ManagedClustersOperations: # pylint: disable=too-many-public-methods """ .. warning:: @@ -2360,12 +2189,7 @@ def get_long_running_output(pipeline_response): ) def _delete_initial( - self, - resource_group_name: str, - resource_name: str, - if_match: Optional[str] = None, - ignore_pod_disruption_budget: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, resource_name: str, if_match: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { 401: ClientAuthenticationError, @@ -2386,7 +2210,6 @@ def _delete_initial( resource_name=resource_name, subscription_id=self._config.subscription_id, if_match=if_match, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, api_version=api_version, headers=_headers, params=_params, @@ -2426,12 +2249,7 @@ def _delete_initial( @distributed_trace def begin_delete( - self, - resource_group_name: str, - resource_name: str, - if_match: Optional[str] = None, - ignore_pod_disruption_budget: Optional[bool] = None, - **kwargs: Any + self, resource_group_name: str, resource_name: str, if_match: Optional[str] = None, **kwargs: Any ) -> LROPoller[None]: """Deletes a managed cluster. @@ -2445,9 +2263,6 @@ def begin_delete( :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str - :param ignore_pod_disruption_budget: ignore-pod-disruption-budget=true to delete those pods on - a node without considering Pod Disruption Budget. Default value is None. - :type ignore_pod_disruption_budget: bool :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: @@ -2465,7 +2280,6 @@ def begin_delete( resource_group_name=resource_group_name, resource_name=resource_name, if_match=if_match, - ignore_pod_disruption_budget=ignore_pod_disruption_budget, api_version=api_version, cls=lambda x, y, z: x, headers=_headers, @@ -2903,7 +2717,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 - def _abort_latest_operation_initial( + def _rotate_cluster_certificates_initial( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -2920,7 +2734,7 @@ def _abort_latest_operation_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_abort_latest_operation_request( + _request = build_rotate_cluster_certificates_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -2952,10 +2766,7 @@ def _abort_latest_operation_initial( response_headers = {} if response.status_code == 202: - response_headers["location"] = self._deserialize("str", response.headers.get("location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -2965,14 +2776,13 @@ def _abort_latest_operation_initial( return deserialized # type: ignore @distributed_trace - def begin_abort_latest_operation( + def begin_rotate_cluster_certificates( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> LROPoller[None]: - """Aborts last operation running on managed cluster. + """Rotates the certificates of a managed cluster. - Aborts the currently running operation on the managed cluster. The Managed Cluster will be - moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If - the operation completes before cancellation can take place, an error is returned. + 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. @@ -2992,7 +2802,7 @@ def begin_abort_latest_operation( 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( + raw_result = self._rotate_cluster_certificates_initial( resource_group_name=resource_group_name, resource_name=resource_name, api_version=api_version, @@ -3025,7 +2835,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 - def _rotate_cluster_certificates_initial( + def _abort_latest_operation_initial( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> Iterator[bytes]: error_map: MutableMapping = { @@ -3042,7 +2852,7 @@ def _rotate_cluster_certificates_initial( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - _request = build_rotate_cluster_certificates_request( + _request = build_abort_latest_operation_request( resource_group_name=resource_group_name, resource_name=resource_name, subscription_id=self._config.subscription_id, @@ -3074,7 +2884,10 @@ def _rotate_cluster_certificates_initial( response_headers = {} if response.status_code == 202: - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) + response_headers["Azure-AsyncOperation"] = self._deserialize( + "str", response.headers.get("Azure-AsyncOperation") + ) deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) @@ -3084,13 +2897,14 @@ def _rotate_cluster_certificates_initial( return deserialized # type: ignore @distributed_trace - def begin_rotate_cluster_certificates( + def begin_abort_latest_operation( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> LROPoller[None]: - """Rotates the certificates of a managed cluster. + """Aborts last operation running on managed cluster. - See `Certificate rotation `_ for - more details about rotating managed cluster certificates. + 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. @@ -3110,7 +2924,7 @@ def begin_rotate_cluster_certificates( 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( + raw_result = self._abort_latest_operation_initial( resource_group_name=resource_group_name, resource_name=resource_name, api_version=api_version, @@ -3871,19 +3685,24 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @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. + def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> ItemPaged["_models.MeshRevisionProfile"]: + """Lists mesh revision profiles for all meshes in the specified location. - Contains 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 - :param version: Safeguards version. Required. - :type version: str - :return: GuardrailsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.GuardrailsAvailableVersion + :return: An iterator like instance of either MeshRevisionProfile or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] :raises ~azure.core.exceptions.HttpResponseError: """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.MeshRevisionProfileList] = kwargs.pop("cls", None) + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, @@ -3892,331 +3711,34 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> } error_map.update(kwargs.pop("error_map", {}) or {}) - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + def prepare_request(next_link=None): + if not next_link: - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) + _request = build_list_mesh_revision_profiles_request( + location=location, + subscription_id=self._config.subscription_id, + api_version=api_version, + headers=_headers, + params=_params, + ) + _request.url = self._client.format_url(_request.url) - _request = build_get_guardrails_versions_request( - location=location, - version=version, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("GuardrailsAvailableVersion", pipeline_response.http_response) - - 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 either GuardrailsAvailableVersion or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.GuardrailsAvailableVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.GuardrailsAvailableVersionsList] = 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_list_guardrails_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("GuardrailsAvailableVersionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @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. - - Contains Safeguards 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: SafeguardsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.SafeguardsAvailableVersion - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) - - _request = build_get_safeguards_versions_request( - location=location, - version=version, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("SafeguardsAvailableVersion", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @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. - - :param location: The name of the Azure region. Required. - :type location: str - :return: An iterator like instance of either SafeguardsAvailableVersion or the result of - cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.SafeguardsAvailableVersion] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.SafeguardsAvailableVersionsList] = 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_list_safeguards_versions_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("SafeguardsAvailableVersionsList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @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. - - 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 either MeshRevisionProfile or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshRevisionProfile] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MeshRevisionProfileList] = 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_list_mesh_revision_profiles_request( - location=location, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + _request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + _request.url = self._client.format_url(_request.url) + _request.method = "GET" + return _request def extract_data(pipeline_response): deserialized = self._deserialize("MeshRevisionProfileList", pipeline_response) @@ -4461,208 +3983,3 @@ def get_mesh_upgrade_profile( return cls(pipeline_response, deserialized, {}) # type: ignore return deserialized # type: ignore - - def _rebalance_load_balancers_initial( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "RebalanceLoadBalancersRequestBody") - - _request = build_rebalance_load_balancers_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - response_headers = {} - response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) - response_headers["Azure-AsyncOperation"] = self._deserialize( - "str", response.headers.get("Azure-AsyncOperation") - ) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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. - - 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 either None or the result of cls(response) - :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. - - 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 either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_rebalance_load_balancers( - self, - resource_group_name: str, - resource_name: str, - parameters: Union[_models.RebalanceLoadBalancersRequestBody, IO[bytes]], - **kwargs: Any - ) -> LROPoller[None]: - """Rebalance nodes across specific load balancers. - - 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 either a RebalanceLoadBalancersRequestBody type or a IO[bytes] - type. Required. - :type parameters: ~azure.mgmt.containerservice.models.RebalanceLoadBalancersRequestBody or - IO[bytes] - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_namespaces_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_namespaces_operations.py index 3568ff4b9964..8dfe5b99e867 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_namespaces_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_managed_namespaces_operations.py @@ -49,7 +49,7 @@ def build_list_by_managed_cluster_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -89,7 +89,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +137,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +188,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -236,7 +236,7 @@ def build_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -287,7 +287,7 @@ def build_list_credential_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_mesh_memberships_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_mesh_memberships_operations.py deleted file mode 100644 index b3ba58bf11db..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_mesh_memberships_operations.py +++ /dev/null @@ -1,738 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from io import IOBase -from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - StreamClosedError, - StreamConsumedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_by_managed_cluster_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "meshMembershipName": _SERIALIZER.url( - "mesh_membership_name", - mesh_membership_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z][a-zA-Z0-9]{0,62}$", - ), - } - - _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_create_or_update_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", "2025-09-02-preview")) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "meshMembershipName": _SERIALIZER.url( - "mesh_membership_name", - mesh_membership_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z][a-zA-Z0-9]{0,62}$", - ), - } - - _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_delete_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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "meshMembershipName": _SERIALIZER.url( - "mesh_membership_name", - mesh_membership_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z][a-zA-Z0-9]{0,62}$", - ), - } - - _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="DELETE", url=_url, params=_params, headers=_headers, **kwargs) - - -class MeshMembershipsOperations: - """ - .. 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. - """ - - models = _models - - 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.MeshMembership"]: - """Lists mesh memberships in a managed cluster. - - Lists mesh memberships in 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 either MeshMembership or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MeshMembershipsListResult] = 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_list_by_managed_cluster_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("MeshMembershipsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - 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. - - Gets the mesh membership 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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: MeshMembership or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.models.MeshMembership - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.MeshMembership] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("MeshMembership", pipeline_response.http_response) - - 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, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, 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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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" - _json = None - _content = None - if isinstance(parameters, (IOBase, bytes)): - _content = parameters - else: - _json = self._serialize.body(parameters, "MeshMembership") - - _request = build_create_or_update_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - content_type=content_type, - json=_json, - content=_content, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: _models.MeshMembership, - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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 - :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 either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @overload - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: IO[bytes], - *, - content_type: str = "application/json", - **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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] - :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 either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - - @distributed_trace - def begin_create_or_update( - self, - resource_group_name: str, - resource_name: str, - mesh_membership_name: str, - parameters: Union[_models.MeshMembership, IO[bytes]], - **kwargs: Any - ) -> LROPoller[_models.MeshMembership]: - """Creates or updates the mesh membership of a managed cluster. - - Creates or updates the mesh membership 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 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 either a MeshMembership type or - a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.models.MeshMembership or IO[bytes] - :return: An instance of LROPoller that returns either MeshMembership or the result of - cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.models.MeshMembership] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _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", self._config.api_version)) - content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - cls: ClsType[_models.MeshMembership] = 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, - mesh_membership_name=mesh_membership_name, - parameters=parameters, - api_version=api_version, - 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): - deserialized = self._deserialize("MeshMembership", pipeline_response.http_response) - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - return deserialized - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[_models.MeshMembership].from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output, - ) - return LROPoller[_models.MeshMembership]( - self._client, raw_result, get_long_running_output, polling_method # type: ignore - ) - - def _delete_initial( - self, resource_group_name: str, resource_name: str, mesh_membership_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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - - _request = build_delete_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - mesh_membership_name=mesh_membership_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_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")) - - deserialized = response.stream_download(self._client._pipeline, decompress=_decompress) - - 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, mesh_membership_name: str, **kwargs: Any - ) -> LROPoller[None]: - """Deletes the mesh membership of a managed cluster. - - Deletes the mesh membership 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 mesh_membership_name: The name of the mesh membership. Required. - :type mesh_membership_name: str - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - 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, - mesh_membership_name=mesh_membership_name, - api_version=api_version, - 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 - - if polling is True: - polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs)) - elif polling is False: - polling_method = cast(PollingMethod, NoPolling()) - else: - polling_method = polling - if cont_token: - return LROPoller[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 diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operation_status_result_operations.py deleted file mode 100644 index e622d5be2ae3..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_operation_status_result_operations.py +++ /dev/null @@ -1,413 +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) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from collections.abc import MutableMapping -from typing import Any, Callable, Optional, TypeVar -import urllib.parse - -from azure.core import PipelineClient -from azure.core.exceptions import ( - ClientAuthenticationError, - HttpResponseError, - ResourceExistsError, - ResourceNotFoundError, - ResourceNotModifiedError, - map_error, -) -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._configuration import ContainerServiceClientConfiguration -from .._utils.serialization import Deserializer, Serializer - -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] -List = list - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -def build_list_request( - resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any -) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - } - - _url: str = _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_get_request( - 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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_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", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _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_get_by_agent_pool_request( - 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", "2025-09-02-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop( - "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}", - ) - path_format_arguments = { - "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), - "resourceGroupName": _SERIALIZER.url( - "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 - ), - "resourceName": _SERIALIZER.url( - "resource_name", - resource_name, - "str", - max_length=63, - min_length=1, - pattern=r"^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$", - ), - "agentPoolName": _SERIALIZER.url( - "agent_pool_name", agent_pool_name, "str", max_length=12, min_length=1, pattern=r"^[a-z][a-z0-9]{0,11}$" - ), - "operationId": _SERIALIZER.url("operation_id", operation_id, "str", min_length=1), - } - - _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) - - -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. - """ - - models = _models - - 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, resource_group_name: str, resource_name: str, **kwargs: Any - ) -> ItemPaged["_models.OperationStatusResult"]: - """Gets a list of operations in the specified managedCluster. - - 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 either OperationStatusResult or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.models.OperationStatusResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResultList] = 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_list_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - else: - # make call to next link with the client's api-version - _parsed_next_link = urllib.parse.urlparse(next_link) - _next_request_params = case_insensitive_dict( - { - key: [urllib.parse.quote(v) for v in value] - for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() - } - ) - _next_request_params["api-version"] = self._config.api_version - _request = HttpRequest( - "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params - ) - _request.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OperationStatusResultList", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - _request = prepare_request(next_link) - - _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 = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - @distributed_trace - 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. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_get_request( - resource_group_name=resource_group_name, - resource_name=resource_name, - operation_id=operation_id, - subscription_id=self._config.subscription_id, - api_version=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore - - @distributed_trace - 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. - - 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 or the result of cls(response) - :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 = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) - cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) - - _request = build_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=api_version, - headers=_headers, - params=_params, - ) - _request.url = self._client.format_url(_request.url) - - _stream = False - pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - _request, stream=_stream, **kwargs - ) - - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize( - _models.ErrorResponse, - pipeline_response, - ) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize("OperationStatusResult", pipeline_response.http_response) - - if cls: - return cls(pipeline_response, deserialized, {}) # type: ignore - - return deserialized # type: ignore 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 e62a2b567f13..204312518ba2 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 @@ -41,7 +41,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_endpoint_connections_operations.py index 7320ef748b40..a0e8fc786f90 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -91,7 +91,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +138,7 @@ def build_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +188,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_link_resources_operations.py index c404c557befc..88a56faf5fad 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_private_link_resources_operations.py @@ -42,7 +42,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_resolve_private_link_service_id_operations.py index 863a478d0d18..f8b8ab7cfd10 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_resolve_private_link_service_id_operations.py @@ -43,7 +43,7 @@ def build_post_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_snapshots_operations.py index 0b1530136477..805ed298bed1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_snapshots_operations.py @@ -43,7 +43,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +67,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +97,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +137,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,7 +180,7 @@ def build_update_tags_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,7 +223,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_role_bindings_operations.py index 5bff1f5beaba..4e7e2f450c6c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_role_bindings_operations.py @@ -49,7 +49,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +93,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -145,7 +145,7 @@ def build_create_or_update_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,7 +200,7 @@ def build_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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_roles_operations.py index 6d2f27aaecb2..b0f3eedfd6f6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/operations/_trusted_access_roles_operations.py @@ -41,7 +41,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht _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", "2025-09-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL 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 deleted file mode 100644 index 9c3fd8bcacfa..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/advanced_networking_transit_encryption.py +++ /dev/null @@ -1,84 +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) AutoRest 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 advanced_networking_transit_encryption.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="00000000-0000-0000-0000-000000000000", - ) - - 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": { - "advancedNetworking": { - "enabled": True, - "observability": {"enabled": False}, - "security": { - "advancedNetworkPolicies": "FQDN", - "enabled": True, - "transitEncryption": {"type": "WireGuard"}, - }, - }, - "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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 a2c7c65090dc..918a00eeb2e3 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsAbortOperation.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 b97226ab4271..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_complete_upgrade.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.agent_pools.begin_complete_upgrade( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 93% 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 83d7b7f1ea5b..5314e9d46641 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsAssociate_CRG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 18cc8a8fc25f..5efbe432b17e 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 @@ -68,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 ad40136ca1d0..9e39f73628b8 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 9fc391d97ab0..33cb46b00248 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 @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 544e7087cfc1..58869d72471d 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 @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableFIPS.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 8293498ca579..632d5dc867c2 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 @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 9400464825d3..74586ea2972f 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 @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Ephemeral.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 85bb5c0778c2..9386c4630732 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 @@ -69,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_GPUMIG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 060b05cfea5f..d06f93dbf49f 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 @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 7dc83c9771d9..b611fdc7e23d 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 @@ -69,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_OSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 3a88f286dab0..084925828f7b 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_PPG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 a50a1db77c35..4dd75ce38a2e 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 @@ -39,7 +39,7 @@ def main(): "properties": { "count": 3, "creationData": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" }, "enableFIPS": True, "orchestratorVersion": "", @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Snapshot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 825d59000c4e..63cbec781195 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 @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Spot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 188b5c555d35..4f249d9b2f74 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 @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d73ae5db43fe..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py +++ /dev/null @@ -1,57 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 fe4f902072e7..5c45e5ad269e 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 @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d9ed63ac6d8c..04918ce69870 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 @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WasmWasi.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 b0e4e8376773..19419e7fe2c9 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 @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f957befd5598..24efd04b9aa9 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 @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 39ccbdce637a..0c692413c1a5 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 1958a892e965..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.agent_pools.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 f34c1e767e72..1368248c63ef 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 @@ -39,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsDeleteMachines.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 c2f0ba3799b2..97ae4b6484d4 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 1bb969f332bc..df1467976ba9 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 ccb62169da69..449f55ace61f 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 a3372c1e807a..ff998f2d5e71 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 dadd3fc82977..25f400c2a73b 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 @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Start.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f611cf97c41c..da8a7498cb42 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 @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Stop.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 e8d4588db304..f9df69818de9 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 @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 cc26d6e107f5..b98884274eca 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 90248158107c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_clusters.get_guardrails_versions( - location="location1", - version="v1.0.0", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 afc2e8f43ead..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_clusters.get_safeguards_versions( - location="location1", - version="v1.0.0", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 b0ed747ddd40..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 b67bdc4d6015..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_delete.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.identity_bindings.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - identity_binding_name="identitybinding1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 753878ff32a4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_get.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.identity_bindings.get( - resource_group_name="rg1", - resource_name="clustername1", - identity_binding_name="identitybinding1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 c35eab15a271..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/identity_bindings_list.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 bebe71556ba4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_create_or_update.py +++ /dev/null @@ -1,67 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 bb14412fe76d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_delete.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.jwt_authenticators.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - jwt_authenticator_name="jwt1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_Delete.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 2f6aa383d0b6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_list.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 7f1762db27e2..863957043b3d 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 @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/KubernetesVersions_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/KubernetesVersions_List.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 17b9c15d16fb..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_clusters.list_guardrails_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 e70a7bca7fe4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_clusters.list_safeguards_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 1fca3cf2015f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py +++ /dev/null @@ -1,45 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 0eabd2c9b45f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.load_balancers.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - load_balancer_name="kubernetes", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Delete.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 3ac863431b4f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 7eb312fc962b..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.managed_clusters.begin_rebalance_load_balancers( - resource_group_name="rg1", - resource_name="clustername1", - parameters={"loadBalancerNames": ["kubernetes"]}, - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 b7e9b8cb5b80..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_create_update.py +++ /dev/null @@ -1,62 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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"}, - }, - "zones": ["1"], - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 193d9cb4ebc2..619ab2f52803 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py @@ -28,7 +28,7 @@ def main(): client = ContainerServiceClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="26fe00f8-9173-4872-9134-bb1d2e00343a", ) response = client.machines.get( @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MachineGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 24805ffe521a..f8679e1035ba 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py @@ -28,7 +28,7 @@ def main(): client = ContainerServiceClient( credential=DefaultAzureCredential(), - subscription_id="00000000-0000-0000-0000-000000000000", + subscription_id="26fe00f8-9173-4872-9134-bb1d2e00343a", ) response = client.machines.list( @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MachineList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 aa1429cf6b77..3106761bce5d 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 @@ -54,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 ad81b0151113..7136aa0d5faf 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 @@ -38,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 2be78438319e..08b62efda7ba 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 355b60b51afd..97494d7f7e5c 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 53e59676d662..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 5d01db50926e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py +++ /dev/null @@ -1,42 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.managed_cluster_snapshots.delete( - resource_group_name="rg1", - resource_name="snapshot1", - ) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 2320edaa38dc..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_cluster_snapshots.get( - resource_group_name="rg1", - resource_name="snapshot1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 f56a5490f59a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py +++ /dev/null @@ -1,41 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_cluster_snapshots.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 730d2c64fa2a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.managed_cluster_snapshots.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 afcb8ed72853..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 b9cbcfbe2f2b..365edded0a77 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersAbortOperation.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 fd95094f3302..363000560bee 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 @@ -55,7 +55,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -75,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 9d95ad182047..1e95a765ae1c 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 @@ -55,7 +55,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_AzureServiceMesh.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 93% 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 f41e8ae97515..61c297d570d6 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, @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersAssociate_CRG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 196d890c9f67..0380e4d7a24a 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -73,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_CustomCATrustCertificates.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 c98e77957e45..05845e89021d 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 de6aa76bb463..89d8cf697ccd 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 @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 243c788e52fb..097da2dbea8e 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 @@ -38,7 +38,7 @@ def main(): "identity": { "type": "UserAssigned", "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} }, }, "location": "location1", @@ -66,7 +66,7 @@ def main(): "scan-interval": "20s", "skip-nodes-with-system-pods": "false", }, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -87,6 +87,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 81d29b2ce93c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py +++ /dev/null @@ -1,76 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 d2e501899796..f739441e8e53 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 edf06df2ff7c..b48349c14160 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 76a171d41bc5..0d5f5ff481a5 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 0b98afd0038e..dfdc7b96e86c 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "httpProxyConfig": { @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_GPUMIG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 0e039d65aa83..a45c8204bfbc 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "httpProxyConfig": { @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_HTTPProxy.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 858c4c7255e0..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ingress_profile_application_load_balancer.py +++ /dev/null @@ -1,70 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 4086368c2ad7..f8e20bb259be 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 6c7548ac510c..d476e04d8658 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -70,6 +70,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 b4b26cfa6e88..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 bc1a402fdf46..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py +++ /dev/null @@ -1,75 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 04c8be966569..02c57c1283cf 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d5e714dd2bdf..dd5e9bfd72b2 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "httpProxyConfig": { @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_OSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 3d8af8090f4a..03b2c8a4a1f4 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PodIdentity.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 4a21841da8c0..580b0b101f7e 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 @@ -51,7 +51,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PPG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 bb046682365e..c41821526579 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 @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Premium.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 8908f23620dd..f30d5dbdcfd2 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 67c3128a2fb2..5608b3b0eddd 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 @@ -71,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 e58d4a8adaa5..b4a0eafa0fd6 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_SecurityProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 7351fcb8ef83..379ce986a12c 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 @@ -42,7 +42,7 @@ def main(): { "count": 3, "creationData": { - "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" + "sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" }, "enableFIPS": True, "enableNodePublicIP": True, @@ -54,7 +54,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -74,6 +74,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Snapshot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f9ecf6e39df5..1a40540356d1 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 @@ -38,7 +38,7 @@ def main(): "identity": { "type": "UserAssigned", "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} }, }, "location": "location1", @@ -66,7 +66,7 @@ def main(): "scan-interval": "20s", "skip-nodes-with-system-pods": "false", }, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 a4cdcf5ccafc..ba00874789e5 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 @@ -38,7 +38,7 @@ def main(): "identity": { "type": "UserAssigned", "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} }, }, "location": "location1", @@ -57,7 +57,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 1e08b6283c52..f86617bb2404 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 @@ -38,7 +38,7 @@ def main(): "identity": { "type": "UserAssigned", "userAssignedIdentities": { - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} }, }, "location": "location1", @@ -57,7 +57,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -81,6 +81,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 145f6bcf3f41..750bf0fb908e 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 @@ -52,7 +52,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 db7c9e851e26..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 c304773e0513..91552c092f44 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 @@ -50,7 +50,7 @@ def main(): } ], "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", + "diskEncryptionSetID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", "dnsPrefix": "dnsprefix1", "enableRBAC": True, "kubernetesVersion": "", @@ -66,6 +66,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 0c5dcece57c4..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 0f2c85ba1b56..15dc9cf03056 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 43cf9994e05a..9c3b4c8d12f9 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 75801f0c440f..ff88b25b6e85 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGetAccessProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 03c2da0036ea..16e2fd6a8987 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 bb0e6298b0c8..6a3fb634d80f 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 dc790d66c986..46e6ac14f85a 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f9a6722bc94b..1b70c2d051e7 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 @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 bb9cceecdb04..33005c433bb9 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 @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListByResourceGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListByResourceGroup.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_admin_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_admin_credentials.py index 0416cfccbcda..86f91f9b7a58 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_admin_credentials.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python managed_clusters_list_cluster_credential_result.py + python managed_clusters_list_cluster_admin_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, @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterAdminCredentials.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/managed_clusters_list_cluster_monitoring_user_credentials.py similarity index 84% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py index 119ca250765c..9045ccb0315b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python load_balancers_get.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, @@ -31,14 +31,13 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.load_balancers.get( + response = client.managed_clusters.list_cluster_monitoring_user_credentials( resource_group_name="rg1", resource_name="clustername1", - load_balancer_name="kubernetes", ) print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Get.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterMonitoringUserCredentials.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/managed_clusters_list_cluster_user_credentials.py similarity index 85% rename from sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py rename to sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py index 5d9fddb56459..06abd78b3eb2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/jwt_authenticators_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py @@ -16,7 +16,7 @@ pip install azure-identity pip install azure-mgmt-containerservice # USAGE - python jwt_authenticators_get.py + python managed_clusters_list_cluster_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, @@ -31,14 +31,13 @@ def main(): subscription_id="00000000-0000-0000-0000-000000000000", ) - response = client.jwt_authenticators.get( + response = client.managed_clusters.list_cluster_user_credentials( resource_group_name="rg1", resource_name="clustername1", - jwt_authenticator_name="jwt1", ) print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_Get.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 74ec58ca1927..d05ba90f3961 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 @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 b0e3cefcbfb9..0638de2b6ec9 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d1d19b96e0ce..6a68d014aebd 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 @@ -43,6 +43,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersResetAADProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 edec81df2bf7..f1e769b62250 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 50d44bd0e39d..baa3b3e757a9 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 6b1e32f3050d..15baf7dd4d9b 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d2d3fd44fa52..28243d02a016 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersStart.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 519dc427926a..5c48dcf4ff61 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 @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersStop.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 278fa6ba2c14..c578425887fb 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersUpdateTags.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 5d3eea3d06c3..e150ee252a05 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 badc9fb3081c..c2c6cf7547ab 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 504a4ee48883..facb215fdbeb 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 ca7eb467cfd0..3105195bbc57 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 3857f8bf247b..2cb3cd66dc6e 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesListCredentialResult.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 3ecb99932492..e516e2d6278b 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 @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesUpdateTags.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 6d94428b5b52..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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 df1f409dc020..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_delete.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - client.mesh_memberships.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - mesh_membership_name="meshmembership1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 54f627352f91..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_get.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.mesh_memberships.get( - resource_group_name="rg1", - resource_name="clustername1", - mesh_membership_name="meshmembership1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 5da35ca718fc..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/mesh_memberships_list_by_managed_cluster.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 b977f4d4d2e3..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py +++ /dev/null @@ -1,43 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.container_service.list_node_image_versions( - location="location1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 730560923395..edbad7e3510c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/Operation_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 99b1d0d8fc45..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 09f0316374de..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py +++ /dev/null @@ -1,45 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 d0022137df27..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py +++ /dev/null @@ -1,44 +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) AutoRest 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="00000000-0000-0000-0000-000000000000", - ) - - response = client.operation_status_result.list( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/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 30b2c40d0575..7b0e8b5b3542 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 9cb00c797641..df7448a674f5 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 ab29b0b2c82a..efc235103c0c 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 3c03c72e147e..ff286d9a4da5 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f96b31ff6e85..d5ed1ef4a6de 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 @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 dc6e939df993..d94de40ac8e4 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 @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateLinkResourcesList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 c942488ff56e..f567e8246131 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ResolvePrivateLinkServiceId.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 086417c7d7bf..7b4d1ac97e10 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandRequest.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 d3ab2f25278e..4ae5c7297ad9 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandResultFailed.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 0c33a34f242b..44f123dee308 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandResultSucceed.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 4471232cd5c8..8e69387ed72c 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsCreate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 433c6c137640..95395ef670fe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py @@ -37,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 96107f75e77f..1439a1f75014 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 61ca955625e9..dcebc17da63d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 a9a6d64734e8..e7b6d2254e20 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 @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsListByResourceGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 06cd73cb1fce..31cab9a70ed1 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsUpdateTags.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 1a5d856c9427..c1f1bf416717 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: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 4f2b562ea339..c5d3fb205010 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 @@ -38,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 dcca85f04f83..dd862e66d711 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 @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_Get.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 5f35e728b3a8..8f6c808c159d 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 @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 43742f9915a2..4d7ad467eb3e 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 @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoles_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/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 f3a54bcb5ec0..b5750367c45b 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 @@ -25,7 +25,7 @@ def test_agent_pools_begin_abort_latest_operation(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_agent_pools_list(self, resource_group): response = self.client.agent_pools.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_agent_pools_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -64,7 +64,6 @@ def test_agent_pools_begin_create_or_update(self, resource_group): resource_name="str", agent_pool_name="str", parameters={ - "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -78,7 +77,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "id": "str", "kubeletConfig": { @@ -92,7 +91,6 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -170,9 +168,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "applicationSecurityGroups": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, - "nodeCustomizationProfile": {"nodeCustomizationId": "str"}, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -204,33 +200,19 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", - "minSurge": "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}, "workloadRuntime": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -243,7 +225,7 @@ def test_agent_pools_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -256,25 +238,12 @@ def test_agent_pools_get_upgrade_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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", - api_version="2025-09-02-preview", - ).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): @@ -283,7 +252,7 @@ def test_agent_pools_begin_delete_machines(self, resource_group): resource_name="str", agent_pool_name="str", machines={"machineNames": ["str"]}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -295,7 +264,7 @@ def test_agent_pools_get_available_agent_pool_versions(self, resource_group): response = self.client.agent_pools.get_available_agent_pool_versions( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -308,7 +277,7 @@ def test_agent_pools_begin_upgrade_node_image_version(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself 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 18154c5c786d..20f779a780a8 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 @@ -27,7 +27,7 @@ async def test_agent_pools_begin_abort_latest_operation(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -40,7 +40,7 @@ async def test_agent_pools_list(self, resource_group): response = self.client.agent_pools.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -53,7 +53,7 @@ async def test_agent_pools_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -68,7 +68,6 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): resource_name="str", agent_pool_name="str", parameters={ - "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -82,7 +81,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "id": "str", "kubeletConfig": { @@ -96,7 +95,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", @@ -174,9 +172,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "applicationSecurityGroups": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, - "nodeCustomizationProfile": {"nodeCustomizationId": "str"}, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -208,33 +204,19 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", - "minSurge": "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}, "workloadRuntime": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -249,7 +231,7 @@ async def test_agent_pools_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -263,27 +245,12 @@ async def test_agent_pools_get_upgrade_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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", - api_version="2025-09-02-preview", - ) - ).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): @@ -293,7 +260,7 @@ async def test_agent_pools_begin_delete_machines(self, resource_group): resource_name="str", agent_pool_name="str", machines={"machineNames": ["str"]}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -306,7 +273,7 @@ async def test_agent_pools_get_available_agent_pool_versions(self, resource_grou response = await self.client.agent_pools.get_available_agent_pool_versions( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -320,7 +287,7 @@ async def test_agent_pools_begin_upgrade_node_image_version(self, resource_group resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result 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 ab79970e1b1c..7e8c098c2ade 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 @@ -25,7 +25,7 @@ def test_machines_list(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,136 +39,8 @@ def test_machines_get(self, resource_group): resource_name="str", agent_pool_name="str", machine_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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": { - "eTag": "str", - "hardware": { - "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, - "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", - }, - "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": "Linux", - "windowsProfile": {"disableOutboundNat": bool}, - }, - "priority": "Regular", - "provisioningState": "str", - "resourceId": "str", - "security": {"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"}, - }, - "type": "str", - "zones": ["str"], - }, - api_version="2025-09-02-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... 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 daabbf94d282..497a714c859c 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 @@ -26,7 +26,7 @@ async def test_machines_list(self, resource_group): resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,138 +40,8 @@ async def test_machines_get(self, resource_group): resource_name="str", agent_pool_name="str", machine_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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": { - "eTag": "str", - "hardware": { - "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, - "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", - }, - "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": "Linux", - "windowsProfile": {"disableOutboundNat": bool}, - }, - "priority": "Regular", - "provisioningState": "str", - "resourceId": "str", - "security": {"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"}, - }, - "type": "str", - "zones": ["str"], - }, - api_version="2025-09-02-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py index 50aba7445adc..967da47e2660 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations.py @@ -24,7 +24,7 @@ def test_maintenance_configurations_list_by_managed_cluster(self, resource_group response = self.client.maintenance_configurations.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_maintenance_configurations_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", config_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -78,7 +78,7 @@ def test_maintenance_configurations_create_or_update(self, resource_group): "timeInWeek": [{"day": "str", "hourSlots": [0]}], "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -91,7 +91,7 @@ def test_maintenance_configurations_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", config_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py index 1d1e4596842e..01f0cb9ff360 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_maintenance_configurations_operations_async.py @@ -25,7 +25,7 @@ async def test_maintenance_configurations_list_by_managed_cluster(self, resource response = self.client.maintenance_configurations.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_maintenance_configurations_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", config_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -79,7 +79,7 @@ async def test_maintenance_configurations_create_or_update(self, resource_group) "timeInWeek": [{"day": "str", "hourSlots": [0]}], "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -92,7 +92,7 @@ async def test_maintenance_configurations_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", config_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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 9858e4a57b78..ef378c3f87b4 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 @@ -23,7 +23,7 @@ def setup_method(self, method): def test_managed_clusters_list_kubernetes_versions(self, resource_group): response = self.client.managed_clusters.list_kubernetes_versions( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_managed_clusters_list_kubernetes_versions(self, resource_group): @recorded_by_proxy def test_managed_clusters_list(self, resource_group): response = self.client.managed_clusters.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -44,7 +44,7 @@ def test_managed_clusters_list(self, resource_group): def test_managed_clusters_list_by_resource_group(self, resource_group): response = self.client.managed_clusters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -56,7 +56,7 @@ def test_managed_clusters_get_upgrade_profile(self, resource_group): response = self.client.managed_clusters.get_upgrade_profile( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -69,7 +69,7 @@ def test_managed_clusters_get_access_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", role_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ def test_managed_clusters_list_cluster_admin_credentials(self, resource_group): response = self.client.managed_clusters.list_cluster_admin_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_managed_clusters_list_cluster_user_credentials(self, resource_group): response = self.client.managed_clusters.list_cluster_user_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ def test_managed_clusters_list_cluster_monitoring_user_credentials(self, resourc response = self.client.managed_clusters.list_cluster_monitoring_user_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -117,7 +117,7 @@ def test_managed_clusters_get(self, resource_group): response = self.client.managed_clusters.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -150,7 +150,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "agentPoolProfiles": [ { "name": "str", - "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -164,7 +163,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -177,7 +176,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, - "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -254,9 +252,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "applicationSecurityGroups": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, - "nodeCustomizationProfile": {"nodeCustomizationId": "str"}, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -288,27 +284,13 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", - "minSurge": "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}, @@ -349,45 +331,23 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "autoUpgradeProfile": {"nodeOSUpgradeChannel": "str", "upgradeChannel": "str"}, "azureMonitorProfile": { - "appMonitoring": { - "autoInstrumentation": {"enabled": bool}, - "openTelemetryLogs": {"enabled": bool, "port": 0}, - "openTelemetryMetrics": {"enabled": bool, "port": 0}, - }, - "containerInsights": { - "disableCustomMetrics": bool, - "disablePrometheusMetricsScraping": bool, - "enabled": bool, - "logAnalyticsWorkspaceResourceId": "str", - "syslogPort": 0, - }, "metrics": { "enabled": bool, "kubeStateMetrics": {"metricAnnotationsAllowList": "str", "metricLabelsAllowlist": "str"}, - }, + } }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "Direct", "containerRegistryId": "str"}, - "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", "eTag": "str", - "enableNamespaceResources": bool, "enableRBAC": bool, "extendedLocation": {"name": "str", "type": "str"}, "fqdn": "str", "fqdnSubdomain": "str", - "hostedSystemProfile": {"enabled": bool}, - "httpProxyConfig": { - "effectiveNoProxy": ["str"], - "enabled": bool, - "httpProxy": "str", - "httpsProxy": "str", - "noProxy": ["str"], - "trustedCa": "str", - }, + "httpProxyConfig": {"httpProxy": "str", "httpsProxy": "str", "noProxy": ["str"], "trustedCa": "str"}, "id": "str", "identity": { "delegatedResources": { @@ -400,18 +360,12 @@ 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, "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, "nginx": {"defaultIngressControllerType": "str"}, - }, + } }, "kind": "str", "kubernetesVersion": "str", @@ -423,29 +377,13 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "advancedNetworking": { "enabled": bool, "observability": {"enabled": bool}, - "performance": {"accelerationMode": "None"}, - "security": { - "advancedNetworkPolicies": "str", - "enabled": bool, - "transitEncryption": {"type": "str"}, - }, + "security": {"advancedNetworkPolicies": "str", "enabled": bool}, }, "dnsServiceIP": "10.0.0.10", "ipFamilies": ["str"], - "kubeProxyConfig": { - "enabled": bool, - "ipvsConfig": { - "scheduler": "str", - "tcpFinTimeoutSeconds": 0, - "tcpTimeoutSeconds": 0, - "udpTimeoutSeconds": 0, - }, - "mode": "str", - }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "NodeIPConfiguration", - "clusterServiceLoadBalancerHealthProbeMode": "ServiceNodePort", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 30, @@ -467,7 +405,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "loadBalancer", "podCidr": "10.244.0.0/16", "podCidrs": ["str"], - "podLinkLocalAccess": "str", "serviceCidr": "10.0.0.0/16", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, @@ -510,7 +447,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, @@ -519,24 +455,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": "Disabled"}, - "nodeRestriction": {"enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -556,7 +476,6 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): {"enabled": bool, "name": "str", "gatewayConfigurationName": "str", "namespace": "str"} ], "ingressGateways": [{"enabled": bool, "mode": "str"}], - "proxyRedirectionMechanism": "str", }, "revisions": ["str"], }, @@ -574,7 +493,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}, }, @@ -597,12 +516,9 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "gmsaProfile": {"dnsServer": "str", "enabled": bool, "rootDomainName": "str"}, "licenseType": "str", }, - "workloadAutoScalerProfile": { - "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": False, "addonAutoscaling": "Disabled"}, - }, + "workloadAutoScalerProfile": {"keda": {"enabled": bool}, "verticalPodAutoscaler": {"enabled": False}}, }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -615,7 +531,7 @@ def test_managed_clusters_begin_update_tags(self, resource_group): resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -627,7 +543,7 @@ def test_managed_clusters_begin_delete(self, resource_group): response = self.client.managed_clusters.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -640,7 +556,7 @@ def test_managed_clusters_begin_reset_service_principal_profile(self, resource_g resource_group_name=resource_group.name, resource_name="str", parameters={"clientId": "str", "secret": "str"}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -661,7 +577,7 @@ def test_managed_clusters_begin_reset_aad_profile(self, resource_group): "serverAppSecret": "str", "tenantID": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -669,11 +585,11 @@ def test_managed_clusters_begin_reset_aad_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_managed_clusters_begin_abort_latest_operation(self, resource_group): - response = self.client.managed_clusters.begin_abort_latest_operation( + def test_managed_clusters_begin_rotate_cluster_certificates(self, resource_group): + response = self.client.managed_clusters.begin_rotate_cluster_certificates( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -681,11 +597,11 @@ def test_managed_clusters_begin_abort_latest_operation(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_managed_clusters_begin_rotate_cluster_certificates(self, resource_group): - response = self.client.managed_clusters.begin_rotate_cluster_certificates( + def test_managed_clusters_begin_abort_latest_operation(self, resource_group): + response = self.client.managed_clusters.begin_abort_latest_operation( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -697,7 +613,7 @@ def test_managed_clusters_begin_rotate_service_account_signing_keys(self, resour response = self.client.managed_clusters.begin_rotate_service_account_signing_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -709,7 +625,7 @@ def test_managed_clusters_begin_stop(self, resource_group): response = self.client.managed_clusters.begin_stop( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -721,7 +637,7 @@ def test_managed_clusters_begin_start(self, resource_group): response = self.client.managed_clusters.begin_start( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -734,7 +650,7 @@ def test_managed_clusters_begin_run_command(self, resource_group): resource_group_name=resource_group.name, resource_name="str", request_payload={"command": "str", "clusterToken": "str", "context": "str"}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -747,7 +663,7 @@ def test_managed_clusters_get_command_result(self, resource_group): resource_group_name=resource_group.name, resource_name="str", command_id="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -759,53 +675,7 @@ def test_managed_clusters_list_outbound_network_dependencies_endpoints(self, res response = self.client.managed_clusters.list_outbound_network_dependencies_endpoints( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", - ) - 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_guardrails_versions(self, resource_group): - response = self.client.managed_clusters.get_guardrails_versions( - location="str", - version="str", - api_version="2025-09-02-preview", - ) - - # 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", - api_version="2025-09-02-preview", - ) - 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", - api_version="2025-09-02-preview", - ) - - # 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", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -816,7 +686,7 @@ def test_managed_clusters_list_safeguards_versions(self, resource_group): def test_managed_clusters_list_mesh_revision_profiles(self, resource_group): response = self.client.managed_clusters.list_mesh_revision_profiles( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -828,7 +698,7 @@ def test_managed_clusters_get_mesh_revision_profile(self, resource_group): response = self.client.managed_clusters.get_mesh_revision_profile( location="str", mode="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -840,7 +710,7 @@ def test_managed_clusters_list_mesh_upgrade_profiles(self, resource_group): response = self.client.managed_clusters.list_mesh_upgrade_profiles( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -853,21 +723,8 @@ def test_managed_clusters_get_mesh_upgrade_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", mode="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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"]}, - api_version="2025-09-02-preview", - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... 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 36843bb1e0d0..dd69a1d2980e 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 @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_managed_clusters_list_kubernetes_versions(self, resource_group): response = await self.client.managed_clusters.list_kubernetes_versions( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_managed_clusters_list_kubernetes_versions(self, resource_group): @recorded_by_proxy_async async def test_managed_clusters_list(self, resource_group): response = self.client.managed_clusters.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -45,7 +45,7 @@ async def test_managed_clusters_list(self, resource_group): async def test_managed_clusters_list_by_resource_group(self, resource_group): response = self.client.managed_clusters.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -57,7 +57,7 @@ async def test_managed_clusters_get_upgrade_profile(self, resource_group): response = await self.client.managed_clusters.get_upgrade_profile( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -70,7 +70,7 @@ async def test_managed_clusters_get_access_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", role_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -82,7 +82,7 @@ async def test_managed_clusters_list_cluster_admin_credentials(self, resource_gr response = await self.client.managed_clusters.list_cluster_admin_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_managed_clusters_list_cluster_user_credentials(self, resource_gro response = await self.client.managed_clusters.list_cluster_user_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_managed_clusters_list_cluster_monitoring_user_credentials(self, r response = await self.client.managed_clusters.list_cluster_monitoring_user_credentials( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -118,7 +118,7 @@ async def test_managed_clusters_get(self, resource_group): response = await self.client.managed_clusters.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -152,7 +152,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "agentPoolProfiles": [ { "name": "str", - "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -166,7 +165,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "enableUltraSSD": bool, "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str", "driverType": "str"}, + "gpuProfile": {"driver": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -179,7 +178,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", @@ -256,9 +254,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "applicationSecurityGroups": ["str"], "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, - "nodeCustomizationProfile": {"nodeCustomizationId": "str"}, "nodeImageVersion": "str", - "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -290,27 +286,13 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, - "maxBlockedNodes": "str", "maxSurge": "str", "maxUnavailable": "str", - "minSurge": "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}, @@ -351,40 +333,23 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "autoUpgradeProfile": {"nodeOSUpgradeChannel": "str", "upgradeChannel": "str"}, "azureMonitorProfile": { - "appMonitoring": { - "autoInstrumentation": {"enabled": bool}, - "openTelemetryLogs": {"enabled": bool, "port": 0}, - "openTelemetryMetrics": {"enabled": bool, "port": 0}, - }, - "containerInsights": { - "disableCustomMetrics": bool, - "disablePrometheusMetricsScraping": bool, - "enabled": bool, - "logAnalyticsWorkspaceResourceId": "str", - "syslogPort": 0, - }, "metrics": { "enabled": bool, "kubeStateMetrics": {"metricAnnotationsAllowList": "str", "metricLabelsAllowlist": "str"}, - }, + } }, "azurePortalFQDN": "str", "bootstrapProfile": {"artifactSource": "Direct", "containerRegistryId": "str"}, - "creationData": {"sourceResourceId": "str"}, "currentKubernetesVersion": "str", "disableLocalAccounts": bool, "diskEncryptionSetID": "str", "dnsPrefix": "str", "eTag": "str", - "enableNamespaceResources": bool, "enableRBAC": bool, "extendedLocation": {"name": "str", "type": "str"}, "fqdn": "str", "fqdnSubdomain": "str", - "hostedSystemProfile": {"enabled": bool}, "httpProxyConfig": { - "effectiveNoProxy": ["str"], - "enabled": bool, "httpProxy": "str", "httpsProxy": "str", "noProxy": ["str"], @@ -407,18 +372,12 @@ 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, "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, "nginx": {"defaultIngressControllerType": "str"}, - }, + } }, "kind": "str", "kubernetesVersion": "str", @@ -430,29 +389,13 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "advancedNetworking": { "enabled": bool, "observability": {"enabled": bool}, - "performance": {"accelerationMode": "None"}, - "security": { - "advancedNetworkPolicies": "str", - "enabled": bool, - "transitEncryption": {"type": "str"}, - }, + "security": {"advancedNetworkPolicies": "str", "enabled": bool}, }, "dnsServiceIP": "10.0.0.10", "ipFamilies": ["str"], - "kubeProxyConfig": { - "enabled": bool, - "ipvsConfig": { - "scheduler": "str", - "tcpFinTimeoutSeconds": 0, - "tcpTimeoutSeconds": 0, - "udpTimeoutSeconds": 0, - }, - "mode": "str", - }, "loadBalancerProfile": { "allocatedOutboundPorts": 0, "backendPoolType": "NodeIPConfiguration", - "clusterServiceLoadBalancerHealthProbeMode": "ServiceNodePort", "effectiveOutboundIPs": [{"id": "str"}], "enableMultipleStandardLoadBalancers": bool, "idleTimeoutInMinutes": 30, @@ -474,7 +417,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "outboundType": "loadBalancer", "podCidr": "10.244.0.0/16", "podCidrs": ["str"], - "podLinkLocalAccess": "str", "serviceCidr": "10.0.0.0/16", "serviceCidrs": ["str"], "staticEgressGatewayProfile": {"enabled": bool}, @@ -519,7 +461,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, @@ -528,24 +469,8 @@ async 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": "Disabled"}, - "nodeRestriction": {"enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -570,7 +495,6 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): } ], "ingressGateways": [{"enabled": bool, "mode": "str"}], - "proxyRedirectionMechanism": "str", }, "revisions": ["str"], }, @@ -588,7 +512,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}, }, @@ -613,10 +537,10 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": False, "addonAutoscaling": "Disabled"}, + "verticalPodAutoscaler": {"enabled": False}, }, }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -631,7 +555,7 @@ async def test_managed_clusters_begin_update_tags(self, resource_group): resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -645,7 +569,7 @@ async def test_managed_clusters_begin_delete(self, resource_group): await self.client.managed_clusters.begin_delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -660,7 +584,7 @@ async def test_managed_clusters_begin_reset_service_principal_profile(self, reso resource_group_name=resource_group.name, resource_name="str", parameters={"clientId": "str", "secret": "str"}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -683,7 +607,7 @@ async def test_managed_clusters_begin_reset_aad_profile(self, resource_group): "serverAppSecret": "str", "tenantID": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -692,12 +616,12 @@ async def test_managed_clusters_begin_reset_aad_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_managed_clusters_begin_abort_latest_operation(self, resource_group): + async def test_managed_clusters_begin_rotate_cluster_certificates(self, resource_group): response = await ( - await self.client.managed_clusters.begin_abort_latest_operation( + await self.client.managed_clusters.begin_rotate_cluster_certificates( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -706,12 +630,12 @@ async def test_managed_clusters_begin_abort_latest_operation(self, resource_grou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_managed_clusters_begin_rotate_cluster_certificates(self, resource_group): + async def test_managed_clusters_begin_abort_latest_operation(self, resource_group): response = await ( - await self.client.managed_clusters.begin_rotate_cluster_certificates( + await self.client.managed_clusters.begin_abort_latest_operation( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -725,7 +649,7 @@ async def test_managed_clusters_begin_rotate_service_account_signing_keys(self, await self.client.managed_clusters.begin_rotate_service_account_signing_keys( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -739,7 +663,7 @@ async def test_managed_clusters_begin_stop(self, resource_group): await self.client.managed_clusters.begin_stop( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -753,7 +677,7 @@ async def test_managed_clusters_begin_start(self, resource_group): await self.client.managed_clusters.begin_start( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -768,7 +692,7 @@ async def test_managed_clusters_begin_run_command(self, resource_group): resource_group_name=resource_group.name, resource_name="str", request_payload={"command": "str", "clusterToken": "str", "context": "str"}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -782,7 +706,7 @@ async def test_managed_clusters_get_command_result(self, resource_group): resource_group_name=resource_group.name, resource_name="str", command_id="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -794,53 +718,7 @@ async def test_managed_clusters_list_outbound_network_dependencies_endpoints(sel response = self.client.managed_clusters.list_outbound_network_dependencies_endpoints( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", - ) - 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_guardrails_versions(self, resource_group): - response = await self.client.managed_clusters.get_guardrails_versions( - location="str", - version="str", - api_version="2025-09-02-preview", - ) - - # 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", - api_version="2025-09-02-preview", - ) - 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", - api_version="2025-09-02-preview", - ) - - # 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", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -851,7 +729,7 @@ async def test_managed_clusters_list_safeguards_versions(self, resource_group): async def test_managed_clusters_list_mesh_revision_profiles(self, resource_group): response = self.client.managed_clusters.list_mesh_revision_profiles( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -863,7 +741,7 @@ async def test_managed_clusters_get_mesh_revision_profile(self, resource_group): response = await self.client.managed_clusters.get_mesh_revision_profile( location="str", mode="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -875,7 +753,7 @@ async def test_managed_clusters_list_mesh_upgrade_profiles(self, resource_group) response = self.client.managed_clusters.list_mesh_upgrade_profiles( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -888,23 +766,8 @@ async def test_managed_clusters_get_mesh_upgrade_profile(self, resource_group): resource_group_name=resource_group.name, resource_name="str", mode="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # 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"]}, - api_version="2025-09-02-preview", - ) - ).result() # call '.result()' to poll until service return final result - - # please add some check logic here by yourself - # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations.py index aaa448d60ca1..d72066d423ad 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations.py @@ -24,7 +24,7 @@ def test_managed_namespaces_list_by_managed_cluster(self, resource_group): response = self.client.managed_namespaces.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_managed_namespaces_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ def test_managed_namespaces_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -94,7 +94,7 @@ def test_managed_namespaces_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -108,7 +108,7 @@ def test_managed_namespaces_update(self, resource_group): resource_name="str", managed_namespace_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -121,7 +121,7 @@ def test_managed_namespaces_list_credential(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations_async.py index 072d9ce3517a..3daef9def784 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_namespaces_operations_async.py @@ -25,7 +25,7 @@ async def test_managed_namespaces_list_by_managed_cluster(self, resource_group): response = self.client.managed_namespaces.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_managed_namespaces_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -83,7 +83,7 @@ async def test_managed_namespaces_begin_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -98,7 +98,7 @@ async def test_managed_namespaces_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -113,7 +113,7 @@ async def test_managed_namespaces_update(self, resource_group): resource_name="str", managed_namespace_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -126,7 +126,7 @@ async def test_managed_namespaces_list_credential(self, resource_group): resource_group_name=resource_group.name, resource_name="str", managed_namespace_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations.py index f8bcea6c5130..af5464fa0673 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) 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_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations_async.py index 7f04a738e38f..2dcb60ffc8fa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) 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_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations.py index 64877d28f6bb..29c011df5a2e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations.py @@ -24,7 +24,7 @@ def test_private_endpoint_connections_list(self, resource_group): response = self.client.private_endpoint_connections.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -58,7 +58,7 @@ def test_private_endpoint_connections_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -71,7 +71,7 @@ def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations_async.py index 1c72b880c4fc..7f51a89c312f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations_async.py @@ -25,7 +25,7 @@ async def test_private_endpoint_connections_list(self, resource_group): response = await self.client.private_endpoint_connections.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -59,7 +59,7 @@ async def test_private_endpoint_connections_update(self, resource_group): "provisioningState": "str", "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -73,7 +73,7 @@ async def test_private_endpoint_connections_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", private_endpoint_connection_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations.py index 640b4a4860f9..cf529c69eb9d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations.py @@ -24,7 +24,7 @@ def test_private_link_resources_list(self, resource_group): response = self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations_async.py index 4286f669eace..fc89fea388ac 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_link_resources_operations_async.py @@ -25,7 +25,7 @@ async def test_private_link_resources_list(self, resource_group): response = await self.client.private_link_resources.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations.py index 90d9eb8babee..89deacf3c81d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations.py @@ -32,7 +32,7 @@ def test_resolve_private_link_service_id_post(self, resource_group): "requiredMembers": ["str"], "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations_async.py index 21013bdb0c2d..4c86fe541a16 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_resolve_private_link_service_id_operations_async.py @@ -33,7 +33,7 @@ async def test_resolve_private_link_service_id_post(self, resource_group): "requiredMembers": ["str"], "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations.py index 68e7f15c003d..df09515a62f7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_snapshots_list(self, resource_group): response = self.client.snapshots.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -33,7 +33,7 @@ def test_snapshots_list(self, resource_group): def test_snapshots_list_by_resource_group(self, resource_group): response = self.client.snapshots.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -45,7 +45,7 @@ def test_snapshots_get(self, resource_group): response = self.client.snapshots.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -80,7 +80,7 @@ def test_snapshots_create_or_update(self, resource_group): "type": "str", "vmSize": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -93,7 +93,7 @@ def test_snapshots_update_tags(self, resource_group): resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -105,7 +105,7 @@ def test_snapshots_delete(self, resource_group): response = self.client.snapshots.delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations_async.py index 71d2da432791..5168e2d4ce0d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_snapshots_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_snapshots_list(self, resource_group): response = self.client.snapshots.list( - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -34,7 +34,7 @@ async def test_snapshots_list(self, resource_group): async def test_snapshots_list_by_resource_group(self, resource_group): response = self.client.snapshots.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -46,7 +46,7 @@ async def test_snapshots_get(self, resource_group): response = await self.client.snapshots.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -81,7 +81,7 @@ async def test_snapshots_create_or_update(self, resource_group): "type": "str", "vmSize": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -94,7 +94,7 @@ async def test_snapshots_update_tags(self, resource_group): resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -106,7 +106,7 @@ async def test_snapshots_delete(self, resource_group): response = await self.client.snapshots.delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations.py index f2e52bff0def..e67fb01385e5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations.py @@ -24,7 +24,7 @@ def test_trusted_access_role_bindings_list(self, resource_group): response = self.client.trusted_access_role_bindings.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_trusted_access_role_bindings_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", trusted_access_role_binding_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -66,7 +66,7 @@ def test_trusted_access_role_bindings_begin_create_or_update(self, resource_grou }, "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -79,7 +79,7 @@ def test_trusted_access_role_bindings_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", trusted_access_role_binding_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations_async.py index da179c5e15d8..06cd793b0f69 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_role_bindings_operations_async.py @@ -25,7 +25,7 @@ async def test_trusted_access_role_bindings_list(self, resource_group): response = self.client.trusted_access_role_bindings.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_trusted_access_role_bindings_get(self, resource_group): resource_group_name=resource_group.name, resource_name="str", trusted_access_role_binding_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) # please add some check logic here by yourself @@ -68,7 +68,7 @@ async def test_trusted_access_role_bindings_begin_create_or_update(self, resourc }, "type": "str", }, - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result @@ -83,7 +83,7 @@ async def test_trusted_access_role_bindings_begin_delete(self, resource_group): resource_group_name=resource_group.name, resource_name="str", trusted_access_role_binding_name="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations.py index fe6d9e91293a..519cdf0644bb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_trusted_access_roles_list(self, resource_group): response = self.client.trusted_access_roles.list( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) 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_trusted_access_roles_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations_async.py index 050531e5bc1b..b05e0e554b33 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_trusted_access_roles_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_trusted_access_roles_list(self, resource_group): response = self.client.trusted_access_roles.list( location="str", - api_version="2025-09-02-preview", + api_version="2025-10-01", ) 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 7a8daa3c2837..304f273924cc 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"