diff --git a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md index 8b0407677894..4fc64afb7528 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md @@ -1,5 +1,88 @@ # Release History +## 36.0.0 (2025-04-23) + +### Features Added + + - Added operation ManagedClustersOperations.begin_rebalance_load_balancers + - Added operation ManagedClustersOperations.get_guardrails_versions + - Added operation ManagedClustersOperations.get_safeguards_versions + - Added operation ManagedClustersOperations.list_guardrails_versions + - Added operation ManagedClustersOperations.list_safeguards_versions + - Added operation group NamespacesOperations + - Model AdvancedNetworkingSecurity has a new parameter advanced_network_policies + - Model AdvancedNetworkingSecurity has a new parameter transit_encryption + - Model AgentPool has a new parameter artifact_streaming_profile + - Model AgentPool has a new parameter enable_custom_ca_trust + - Model AgentPool has a new parameter gateway_profile + - Model AgentPool has a new parameter node_initialization_taints + - Model AgentPool has a new parameter pod_ip_allocation_mode + - Model AgentPool has a new parameter status + - Model AgentPool has a new parameter virtual_machine_nodes_status + - Model AgentPool has a new parameter virtual_machines_profile + - Model AgentPoolSecurityProfile has a new parameter ssh_access + - Model AgentPoolUpgradeProfile has a new parameter components_by_releases + - Model AgentPoolUpgradeProfilePropertiesUpgradesItem has a new parameter is_out_of_support + - Model AgentPoolUpgradeSettings has a new parameter max_blocked_nodes + - Model AgentPoolUpgradeSettings has a new parameter max_unavailable + - Model AgentPoolUpgradeSettings has a new parameter undrainable_node_behavior + - Model AutoScaleProfile has a new parameter size + - Model ContainerServiceNetworkProfile has a new parameter kube_proxy_config + - Model ContainerServiceNetworkProfile has a new parameter pod_link_local_access + - Model ContainerServiceNetworkProfile has a new parameter static_egress_gateway_profile + - Model GPUProfile has a new parameter driver_type + - Model IstioEgressGateway has a new parameter gateway_configuration_name + - Model IstioEgressGateway has a new parameter namespace + - Model KubeletConfig has a new parameter seccomp_default + - Model ManagedCluster has a new parameter ai_toolchain_operator_profile + - Model ManagedCluster has a new parameter creation_data + - Model ManagedCluster has a new parameter enable_namespace_resources + - Model ManagedCluster has a new parameter kind + - Model ManagedCluster has a new parameter node_provisioning_profile + - Model ManagedCluster has a new parameter safeguards_profile + - Model ManagedCluster has a new parameter status + - Model ManagedClusterAPIServerAccessProfile has a new parameter enable_vnet_integration + - Model ManagedClusterAPIServerAccessProfile has a new parameter subnet_id + - Model ManagedClusterAgentPoolProfile has a new parameter artifact_streaming_profile + - Model ManagedClusterAgentPoolProfile has a new parameter enable_custom_ca_trust + - Model ManagedClusterAgentPoolProfile has a new parameter gateway_profile + - Model ManagedClusterAgentPoolProfile has a new parameter node_initialization_taints + - Model ManagedClusterAgentPoolProfile has a new parameter pod_ip_allocation_mode + - Model ManagedClusterAgentPoolProfile has a new parameter status + - Model ManagedClusterAgentPoolProfile has a new parameter virtual_machine_nodes_status + - Model ManagedClusterAgentPoolProfile has a new parameter virtual_machines_profile + - Model ManagedClusterAgentPoolProfileProperties has a new parameter artifact_streaming_profile + - Model ManagedClusterAgentPoolProfileProperties has a new parameter enable_custom_ca_trust + - Model ManagedClusterAgentPoolProfileProperties has a new parameter gateway_profile + - Model ManagedClusterAgentPoolProfileProperties has a new parameter node_initialization_taints + - Model ManagedClusterAgentPoolProfileProperties has a new parameter pod_ip_allocation_mode + - Model ManagedClusterAgentPoolProfileProperties has a new parameter status + - Model ManagedClusterAgentPoolProfileProperties has a new parameter virtual_machine_nodes_status + - Model ManagedClusterAgentPoolProfileProperties has a new parameter virtual_machines_profile + - Model ManagedClusterAzureMonitorProfile has a new parameter app_monitoring + - Model ManagedClusterAzureMonitorProfile has a new parameter container_insights + - Model ManagedClusterHTTPProxyConfig has a new parameter effective_no_proxy + - Model ManagedClusterLoadBalancerProfile has a new parameter cluster_service_load_balancer_health_probe_mode + - Model ManagedClusterPoolUpgradeProfile has a new parameter components_by_releases + - Model ManagedClusterPoolUpgradeProfileUpgradesItem has a new parameter is_out_of_support + - Model ManagedClusterSecurityProfile has a new parameter image_integrity + - Model ManagedClusterSecurityProfile has a new parameter node_restriction + - Model ManagedClusterSecurityProfileDefender has a new parameter security_gating + - Model ManagedClusterStorageProfileDiskCSIDriver has a new parameter version + - Model ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler has a new parameter addon_autoscaling + - Model ManualScaleProfile has a new parameter size + - Operation ManagedClustersOperations.begin_delete has a new optional parameter ignore_pod_disruption_budget + +### Breaking Changes + + - Model AutoScaleProfile no longer has parameter os_disk_size_gb + - Model AutoScaleProfile no longer has parameter os_disk_type + - Model AutoScaleProfile no longer has parameter sizes + - Model IstioEgressGateway has a new required parameter name + - Model ManualScaleProfile no longer has parameter os_disk_size_gb + - Model ManualScaleProfile no longer has parameter os_disk_type + - Model ManualScaleProfile no longer has parameter sizes + ## 35.0.0 (2025-04-14) ### Features Added diff --git a/sdk/containerservice/azure-mgmt-containerservice/README.md b/sdk/containerservice/azure-mgmt-containerservice/README.md index a178a86c0b7a..7fb3f35472de 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/README.md +++ b/sdk/containerservice/azure-mgmt-containerservice/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Container Service Management Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/containerservice/azure-mgmt-containerservice/_meta.json b/sdk/containerservice/azure-mgmt-containerservice/_meta.json index a301dbbb0754..2334d11eddd7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_meta.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_meta.json @@ -1,12 +1,12 @@ { - "commit": "d18ba009da04dd6afc04402c39f87e032051fe9b", + "commit": "d04d3b65c18c5d8c228b838399561c284b1911dd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.27.4", + "@autorest/python@6.33.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 --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --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 --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.33.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", "package-2024-05": "2024-07-10 04:37:35 +0800 794e29ee5f8eca63ce0ddf007c60da7df37baaad stable/2024-05-01/managedClusters.json", "package-preview-2024-04": "2024-08-27 19:55:39 -0700 4bc9b37173bd5fe0ed19f21edfb8a195e89caaf6 preview/2024-04-02-preview/managedClusters.json", 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 d86c67067d20..c4c49266f506 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 @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin @@ -27,7 +29,7 @@ class _SDKClient(object): def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." + """This is a fake class to support current implementation of MultiApiClientMixin." Will be removed in final version of multiapi azure-core based client """ pass @@ -61,12 +63,8 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'container_service': '2025-01-02-preview', 'container_services': '2017-07-01', - 'load_balancers': '2025-01-02-preview', - 'managed_cluster_snapshots': '2025-01-02-preview', 'open_shift_managed_clusters': '2019-09-30-preview', - 'operation_status_result': '2025-01-02-preview', }}, _PROFILE_TAG + " latest" ) @@ -76,13 +74,18 @@ def __init__( credential: "TokenCredential", subscription_id: str, api_version: Optional[str]=None, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, profile: KnownProfiles=KnownProfiles.default, **kwargs: Any ): if api_version: kwargs.setdefault('api_version', api_version) - self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = ContainerServiceClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -101,7 +104,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) super(ContainerServiceClient, self).__init__( api_version=api_version, profile=profile @@ -119,8 +122,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-30-preview: :mod:`v2019_09_30_preview.models` * 2020-03-01: :mod:`v2020_03_01.models` * 2020-11-01: :mod:`v2020_11_01.models` - * 2025-01-02-preview: :mod:`v2025_01_02_preview.models` * 2025-02-01: :mod:`v2025_02_01.models` + * 2025-03-02-preview: :mod:`v2025_03_02_preview.models` """ if api_version == '2017-07-01': from .v2017_07_01 import models @@ -134,12 +137,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-11-01': from .v2020_11_01 import models return models - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview import models - return models elif api_version == '2025-02-01': from .v2025_02_01 import models return models + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -148,18 +151,18 @@ def agent_pools(self): * 2020-03-01: :class:`AgentPoolsOperations` * 2020-11-01: :class:`AgentPoolsOperations` - * 2025-01-02-preview: :class:`AgentPoolsOperations` * 2025-02-01: :class:`AgentPoolsOperations` + * 2025-03-02-preview: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2020-03-01': from .v2020_03_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import AgentPoolsOperations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import AgentPoolsOperations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) self._config.api_version = api_version @@ -169,11 +172,11 @@ def agent_pools(self): def container_service(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`ContainerServiceOperations` + * 2025-03-02-preview: :class:`ContainerServiceOperations` """ api_version = self._get_api_version('container_service') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import ContainerServiceOperations as OperationClass + if api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import ContainerServiceOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'container_service'".format(api_version)) self._config.api_version = api_version @@ -197,11 +200,11 @@ def container_services(self): def load_balancers(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`LoadBalancersOperations` + * 2025-03-02-preview: :class:`LoadBalancersOperations` """ api_version = self._get_api_version('load_balancers') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import LoadBalancersOperations as OperationClass + if api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import LoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) self._config.api_version = api_version @@ -211,14 +214,14 @@ def load_balancers(self): def machines(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`MachinesOperations` * 2025-02-01: :class:`MachinesOperations` + * 2025-03-02-preview: :class:`MachinesOperations` """ api_version = self._get_api_version('machines') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import MachinesOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from .v2025_02_01.operations import MachinesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import MachinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'machines'".format(api_version)) self._config.api_version = api_version @@ -228,14 +231,14 @@ def machines(self): def maintenance_configurations(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`MaintenanceConfigurationsOperations` * 2025-02-01: :class:`MaintenanceConfigurationsOperations` + * 2025-03-02-preview: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from .v2025_02_01.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) self._config.api_version = api_version @@ -245,11 +248,11 @@ def maintenance_configurations(self): def managed_cluster_snapshots(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`ManagedClusterSnapshotsOperations` + * 2025-03-02-preview: :class:`ManagedClusterSnapshotsOperations` """ api_version = self._get_api_version('managed_cluster_snapshots') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import ManagedClusterSnapshotsOperations as OperationClass + if api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import ManagedClusterSnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_cluster_snapshots'".format(api_version)) self._config.api_version = api_version @@ -261,23 +264,37 @@ def managed_clusters(self): * 2020-03-01: :class:`ManagedClustersOperations` * 2020-11-01: :class:`ManagedClustersOperations` - * 2025-01-02-preview: :class:`ManagedClustersOperations` * 2025-02-01: :class:`ManagedClustersOperations` + * 2025-03-02-preview: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2020-03-01': from .v2020_03_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import ManagedClustersOperations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import ManagedClustersOperations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) self._config.api_version = api_version return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + @property + def namespaces(self): + """Instance depends on the API version: + + * 2025-03-02-preview: :class:`NamespacesOperations` + """ + api_version = self._get_api_version('namespaces') + if api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import NamespacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'namespaces'".format(api_version)) + self._config.api_version = api_version + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + @property def open_shift_managed_clusters(self): """Instance depends on the API version: @@ -296,11 +313,11 @@ def open_shift_managed_clusters(self): def operation_status_result(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`OperationStatusResultOperations` + * 2025-03-02-preview: :class:`OperationStatusResultOperations` """ api_version = self._get_api_version('operation_status_result') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import OperationStatusResultOperations as OperationClass + if api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import OperationStatusResultOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'operation_status_result'".format(api_version)) self._config.api_version = api_version @@ -312,18 +329,18 @@ def operations(self): * 2020-03-01: :class:`Operations` * 2020-11-01: :class:`Operations` - * 2025-01-02-preview: :class:`Operations` * 2025-02-01: :class:`Operations` + * 2025-03-02-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2020-03-01': from .v2020_03_01.operations import Operations as OperationClass elif api_version == '2020-11-01': from .v2020_11_01.operations import Operations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import Operations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import Operations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version @@ -334,16 +351,16 @@ def private_endpoint_connections(self): """Instance depends on the API version: * 2020-11-01: :class:`PrivateEndpointConnectionsOperations` - * 2025-01-02-preview: :class:`PrivateEndpointConnectionsOperations` * 2025-02-01: :class:`PrivateEndpointConnectionsOperations` + * 2025-03-02-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-11-01': from .v2020_11_01.operations import PrivateEndpointConnectionsOperations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) self._config.api_version = api_version @@ -354,16 +371,16 @@ def private_link_resources(self): """Instance depends on the API version: * 2020-11-01: :class:`PrivateLinkResourcesOperations` - * 2025-01-02-preview: :class:`PrivateLinkResourcesOperations` * 2025-02-01: :class:`PrivateLinkResourcesOperations` + * 2025-03-02-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-11-01': from .v2020_11_01.operations import PrivateLinkResourcesOperations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) self._config.api_version = api_version @@ -374,16 +391,16 @@ def resolve_private_link_service_id(self): """Instance depends on the API version: * 2020-11-01: :class:`ResolvePrivateLinkServiceIdOperations` - * 2025-01-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` * 2025-02-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2025-03-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-11-01': from .v2020_11_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass - elif api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2025-02-01': from .v2025_02_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) self._config.api_version = api_version @@ -393,14 +410,14 @@ def resolve_private_link_service_id(self): def snapshots(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`SnapshotsOperations` * 2025-02-01: :class:`SnapshotsOperations` + * 2025-03-02-preview: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import SnapshotsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from .v2025_02_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) self._config.api_version = api_version @@ -410,14 +427,14 @@ def snapshots(self): def trusted_access_role_bindings(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2025-02-01: :class:`TrustedAccessRoleBindingsOperations` + * 2025-03-02-preview: :class:`TrustedAccessRoleBindingsOperations` """ api_version = self._get_api_version('trusted_access_role_bindings') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import TrustedAccessRoleBindingsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from .v2025_02_01.operations import TrustedAccessRoleBindingsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import TrustedAccessRoleBindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_role_bindings'".format(api_version)) self._config.api_version = api_version @@ -427,14 +444,14 @@ def trusted_access_role_bindings(self): def trusted_access_roles(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`TrustedAccessRolesOperations` * 2025-02-01: :class:`TrustedAccessRolesOperations` + * 2025-03-02-preview: :class:`TrustedAccessRolesOperations` """ api_version = self._get_api_version('trusted_access_roles') - if api_version == '2025-01-02-preview': - from .v2025_01_02_preview.operations import TrustedAccessRolesOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from .v2025_02_01.operations import TrustedAccessRolesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from .v2025_03_02_preview.operations import TrustedAccessRolesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_roles'".format(api_version)) self._config.api_version = api_version diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py index a94487cbf17a..05bcd7d403ae 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_serialization.py @@ -1,28 +1,4 @@ -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- +# coding=utf-8 # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -47,9 +23,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -60,13 +34,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -184,73 +158,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -478,8 +386,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -625,7 +533,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -735,8 +643,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -780,8 +688,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -804,8 +712,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -834,8 +742,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -854,9 +762,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1191,7 +1099,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1217,7 +1125,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1250,7 +1158,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1428,7 +1336,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1487,7 +1395,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1501,7 +1409,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1716,7 +1624,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1798,7 +1706,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1844,7 +1752,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1935,7 +1843,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1948,7 +1856,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1963,7 +1871,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1981,7 +1889,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1994,7 +1902,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2012,7 +1920,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2028,7 +1936,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2043,14 +1951,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2066,7 +1974,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2104,7 +2012,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore 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 ce330953651e..c89f5e6483e2 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 = "35.0.0" +VERSION = "36.0.0" 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 1b5ef26083f5..ae93f94a1aaa 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 @@ -9,12 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin @@ -27,7 +29,7 @@ class _SDKClient(object): def __init__(self, *args, **kwargs): - """This is a fake class to support current implemetation of MultiApiClientMixin." + """This is a fake class to support current implementation of MultiApiClientMixin." Will be removed in final version of multiapi azure-core based client """ pass @@ -61,12 +63,8 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'container_service': '2025-01-02-preview', 'container_services': '2017-07-01', - 'load_balancers': '2025-01-02-preview', - 'managed_cluster_snapshots': '2025-01-02-preview', 'open_shift_managed_clusters': '2019-09-30-preview', - 'operation_status_result': '2025-01-02-preview', }}, _PROFILE_TAG + " latest" ) @@ -76,13 +74,18 @@ def __init__( credential: "AsyncTokenCredential", subscription_id: str, api_version: Optional[str] = None, - base_url: str = "https://management.azure.com", + base_url: Optional[str] = None, profile: KnownProfiles = KnownProfiles.default, **kwargs: Any ) -> None: if api_version: kwargs.setdefault('api_version', api_version) - self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) + self._config = ContainerServiceClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs) _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -101,7 +104,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) super(ContainerServiceClient, self).__init__( api_version=api_version, profile=profile @@ -119,8 +122,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-30-preview: :mod:`v2019_09_30_preview.models` * 2020-03-01: :mod:`v2020_03_01.models` * 2020-11-01: :mod:`v2020_11_01.models` - * 2025-01-02-preview: :mod:`v2025_01_02_preview.models` * 2025-02-01: :mod:`v2025_02_01.models` + * 2025-03-02-preview: :mod:`v2025_03_02_preview.models` """ if api_version == '2017-07-01': from ..v2017_07_01 import models @@ -134,12 +137,12 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-11-01': from ..v2020_11_01 import models return models - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview import models - return models elif api_version == '2025-02-01': from ..v2025_02_01 import models return models + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -148,18 +151,18 @@ def agent_pools(self): * 2020-03-01: :class:`AgentPoolsOperations` * 2020-11-01: :class:`AgentPoolsOperations` - * 2025-01-02-preview: :class:`AgentPoolsOperations` * 2025-02-01: :class:`AgentPoolsOperations` + * 2025-03-02-preview: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2020-03-01': from ..v2020_03_01.aio.operations import AgentPoolsOperations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import AgentPoolsOperations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import AgentPoolsOperations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import AgentPoolsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) self._config.api_version = api_version @@ -169,11 +172,11 @@ def agent_pools(self): def container_service(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`ContainerServiceOperations` + * 2025-03-02-preview: :class:`ContainerServiceOperations` """ api_version = self._get_api_version('container_service') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import ContainerServiceOperations as OperationClass + if api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import ContainerServiceOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'container_service'".format(api_version)) self._config.api_version = api_version @@ -197,11 +200,11 @@ def container_services(self): def load_balancers(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`LoadBalancersOperations` + * 2025-03-02-preview: :class:`LoadBalancersOperations` """ api_version = self._get_api_version('load_balancers') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import LoadBalancersOperations as OperationClass + if api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import LoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) self._config.api_version = api_version @@ -211,14 +214,14 @@ def load_balancers(self): def machines(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`MachinesOperations` * 2025-02-01: :class:`MachinesOperations` + * 2025-03-02-preview: :class:`MachinesOperations` """ api_version = self._get_api_version('machines') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import MachinesOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from ..v2025_02_01.aio.operations import MachinesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import MachinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'machines'".format(api_version)) self._config.api_version = api_version @@ -228,14 +231,14 @@ def machines(self): def maintenance_configurations(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`MaintenanceConfigurationsOperations` * 2025-02-01: :class:`MaintenanceConfigurationsOperations` + * 2025-03-02-preview: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import MaintenanceConfigurationsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from ..v2025_02_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) self._config.api_version = api_version @@ -245,11 +248,11 @@ def maintenance_configurations(self): def managed_cluster_snapshots(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`ManagedClusterSnapshotsOperations` + * 2025-03-02-preview: :class:`ManagedClusterSnapshotsOperations` """ api_version = self._get_api_version('managed_cluster_snapshots') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import ManagedClusterSnapshotsOperations as OperationClass + if api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import ManagedClusterSnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_cluster_snapshots'".format(api_version)) self._config.api_version = api_version @@ -261,23 +264,37 @@ def managed_clusters(self): * 2020-03-01: :class:`ManagedClustersOperations` * 2020-11-01: :class:`ManagedClustersOperations` - * 2025-01-02-preview: :class:`ManagedClustersOperations` * 2025-02-01: :class:`ManagedClustersOperations` + * 2025-03-02-preview: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2020-03-01': from ..v2020_03_01.aio.operations import ManagedClustersOperations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import ManagedClustersOperations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import ManagedClustersOperations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import ManagedClustersOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) self._config.api_version = api_version return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + @property + def namespaces(self): + """Instance depends on the API version: + + * 2025-03-02-preview: :class:`NamespacesOperations` + """ + api_version = self._get_api_version('namespaces') + if api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import NamespacesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'namespaces'".format(api_version)) + self._config.api_version = api_version + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)), api_version) + @property def open_shift_managed_clusters(self): """Instance depends on the API version: @@ -296,11 +313,11 @@ def open_shift_managed_clusters(self): def operation_status_result(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`OperationStatusResultOperations` + * 2025-03-02-preview: :class:`OperationStatusResultOperations` """ api_version = self._get_api_version('operation_status_result') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import OperationStatusResultOperations as OperationClass + if api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import OperationStatusResultOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'operation_status_result'".format(api_version)) self._config.api_version = api_version @@ -312,18 +329,18 @@ def operations(self): * 2020-03-01: :class:`Operations` * 2020-11-01: :class:`Operations` - * 2025-01-02-preview: :class:`Operations` * 2025-02-01: :class:`Operations` + * 2025-03-02-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2020-03-01': from ..v2020_03_01.aio.operations import Operations as OperationClass elif api_version == '2020-11-01': from ..v2020_11_01.aio.operations import Operations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import Operations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import Operations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) self._config.api_version = api_version @@ -334,16 +351,16 @@ def private_endpoint_connections(self): """Instance depends on the API version: * 2020-11-01: :class:`PrivateEndpointConnectionsOperations` - * 2025-01-02-preview: :class:`PrivateEndpointConnectionsOperations` * 2025-02-01: :class:`PrivateEndpointConnectionsOperations` + * 2025-03-02-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-11-01': from ..v2020_11_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) self._config.api_version = api_version @@ -354,16 +371,16 @@ def private_link_resources(self): """Instance depends on the API version: * 2020-11-01: :class:`PrivateLinkResourcesOperations` - * 2025-01-02-preview: :class:`PrivateLinkResourcesOperations` * 2025-02-01: :class:`PrivateLinkResourcesOperations` + * 2025-03-02-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-11-01': from ..v2020_11_01.aio.operations import PrivateLinkResourcesOperations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) self._config.api_version = api_version @@ -374,16 +391,16 @@ def resolve_private_link_service_id(self): """Instance depends on the API version: * 2020-11-01: :class:`ResolvePrivateLinkServiceIdOperations` - * 2025-01-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` * 2025-02-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2025-03-02-preview: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-11-01': from ..v2020_11_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass - elif api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2025-02-01': from ..v2025_02_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) self._config.api_version = api_version @@ -393,14 +410,14 @@ def resolve_private_link_service_id(self): def snapshots(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`SnapshotsOperations` * 2025-02-01: :class:`SnapshotsOperations` + * 2025-03-02-preview: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import SnapshotsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from ..v2025_02_01.aio.operations import SnapshotsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) self._config.api_version = api_version @@ -410,14 +427,14 @@ def snapshots(self): def trusted_access_role_bindings(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`TrustedAccessRoleBindingsOperations` * 2025-02-01: :class:`TrustedAccessRoleBindingsOperations` + * 2025-03-02-preview: :class:`TrustedAccessRoleBindingsOperations` """ api_version = self._get_api_version('trusted_access_role_bindings') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from ..v2025_02_01.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import TrustedAccessRoleBindingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_role_bindings'".format(api_version)) self._config.api_version = api_version @@ -427,14 +444,14 @@ def trusted_access_role_bindings(self): def trusted_access_roles(self): """Instance depends on the API version: - * 2025-01-02-preview: :class:`TrustedAccessRolesOperations` * 2025-02-01: :class:`TrustedAccessRolesOperations` + * 2025-03-02-preview: :class:`TrustedAccessRolesOperations` """ api_version = self._get_api_version('trusted_access_roles') - if api_version == '2025-01-02-preview': - from ..v2025_01_02_preview.aio.operations import TrustedAccessRolesOperations as OperationClass - elif api_version == '2025-02-01': + if api_version == '2025-02-01': from ..v2025_02_01.aio.operations import TrustedAccessRolesOperations as OperationClass + elif api_version == '2025-03-02-preview': + from ..v2025_03_02_preview.aio.operations import TrustedAccessRolesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'trusted_access_roles'".format(api_version)) self._config.api_version = api_version diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py index cc759c732d2e..633c8be9c0fd 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py @@ -6,5 +6,4 @@ # -------------------------------------------------------------------------- from .v2017_07_01.models import * from .v2019_09_30_preview.models import * -from .v2025_01_02_preview.models import * from .v2025_02_01.models import * diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py index abe0ccded765..aaea2e39d24f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -35,7 +37,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this default value may result in unsupported behavior. @@ -45,15 +47,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +76,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json index 706b819a5e06..dc427070fc0c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_metadata.json @@ -5,13 +5,13 @@ "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py index ce9a301baaf8..a6f13b87749c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -35,7 +37,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2017-07-01". Note that overriding this default value may result in unsupported behavior. @@ -45,15 +47,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +76,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py index d269db5ae401..b8ba0e0fe36a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/aio/operations/_container_services_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._container_services_operations import ( build_create_or_update_request, build_delete_request, @@ -38,11 +40,8 @@ build_list_by_resource_group_request, build_list_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,10 +60,10 @@ class ContainerServicesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py index a583cc6f63e7..476e9503a698 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/models/_models_py3.py @@ -56,9 +56,9 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -190,7 +190,7 @@ def __init__( ~azure.mgmt.containerservice.v2017_07_01.models.ContainerServiceDiagnosticsProfile """ super().__init__(location=location, tags=tags, **kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.orchestrator_profile = orchestrator_profile self.custom_profile = custom_profile self.service_principal_profile = service_principal_profile @@ -385,7 +385,7 @@ def __init__( self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb self.dns_prefix = dns_prefix - self.fqdn = None + self.fqdn: Optional[str] = None self.ports = ports self.storage_profile = storage_profile self.vnet_subnet_id = vnet_subnet_id @@ -507,7 +507,7 @@ def __init__(self, *, value: Optional[List["_models.ContainerService"]] = None, """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ContainerServiceMasterProfile(_serialization.Model): @@ -679,7 +679,7 @@ def __init__( self.vnet_subnet_id = vnet_subnet_id self.first_consecutive_static_ip = first_consecutive_static_ip self.storage_profile = storage_profile - self.fqdn = None + self.fqdn: Optional[str] = None class ContainerServiceOrchestratorProfile(_serialization.Model): @@ -864,7 +864,7 @@ def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.enabled = enabled - self.storage_uri = None + self.storage_uri: Optional[str] = None class ContainerServiceWindowsProfile(_serialization.Model): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py index f351d1533a3f..4571a00ab1e4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2017_07_01/operations/_container_services_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -83,7 +82,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "containerServiceName": _SERIALIZER.url("container_service_name", container_service_name, "str"), @@ -116,7 +115,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "containerServiceName": _SERIALIZER.url("container_service_name", container_service_name, "str"), @@ -144,7 +143,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "containerServiceName": _SERIALIZER.url("container_service_name", container_service_name, "str"), @@ -170,7 +169,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -201,10 +200,10 @@ class ContainerServicesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py index 17e40e6186bb..ceb31d85594b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -35,7 +37,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2019-09-30-preview". Note that overriding this default value may result in unsupported behavior. @@ -45,15 +47,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +76,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json index 708d610b1542..d02fad5764f5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_metadata.json @@ -5,13 +5,13 @@ "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py index 5f64ade5a381..d812bb6c4d67 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -35,7 +37,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2019-09-30-preview". Note that overriding this default value may result in unsupported behavior. @@ -45,15 +47,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -72,7 +76,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py index 0200a7639635..4d3408faf87b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/operations/_open_shift_managed_clusters_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._open_shift_managed_clusters_operations import ( build_create_or_update_request, build_delete_request, @@ -39,11 +42,8 @@ build_list_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,15 +62,14 @@ class OpenShiftManagedClustersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.OpenShiftManagedCluster"]: - # pylint: disable=line-too-long """Gets a list of OpenShift managed clusters in the specified subscription. Gets a list of OpenShift managed clusters in the specified subscription. The operation returns @@ -154,7 +153,6 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.OpenShiftManagedCluster"]: - # pylint: disable=line-too-long """Lists OpenShift managed clusters in the specified subscription and resource group. Lists OpenShift managed clusters in the specified subscription and resource group. The @@ -373,7 +371,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Creates or updates an OpenShift managed cluster. Creates or updates a OpenShift managed cluster with the specified configuration for agents and @@ -407,7 +404,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Creates or updates an OpenShift managed cluster. Creates or updates a OpenShift managed cluster with the specified configuration for agents and @@ -438,7 +434,6 @@ async def begin_create_or_update( parameters: Union[_models.OpenShiftManagedCluster, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Creates or updates an OpenShift managed cluster. Creates or updates a OpenShift managed cluster with the specified configuration for agents and @@ -585,7 +580,6 @@ async def begin_update_tags( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags. @@ -617,7 +611,6 @@ async def begin_update_tags( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags. @@ -647,7 +640,6 @@ async def begin_update_tags( parameters: Union[_models.TagsObject, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.OpenShiftManagedCluster]: - # pylint: disable=line-too-long """Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py index a23f034c22b1..d446338958f1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/models/_models_py3.py @@ -148,9 +148,9 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -287,11 +287,11 @@ def __init__( """ super().__init__(location=location, tags=tags, **kwargs) self.plan = plan - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.open_shift_version = open_shift_version - self.cluster_version = None - self.public_hostname = None - self.fqdn = None + self.cluster_version: Optional[str] = None + self.public_hostname: Optional[str] = None + self.fqdn: Optional[str] = None self.network_profile = network_profile self.router_profiles = router_profiles self.master_pool_profile = master_pool_profile @@ -567,7 +567,7 @@ def __init__(self, *, value: Optional[List["_models.OpenShiftManagedCluster"]] = """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class OpenShiftManagedClusterMasterPoolProfile(_serialization.Model): @@ -713,8 +713,8 @@ def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.name = name - self.public_subdomain = None - self.fqdn = None + self.public_subdomain: Optional[str] = None + self.fqdn: Optional[str] = None class PurchasePlan(_serialization.Model): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py index 2b3529f7c673..48929d22664a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/operations/_open_shift_managed_clusters_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +52,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/openShiftManagedClusters" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -80,7 +79,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -108,7 +107,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -140,7 +139,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -174,7 +173,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -207,7 +206,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/openShiftManagedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -239,10 +238,10 @@ class OpenShiftManagedClustersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py index 151221184a48..f6a086b94bbe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -39,7 +41,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2020-03-01". Note that overriding this default value may result in unsupported behavior. @@ -49,15 +51,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -76,7 +80,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json index e2e6ea4cf948..17b77dc76430 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_metadata.json @@ -5,13 +5,13 @@ "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py index 29931905ca18..d4a59703811a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -40,7 +42,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2020-03-01". Note that overriding this default value may result in unsupported behavior. @@ -50,15 +52,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -77,7 +81,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py index 25df337596b9..f011c2f0635a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_agent_pools_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._agent_pools_operations import ( build_create_or_update_request, build_delete_request, @@ -39,11 +41,8 @@ build_get_upgrade_profile_request, build_list_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,10 +61,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py index 83bfcc14b669..a990ad6caa62 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_managed_clusters_operations.py @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._managed_clusters_operations import ( build_create_or_update_request, build_delete_request, @@ -48,11 +50,8 @@ build_rotate_cluster_certificates_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -71,10 +70,10 @@ class ManagedClustersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_operations.py index 727c420a3714..3eb79d7c5e8d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/aio/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py index 2e39bacca470..8534c089ea31 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/models/_models_py3.py @@ -44,9 +44,9 @@ class SubResource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class AgentPool(SubResource): @@ -333,7 +333,7 @@ def __init__( # pylint: disable=too-many-locals self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip self.scale_set_priority = scale_set_priority @@ -388,9 +388,9 @@ def __init__( list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.agent_pool_versions = agent_pool_versions @@ -460,7 +460,7 @@ def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwarg """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class AgentPoolUpgradeProfile(_serialization.Model): @@ -522,9 +522,9 @@ def __init__( list[~azure.mgmt.containerservice.v2020_03_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.kubernetes_version = kubernetes_version self.os_type = os_type self.upgrades = upgrades @@ -738,12 +738,12 @@ def __init__( """ super().__init__(**kwargs) self.identity = identity - self.provisioning_state = None - self.max_agent_pools = None + self.provisioning_state: Optional[str] = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -1043,7 +1043,7 @@ def __init__( self.vnet_subnet_id = vnet_subnet_id self.first_consecutive_static_ip = first_consecutive_static_ip self.storage_profile = storage_profile - self.fqdn = None + self.fqdn: Optional[str] = None class ContainerServiceNetworkProfile(_serialization.Model): @@ -1251,7 +1251,7 @@ def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.enabled = enabled - self.storage_uri = None + self.storage_uri: Optional[str] = None class CredentialResult(_serialization.Model): @@ -1278,8 +1278,8 @@ class CredentialResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.value = None + self.name: Optional[str] = None + self.value: Optional[bytes] = None class CredentialResults(_serialization.Model): @@ -1302,7 +1302,7 @@ class CredentialResults(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.kubeconfigs = None + self.kubeconfigs: Optional[List["_models.CredentialResult"]] = None class Resource(_serialization.Model): @@ -1347,9 +1347,9 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -1588,12 +1588,12 @@ def __init__( # pylint: disable=too-many-locals **kwargs ) self.identity = identity - self.provisioning_state = None - self.max_agent_pools = None + self.provisioning_state: Optional[str] = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -1609,9 +1609,9 @@ def __init__( # pylint: disable=too-many-locals self.disk_encryption_set_id = disk_encryption_set_id self.identity_profile = identity_profile self.sku = sku - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -1773,7 +1773,7 @@ def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, ** super().__init__(**kwargs) self.enabled = enabled self.config = config - self.identity = None + self.identity: Optional["_models.ManagedClusterAddonProfileIdentity"] = None class UserAssignedIdentity(_serialization.Model): @@ -2096,7 +2096,7 @@ def __init__( self.type = type self.mode = mode self.orchestrator_version = orchestrator_version - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip self.scale_set_priority = scale_set_priority @@ -2470,8 +2470,8 @@ def __init__(self, *, type: Optional[Union[str, "_models.ResourceIdentityType"]] :paramtype type: str or ~azure.mgmt.containerservice.v2020_03_01.models.ResourceIdentityType """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type @@ -2502,7 +2502,7 @@ def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, ** """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ManagedClusterLoadBalancerProfile(_serialization.Model): @@ -2961,9 +2961,9 @@ def __init__( list[~azure.mgmt.containerservice.v2020_03_01.models.ManagedClusterPoolUpgradeProfile] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.control_plane_profile = control_plane_profile self.agent_pool_profiles = agent_pool_profiles @@ -3044,7 +3044,7 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.OperationValue"]] = None class OperationValue(_serialization.Model): @@ -3087,12 +3087,12 @@ class OperationValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None + self.origin: Optional[str] = None + self.name: Optional[str] = None + self.operation: Optional[str] = None + self.resource: Optional[str] = None + self.description: Optional[str] = None + self.provider: Optional[str] = None class ResourceReference(_serialization.Model): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py index 3698431ab361..f1c9104c237e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_agent_pools_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -94,7 +93,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -134,7 +133,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -175,7 +174,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -214,7 +213,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -253,7 +252,7 @@ def build_get_available_agent_pool_versions_request( # pylint: disable=name-too _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -292,10 +291,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py index ca47a48e1190..b0a1d8a24b26 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +79,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -111,7 +109,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -149,7 +147,7 @@ def build_get_access_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -188,7 +186,7 @@ def build_list_cluster_admin_credentials_request( # pylint: disable=name-too-lo _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -226,7 +224,7 @@ def build_list_cluster_user_credentials_request( # pylint: disable=name-too-lon _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -264,7 +262,7 @@ def build_list_cluster_monitoring_user_credentials_request( # pylint: disable=n _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -300,7 +298,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -339,7 +337,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -380,7 +378,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -420,7 +418,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -459,7 +457,7 @@ def build_reset_service_principal_profile_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -500,7 +498,7 @@ def build_reset_aad_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -540,7 +538,7 @@ def build_rotate_cluster_certificates_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -579,10 +577,10 @@ class ManagedClustersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py index 8fc2b689bb82..f1158d132e33 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -71,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py index 33be7380e08f..9b47dcb27a0d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -55,7 +57,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2020-11-01". Note that overriding this default value may result in unsupported behavior. @@ -65,15 +67,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -92,7 +96,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json index 918246224fff..d437cc0785b1 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_metadata.json @@ -5,13 +5,13 @@ "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py index d8c18546cb6c..54f2b4f39386 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -56,7 +58,7 @@ class ContainerServiceClient: :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2020-11-01". Note that overriding this default value may result in unsupported behavior. @@ -66,15 +68,17 @@ class ContainerServiceClient: """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -93,7 +97,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py index e4e9adde5516..57b774950558 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_agent_pools_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._agent_pools_operations import ( build_create_or_update_request, build_delete_request, @@ -40,11 +42,8 @@ build_list_request, build_upgrade_node_image_version_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,10 +62,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py index 8aaad01321f3..05a63e89eebc 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_managed_clusters_operations.py @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._managed_clusters_operations import ( build_create_or_update_request, build_delete_request, @@ -50,11 +52,8 @@ build_stop_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -73,10 +72,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_operations.py index 1151b1593f82..19f9503c0fa0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py index 0ed81edcf391..4f260736d6f8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_endpoint_connections_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,17 +29,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_endpoint_connections_operations import ( build_delete_request, build_get_request, build_list_request, build_update_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,10 +56,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_link_resources_operations.py index 64e4c5a1d869..7ca4d6abf186 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_private_link_resources_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +24,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_link_resources_operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,10 +46,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py index 7cb3d31b3eed..fbf96946b285 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +25,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._resolve_private_link_service_id_operations import build_post_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -48,10 +47,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py index 2d19266751d8..c35e295fbc38 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/models/_models_py3.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,9 +44,9 @@ class SubResource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class AgentPool(SubResource): @@ -390,10 +390,10 @@ def __init__( # pylint: disable=too-many-locals self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version - self.node_image_version = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip self.scale_set_priority = scale_set_priority @@ -451,9 +451,9 @@ def __init__( list[~azure.mgmt.containerservice.v2020_11_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.agent_pool_versions = agent_pool_versions @@ -523,7 +523,7 @@ def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwarg """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class AgentPoolUpgradeProfile(_serialization.Model): @@ -593,9 +593,9 @@ def __init__( :paramtype latest_node_image_version: str """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.kubernetes_version = kubernetes_version self.os_type = os_type self.upgrades = upgrades @@ -792,7 +792,7 @@ class Components1Q1Og48SchemasManagedclusterAllof1(_serialization.Model): # pyl :vartype disk_encryption_set_id: str :ivar identity_profile: Identities associated with the cluster. :vartype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] """ _validation = { @@ -925,17 +925,17 @@ def __init__( # pylint: disable=too-many-locals :paramtype disk_encryption_set_id: str :keyword identity_profile: Identities associated with the cluster. :paramtype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] """ super().__init__(**kwargs) self.identity = identity - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -980,8 +980,8 @@ class Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidenti def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.principal_id = None - self.client_id = None + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None class UserAssignedIdentity(_serialization.Model): @@ -1268,7 +1268,7 @@ def __init__( self.vnet_subnet_id = vnet_subnet_id self.first_consecutive_static_ip = first_consecutive_static_ip self.storage_profile = storage_profile - self.fqdn = None + self.fqdn: Optional[str] = None class ContainerServiceNetworkProfile(_serialization.Model): @@ -1476,7 +1476,7 @@ def __init__(self, *, enabled: bool, **kwargs: Any) -> None: """ super().__init__(**kwargs) self.enabled = enabled - self.storage_uri = None + self.storage_uri: Optional[str] = None class CredentialResult(_serialization.Model): @@ -1503,8 +1503,8 @@ class CredentialResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.value = None + self.name: Optional[str] = None + self.value: Optional[bytes] = None class CredentialResults(_serialization.Model): @@ -1527,7 +1527,7 @@ class CredentialResults(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.kubeconfigs = None + self.kubeconfigs: Optional[List["_models.CredentialResult"]] = None class KubeletConfig(_serialization.Model): @@ -1703,9 +1703,9 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -1780,7 +1780,7 @@ class ManagedCluster(Resource, Components1Q1Og48SchemasManagedclusterAllof1): :vartype disk_encryption_set_id: str :ivar identity_profile: Identities associated with the cluster. :vartype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. @@ -1938,7 +1938,7 @@ def __init__( # pylint: disable=too-many-locals :paramtype disk_encryption_set_id: str :keyword identity_profile: Identities associated with the cluster. :paramtype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.ComponentsQit0EtSchemasManagedclusterpropertiesPropertiesIdentityprofileAdditionalproperties] :keyword location: Resource location. Required. :paramtype location: str :keyword tags: Resource tags. @@ -1971,13 +1971,13 @@ def __init__( # pylint: disable=too-many-locals **kwargs ) self.identity = identity - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version self.dns_prefix = dns_prefix - self.fqdn = None - self.private_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -1995,9 +1995,9 @@ def __init__( # pylint: disable=too-many-locals self.disk_encryption_set_id = disk_encryption_set_id self.identity_profile = identity_profile self.sku = sku - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.location = location self.tags = tags @@ -2166,7 +2166,7 @@ def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, ** super().__init__(**kwargs) self.enabled = enabled self.config = config - self.identity = None + self.identity: Optional["_models.ManagedClusterAddonProfileIdentity"] = None class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): @@ -2507,10 +2507,10 @@ def __init__( # pylint: disable=too-many-locals self.type = type self.mode = mode self.orchestrator_version = orchestrator_version - self.node_image_version = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None - self.power_state = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip self.scale_set_priority = scale_set_priority @@ -2962,9 +2962,9 @@ class ManagedClusterIdentity(_serialization.Model): :ivar user_assigned_identities: The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ _validation = { @@ -3004,13 +3004,13 @@ def __init__( :keyword user_assigned_identities: The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2020_11_01.models.Components1Umhcm8SchemasManagedclusteridentityPropertiesUserassignedidentitiesAdditionalproperties] """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type self.user_assigned_identities = user_assigned_identities @@ -3042,7 +3042,7 @@ def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, ** """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ManagedClusterLoadBalancerProfile(_serialization.Model): @@ -3254,8 +3254,8 @@ def __init__(self, *, name: str, namespace: str, identity: "_models.UserAssigned self.name = name self.namespace = namespace self.identity = identity - self.provisioning_state = None - self.provisioning_info = None + self.provisioning_state: Optional[Union[str, "_models.ManagedClusterPodIdentityProvisioningState"]] = None + self.provisioning_info: Optional["_models.ManagedClusterPodIdentityProvisioningInfo"] = None class ManagedClusterPodIdentityException(_serialization.Model): @@ -3699,9 +3699,9 @@ def __init__( list[~azure.mgmt.containerservice.v2020_11_01.models.ManagedClusterPoolUpgradeProfile] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.control_plane_profile = control_plane_profile self.agent_pool_profiles = agent_pool_profiles @@ -3797,7 +3797,7 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.OperationValue"]] = None class OperationValue(_serialization.Model): @@ -3840,12 +3840,12 @@ class OperationValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None + self.origin: Optional[str] = None + self.name: Optional[str] = None + self.operation: Optional[str] = None + self.resource: Optional[str] = None + self.description: Optional[str] = None + self.provider: Optional[str] = None class PowerState(_serialization.Model): @@ -3948,10 +3948,10 @@ def __init__( ~azure.mgmt.containerservice.v2020_11_01.models.PrivateLinkServiceConnectionState """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = None self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state @@ -4038,7 +4038,7 @@ def __init__( self.type = type self.group_id = group_id self.required_members = required_members - self.private_link_service_id = None + self.private_link_service_id: Optional[str] = None class PrivateLinkResourcesListResult(_serialization.Model): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py index f87f48d89033..568b0d9d1ec5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_agent_pools_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -95,7 +93,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -135,7 +133,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -176,7 +174,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -215,7 +213,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -254,7 +252,7 @@ def build_get_available_agent_pool_versions_request( # pylint: disable=name-too _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -292,7 +290,7 @@ def build_upgrade_node_image_version_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -332,10 +330,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py index 19739f538453..cad6bf24bd08 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -81,7 +79,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -111,7 +109,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -149,7 +147,7 @@ def build_get_access_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -188,7 +186,7 @@ def build_list_cluster_admin_credentials_request( # pylint: disable=name-too-lo _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -226,7 +224,7 @@ def build_list_cluster_user_credentials_request( # pylint: disable=name-too-lon _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -264,7 +262,7 @@ def build_list_cluster_monitoring_user_credentials_request( # pylint: disable=n _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -300,7 +298,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -339,7 +337,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -380,7 +378,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -420,7 +418,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -459,7 +457,7 @@ def build_reset_service_principal_profile_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -500,7 +498,7 @@ def build_reset_aad_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -540,7 +538,7 @@ def build_rotate_cluster_certificates_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -578,7 +576,7 @@ def build_stop_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -616,7 +614,7 @@ def build_start_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -655,10 +653,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_operations.py index 6e567f206029..7ebe1ad99cf5 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -71,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py index 6e2fa712b9ca..9bbd93c9a441 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_endpoint_connections_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,12 +30,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -96,7 +95,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -142,7 +141,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -189,7 +188,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -231,10 +230,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_link_resources_operations.py index 1ff92698cdba..8b0f89533167 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_private_link_resources_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -88,10 +87,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py index d1e7357143ee..b7c52b33b0a3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_11_01/operations/_resolve_private_link_service_id_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ def build_post_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str", min_length=1), @@ -92,10 +91,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_patch.py deleted file mode 100644 index f7dd32510333..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_patch.py +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -"""Customize generated code here. - -Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize -""" -from typing import List - -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level - - -def patch_sdk(): - """Do not remove from this file. - - `patch_sdk` is a last resort escape hatch that allows you to do customizations - you can't accomplish using the techniques described in - https://aka.ms/azsdk/python/dpcodegen/python/customize - """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_container_service_client.py index 6fdce52a95bc..60de72ac82ae 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -72,7 +74,7 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2025-02-01". Note that overriding this default value may result in unsupported behavior. @@ -82,15 +84,17 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -109,7 +113,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_metadata.json index 44974bd690a8..653f7cef408c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_metadata.json @@ -5,13 +5,13 @@ "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/_container_service_client.py index ea3e675f5a89..d054ae4a3a7e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -73,7 +75,7 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2025-02-01". Note that overriding this default value may result in unsupported behavior. @@ -83,15 +85,17 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -110,7 +114,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_agent_pools_operations.py index 72b6670c926d..0d6d9063345e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_agent_pools_operations.py @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._agent_pools_operations import ( build_abort_latest_operation_request, build_create_or_update_request, @@ -43,11 +45,8 @@ build_list_request, build_upgrade_node_image_version_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,10 +65,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") async def _abort_latest_operation_initial( diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_machines_operations.py index 2ec1c0ac55dc..22d9a7a78413 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_machines_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._machines_operations import build_get_request, build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,10 +49,10 @@ class MachinesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_maintenance_configurations_operations.py index 5a1d4ad766f1..88d591f4d2e9 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_maintenance_configurations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, Callable, Dict, 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, @@ -27,17 +29,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._maintenance_configurations_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_managed_cluster_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,17 +56,16 @@ class MaintenanceConfigurationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.MaintenanceConfiguration"]: - # pylint: disable=line-too-long """Gets a list of maintenance configurations in the specified managed cluster. Gets a list of maintenance configurations in the specified managed cluster. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_managed_clusters_operations.py index 9290bbaf0561..469ac93a1282 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._managed_clusters_operations import ( build_abort_latest_operation_request, build_create_or_update_request, @@ -60,11 +62,8 @@ build_stop_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -83,10 +82,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async @@ -2502,7 +2501,6 @@ async def get_command_result( def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.OutboundEnvironmentEndpoint"]: - # pylint: disable=line-too-long """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_operations.py index bcb289c7e5e9..d6c28d7404b6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_endpoint_connections_operations.py index 1703b73ecd42..78825a6b15d8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_endpoint_connections_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,17 +29,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_endpoint_connections_operations import ( build_delete_request, build_get_request, build_list_request, build_update_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,10 +56,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_link_resources_operations.py index 46bb6e9fa769..16d8603aef39 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_private_link_resources_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +24,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_link_resources_operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,10 +46,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_resolve_private_link_service_id_operations.py index f80af2b8f948..cefb0642f579 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +25,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._resolve_private_link_service_id_operations import build_post_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -48,10 +47,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_snapshots_operations.py index be1e33839ed7..27a0fb8247f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_snapshots_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, Callable, Dict, 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, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._snapshots_operations import ( build_create_or_update_request, build_delete_request, @@ -35,11 +37,8 @@ build_list_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,10 +57,10 @@ class SnapshotsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_role_bindings_operations.py index 5b8b79bc4a75..482ac3f29d1a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_role_bindings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,17 +33,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._trusted_access_role_bindings_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,17 +60,16 @@ class TrustedAccessRoleBindingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.TrustedAccessRoleBinding"]: - # pylint: disable=line-too-long """List trusted access role bindings. List trusted access role bindings. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_roles_operations.py index 4b78f8a75848..25041e553cfa 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/aio/operations/_trusted_access_roles_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._trusted_access_roles_operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class TrustedAccessRolesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_container_service_client_enums.py index e0876b8f626b..d0a486813daf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_container_service_client_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_models_py3.py index a69a625663ff..9c432518efb6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/models/_models_py3.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -174,9 +174,9 @@ class SubResource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class AgentPool(SubResource): @@ -230,11 +230,11 @@ class AgentPool(SubResource): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int @@ -301,7 +301,7 @@ class AgentPool(SubResource): The default is false. :vartype enable_node_public_ip: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -349,7 +349,7 @@ class AgentPool(SubResource): Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str @@ -515,11 +515,11 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int @@ -575,11 +575,11 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -628,7 +628,7 @@ def __init__( # pylint: disable=too-many-locals Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str @@ -645,7 +645,7 @@ def __init__( # pylint: disable=too-many-locals :paramtype gpu_profile: ~azure.mgmt.containerservice.v2025_02_01.models.GPUProfile """ super().__init__(**kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.count = count self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb @@ -665,10 +665,10 @@ def __init__( # pylint: disable=too-many-locals self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version - self.current_orchestrator_version = None - self.node_image_version = None + self.current_orchestrator_version: Optional[str] = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip @@ -739,9 +739,9 @@ def __init__( list[~azure.mgmt.containerservice.v2025_02_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.agent_pool_versions = agent_pool_versions @@ -837,7 +837,7 @@ def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwarg """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class AgentPoolNetworkProfile(_serialization.Model): @@ -984,9 +984,9 @@ def __init__( :paramtype latest_node_image_version: str """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.kubernetes_version = kubernetes_version self.os_type = os_type self.upgrades = upgrades @@ -1113,7 +1113,7 @@ class AzureKeyVaultKms(_serialization.Model): :ivar enabled: Whether to enable Azure Key Vault key management service. The default is false. :vartype enabled: bool :ivar key_id: Identifier of Azure Key Vault key. See `key identifier format - `_ # pylint: disable=line-too-long + `_ for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. @@ -1151,7 +1151,7 @@ def __init__( false. :paramtype enabled: bool :keyword key_id: Identifier of Azure Key Vault key. See `key identifier format - `_ # pylint: disable=line-too-long + `_ for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. @@ -1596,8 +1596,8 @@ class CredentialResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.value = None + self.name: Optional[str] = None + self.value: Optional[bytes] = None class CredentialResults(_serialization.Model): @@ -1620,7 +1620,7 @@ class CredentialResults(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.kubeconfigs = None + self.kubeconfigs: Optional[List["_models.CredentialResult"]] = None class DailySchedule(_serialization.Model): @@ -1833,8 +1833,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -1874,11 +1874,11 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[List["_models.ErrorDetail"]] = None + self.additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = None class ErrorResponse(_serialization.Model): @@ -2546,7 +2546,7 @@ class Machine(SubResource): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.properties = None + self.properties: Optional["_models.MachineProperties"] = None class MachineIpAddress(_serialization.Model): @@ -2574,8 +2574,8 @@ class MachineIpAddress(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.family = None - self.ip = None + self.family: Optional[Union[str, "_models.IpFamily"]] = None + self.ip: Optional[str] = None class MachineListResult(_serialization.Model): @@ -2604,7 +2604,7 @@ def __init__(self, *, value: Optional[List["_models.Machine"]] = None, **kwargs: :paramtype value: list[~azure.mgmt.containerservice.v2025_02_01.models.Machine] """ super().__init__(**kwargs) - self.next_link = None + self.next_link: Optional[str] = None self.value = value @@ -2628,7 +2628,7 @@ class MachineNetworkProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.ip_addresses = None + self.ip_addresses: Optional[List["_models.MachineIpAddress"]] = None class MachineProperties(_serialization.Model): @@ -2656,8 +2656,8 @@ class MachineProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.network = None - self.resource_id = None + self.network: Optional["_models.MachineNetworkProperties"] = None + self.resource_id: Optional[str] = None class MaintenanceConfiguration(SubResource): @@ -2720,7 +2720,7 @@ def __init__( ~azure.mgmt.containerservice.v2025_02_01.models.MaintenanceWindow """ super().__init__(**kwargs) - self.system_data = None + self.system_data: Optional["_models.SystemData"] = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time self.maintenance_window = maintenance_window @@ -2754,7 +2754,7 @@ def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MaintenanceWindow(_serialization.Model): @@ -2848,7 +2848,7 @@ class Resource(_serialization.Model): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2877,10 +2877,10 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.system_data = None + 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): @@ -2892,7 +2892,7 @@ class TrackedResource(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2945,7 +2945,7 @@ class ManagedCluster(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3059,12 +3059,12 @@ class ManagedCluster(TrackedResource): :vartype api_server_access_profile: ~azure.mgmt.containerservice.v2025_02_01.models.ManagedClusterAPIServerAccessProfile :ivar disk_encryption_set_id: This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. :vartype disk_encryption_set_id: str :ivar identity_profile: The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". :vartype identity_profile: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.UserAssignedIdentity] :ivar private_link_resources: Private link resources associated with the cluster. @@ -3327,12 +3327,12 @@ def __init__( # pylint: disable=too-many-locals :paramtype api_server_access_profile: ~azure.mgmt.containerservice.v2025_02_01.models.ManagedClusterAPIServerAccessProfile :keyword disk_encryption_set_id: This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. :paramtype disk_encryption_set_id: str :keyword identity_profile: The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". :paramtype identity_profile: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.UserAssignedIdentity] :keyword private_link_resources: Private link resources associated with the cluster. @@ -3378,20 +3378,20 @@ def __init__( # pylint: disable=too-many-locals ~azure.mgmt.containerservice.v2025_02_01.models.ManagedClusterBootstrapProfile """ super().__init__(tags=tags, location=location, **kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.sku = sku self.extended_location = extended_location self.identity = identity - self.provisioning_state = None - self.power_state = None - self.max_agent_pools = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version - self.current_kubernetes_version = None + self.current_kubernetes_version: Optional[str] = None self.dns_prefix = dns_prefix self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None + self.azure_portal_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -3422,7 +3422,7 @@ def __init__( # pylint: disable=too-many-locals self.workload_auto_scaler_profile = workload_auto_scaler_profile self.azure_monitor_profile = azure_monitor_profile self.service_mesh_profile = service_mesh_profile - self.resource_uid = None + self.resource_uid: Optional[str] = None self.metrics_profile = metrics_profile self.bootstrap_profile = bootstrap_profile @@ -3512,7 +3512,7 @@ class ManagedClusterAccessProfile(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3605,7 +3605,7 @@ def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, ** super().__init__(**kwargs) self.enabled = enabled self.config = config - self.identity = None + self.identity: Optional["_models.ManagedClusterAddonProfileIdentity"] = None class UserAssignedIdentity(_serialization.Model): @@ -3703,11 +3703,11 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int @@ -3773,7 +3773,7 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): The default is false. :vartype enable_node_public_ip: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -3821,7 +3821,7 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str @@ -3981,11 +3981,11 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int @@ -4040,11 +4040,11 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -4093,7 +4093,7 @@ def __init__( # pylint: disable=too-many-locals Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str @@ -4110,7 +4110,7 @@ def __init__( # pylint: disable=too-many-locals :paramtype gpu_profile: ~azure.mgmt.containerservice.v2025_02_01.models.GPUProfile """ super().__init__(**kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.count = count self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb @@ -4130,10 +4130,10 @@ def __init__( # pylint: disable=too-many-locals self.type = type self.mode = mode self.orchestrator_version = orchestrator_version - self.current_orchestrator_version = None - self.node_image_version = None + self.current_orchestrator_version: Optional[str] = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip @@ -4206,11 +4206,11 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int @@ -4276,7 +4276,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): The default is false. :vartype enable_node_public_ip: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -4324,7 +4324,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str @@ -4489,11 +4489,11 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int @@ -4548,11 +4548,11 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". @@ -4601,7 +4601,7 @@ def __init__( # pylint: disable=too-many-locals Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str @@ -5034,7 +5034,7 @@ class ManagedClusterIdentity(_serialization.Model): :vartype delegated_resources: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.DelegatedResource] :ivar user_assigned_identities: The keys must be ARM resource IDs in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] """ @@ -5076,13 +5076,13 @@ def __init__( :paramtype delegated_resources: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.DelegatedResource] :keyword user_assigned_identities: The keys must be ARM resource IDs in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.containerservice.v2025_02_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type self.delegated_resources = delegated_resources self.user_assigned_identities = user_assigned_identities @@ -5198,7 +5198,7 @@ def __init__( 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. # pylint: disable=line-too-long + https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. :paramtype nginx: ~azure.mgmt.containerservice.v2025_02_01.models.ManagedClusterIngressProfileNginx """ @@ -5206,7 +5206,7 @@ def __init__( self.enabled = enabled self.dns_zone_resource_ids = dns_zone_resource_ids self.nginx = nginx - self.identity = None + self.identity: Optional["_models.UserAssignedIdentity"] = None class ManagedClusterListResult(_serialization.Model): @@ -5236,7 +5236,7 @@ def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, ** """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ManagedClusterLoadBalancerProfile(_serialization.Model): @@ -5338,7 +5338,7 @@ def __init__( self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes self.outbound_i_ps = outbound_i_ps - self.effective_outbound_i_ps = None + self.effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers @@ -5525,7 +5525,7 @@ def __init__( """ super().__init__(**kwargs) self.managed_outbound_ip_profile = managed_outbound_ip_profile - self.effective_outbound_i_ps = None + self.effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None self.idle_timeout_in_minutes = idle_timeout_in_minutes @@ -5582,7 +5582,7 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: :paramtype enabled: bool """ super().__init__(**kwargs) - self.issuer_url = None + self.issuer_url: Optional[str] = None self.enabled = enabled @@ -5651,8 +5651,8 @@ def __init__( self.namespace = namespace self.binding_selector = binding_selector self.identity = identity - self.provisioning_state = None - self.provisioning_info = None + self.provisioning_state: Optional[Union[str, "_models.ManagedClusterPodIdentityProvisioningState"]] = None + self.provisioning_info: Optional["_models.ManagedClusterPodIdentityProvisioningInfo"] = None class ManagedClusterPodIdentityException(_serialization.Model): @@ -5706,7 +5706,7 @@ class ManagedClusterPodIdentityProfile(_serialization.Model): :ivar allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet network plugin with AAD Pod Identity - `_ # pylint: disable=line-too-long + `_ for more information. :vartype allow_network_plugin_kubenet: bool :ivar user_assigned_identities: The pod identities to use in the cluster. @@ -5742,7 +5742,7 @@ def __init__( :keyword allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet network plugin with AAD Pod Identity - `_ # pylint: disable=line-too-long + `_ for more information. :paramtype allow_network_plugin_kubenet: bool :keyword user_assigned_identities: The pod identities to use in the cluster. @@ -6587,9 +6587,9 @@ def __init__( list[~azure.mgmt.containerservice.v2025_02_01.models.ManagedClusterPoolUpgradeProfile] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.control_plane_profile = control_plane_profile self.agent_pool_profiles = agent_pool_profiles @@ -6806,8 +6806,8 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.principal_id = None - self.client_id = None + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None class MeshRevision(_serialization.Model): @@ -6860,7 +6860,7 @@ class ProxyResource(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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6879,7 +6879,7 @@ class MeshRevisionProfile(ProxyResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6946,7 +6946,7 @@ def __init__(self, *, value: Optional[List["_models.MeshRevisionProfile"]] = Non """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MeshRevisionProfileProperties(_serialization.Model): @@ -6975,7 +6975,7 @@ class MeshUpgradeProfile(ProxyResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7042,7 +7042,7 @@ def __init__(self, *, value: Optional[List["_models.MeshUpgradeProfile"]] = None """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MeshUpgradeProfileProperties(MeshRevision): @@ -7079,7 +7079,7 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.OperationValue"]] = None class OperationValue(_serialization.Model): @@ -7122,12 +7122,12 @@ class OperationValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None + self.origin: Optional[str] = None + self.name: Optional[str] = None + self.operation: Optional[str] = None + self.resource: Optional[str] = None + self.description: Optional[str] = None + self.provider: Optional[str] = None class OutboundEnvironmentEndpoint(_serialization.Model): @@ -7196,7 +7196,7 @@ def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwar """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class PortRange(_serialization.Model): @@ -7347,10 +7347,10 @@ def __init__( ~azure.mgmt.containerservice.v2025_02_01.models.PrivateLinkServiceConnectionState """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = None self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state @@ -7437,7 +7437,7 @@ def __init__( self.type = type self.group_id = group_id self.required_members = required_members - self.private_link_service_id = None + self.private_link_service_id: Optional[str] = None class PrivateLinkResourcesListResult(_serialization.Model): @@ -7653,13 +7653,13 @@ class RunCommandResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None + self.id: Optional[str] = None + self.provisioning_state: Optional[str] = None + self.exit_code: Optional[int] = None + self.started_at: Optional[datetime.datetime] = None + self.finished_at: Optional[datetime.datetime] = None + self.logs: Optional[str] = None + self.reason: Optional[str] = None class Schedule(_serialization.Model): @@ -7764,7 +7764,7 @@ class Snapshot(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7855,12 +7855,12 @@ def __init__( super().__init__(tags=tags, location=location, **kwargs) self.creation_data = creation_data self.snapshot_type = snapshot_type - self.kubernetes_version = None - self.node_image_version = None - self.os_type = None - self.os_sku = None - self.vm_size = None - self.enable_fips = None + self.kubernetes_version: Optional[str] = None + self.node_image_version: Optional[str] = None + self.os_type: Optional[Union[str, "_models.OSType"]] = None + self.os_sku: Optional[Union[str, "_models.OSSKU"]] = None + self.vm_size: Optional[str] = None + self.enable_fips: Optional[bool] = None class SnapshotListResult(_serialization.Model): @@ -7890,7 +7890,7 @@ def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class SysctlConfig(_serialization.Model): @@ -8296,9 +8296,9 @@ class TrustedAccessRole(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.source_resource_type = None - self.name = None - self.rules = None + self.source_resource_type: Optional[str] = None + self.name: Optional[str] = None + self.rules: Optional[List["_models.TrustedAccessRoleRule"]] = None class TrustedAccessRoleBinding(Resource): @@ -8309,7 +8309,7 @@ class TrustedAccessRoleBinding(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8361,7 +8361,7 @@ def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) :paramtype roles: list[str] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.TrustedAccessRoleBindingProvisioningState"]] = None self.source_resource_id = source_resource_id self.roles = roles @@ -8394,7 +8394,7 @@ def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class TrustedAccessRoleListResult(_serialization.Model): @@ -8421,8 +8421,8 @@ class TrustedAccessRoleListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.TrustedAccessRole"]] = None + self.next_link: Optional[str] = None class TrustedAccessRoleRule(_serialization.Model): @@ -8461,11 +8461,11 @@ class TrustedAccessRoleRule(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.verbs = None - self.api_groups = None - self.resources = None - self.resource_names = None - self.non_resource_ur_ls = None + self.verbs: Optional[List[str]] = None + self.api_groups: Optional[List[str]] = None + self.resources: Optional[List[str]] = None + self.resource_names: Optional[List[str]] = None + self.non_resource_ur_ls: Optional[List[str]] = None class UpgradeOverrideSettings(_serialization.Model): diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_agent_pools_operations.py index cfe87c5a4441..cb2dc35e324d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_agent_pools_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_abort_latest_operation_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -100,7 +98,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -140,7 +138,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -191,7 +189,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -247,7 +245,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -296,7 +294,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -340,7 +338,7 @@ def build_delete_machines_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -385,7 +383,7 @@ def build_get_available_agent_pool_versions_request( # pylint: disable=name-too _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -425,7 +423,7 @@ def build_upgrade_node_image_version_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -469,10 +467,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _abort_latest_operation_initial( diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_machines_operations.py index b7c0feb97b5e..d7f026052bf8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_machines_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -99,7 +98,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -146,10 +145,10 @@ class MachinesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_maintenance_configurations_operations.py index 0b572ca7fe60..c1e67aeeab92 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_maintenance_configurations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ def build_list_by_managed_cluster_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -92,7 +91,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -134,7 +133,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -177,7 +176,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -219,10 +218,10 @@ class MaintenanceConfigurationsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_managed_clusters_operations.py index 3befe7310461..df249ae23360 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +53,7 @@ def build_list_kubernetes_versions_request(location: str, subscription_id: str, _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -109,7 +107,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -141,7 +139,7 @@ def build_get_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -181,7 +179,7 @@ def build_get_access_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -227,7 +225,7 @@ def build_list_cluster_admin_credentials_request( # pylint: disable=name-too-lo _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -275,7 +273,7 @@ def build_list_cluster_user_credentials_request( # pylint: disable=name-too-lon _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -324,7 +322,7 @@ def build_list_cluster_monitoring_user_credentials_request( # pylint: disable=n _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -364,7 +362,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -411,7 +409,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -458,7 +456,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -502,7 +500,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -545,7 +543,7 @@ def build_reset_service_principal_profile_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -588,7 +586,7 @@ def build_reset_aad_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -630,7 +628,7 @@ def build_rotate_cluster_certificates_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -670,7 +668,7 @@ def build_abort_latest_operation_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -710,7 +708,7 @@ def build_rotate_service_account_signing_keys_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -750,7 +748,7 @@ def build_stop_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -790,7 +788,7 @@ def build_start_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -831,7 +829,7 @@ def build_run_command_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -873,7 +871,7 @@ def build_get_command_result_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -914,7 +912,7 @@ def build_list_outbound_network_dependencies_endpoints_request( # pylint: disab _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -954,7 +952,7 @@ def build_list_mesh_revision_profiles_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -984,7 +982,7 @@ def build_get_mesh_revision_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1022,7 +1020,7 @@ def build_list_mesh_upgrade_profiles_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1062,7 +1060,7 @@ def build_get_mesh_upgrade_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1111,10 +1109,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_operations.py index 520c9d3a4469..09fa22486f33 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -71,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_endpoint_connections_operations.py index ca2ecfeb3e5f..d937e60e218e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_endpoint_connections_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,12 +30,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +53,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -98,7 +97,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -146,7 +145,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -195,7 +194,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -239,10 +238,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_link_resources_operations.py index f0f753090394..7c94aacffe94 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_private_link_resources_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -90,10 +89,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_resolve_private_link_service_id_operations.py index 6b8c74050953..2e2abe852b36 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_resolve_private_link_service_id_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,7 @@ def build_post_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -94,10 +93,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_snapshots_operations.py index f7772b6e0545..8db90ab11a2d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_snapshots_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -74,7 +73,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -104,7 +103,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -145,7 +144,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -188,7 +187,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -230,7 +229,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -271,10 +270,10 @@ class SnapshotsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_role_bindings_operations.py index 5917282c8dd6..ccdff1a7b478 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_role_bindings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +55,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -100,7 +99,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -153,7 +152,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -207,7 +206,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -256,10 +255,10 @@ class TrustedAccessRoleBindingsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_roles_operations.py index 47d537f36857..d9c873eb71ad 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_02_01/operations/_trusted_access_roles_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +47,7 @@ def build_list_request(location: str, subscription_id: str, **kwargs: Any) -> Ht _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -80,10 +78,10 @@ class TrustedAccessRolesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/__init__.py similarity index 100% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/__init__.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/__init__.py diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_configuration.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_configuration.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_configuration.py index 825722cbfdf1..69bff9c6a460 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_configuration.py @@ -27,13 +27,13 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2025-01-02-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2025-03-02-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2025-01-02-preview") + api_version: str = kwargs.pop("api_version", "2025-03-02-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_container_service_client.py similarity index 77% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_container_service_client.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_container_service_client.py index a70162fc5311..93d232387cc4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from .._serialization import Deserializer, Serializer @@ -26,6 +28,7 @@ MaintenanceConfigurationsOperations, ManagedClusterSnapshotsOperations, ManagedClustersOperations, + NamespacesOperations, OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, @@ -44,56 +47,59 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """The Container Service Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2025_01_02_preview.operations.Operations + :vartype operations: azure.mgmt.containerservice.v2025_03_02_preview.operations.Operations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: - azure.mgmt.containerservice.v2025_01_02_preview.operations.ManagedClustersOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.ManagedClustersOperations :ivar container_service: ContainerServiceOperations operations :vartype container_service: - azure.mgmt.containerservice.v2025_01_02_preview.operations.ContainerServiceOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.ContainerServiceOperations :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: - azure.mgmt.containerservice.v2025_01_02_preview.operations.MaintenanceConfigurationsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.MaintenanceConfigurationsOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: + azure.mgmt.containerservice.v2025_03_02_preview.operations.NamespacesOperations :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: - azure.mgmt.containerservice.v2025_01_02_preview.operations.AgentPoolsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.AgentPoolsOperations :ivar machines: MachinesOperations operations :vartype machines: - azure.mgmt.containerservice.v2025_01_02_preview.operations.MachinesOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.MachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - azure.mgmt.containerservice.v2025_01_02_preview.operations.PrivateEndpointConnectionsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - azure.mgmt.containerservice.v2025_01_02_preview.operations.PrivateLinkResourcesOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.PrivateLinkResourcesOperations :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: - azure.mgmt.containerservice.v2025_01_02_preview.operations.ResolvePrivateLinkServiceIdOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.ResolvePrivateLinkServiceIdOperations :ivar operation_status_result: OperationStatusResultOperations operations :vartype operation_status_result: - azure.mgmt.containerservice.v2025_01_02_preview.operations.OperationStatusResultOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.OperationStatusResultOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: - azure.mgmt.containerservice.v2025_01_02_preview.operations.SnapshotsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.SnapshotsOperations :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations :vartype managed_cluster_snapshots: - azure.mgmt.containerservice.v2025_01_02_preview.operations.ManagedClusterSnapshotsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: - azure.mgmt.containerservice.v2025_01_02_preview.operations.TrustedAccessRolesOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.TrustedAccessRolesOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: - azure.mgmt.containerservice.v2025_01_02_preview.operations.TrustedAccessRoleBindingsOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.TrustedAccessRoleBindingsOperations :ivar load_balancers: LoadBalancersOperations operations :vartype load_balancers: - azure.mgmt.containerservice.v2025_01_02_preview.operations.LoadBalancersOperations + azure.mgmt.containerservice.v2025_03_02_preview.operations.LoadBalancersOperations :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. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2025-01-02-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2025-03-02-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -101,15 +107,17 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -128,56 +136,59 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.managed_clusters = ManagedClustersOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" + ) + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.agent_pools = AgentPoolsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.machines = MachinesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.snapshots = SnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.trusted_access_roles = TrustedAccessRolesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse: diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_metadata.json similarity index 81% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_metadata.json rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_metadata.json index 6da120276bd4..4e7608e94abb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_metadata.json +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_metadata.json @@ -1,17 +1,17 @@ { - "chosen_version": "2025-01-02-preview", - "total_api_version_list": ["2025-01-02-preview"], + "chosen_version": "2025-03-02-preview", + "total_api_version_list": ["2025-03-02-preview"], "client": { "name": "ContainerServiceClient", "filename": "_container_service_client", "description": "The Container Service Client.", - "host_value": "\"https://management.azure.com\"", + "host_value": null, "parameterized_host_template": null, "azure_arm": true, "has_public_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}, \"stdlib\": {\"typing_extensions\": [\"Self\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"ARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \".._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}, \"regular\": {\"sdkcore\": {\"azure.mgmt.core\": [\"AsyncARMPipelineClient\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"AsyncARMAutoResourceProviderRegistrationPolicy\"], \"azure.core.settings\": [\"settings\"], \"azure.mgmt.core.tools\": [\"get_arm_endpoints\"], \"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"]}, \"stdlib\": {\"typing\": [\"Optional\", \"cast\"], \"typing_extensions\": [\"Self\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"], \"..._serialization\": [\"Deserializer\", \"Serializer\"]}}, \"typing\": {\"sdkcore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "global_parameters": { "sync": { @@ -57,7 +57,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -80,7 +80,7 @@ "method_location": "positional" }, "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", + "signature": "base_url: Optional[str] = None,", "description": "Service URL", "docstring_type": "str", "required": false, @@ -109,6 +109,7 @@ "managed_clusters": "ManagedClustersOperations", "container_service": "ContainerServiceOperations", "maintenance_configurations": "MaintenanceConfigurationsOperations", + "namespaces": "NamespacesOperations", "agent_pools": "AgentPoolsOperations", "machines": "MachinesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_patch.py similarity index 61% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_patch.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_version.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_version.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_version.py index 6ba690f28963..470657edc1cb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "35.0.0" +VERSION = "36.0.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/__init__.py similarity index 100% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/__init__.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/__init__.py diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_configuration.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_configuration.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_configuration.py index a4f6bf2c43f8..701ada1bc3f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_configuration.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_configuration.py @@ -27,13 +27,13 @@ class ContainerServiceClientConfiguration: # pylint: disable=too-many-instance- :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2025-01-02-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2025-03-02-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: - api_version: str = kwargs.pop("api_version", "2025-01-02-preview") + api_version: str = kwargs.pop("api_version", "2025-03-02-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_container_service_client.py similarity index 77% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_container_service_client.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_container_service_client.py index e66b555fccc3..602501ad42ff 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_container_service_client.py @@ -7,13 +7,15 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models from ..._serialization import Deserializer, Serializer @@ -26,6 +28,7 @@ MaintenanceConfigurationsOperations, ManagedClusterSnapshotsOperations, ManagedClustersOperations, + NamespacesOperations, OperationStatusResultOperations, Operations, PrivateEndpointConnectionsOperations, @@ -44,56 +47,59 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """The Container Service Client. :ivar operations: Operations operations - :vartype operations: azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.Operations + :vartype operations: azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.Operations :ivar managed_clusters: ManagedClustersOperations operations :vartype managed_clusters: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.ManagedClustersOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.ManagedClustersOperations :ivar container_service: ContainerServiceOperations operations :vartype container_service: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.ContainerServiceOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.ContainerServiceOperations :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations :vartype maintenance_configurations: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.MaintenanceConfigurationsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.MaintenanceConfigurationsOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.NamespacesOperations :ivar agent_pools: AgentPoolsOperations operations :vartype agent_pools: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.AgentPoolsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.AgentPoolsOperations :ivar machines: MachinesOperations operations :vartype machines: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.MachinesOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.MachinesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.PrivateEndpointConnectionsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.PrivateLinkResourcesOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.PrivateLinkResourcesOperations :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations :vartype resolve_private_link_service_id: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.ResolvePrivateLinkServiceIdOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.ResolvePrivateLinkServiceIdOperations :ivar operation_status_result: OperationStatusResultOperations operations :vartype operation_status_result: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.OperationStatusResultOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.OperationStatusResultOperations :ivar snapshots: SnapshotsOperations operations :vartype snapshots: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.SnapshotsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.SnapshotsOperations :ivar managed_cluster_snapshots: ManagedClusterSnapshotsOperations operations :vartype managed_cluster_snapshots: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.ManagedClusterSnapshotsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.ManagedClusterSnapshotsOperations :ivar trusted_access_roles: TrustedAccessRolesOperations operations :vartype trusted_access_roles: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.TrustedAccessRolesOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.TrustedAccessRolesOperations :ivar trusted_access_role_bindings: TrustedAccessRoleBindingsOperations operations :vartype trusted_access_role_bindings: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.TrustedAccessRoleBindingsOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.TrustedAccessRoleBindingsOperations :ivar load_balancers: LoadBalancersOperations operations :vartype load_balancers: - azure.mgmt.containerservice.v2025_01_02_preview.aio.operations.LoadBalancersOperations + azure.mgmt.containerservice.v2025_03_02_preview.aio.operations.LoadBalancersOperations :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. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2025-01-02-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2025-03-02-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -101,15 +107,17 @@ class ContainerServiceClient: # pylint: disable=too-many-instance-attributes """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = ContainerServiceClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -128,56 +136,61 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.managed_clusters = ManagedClustersOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.container_service = ContainerServiceOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.maintenance_configurations = MaintenanceConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" + ) + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.agent_pools = AgentPoolsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.machines = MachinesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.private_link_resources = PrivateLinkResourcesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.operation_status_result = OperationStatusResultOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.snapshots = SnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.managed_cluster_snapshots = ManagedClusterSnapshotsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.trusted_access_roles = TrustedAccessRolesOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.trusted_access_role_bindings = TrustedAccessRoleBindingsOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize, "2025-01-02-preview" + self._client, self._config, self._serialize, self._deserialize, "2025-03-02-preview" ) def _send_request( diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_patch.py similarity index 61% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_patch.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/__init__.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/__init__.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/__init__.py index 786209b6598f..f8fd4f978b64 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/__init__.py @@ -16,6 +16,7 @@ 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 ._namespaces_operations import NamespacesOperations # 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 @@ -37,6 +38,7 @@ "ManagedClustersOperations", "ContainerServiceOperations", "MaintenanceConfigurationsOperations", + "NamespacesOperations", "AgentPoolsOperations", "MachinesOperations", "PrivateEndpointConnectionsOperations", diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_agent_pools_operations.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_agent_pools_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_agent_pools_operations.py index fb3b00646655..e0694e5271d6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_agent_pools_operations.py @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._agent_pools_operations import ( build_abort_latest_operation_request, build_create_or_update_request, @@ -43,11 +45,8 @@ build_list_request, build_upgrade_node_image_version_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +57,7 @@ class AgentPoolsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`agent_pools` attribute. """ @@ -66,10 +65,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") async def _abort_latest_operation_initial( @@ -87,7 +86,7 @@ async def _abort_latest_operation_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -157,7 +156,7 @@ async def begin_abort_latest_operation( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -211,14 +210,14 @@ def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> A :type resource_name: str :return: An iterator like instance of either AgentPool or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) @@ -300,7 +299,7 @@ async def get( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :return: AgentPool or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -315,7 +314,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) @@ -370,7 +369,7 @@ async def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -447,7 +446,7 @@ async def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: The agent pool to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -460,7 +459,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -502,7 +501,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +529,7 @@ async def begin_create_or_update( :type agent_pool_name: str :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -541,14 +540,14 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) @@ -617,7 +616,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -696,7 +695,7 @@ async def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -753,7 +752,7 @@ async def get_upgrade_profile( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :return: AgentPoolUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -768,7 +767,7 @@ async def get_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) @@ -821,7 +820,7 @@ async def _delete_machines_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -899,7 +898,7 @@ async def begin_delete_machines( :type agent_pool_name: str :param machines: A list of machines from the agent pool to be deleted. Required. :type machines: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolDeleteMachinesParameter + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolDeleteMachinesParameter :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -963,7 +962,7 @@ async def begin_delete_machines( :param machines: A list of machines from the agent pool to be deleted. Is either a AgentPoolDeleteMachinesParameter type or a IO[bytes] type. Required. :type machines: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolDeleteMachinesParameter or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolDeleteMachinesParameter or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] @@ -973,7 +972,7 @@ async def begin_delete_machines( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1031,7 +1030,7 @@ async def get_available_agent_pool_versions( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: AgentPoolAvailableVersions or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolAvailableVersions + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolAvailableVersions :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1046,7 +1045,7 @@ async def get_available_agent_pool_versions( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) @@ -1093,7 +1092,7 @@ async def _upgrade_node_image_version_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1157,14 +1156,14 @@ async def begin_upgrade_node_image_version( :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_container_service_operations.py similarity index 86% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_container_service_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_container_service_operations.py index f6cb7055c804..3e995c00ac89 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_container_service_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_container_service_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._container_service_operations import build_list_node_image_versions_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,7 +41,7 @@ class ContainerServiceOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`container_service` attribute. """ @@ -49,15 +49,14 @@ class ContainerServiceOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list_node_image_versions(self, location: str, **kwargs: Any) -> AsyncIterable["_models.NodeImageVersion"]: - # pylint: disable=line-too-long """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 @@ -68,14 +67,14 @@ def list_node_image_versions(self, location: str, **kwargs: Any) -> AsyncIterabl :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.v2025_01_02_preview.models.NodeImageVersion] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.NodeImageVersionsListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_load_balancers_operations.py similarity index 93% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_load_balancers_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_load_balancers_operations.py index 2938fcfc28f6..df0feb42c47d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_load_balancers_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_load_balancers_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,17 +32,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._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 -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +51,7 @@ class LoadBalancersOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`load_balancers` attribute. """ @@ -60,10 +59,10 @@ class LoadBalancersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -81,14 +80,14 @@ def list_by_managed_cluster( :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.v2025_01_02_preview.models.LoadBalancer] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) @@ -170,7 +169,7 @@ async def get( :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.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -185,7 +184,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) @@ -241,12 +240,12 @@ async def create_or_update( :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.v2025_01_02_preview.models.LoadBalancer + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ @@ -278,7 +277,7 @@ async def create_or_update( Default value is "application/json". :paramtype content_type: str :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ @@ -304,10 +303,10 @@ async def create_or_update( :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.v2025_01_02_preview.models.LoadBalancer or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer or IO[bytes] :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -322,7 +321,7 @@ async def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) @@ -382,7 +381,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -448,7 +447,7 @@ async def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_machines_operations.py similarity index 90% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_machines_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_machines_operations.py index 228c3dfb7ac9..5b1ad047d7fb 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_machines_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._machines_operations import build_get_request, build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +41,7 @@ class MachinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`machines` attribute. """ @@ -50,10 +49,10 @@ class MachinesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -73,14 +72,14 @@ def list( :type agent_pool_name: str :return: An iterator like instance of either Machine or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Machine] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MachineListResult] = kwargs.pop("cls", None) @@ -165,7 +164,7 @@ async def get( :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.v2025_01_02_preview.models.Machine + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -180,7 +179,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.Machine] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_maintenance_configurations_operations.py similarity index 92% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_maintenance_configurations_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_maintenance_configurations_operations.py index cccd68131c96..4adf325d1cf7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_maintenance_configurations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, Callable, Dict, 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, @@ -27,17 +29,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._maintenance_configurations_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_managed_cluster_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -48,7 +48,7 @@ class MaintenanceConfigurationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`maintenance_configurations` attribute. """ @@ -56,17 +56,16 @@ class MaintenanceConfigurationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list_by_managed_cluster( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.MaintenanceConfiguration"]: - # pylint: disable=line-too-long """Gets a list of maintenance configurations in the specified managed cluster. Gets a list of maintenance configurations in the specified managed cluster. @@ -79,14 +78,14 @@ def list_by_managed_cluster( :return: An iterator like instance of either MaintenanceConfiguration or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) @@ -168,7 +167,7 @@ async def get( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -183,7 +182,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) @@ -240,12 +239,12 @@ async def create_or_update( :type config_name: str :param parameters: The maintenance configuration to create or update. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -277,7 +276,7 @@ async def create_or_update( Default value is "application/json". :paramtype content_type: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -304,9 +303,9 @@ async def create_or_update( :param parameters: The maintenance configuration to create or update. Is either a MaintenanceConfiguration type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration or IO[bytes] :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -321,7 +320,7 @@ async def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) @@ -395,7 +394,7 @@ async def delete(self, resource_group_name: str, resource_name: str, config_name _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py similarity index 93% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py index ad3debca7d52..7f2935b8c6a7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_cluster_snapshots_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, Callable, Dict, 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, @@ -27,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._managed_cluster_snapshots_operations import ( build_create_or_update_request, build_delete_request, @@ -35,11 +38,8 @@ build_list_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +50,7 @@ class ManagedClusterSnapshotsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`managed_cluster_snapshots` attribute. """ @@ -58,15 +58,14 @@ class ManagedClusterSnapshotsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedClusterSnapshot"]: - # pylint: disable=line-too-long """Gets a list of managed cluster snapshots in the specified subscription. Gets a list of managed cluster snapshots in the specified subscription. @@ -74,14 +73,14 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedClusterSnapshot"] :return: An iterator like instance of either ManagedClusterSnapshot or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) @@ -149,7 +148,6 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.ManagedClusterSnapshot"]: - # pylint: disable=line-too-long """Lists managed cluster snapshots in the specified subscription and resource group. Lists managed cluster snapshots in the specified subscription and resource group. @@ -160,14 +158,14 @@ def list_by_resource_group( :return: An iterator like instance of either ManagedClusterSnapshot or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) @@ -244,7 +242,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) :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.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -259,7 +257,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -312,12 +310,12 @@ async def create_or_update( :type resource_name: str :param parameters: The managed cluster snapshot to create or update. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -346,7 +344,7 @@ async def create_or_update( Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -370,9 +368,9 @@ async def create_or_update( :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.v2025_01_02_preview.models.ManagedClusterSnapshot or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot or IO[bytes] :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -387,7 +385,7 @@ async def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -452,12 +450,12 @@ async def update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -487,7 +485,7 @@ async def update_tags( Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -510,10 +508,10 @@ async def update_tags( :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.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -528,7 +526,7 @@ async def update_tags( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -599,7 +597,7 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_clusters_operations.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_clusters_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_clusters_operations.py index 995d01bea6ab..c789e0572230 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._managed_clusters_operations import ( build_abort_latest_operation_request, build_create_or_update_request, @@ -65,11 +67,8 @@ build_stop_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,7 +79,7 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`managed_clusters` attribute. """ @@ -88,10 +87,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async @@ -104,7 +103,7 @@ async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _model :param location: The name of the Azure region. Required. :type location: str :return: KubernetesVersionListResult or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersionListResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -119,7 +118,7 @@ async def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _model _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) @@ -158,14 +157,14 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ManagedCluster"]: :return: An iterator like instance of either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) @@ -242,14 +241,14 @@ def list_by_resource_group( :type resource_group_name: str :return: An iterator like instance of either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) @@ -328,7 +327,7 @@ async def get_upgrade_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: ManagedClusterUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -343,7 +342,7 @@ async def get_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) @@ -394,7 +393,7 @@ async def get_access_profile( :param role_name: The name of the role for managed cluster accessProfile resource. Required. :type role_name: str :return: ManagedClusterAccessProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAccessProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAccessProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -409,7 +408,7 @@ async def get_access_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) @@ -458,7 +457,7 @@ async def list_cluster_admin_credentials( :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. :type server_fqdn: str :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -473,7 +472,7 @@ async def list_cluster_admin_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -530,9 +529,9 @@ async def list_cluster_user_credentials( 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. Known values are: "azure", "exec", and "exec". Default value is None. - :type format: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Format + :type format: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Format :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -547,7 +546,7 @@ async def list_cluster_user_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -597,7 +596,7 @@ async def list_cluster_monitoring_user_credentials( :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. :type server_fqdn: str :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -612,7 +611,7 @@ async def list_cluster_monitoring_user_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -657,7 +656,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: ManagedCluster or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -672,7 +671,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -725,7 +724,7 @@ async def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -798,7 +797,7 @@ async def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -811,7 +810,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -850,7 +849,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -875,7 +874,7 @@ async def begin_create_or_update( :type resource_name: str :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -886,14 +885,14 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -960,7 +959,7 @@ async def _update_tags_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1031,7 +1030,7 @@ async def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -1041,7 +1040,7 @@ async def begin_update_tags( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1076,7 +1075,7 @@ async def begin_update_tags( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1100,7 +1099,7 @@ async def begin_update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -1108,14 +1107,14 @@ async def begin_update_tags( :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -1181,7 +1180,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1256,7 +1255,7 @@ async def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1315,7 +1314,7 @@ async def _reset_service_principal_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1389,7 +1388,7 @@ async def begin_reset_service_principal_profile( :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1447,7 +1446,7 @@ async def begin_reset_service_principal_profile( :param parameters: The service principal profile to set on the managed cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile or IO[bytes] :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] @@ -1457,7 +1456,7 @@ async def begin_reset_service_principal_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1519,7 +1518,7 @@ async def _reset_aad_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1595,7 +1594,7 @@ async def begin_reset_aad_profile( :type resource_name: str :param parameters: The AAD profile to set on the Managed Cluster. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1657,7 +1656,7 @@ async def begin_reset_aad_profile( :param parameters: The AAD profile to set on the Managed Cluster. Is either a ManagedClusterAADProfile type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile 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: @@ -1666,7 +1665,7 @@ async def begin_reset_aad_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1724,7 +1723,7 @@ async def _abort_latest_operation_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1791,7 +1790,7 @@ async def begin_abort_latest_operation( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1846,7 +1845,7 @@ async def _rotate_cluster_certificates_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -1909,7 +1908,7 @@ async def begin_rotate_cluster_certificates( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1964,7 +1963,7 @@ async def _rotate_service_account_signing_keys_initial( # pylint: disable=name- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -2026,7 +2025,7 @@ async def begin_rotate_service_account_signing_keys( # pylint: disable=name-too _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2079,7 +2078,7 @@ async def _stop_initial(self, resource_group_name: str, resource_name: str, **kw _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -2143,7 +2142,7 @@ async def begin_stop(self, resource_group_name: str, resource_name: str, **kwarg _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2196,7 +2195,7 @@ async def _start_initial(self, resource_group_name: str, resource_name: str, **k _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -2257,7 +2256,7 @@ async def begin_start(self, resource_group_name: str, resource_name: str, **kwar _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2316,7 +2315,7 @@ async def _run_command_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -2392,14 +2391,14 @@ async def begin_run_command( :type resource_name: str :param request_payload: The run command request. Required. :type request_payload: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandRequest + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2432,7 +2431,7 @@ async def begin_run_command( :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2458,18 +2457,18 @@ async def begin_run_command( :param request_payload: The run command request. Is either a RunCommandRequest type or a IO[bytes] type. Required. :type request_payload: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandRequest or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandRequest or IO[bytes] :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) @@ -2532,7 +2531,7 @@ async def get_command_result( :param command_id: Id of the command. Required. :type command_id: str :return: RunCommandResult or None or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult or None + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult or None :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2547,7 +2546,7 @@ async def get_command_result( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) @@ -2590,7 +2589,6 @@ async def get_command_result( def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.OutboundEnvironmentEndpoint"]: - # pylint: disable=line-too-long """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. @@ -2605,14 +2603,14 @@ def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-lo :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundEnvironmentEndpoint] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundEnvironmentEndpoint] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) @@ -2691,7 +2689,7 @@ async def get_guardrails_versions( :param version: Safeguards version. Required. :type version: str :return: GuardrailsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2706,7 +2704,7 @@ async def get_guardrails_versions( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) @@ -2742,7 +2740,6 @@ async def get_guardrails_versions( def list_guardrails_versions( self, location: str, **kwargs: Any ) -> AsyncIterable["_models.GuardrailsAvailableVersion"]: - # pylint: disable=line-too-long """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 @@ -2753,14 +2750,14 @@ def list_guardrails_versions( :return: An iterator like instance of either GuardrailsAvailableVersion or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.GuardrailsAvailableVersionsList] = kwargs.pop("cls", None) @@ -2838,7 +2835,7 @@ async def get_safeguards_versions( :param version: Safeguards version. Required. :type version: str :return: SafeguardsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -2853,7 +2850,7 @@ async def get_safeguards_versions( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) @@ -2889,7 +2886,6 @@ async def get_safeguards_versions( def list_safeguards_versions( self, location: str, **kwargs: Any ) -> AsyncIterable["_models.SafeguardsAvailableVersion"]: - # pylint: disable=line-too-long """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 @@ -2900,14 +2896,14 @@ def list_safeguards_versions( :return: An iterator like instance of either SafeguardsAvailableVersion or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SafeguardsAvailableVersionsList] = kwargs.pop("cls", None) @@ -2974,7 +2970,6 @@ async def get_next(next_link=None): @distributed_trace def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> AsyncIterable["_models.MeshRevisionProfile"]: - # pylint: disable=line-too-long """Lists mesh revision profiles for all meshes in the specified location. Contains extra metadata on each revision, including supported revisions, cluster compatibility @@ -2984,14 +2979,14 @@ def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> AsyncIter :type location: str :return: An iterator like instance of either MeshRevisionProfile or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfile] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshRevisionProfileList] = kwargs.pop("cls", None) @@ -3068,7 +3063,7 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An :param mode: The mode of the mesh. Required. :type mode: str :return: MeshRevisionProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3083,7 +3078,7 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) @@ -3119,7 +3114,6 @@ async def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: An def list_mesh_upgrade_profiles( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.MeshUpgradeProfile"]: - # pylint: disable=line-too-long """Lists available upgrades for all service meshes in a specific cluster. Lists available upgrades for all service meshes in a specific cluster. @@ -3131,14 +3125,14 @@ def list_mesh_upgrade_profiles( :type resource_name: str :return: An iterator like instance of either MeshUpgradeProfile or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshUpgradeProfileList] = kwargs.pop("cls", None) @@ -3220,7 +3214,7 @@ async def get_mesh_upgrade_profile( :param mode: The mode of the mesh. Required. :type mode: str :return: MeshUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3235,7 +3229,7 @@ async def get_mesh_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) @@ -3287,7 +3281,7 @@ async def _rebalance_load_balancers_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -3362,7 +3356,7 @@ async def begin_rebalance_load_balancers( :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.v2025_01_02_preview.models.RebalanceLoadBalancersRequestBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RebalanceLoadBalancersRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -3422,7 +3416,7 @@ async def begin_rebalance_load_balancers( balancers will be rebalanced. Is either a RebalanceLoadBalancersRequestBody type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RebalanceLoadBalancersRequestBody or + ~azure.mgmt.containerservice.v2025_03_02_preview.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] @@ -3432,7 +3426,7 @@ async def begin_rebalance_load_balancers( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_namespaces_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_namespaces_operations.py new file mode 100644 index 000000000000..508c57830776 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_namespaces_operations.py @@ -0,0 +1,774 @@ +# 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, AsyncIterable, AsyncIterator, Callable, Dict, 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 ...._serialization import Deserializer, Serializer +from ...operations._namespaces_operations import ( + build_create_or_update_request, + build_delete_request, + build_get_request, + build_list_by_managed_cluster_request, + build_list_credential_request, + build_update_request, +) +from .._configuration import ContainerServiceClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class NamespacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s + :attr:`namespaces` 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") + self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> AsyncIterable["_models.Namespace"]: + """Gets a list of managed namespaces in the specified managed cluster. + + Gets a list of managed namespaces in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of either Namespace or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :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._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.NamespaceListResult] = 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._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("NamespaceListResult", 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) + raise HttpResponseError(response=response, 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, namespace_name: str, **kwargs: Any + ) -> _models.Namespace: + """Gets the specified namespace of a managed cluster. + + Gets the specified namespace of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.Namespace] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Namespace", 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, + namespace_name: str, + parameters: Union[_models.Namespace, 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._api_version or "2025-03-02-preview") + ) + 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, "Namespace") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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, + namespace_name: str, + parameters: _models.Namespace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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 Namespace or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> AsyncLROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of AsyncLROPoller that returns either Namespace or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: Union[_models.Namespace, IO[bytes]], + **kwargs: Any + ) -> AsyncLROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Is either a Namespace type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace or + IO[bytes] + :return: An instance of AsyncLROPoller that returns either Namespace or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :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._api_version or "2025-03-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Namespace] = 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, + namespace_name=namespace_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("Namespace", 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.Namespace].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller[_models.Namespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + async def _delete_initial( + self, resource_group_name: str, resource_name: str, namespace_name: str, **kwargs: Any + ) -> AsyncIterator[bytes]: + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop( + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") + ) + cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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, namespace_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a namespace. + + Deletes a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_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._api_version or "2025-03-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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 + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + async def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or + IO[bytes] + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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._api_version or "2025-03-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Namespace] = 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_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Namespace", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace_async + async def list_credential( + self, resource_group_name: str, resource_name: str, namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. + + Lists the credentials of a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop( + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_list_credential_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", 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/v2025_01_02_preview/aio/operations/_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operation_status_result_operations.py similarity index 91% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_operation_status_result_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operation_status_result_operations.py index 3e66dd7e438a..75b193e4ebe3 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_operation_status_result_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operation_status_result_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,16 +28,14 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._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 -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +46,7 @@ class OperationStatusResultOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`operation_status_result` attribute. """ @@ -54,17 +54,16 @@ class OperationStatusResultOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.OperationStatusResult"]: - # pylint: disable=line-too-long """Gets a list of operations in the specified managedCluster. Gets a list of operations in the specified managedCluster. @@ -77,14 +76,14 @@ def list( :return: An iterator like instance of either OperationStatusResult or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationStatusResult] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResultList] = kwargs.pop("cls", None) @@ -166,7 +165,7 @@ async def get( :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.v2025_01_02_preview.models.OperationStatusResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -181,7 +180,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) @@ -232,7 +231,7 @@ async def get_by_agent_pool( :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.v2025_01_02_preview.models.OperationStatusResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -247,7 +246,7 @@ async def get_by_agent_pool( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operations.py similarity index 86% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operations.py index febc3e629c5d..68f1ab49812f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,7 +40,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`operations` attribute. """ @@ -49,10 +48,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -63,14 +62,14 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationValue"]: :return: An iterator like instance of either OperationValue or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationValue] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationValue] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_patch.py similarity index 61% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_patch.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_endpoint_connections_operations.py similarity index 93% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_endpoint_connections_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_endpoint_connections_operations.py index 7732afc90b5d..ca2856c0275e 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_endpoint_connections_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,17 +29,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_endpoint_connections_operations import ( build_delete_request, build_get_request, build_list_request, build_update_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +48,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -57,10 +56,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async @@ -79,7 +78,7 @@ async def list( :type resource_name: str :return: PrivateEndpointConnectionListResult or the result of cls(response) :rtype: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnectionListResult + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -94,7 +93,7 @@ async def list( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) @@ -143,7 +142,7 @@ async def get( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -158,7 +157,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -215,12 +214,12 @@ async def update( :type private_endpoint_connection_name: str :param parameters: The updated private endpoint connection. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -252,7 +251,7 @@ async def update( Default value is "application/json". :paramtype content_type: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -279,9 +278,9 @@ async def update( :param parameters: The updated private endpoint connection. Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection or IO[bytes] :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -296,7 +295,7 @@ async def update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -356,7 +355,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -417,7 +416,7 @@ async def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_link_resources_operations.py similarity index 84% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_link_resources_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_link_resources_operations.py index b4569e0a5f7c..a099a5d4cd36 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_private_link_resources_operations.py @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +24,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._private_link_resources_operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -39,7 +38,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`private_link_resources` attribute. """ @@ -47,10 +46,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace_async @@ -68,7 +67,7 @@ async def list( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: PrivateLinkResourcesListResult or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResourcesListResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResourcesListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -83,7 +82,7 @@ async def list( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py similarity index 87% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py index 406d7d7aaabb..f3c3e1620977 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_resolve_private_link_service_id_operations.py @@ -5,10 +5,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +25,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._resolve_private_link_service_id_operations import build_post_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -40,7 +39,7 @@ class ResolvePrivateLinkServiceIdOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`resolve_private_link_service_id` attribute. """ @@ -48,10 +47,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload @@ -74,12 +73,12 @@ async def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -108,7 +107,7 @@ async def post( Default value is "application/json". :paramtype content_type: str :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -131,10 +130,10 @@ async def post( :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either a PrivateLinkResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource or IO[bytes] :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -149,7 +148,7 @@ async def post( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_snapshots_operations.py similarity index 93% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_snapshots_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_snapshots_operations.py index cf382be6a390..de70a0ee777b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_snapshots_operations.py @@ -5,11 +5,12 @@ # 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 -import sys from typing import Any, AsyncIterable, Callable, Dict, 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, @@ -27,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._snapshots_operations import ( build_create_or_update_request, build_delete_request, @@ -35,11 +37,8 @@ build_list_request, build_update_tags_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +49,7 @@ class SnapshotsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`snapshots` attribute. """ @@ -58,10 +57,10 @@ class SnapshotsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -72,14 +71,14 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Snapshot"]: :return: An iterator like instance of either Snapshot or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) @@ -154,14 +153,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy :type resource_group_name: str :return: An iterator like instance of either Snapshot or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) @@ -238,7 +237,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -253,7 +252,7 @@ async def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -305,12 +304,12 @@ async def create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -339,7 +338,7 @@ async def create_or_update( Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -362,9 +361,9 @@ async def create_or_update( :type resource_name: str :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot or IO[bytes] + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot or IO[bytes] :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -379,7 +378,7 @@ async def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -443,12 +442,12 @@ async def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -477,7 +476,7 @@ async def update_tags( Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -500,10 +499,10 @@ async def update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -518,7 +517,7 @@ async def update_tags( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -589,7 +588,7 @@ async def delete(self, resource_group_name: str, resource_name: str, **kwargs: A _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_role_bindings_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_role_bindings_operations.py index 9ca53c5d5f93..56d87a7a026a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_role_bindings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, 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, @@ -31,17 +33,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._trusted_access_role_bindings_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_request, ) +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +52,7 @@ class TrustedAccessRoleBindingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`trusted_access_role_bindings` attribute. """ @@ -60,17 +60,16 @@ class TrustedAccessRoleBindingsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list( self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> AsyncIterable["_models.TrustedAccessRoleBinding"]: - # pylint: disable=line-too-long """List trusted access role bindings. List trusted access role bindings. @@ -83,14 +82,14 @@ def list( :return: An iterator like instance of either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleBindingListResult] = kwargs.pop("cls", None) @@ -172,7 +171,7 @@ async def get( :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str :return: TrustedAccessRoleBinding or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -187,7 +186,7 @@ async def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) @@ -240,7 +239,7 @@ async def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -302,7 +301,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - # pylint: disable=line-too-long """Create or update a trusted access role binding. Create or update a trusted access role binding. @@ -316,14 +314,14 @@ async def begin_create_or_update( :type trusted_access_role_binding_name: str :param trusted_access_role_binding: A trusted access role binding. Required. :type trusted_access_role_binding: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of AsyncLROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -338,7 +336,6 @@ async def begin_create_or_update( content_type: str = "application/json", **kwargs: Any ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - # pylint: disable=line-too-long """Create or update a trusted access role binding. Create or update a trusted access role binding. @@ -358,7 +355,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -371,7 +368,6 @@ async def begin_create_or_update( trusted_access_role_binding: Union[_models.TrustedAccessRoleBinding, IO[bytes]], **kwargs: Any ) -> AsyncLROPoller[_models.TrustedAccessRoleBinding]: - # pylint: disable=line-too-long """Create or update a trusted access role binding. Create or update a trusted access role binding. @@ -386,18 +382,18 @@ async def begin_create_or_update( :param trusted_access_role_binding: A trusted access role binding. Is either a TrustedAccessRoleBinding type or a IO[bytes] type. Required. :type trusted_access_role_binding: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding or IO[bytes] :return: An instance of AsyncLROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) @@ -458,7 +454,7 @@ async def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) @@ -524,7 +520,7 @@ async def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_roles_operations.py similarity index 86% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_roles_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_roles_operations.py index 2bf2774b3ee3..bb9657e77455 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/aio/operations/_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/aio/operations/_trusted_access_roles_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ...._serialization import Deserializer, Serializer from ...operations._trusted_access_roles_operations import build_list_request +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,7 +41,7 @@ class TrustedAccessRolesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.aio.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.aio.ContainerServiceClient`'s :attr:`trusted_access_roles` attribute. """ @@ -49,15 +49,14 @@ class TrustedAccessRolesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.TrustedAccessRole"]: - # pylint: disable=line-too-long """List supported trusted access roles. List supported trusted access roles. @@ -66,14 +65,14 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.TrustedAc :type location: str :return: An iterator like instance of either TrustedAccessRole or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRole] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRole] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/__init__.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/__init__.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/__init__.py index 522f648c7fc5..06d405ae723f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/__init__.py @@ -23,7 +23,6 @@ AgentPoolAvailableVersions, AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, AgentPoolDeleteMachinesParameter, - AgentPoolGPUProfile, AgentPoolGatewayProfile, AgentPoolListResult, AgentPoolNetworkProfile, @@ -58,6 +57,7 @@ ErrorDetail, ErrorResponse, ExtendedLocation, + GPUProfile, GuardrailsAvailableVersion, GuardrailsAvailableVersionsList, GuardrailsAvailableVersionsProperties, @@ -166,6 +166,10 @@ MeshUpgradeProfile, MeshUpgradeProfileList, MeshUpgradeProfileProperties, + Namespace, + NamespaceListResult, + NamespaceProperties, + NetworkPolicies, NetworkProfileForSnapshot, NodeImageVersion, NodeImageVersionsListResult, @@ -187,6 +191,7 @@ RebalanceLoadBalancersRequestBody, RelativeMonthlySchedule, Resource, + ResourceQuota, ResourceReference, RunCommandRequest, RunCommandResult, @@ -221,6 +226,8 @@ from ._container_service_client_enums import ( # type: ignore AddonAutoscaling, + AdoptionPolicy, + AdvancedNetworkPolicies, AgentPoolMode, AgentPoolSSHAccess, AgentPoolType, @@ -230,10 +237,12 @@ Code, ConnectionStatus, CreatedByType, + DeletePolicy, DriverType, Expander, ExtendedLocationTypes, Format, + GPUDriver, GPUInstanceProfile, GuardrailsSupport, IPFamily, @@ -249,6 +258,7 @@ ManagedClusterSKUName, ManagedClusterSKUTier, Mode, + NamespaceProvisioningState, NetworkDataplane, NetworkMode, NetworkPlugin, @@ -264,6 +274,7 @@ OutboundType, PodIPAllocationMode, PodLinkLocalAccess, + PolicyRule, PrivateEndpointConnectionProvisioningState, Protocol, PublicNetworkAccess, @@ -276,6 +287,7 @@ SeccompDefault, ServiceMeshMode, SnapshotType, + TransitEncryption, TrustedAccessRoleBindingProvisioningState, Type, UndrainableNodeBehavior, @@ -297,7 +309,6 @@ "AgentPoolAvailableVersions", "AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem", "AgentPoolDeleteMachinesParameter", - "AgentPoolGPUProfile", "AgentPoolGatewayProfile", "AgentPoolListResult", "AgentPoolNetworkProfile", @@ -332,6 +343,7 @@ "ErrorDetail", "ErrorResponse", "ExtendedLocation", + "GPUProfile", "GuardrailsAvailableVersion", "GuardrailsAvailableVersionsList", "GuardrailsAvailableVersionsProperties", @@ -440,6 +452,10 @@ "MeshUpgradeProfile", "MeshUpgradeProfileList", "MeshUpgradeProfileProperties", + "Namespace", + "NamespaceListResult", + "NamespaceProperties", + "NetworkPolicies", "NetworkProfileForSnapshot", "NodeImageVersion", "NodeImageVersionsListResult", @@ -461,6 +477,7 @@ "RebalanceLoadBalancersRequestBody", "RelativeMonthlySchedule", "Resource", + "ResourceQuota", "ResourceReference", "RunCommandRequest", "RunCommandResult", @@ -492,6 +509,8 @@ "WeeklySchedule", "WindowsGmsaProfile", "AddonAutoscaling", + "AdoptionPolicy", + "AdvancedNetworkPolicies", "AgentPoolMode", "AgentPoolSSHAccess", "AgentPoolType", @@ -501,10 +520,12 @@ "Code", "ConnectionStatus", "CreatedByType", + "DeletePolicy", "DriverType", "Expander", "ExtendedLocationTypes", "Format", + "GPUDriver", "GPUInstanceProfile", "GuardrailsSupport", "IPFamily", @@ -520,6 +541,7 @@ "ManagedClusterSKUName", "ManagedClusterSKUTier", "Mode", + "NamespaceProvisioningState", "NetworkDataplane", "NetworkMode", "NetworkPlugin", @@ -535,6 +557,7 @@ "OutboundType", "PodIPAllocationMode", "PodLinkLocalAccess", + "PolicyRule", "PrivateEndpointConnectionProvisioningState", "Protocol", "PublicNetworkAccess", @@ -547,6 +570,7 @@ "SeccompDefault", "ServiceMeshMode", "SnapshotType", + "TransitEncryption", "TrustedAccessRoleBindingProvisioningState", "Type", "UndrainableNodeBehavior", diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_container_service_client_enums.py similarity index 92% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_container_service_client_enums.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_container_service_client_enums.py index 5eb58d78d105..c2e9188ca5c4 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_container_service_client_enums.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_container_service_client_enums.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -20,6 +21,35 @@ class AddonAutoscaling(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Feature to autoscale AKS-managed add-ons is disabled.""" +class AdoptionPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Action if Kubernetes namespace with same name already exists.""" + + NEVER = "Never" + """If the namespace already exists in Kubernetes, attempts to create that same namespace in ARM + will fail.""" + IF_IDENTICAL = "IfIdentical" + """Take over the existing namespace to be managed by ARM, if there is no difference.""" + ALWAYS = "Always" + """Always take over the existing namespace to be managed by ARM, some fields might be overwritten.""" + + +class AdvancedNetworkPolicies(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies + themselves must be configured via the Cilium Network Policy resources, see + https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on + cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set + to true. + """ + + L7 = "L7" + """Enable Layer7 network policies (FQDN, HTTP/S, Kafka). This option is a superset of the FQDN + option.""" + FQDN = "FQDN" + """Enable FQDN based network policies""" + NONE = "None" + """Disable Layer 7 network policies (FQDN, HTTP/S, Kafka)""" + + class AgentPoolMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: @@ -115,6 +145,16 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): KEY = "Key" +class DeletePolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Delete options of a namespace.""" + + KEEP = "Keep" + """Only delete the ARM resource, keep the Kubernetes namespace. Also delete the ManagedByARM + label.""" + DELETE = "Delete" + """Delete both the ARM resource and the Kubernetes namespace together.""" + + 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 @@ -172,6 +212,15 @@ class Format(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Return exec format kubeconfig. This format requires kubelogin binary in the path.""" +class GPUDriver(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Whether to install GPU drivers. When it's not specified, default is Install.""" + + INSTALL = "Install" + """Install driver.""" + NONE = "None" + """Skip driver install.""" + + class GPUInstanceProfile(str, Enum, metaclass=CaseInsensitiveEnumMeta): """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.""" @@ -338,6 +387,17 @@ class Mode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """IPVS proxy mode. Must be using Kubernetes version >= 1.22.""" +class NamespaceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The current provisioning state of the namespace.""" + + UPDATING = "Updating" + DELETING = "Deleting" + CREATING = "Creating" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + + class NetworkDataplane(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Network dataplane used in the Kubernetes cluster.""" @@ -580,6 +640,17 @@ class PodLinkLocalAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS).""" +class PolicyRule(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum representing different network policy rules.""" + + DENY_ALL = "DenyAll" + """Deny all network traffic.""" + ALLOW_ALL = "AllowAll" + """Allow all network traffic.""" + ALLOW_SAME_NAMESPACE = "AllowSameNamespace" + """Allow traffic within the same namespace.""" + + class PrivateEndpointConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The current provisioning state.""" @@ -712,6 +783,15 @@ class SnapshotType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The snapshot is a snapshot of a managed cluster.""" +class TransitEncryption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """This can be enabled only on Cilium-based clusters. If not specified, the default value is None.""" + + WIRE_GUARD = "WireGuard" + """Enable WireGuard encryption for cluster traffic""" + NONE = "None" + """Disable WireGuard encryption for cluster traffic""" + + class TrustedAccessRoleBindingProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The current provisioning state of trusted access role binding.""" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_models_py3.py similarity index 88% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_models_py3.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_models_py3.py index b0186764338f..dbe71b246eaf 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_models_py3.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,6 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union @@ -14,6 +15,7 @@ if TYPE_CHECKING: from .. import models as _models +JSON = MutableMapping[str, Any] class AbsoluteMonthlySchedule(_serialization.Model): @@ -62,10 +64,10 @@ class AdvancedNetworking(_serialization.Model): :ivar observability: Observability profile to enable advanced network metrics and flow logs with historical contexts. :vartype observability: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AdvancedNetworkingObservability - :ivar security: Security profile to enable security features on cilium based cluster. + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkingObservability + :ivar security: Security profile to enable security features on cilium-based cluster. :vartype security: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AdvancedNetworkingSecurity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkingSecurity """ _attribute_map = { @@ -91,10 +93,10 @@ def __init__( :keyword observability: Observability profile to enable advanced network metrics and flow logs with historical contexts. :paramtype observability: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AdvancedNetworkingObservability - :keyword security: Security profile to enable security features on cilium based cluster. + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkingObservability + :keyword security: Security profile to enable security features on cilium-based cluster. :paramtype security: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AdvancedNetworkingSecurity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkingSecurity """ super().__init__(**kwargs) self.enabled = enabled @@ -126,25 +128,58 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: 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: 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. + :ivar enabled: Configure Advanced Networking Security features on Cilium clusters. See + individual fields for their default values. :vartype enabled: bool + :ivar advanced_network_policies: This allows users to configure Layer 7 network policies (FQDN, + HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy resources, + see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled only on + cilium-based clusters. If not specified, the default value is FQDN if security.enabled is set + to true. Known values are: "L7", "FQDN", and "None". + :vartype advanced_network_policies: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkPolicies + :ivar transit_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 transit_encryption: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TransitEncryption """ _attribute_map = { "enabled": {"key": "enabled", "type": "bool"}, + "advanced_network_policies": {"key": "advancedNetworkPolicies", "type": "str"}, + "transit_encryption": {"key": "transitEncryption", "type": "str"}, } - def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + enabled: Optional[bool] = None, + advanced_network_policies: Optional[Union[str, "_models.AdvancedNetworkPolicies"]] = None, + transit_encryption: Optional[Union[str, "_models.TransitEncryption"]] = None, + **kwargs: Any + ) -> None: """ - :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. + :keyword enabled: Configure Advanced Networking Security features on Cilium clusters. See + individual fields for their default values. :paramtype enabled: bool + :keyword advanced_network_policies: This allows users to configure Layer 7 network policies + (FQDN, HTTP, Kafka). Policies themselves must be configured via the Cilium Network Policy + resources, see https://docs.cilium.io/en/latest/security/policy/index.html. This can be enabled + only on cilium-based clusters. If not specified, the default value is FQDN if security.enabled + is set to true. Known values are: "L7", "FQDN", and "None". + :paramtype advanced_network_policies: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworkPolicies + :keyword transit_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 transit_encryption: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TransitEncryption """ super().__init__(**kwargs) self.enabled = enabled + self.advanced_network_policies = advanced_network_policies + self.transit_encryption = transit_encryption class SubResource(_serialization.Model): @@ -176,9 +211,9 @@ class SubResource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None class AgentPool(SubResource): @@ -216,15 +251,15 @@ class AgentPool(SubResource): `_. Known values are: "Managed" and "Ephemeral". :vartype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :vartype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -233,27 +268,27 @@ class AgentPool(SubResource): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :vartype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int :ivar min_count: The minimum number of nodes for auto-scaling. @@ -263,16 +298,16 @@ class AgentPool(SubResource): :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :vartype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :ivar type_properties_type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". :vartype type_properties_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :vartype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :vartype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :ivar orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -291,14 +326,14 @@ class AgentPool(SubResource): :vartype node_image_version: str :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :vartype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :vartype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :ivar availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :vartype availability_zones: list[str] @@ -315,16 +350,16 @@ class AgentPool(SubResource): stores. Defaults to false. :vartype enable_custom_ca_trust: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :vartype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :vartype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -346,9 +381,9 @@ class AgentPool(SubResource): :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. - :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :ivar linux_os_config: The OS configuration of Linux agent nodes. - :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -362,45 +397,44 @@ class AgentPool(SubResource): :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.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str :ivar windows_profile: The Windows agent pool's specific profile. :vartype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :ivar gpu_profile: The GPU settings of an agent pool. - :vartype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :vartype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. - :vartype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :vartype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus """ _validation = { @@ -468,7 +502,7 @@ class AgentPool(SubResource): "windows_profile": {"key": "properties.windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "properties.networkProfile", "type": "AgentPoolNetworkProfile"}, "security_profile": {"key": "properties.securityProfile", "type": "AgentPoolSecurityProfile"}, - "gpu_profile": {"key": "properties.gpuProfile", "type": "AgentPoolGPUProfile"}, + "gpu_profile": {"key": "properties.gpuProfile", "type": "GPUProfile"}, "artifact_streaming_profile": { "key": "properties.artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile", @@ -531,7 +565,7 @@ def __init__( # pylint: disable=too-many-locals windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, - gpu_profile: Optional["_models.AgentPoolGPUProfile"] = None, + gpu_profile: Optional["_models.GPUProfile"] = None, artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[List["_models.VirtualMachineNodes"]] = None, @@ -558,15 +592,15 @@ def __init__( # pylint: disable=too-many-locals `_. Known values are: "Managed" and "Ephemeral". :paramtype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :paramtype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -575,27 +609,27 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :paramtype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int :keyword min_count: The minimum number of nodes for auto-scaling. @@ -605,16 +639,16 @@ def __init__( # pylint: disable=too-many-locals :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :paramtype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :keyword type_properties_type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". :paramtype type_properties_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :paramtype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :paramtype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :keyword orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -627,12 +661,12 @@ def __init__( # pylint: disable=too-many-locals :paramtype orchestrator_version: str :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :paramtype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :paramtype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :keyword availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :paramtype availability_zones: list[str] @@ -640,7 +674,7 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that @@ -649,16 +683,16 @@ def __init__( # pylint: disable=too-many-locals stores. Defaults to false. :paramtype enable_custom_ca_trust: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :paramtype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :paramtype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -681,10 +715,10 @@ def __init__( # pylint: disable=too-many-locals :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. :paramtype kubelet_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :keyword linux_os_config: The OS configuration of Linux agent nodes. :paramtype linux_os_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -699,48 +733,47 @@ def __init__( # pylint: disable=too-many-locals profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". :paramtype gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str :keyword windows_profile: The Windows agent pool's specific profile. :paramtype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :keyword gpu_profile: The GPU settings of an agent pool. - :paramtype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :paramtype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. - :paramtype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :paramtype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus """ super().__init__(**kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.count = count self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb @@ -761,10 +794,10 @@ def __init__( # pylint: disable=too-many-locals self.type_properties_type = type_properties_type self.mode = mode self.orchestrator_version = orchestrator_version - self.current_orchestrator_version = None - self.node_image_version = None + self.current_orchestrator_version: Optional[str] = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip @@ -835,7 +868,7 @@ class AgentPoolAvailableVersions(_serialization.Model): :vartype type: str :ivar agent_pool_versions: List of versions available for agent pool. :vartype agent_pool_versions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] # pylint: disable=line-too-long + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] """ _validation = { @@ -863,12 +896,12 @@ def __init__( """ :keyword agent_pool_versions: List of versions available for agent pool. :paramtype agent_pool_versions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] # pylint: disable=line-too-long + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.agent_pool_versions = agent_pool_versions @@ -971,62 +1004,13 @@ def __init__(self, *, public_ip_prefix_size: int = 31, **kwargs: Any) -> None: self.public_ip_prefix_size = public_ip_prefix_size -class AgentPoolGPUProfile(_serialization.Model): - """AgentPoolGPUProfile. - - :ivar install_gpu_driver: The default value is true when the vmSize of the agent pool contains - a GPU, false otherwise. GPU Driver Installation can only be set true when VM has an associated - GPU resource. Setting this field to false prevents automatic GPU driver installation. In that - case, in order for the GPU to be usable, the user must perform GPU driver installation - themselves. - :vartype install_gpu_driver: bool - :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.v2025_01_02_preview.models.DriverType - """ - - _attribute_map = { - "install_gpu_driver": {"key": "installGPUDriver", "type": "bool"}, - "driver_type": {"key": "driverType", "type": "str"}, - } - - def __init__( - self, - *, - install_gpu_driver: Optional[bool] = None, - driver_type: Optional[Union[str, "_models.DriverType"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword install_gpu_driver: The default value is true when the vmSize of the agent pool - contains a GPU, false otherwise. GPU Driver Installation can only be set true when VM has an - associated GPU resource. Setting this field to false prevents automatic GPU driver - installation. In that case, in order for the GPU to be usable, the user must perform GPU driver - installation themselves. - :paramtype install_gpu_driver: bool - :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.v2025_01_02_preview.models.DriverType - """ - super().__init__(**kwargs) - self.install_gpu_driver = install_gpu_driver - self.driver_type = driver_type - - class AgentPoolListResult(_serialization.Model): """The response from the List Agent Pools operation. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of agent pools. - :vartype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :ivar next_link: The URL to get the next set of agent pool results. :vartype next_link: str """ @@ -1043,11 +1027,11 @@ class AgentPoolListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.AgentPool"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of agent pools. - :paramtype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class AgentPoolNetworkProfile(_serialization.Model): @@ -1055,11 +1039,11 @@ class AgentPoolNetworkProfile(_serialization.Model): :ivar node_public_ip_tags: IPTags of instance-level public IPs. :vartype node_public_ip_tags: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IPTag] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IPTag] :ivar allowed_host_ports: The port ranges that are allowed to access. The specified ranges are allowed to overlap. :vartype allowed_host_ports: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PortRange] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PortRange] :ivar application_security_groups: The IDs of the application security groups which agent pool will associate when created. :vartype application_security_groups: list[str] @@ -1082,11 +1066,11 @@ def __init__( """ :keyword node_public_ip_tags: IPTags of instance-level public IPs. :paramtype node_public_ip_tags: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IPTag] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IPTag] :keyword allowed_host_ports: The port ranges that are allowed to access. The specified ranges are allowed to overlap. :paramtype allowed_host_ports: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PortRange] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PortRange] :keyword application_security_groups: The IDs of the application security groups which agent pool will associate when created. :paramtype application_security_groups: list[str] @@ -1103,7 +1087,7 @@ class AgentPoolSecurityProfile(_serialization.Model): :ivar ssh_access: SSH access method of an agent pool. Known values are: "LocalUser" and "Disabled". :vartype ssh_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSSHAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.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. @@ -1132,7 +1116,7 @@ def __init__( :keyword ssh_access: SSH access method of an agent pool. Known values are: "LocalUser" and "Disabled". :paramtype ssh_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSSHAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.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. @@ -1156,7 +1140,7 @@ class AgentPoolStatus(_serialization.Model): :ivar provisioning_error: Preserves the detailed info of failure. If there was no error, this field is omitted. :vartype provisioning_error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CloudErrorBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CloudErrorBody """ _validation = { @@ -1170,7 +1154,7 @@ class AgentPoolStatus(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provisioning_error = None + self.provisioning_error: Optional["_models.CloudErrorBody"] = None class AgentPoolUpgradeProfile(_serialization.Model): @@ -1190,13 +1174,13 @@ class AgentPoolUpgradeProfile(_serialization.Model): :vartype kubernetes_version: str :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] :ivar components_by_releases: List of components grouped by kubernetes major.minor version. :vartype components_by_releases: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ComponentsByRelease] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ComponentsByRelease] :ivar latest_node_image_version: The latest AKS supported node image version. :vartype latest_node_image_version: str """ @@ -1235,20 +1219,20 @@ def __init__( :paramtype kubernetes_version: str :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :keyword upgrades: List of orchestrator types and versions available for upgrade. :paramtype upgrades: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] :keyword components_by_releases: List of components grouped by kubernetes major.minor version. :paramtype components_by_releases: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ComponentsByRelease] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ComponentsByRelease] :keyword latest_node_image_version: The latest AKS supported node image version. :paramtype latest_node_image_version: str """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.kubernetes_version = kubernetes_version self.os_type = os_type self.upgrades = upgrades @@ -1332,7 +1316,7 @@ class AgentPoolUpgradeSettings(_serialization.Model): still being in a running state, can also cause undrainable nodes. Known values are: "Cordon" and "Schedule". :vartype undrainable_node_behavior: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UndrainableNodeBehavior + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UndrainableNodeBehavior """ _validation = { @@ -1395,7 +1379,7 @@ def __init__( is still being in a running state, can also cause undrainable nodes. Known values are: "Cordon" and "Schedule". :paramtype undrainable_node_behavior: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UndrainableNodeBehavior + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UndrainableNodeBehavior """ super().__init__(**kwargs) self.max_surge = max_surge @@ -1433,76 +1417,42 @@ def __init__(self, *, disable_outbound_nat: Optional[bool] = None, **kwargs: Any class AutoScaleProfile(_serialization.Model): """Specifications on auto-scaling. - :ivar sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', - 'Standard_D16s_v5']. AKS will use the first available one when auto scaling. If a VM size is - unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. - :vartype sizes: list[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 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 - :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine - in the master/agent pool. If you specify 0, it will apply the default osDisk size according to - the vmSize specified. - :vartype os_disk_size_gb: int - :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk - larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - after creation. For more information see `Ephemeral OS - `_. Known values are: - "Managed" and "Ephemeral". - :vartype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType """ - _validation = { - "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, - } - _attribute_map = { - "sizes": {"key": "sizes", "type": "[str]"}, + "size": {"key": "size", "type": "str"}, "min_count": {"key": "minCount", "type": "int"}, "max_count": {"key": "maxCount", "type": "int"}, - "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, - "os_disk_type": {"key": "osDiskType", "type": "str"}, } def __init__( self, *, - sizes: Optional[List[str]] = None, + size: Optional[str] = None, min_count: Optional[int] = None, max_count: Optional[int] = None, - os_disk_size_gb: Optional[int] = None, - os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, **kwargs: Any ) -> None: """ - :keyword sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', - 'Standard_D16s_v5']. AKS will use the first available one when auto scaling. If a VM size is - unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. - :paramtype sizes: list[str] + :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 - :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every - machine in the master/agent pool. If you specify 0, it will apply the default osDisk size - according to the vmSize specified. - :paramtype os_disk_size_gb: int - :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk - larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - after creation. For more information see `Ephemeral OS - `_. Known values are: - "Managed" and "Ephemeral". - :paramtype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType """ super().__init__(**kwargs) - self.sizes = sizes + self.size = size self.min_count = min_count self.max_count = max_count - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type class AzureKeyVaultKms(_serialization.Model): @@ -1511,7 +1461,7 @@ class AzureKeyVaultKms(_serialization.Model): :ivar enabled: Whether to enable Azure Key Vault key management service. The default is false. :vartype enabled: bool :ivar key_id: Identifier of Azure Key Vault key. See `key identifier format - `_ # pylint: disable=line-too-long + `_ for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. @@ -1521,7 +1471,7 @@ class AzureKeyVaultKms(_serialization.Model): ``Private`` means the key vault disables public access and enables private link. The default value is ``Public``. Known values are: "Public" and "Private". :vartype key_vault_network_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KeyVaultNetworkAccessTypes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KeyVaultNetworkAccessTypes :ivar key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is ``Private``\\ , this field is required and must be a valid resource ID. When keyVaultNetworkAccess is ``Public``\\ , leave the field empty. @@ -1549,7 +1499,7 @@ def __init__( false. :paramtype enabled: bool :keyword key_id: Identifier of Azure Key Vault key. See `key identifier format - `_ # pylint: disable=line-too-long + `_ for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. @@ -1559,7 +1509,7 @@ def __init__( networks. ``Private`` means the key vault disables public access and enables private link. The default value is ``Public``. Known values are: "Public" and "Private". :paramtype key_vault_network_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KeyVaultNetworkAccessTypes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KeyVaultNetworkAccessTypes :keyword key_vault_resource_id: Resource ID of key vault. When keyVaultNetworkAccess is ``Private``\\ , this field is required and must be a valid resource ID. When keyVaultNetworkAccess is ``Public``\\ , leave the field empty. @@ -1585,7 +1535,7 @@ class CloudErrorBody(_serialization.Model): error. :vartype target: str :ivar details: A list of additional details about the error. - :vartype details: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CloudErrorBody] + :vartype details: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CloudErrorBody] """ _attribute_map = { @@ -1616,7 +1566,7 @@ def __init__( :paramtype target: str :keyword details: A list of additional details about the error. :paramtype details: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CloudErrorBody] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CloudErrorBody] """ super().__init__(**kwargs) self.code = code @@ -1630,7 +1580,7 @@ class ClusterUpgradeSettings(_serialization.Model): :ivar override_settings: Settings for overrides. :vartype override_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UpgradeOverrideSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UpgradeOverrideSettings """ _attribute_map = { @@ -1641,7 +1591,7 @@ def __init__(self, *, override_settings: Optional["_models.UpgradeOverrideSettin """ :keyword override_settings: Settings for overrides. :paramtype override_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UpgradeOverrideSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UpgradeOverrideSettings """ super().__init__(**kwargs) self.override_settings = override_settings @@ -1682,7 +1632,7 @@ class Component(_serialization.Model): :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. # pylint: disable=line-too-long + https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. :vartype has_breaking_changes: bool """ @@ -1707,7 +1657,7 @@ def __init__( :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. # pylint: disable=line-too-long + 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) @@ -1722,7 +1672,7 @@ class ComponentsByRelease(_serialization.Model): :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.v2025_01_02_preview.models.Component] + :vartype components: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Component] """ _attribute_map = { @@ -1741,7 +1691,7 @@ def __init__( :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.v2025_01_02_preview.models.Component] + :paramtype components: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Component] """ super().__init__(**kwargs) self.kubernetes_version = kubernetes_version @@ -1757,7 +1707,7 @@ class ContainerServiceLinuxProfile(_serialization.Model): :vartype admin_username: str :ivar ssh: The SSH configuration for Linux-based VMs running on Azure. Required. :vartype ssh: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceSshConfiguration + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceSshConfiguration """ _validation = { @@ -1776,7 +1726,7 @@ def __init__(self, *, admin_username: str, ssh: "_models.ContainerServiceSshConf :paramtype admin_username: str :keyword ssh: The SSH configuration for Linux-based VMs running on Azure. Required. :paramtype ssh: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceSshConfiguration + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceSshConfiguration """ super().__init__(**kwargs) self.admin_username = admin_username @@ -1789,23 +1739,23 @@ 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.v2025_01_02_preview.models.NetworkPlugin + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPlugin :ivar network_plugin_mode: Network plugin mode used for building the Kubernetes network. "overlay" :vartype network_plugin_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPluginMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPluginMode :ivar network_policy: Network policy used for building the Kubernetes network. Known values are: "none", "calico", "azure", and "cilium". :vartype network_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPolicy :ivar network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. Known values are: "transparent" and "bridge". :vartype network_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkMode :ivar network_dataplane: Network dataplane used in the Kubernetes cluster. Known values are: "azure" and "cilium". :vartype network_dataplane: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkDataplane + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkDataplane :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 @@ -1819,22 +1769,22 @@ class ContainerServiceNetworkProfile(_serialization.Model): `_. Known values are: "loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway", and "none". :vartype outbound_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundType :ivar load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information about the differences between load balancer SKUs. Known values are: "standard" and "basic". :vartype load_balancer_sku: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancerSku + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancerSku :ivar load_balancer_profile: Profile of the cluster load balancer. :vartype load_balancer_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfile :ivar nat_gateway_profile: Profile of the cluster NAT gateway. :vartype nat_gateway_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNATGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNATGatewayProfile :ivar static_egress_gateway_profile: The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. :vartype static_egress_gateway_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStaticEgressGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStaticEgressGatewayProfile :ivar pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. :vartype pod_cidrs: list[str] @@ -1846,23 +1796,23 @@ class ContainerServiceNetworkProfile(_serialization.Model): 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.v2025_01_02_preview.models.IPFamily] + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.PodLinkLocalAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AdvancedNetworking + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworking """ _validation = { @@ -1926,23 +1876,23 @@ def __init__( :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.v2025_01_02_preview.models.NetworkPlugin + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPlugin :keyword network_plugin_mode: Network plugin mode used for building the Kubernetes network. "overlay" :paramtype network_plugin_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPluginMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPluginMode :keyword network_policy: Network policy used for building the Kubernetes network. Known values are: "none", "calico", "azure", and "cilium". :paramtype network_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPolicy :keyword network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. Known values are: "transparent" and "bridge". :paramtype network_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkMode :keyword network_dataplane: Network dataplane used in the Kubernetes cluster. Known values are: "azure" and "cilium". :paramtype network_dataplane: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkDataplane + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkDataplane :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 @@ -1956,22 +1906,22 @@ def __init__( `_. Known values are: "loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway", and "none". :paramtype outbound_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundType :keyword load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs `_ for more information about the differences between load balancer SKUs. Known values are: "standard" and "basic". :paramtype load_balancer_sku: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancerSku + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancerSku :keyword load_balancer_profile: Profile of the cluster load balancer. :paramtype load_balancer_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfile :keyword nat_gateway_profile: Profile of the cluster NAT gateway. :paramtype nat_gateway_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNATGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNATGatewayProfile :keyword static_egress_gateway_profile: The profile for Static Egress Gateway addon. For more details about Static Egress Gateway, see https://aka.ms/aks/static-egress-gateway. :paramtype static_egress_gateway_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStaticEgressGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStaticEgressGatewayProfile :keyword pod_cidrs: One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. :paramtype pod_cidrs: list[str] @@ -1983,23 +1933,23 @@ def __init__( 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.v2025_01_02_preview.models.IPFamily] + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.PodLinkLocalAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AdvancedNetworking + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AdvancedNetworking """ super().__init__(**kwargs) self.network_plugin = network_plugin @@ -2035,11 +1985,11 @@ class ContainerServiceNetworkProfileKubeProxyConfig(_serialization.Model): # py :vartype enabled: bool :ivar mode: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). Known values are: "IPTABLES" and "IPVS". - :vartype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Mode + :vartype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Mode :ivar ipvs_config: Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. :vartype ipvs_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig """ _attribute_map = { @@ -2062,11 +2012,11 @@ def __init__( :paramtype enabled: bool :keyword mode: Specify which proxy mode to use ('IPTABLES' or 'IPVS'). Known values are: "IPTABLES" and "IPVS". - :paramtype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Mode + :paramtype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Mode :keyword ipvs_config: Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. :paramtype ipvs_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig """ super().__init__(**kwargs) self.enabled = enabled @@ -2081,7 +2031,7 @@ class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(_serialization.Mod http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and "LeastConnection". :vartype scheduler: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IpvsScheduler + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IpvsScheduler :ivar tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. :vartype tcp_timeout_seconds: int @@ -2114,7 +2064,7 @@ def __init__( http://www.linuxvirtualserver.org/docs/scheduling.html. Known values are: "RoundRobin" and "LeastConnection". :paramtype scheduler: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IpvsScheduler + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IpvsScheduler :keyword tcp_timeout_seconds: The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. :paramtype tcp_timeout_seconds: int @@ -2140,7 +2090,7 @@ class ContainerServiceSshConfiguration(_serialization.Model): :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.v2025_01_02_preview.models.ContainerServiceSshPublicKey] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceSshPublicKey] """ _validation = { @@ -2156,7 +2106,7 @@ def __init__(self, *, public_keys: List["_models.ContainerServiceSshPublicKey"], :keyword public_keys: The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. Required. :paramtype public_keys: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceSshPublicKey] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceSshPublicKey] """ super().__init__(**kwargs) self.public_keys = public_keys @@ -2236,8 +2186,8 @@ class CredentialResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.value = None + self.name: Optional[str] = None + self.value: Optional[bytes] = None class CredentialResults(_serialization.Model): @@ -2247,7 +2197,7 @@ class CredentialResults(_serialization.Model): :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. :vartype kubeconfigs: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResult] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResult] """ _validation = { @@ -2261,7 +2211,7 @@ class CredentialResults(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.kubeconfigs = None + self.kubeconfigs: Optional[List["_models.CredentialResult"]] = None class DailySchedule(_serialization.Model): @@ -2378,7 +2328,7 @@ class EndpointDependency(_serialization.Model): :vartype domain_name: str :ivar endpoint_details: The Ports and Protocols used when connecting to domainName. :vartype endpoint_details: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.EndpointDetail] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.EndpointDetail] """ _attribute_map = { @@ -2398,7 +2348,7 @@ def __init__( :paramtype domain_name: str :keyword endpoint_details: The Ports and Protocols used when connecting to domainName. :paramtype endpoint_details: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.EndpointDetail] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.EndpointDetail] """ super().__init__(**kwargs) self.domain_name = domain_name @@ -2475,8 +2425,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -2491,10 +2441,10 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorDetail] + :vartype details: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -2516,11 +2466,11 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[List["_models.ErrorDetail"]] = None + self.additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = None class ErrorResponse(_serialization.Model): @@ -2528,7 +2478,7 @@ class ErrorResponse(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorDetail """ _attribute_map = { @@ -2538,7 +2488,7 @@ class ErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -2551,7 +2501,7 @@ class ExtendedLocation(_serialization.Model): :vartype name: str :ivar type: The type of the extended location. "EdgeZone" :vartype type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ExtendedLocationTypes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ExtendedLocationTypes """ _attribute_map = { @@ -2571,20 +2521,63 @@ def __init__( :paramtype name: str :keyword type: The type of the extended location. "EdgeZone" :paramtype type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ExtendedLocationTypes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ExtendedLocationTypes """ super().__init__(**kwargs) self.name = name self.type = type +class GPUProfile(_serialization.Model): + """GPUProfile. + + :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.v2025_03_02_preview.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.v2025_03_02_preview.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: + """ + :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.v2025_03_02_preview.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.v2025_03_02_preview.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. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2593,7 +2586,7 @@ class Resource(_serialization.Model): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData """ _validation = { @@ -2613,10 +2606,10 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.system_data = None + 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): @@ -2627,7 +2620,7 @@ class GuardrailsAvailableVersion(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2636,10 +2629,10 @@ class GuardrailsAvailableVersion(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar properties: Whether the version is default or not and support info. Required. :vartype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersionsProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersionsProperties """ _validation = { @@ -2662,7 +2655,7 @@ def __init__(self, *, properties: "_models.GuardrailsAvailableVersionsProperties """ :keyword properties: Whether the version is default or not and support info. Required. :paramtype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersionsProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersionsProperties """ super().__init__(**kwargs) self.properties = properties @@ -2675,7 +2668,7 @@ class GuardrailsAvailableVersionsList(_serialization.Model): :ivar value: Array of AKS supported Guardrails versions. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersion] :ivar next_link: The URL to get the next Guardrails available version. :vartype next_link: str """ @@ -2693,11 +2686,11 @@ def __init__(self, *, value: Optional[List["_models.GuardrailsAvailableVersion"] """ :keyword value: Array of AKS supported Guardrails versions. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersion] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class GuardrailsAvailableVersionsProperties(_serialization.Model): @@ -2710,7 +2703,7 @@ class GuardrailsAvailableVersionsProperties(_serialization.Model): :ivar support: Whether the version is preview or stable. Known values are: "Preview" and "Stable". :vartype support: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsSupport + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsSupport """ _validation = { @@ -2726,8 +2719,8 @@ class GuardrailsAvailableVersionsProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.is_default_version = None - self.support = None + self.is_default_version: Optional[bool] = None + self.support: Optional[Union[str, "_models.GuardrailsSupport"]] = None class IPTag(_serialization.Model): @@ -2762,7 +2755,7 @@ class IstioCertificateAuthority(_serialization.Model): :ivar plugin: Plugin certificates information for Service Mesh. :vartype plugin: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioPluginCertificateAuthority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioPluginCertificateAuthority """ _attribute_map = { @@ -2773,7 +2766,7 @@ def __init__(self, *, plugin: Optional["_models.IstioPluginCertificateAuthority" """ :keyword plugin: Plugin certificates information for Service Mesh. :paramtype plugin: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioPluginCertificateAuthority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioPluginCertificateAuthority """ super().__init__(**kwargs) self.plugin = plugin @@ -2784,10 +2777,10 @@ class IstioComponents(_serialization.Model): :ivar ingress_gateways: Istio ingress gateways. :vartype ingress_gateways: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioIngressGateway] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioIngressGateway] :ivar egress_gateways: Istio egress gateways. :vartype egress_gateways: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioEgressGateway] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioEgressGateway] """ _attribute_map = { @@ -2805,10 +2798,10 @@ def __init__( """ :keyword ingress_gateways: Istio ingress gateways. :paramtype ingress_gateways: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioIngressGateway] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioIngressGateway] :keyword egress_gateways: Istio egress gateways. :paramtype egress_gateways: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioEgressGateway] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioEgressGateway] """ super().__init__(**kwargs) self.ingress_gateways = ingress_gateways @@ -2883,7 +2876,7 @@ class IstioIngressGateway(_serialization.Model): :ivar mode: Mode of an ingress gateway. Required. Known values are: "External" and "Internal". :vartype mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioIngressGatewayMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioIngressGatewayMode :ivar enabled: Whether to enable the ingress gateway. Required. :vartype enabled: bool """ @@ -2903,7 +2896,7 @@ def __init__(self, *, mode: Union[str, "_models.IstioIngressGatewayMode"], enabl :keyword mode: Mode of an ingress gateway. Required. Known values are: "External" and "Internal". :paramtype mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioIngressGatewayMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioIngressGatewayMode :keyword enabled: Whether to enable the ingress gateway. Required. :paramtype enabled: bool """ @@ -2969,11 +2962,11 @@ class IstioServiceMesh(_serialization.Model): """Istio service mesh configuration. :ivar components: Istio components configuration. - :vartype components: ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioComponents + :vartype components: ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioComponents :ivar 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. :vartype certificate_authority: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioCertificateAuthority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioCertificateAuthority :ivar 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: @@ -3001,11 +2994,11 @@ def __init__( ) -> None: """ :keyword components: Istio components configuration. - :paramtype components: ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioComponents + :paramtype components: ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.IstioCertificateAuthority + ~azure.mgmt.containerservice.v2025_03_02_preview.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: @@ -3060,7 +3053,7 @@ class KubeletConfig(_serialization.Model): specified, 'Unconfined' will be used by default. Known values are: "Unconfined" and "RuntimeDefault". :vartype seccomp_default: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SeccompDefault + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SeccompDefault """ _validation = { @@ -3138,7 +3131,7 @@ def __init__( not specified, 'Unconfined' will be used by default. Known values are: "Unconfined" and "RuntimeDefault". :paramtype seccomp_default: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SeccompDefault + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SeccompDefault """ super().__init__(**kwargs) self.cpu_manager_policy = cpu_manager_policy @@ -3182,14 +3175,14 @@ class KubernetesVersion(_serialization.Model): :vartype version: str :ivar capabilities: Capabilities on this Kubernetes version. :vartype capabilities: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersionCapabilities + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersionCapabilities :ivar is_default: Whether this version is default. :vartype is_default: bool :ivar is_preview: Whether this version is in preview mode. :vartype is_preview: bool :ivar patch_versions: Patch versions of Kubernetes release. :vartype patch_versions: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesPatchVersion] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesPatchVersion] """ _attribute_map = { @@ -3215,14 +3208,14 @@ def __init__( :paramtype version: str :keyword capabilities: Capabilities on this Kubernetes version. :paramtype capabilities: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersionCapabilities + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersionCapabilities :keyword is_default: Whether this version is default. :paramtype is_default: bool :keyword is_preview: Whether this version is in preview mode. :paramtype is_preview: bool :keyword patch_versions: Patch versions of Kubernetes release. :paramtype patch_versions: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesPatchVersion] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesPatchVersion] """ super().__init__(**kwargs) self.version = version @@ -3237,7 +3230,7 @@ class KubernetesVersionCapabilities(_serialization.Model): :ivar support_plan: :vartype support_plan: list[str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesSupportPlan] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesSupportPlan] """ _attribute_map = { @@ -3250,7 +3243,7 @@ def __init__( """ :keyword support_plan: :paramtype support_plan: list[str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesSupportPlan] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesSupportPlan] """ super().__init__(**kwargs) self.support_plan = support_plan @@ -3261,7 +3254,7 @@ class KubernetesVersionListResult(_serialization.Model): :ivar values: Array of AKS supported Kubernetes versions. :vartype values: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersion] """ _attribute_map = { @@ -3272,7 +3265,7 @@ def __init__(self, *, values: Optional[List["_models.KubernetesVersion"]] = None """ :keyword values: Array of AKS supported Kubernetes versions. :paramtype values: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersion] """ super().__init__(**kwargs) self.values = values @@ -3291,7 +3284,7 @@ class LabelSelector(_serialization.Model): :ivar match_expressions: matchExpressions is a list of label selector requirements. The requirements are ANDed. :vartype match_expressions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.LabelSelectorRequirement] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelectorRequirement] """ _attribute_map = { @@ -3315,7 +3308,7 @@ def __init__( :keyword match_expressions: matchExpressions is a list of label selector requirements. The requirements are ANDed. :paramtype match_expressions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.LabelSelectorRequirement] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelectorRequirement] """ super().__init__(**kwargs) self.match_labels = match_labels @@ -3330,7 +3323,7 @@ class LabelSelectorRequirement(_serialization.Model): :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.v2025_01_02_preview.models.Operator + :vartype operator: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Operator :ivar values: values is an array of string values, the values array must be non-empty. :vartype values: list[str] """ @@ -3354,7 +3347,7 @@ def __init__( :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.v2025_01_02_preview.models.Operator + :paramtype operator: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Operator :keyword values: values is an array of string values, the values array must be non-empty. :paramtype values: list[str] """ @@ -3369,7 +3362,7 @@ class LinuxOSConfig(_serialization.Model): `_ for more details. :ivar sysctls: Sysctl settings for Linux agent nodes. - :vartype sysctls: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SysctlConfig + :vartype sysctls: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SysctlConfig :ivar transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see `Transparent Hugepages `_. @@ -3401,7 +3394,7 @@ def __init__( ) -> None: """ :keyword sysctls: Sysctl settings for Linux agent nodes. - :paramtype sysctls: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SysctlConfig + :paramtype sysctls: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SysctlConfig :keyword transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see `Transparent Hugepages `_. @@ -3428,7 +3421,7 @@ class ProxyResource(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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3437,7 +3430,7 @@ class ProxyResource(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData """ @@ -3453,7 +3446,7 @@ class LoadBalancer(ProxyResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3462,7 +3455,7 @@ class LoadBalancer(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.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 @@ -3475,14 +3468,14 @@ class LoadBalancer(ProxyResource): :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.v2025_01_02_preview.models.LabelSelector + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.LabelSelector + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelector :ivar node_selector: Nodes that match this selector will be possible members of this load balancer. - :vartype node_selector: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LabelSelector + :vartype node_selector: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelector :ivar provisioning_state: The current provisioning state. :vartype provisioning_state: str """ @@ -3531,14 +3524,14 @@ def __init__( :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.v2025_01_02_preview.models.LabelSelector + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.LabelSelector + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelector :keyword node_selector: Nodes that match this selector will be possible members of this load balancer. - :paramtype node_selector: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LabelSelector + :paramtype node_selector: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LabelSelector """ super().__init__(**kwargs) self.primary_agent_pool_name = primary_agent_pool_name @@ -3546,7 +3539,7 @@ def __init__( self.service_label_selector = service_label_selector self.service_namespace_selector = service_namespace_selector self.node_selector = node_selector - self.provisioning_state = None + self.provisioning_state: Optional[str] = None class LoadBalancerListResult(_serialization.Model): @@ -3555,7 +3548,7 @@ class LoadBalancerListResult(_serialization.Model): 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.v2025_01_02_preview.models.LoadBalancer] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer] :ivar next_link: The URL to get the next set of load balancer results. :vartype next_link: str """ @@ -3572,11 +3565,11 @@ class LoadBalancerListResult(_serialization.Model): 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.v2025_01_02_preview.models.LoadBalancer] + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class Machine(SubResource): @@ -3594,7 +3587,7 @@ class Machine(SubResource): :ivar type: Resource type. :vartype type: str :ivar properties: The properties of the machine. - :vartype properties: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MachineProperties + :vartype properties: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MachineProperties """ _validation = { @@ -3614,7 +3607,7 @@ class Machine(SubResource): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.properties = None + self.properties: Optional["_models.MachineProperties"] = None class MachineIpAddress(_serialization.Model): @@ -3624,7 +3617,7 @@ 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.v2025_01_02_preview.models.IPFamily + :vartype family: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.IPFamily :ivar ip: IPv4 or IPv6 address of the machine. :vartype ip: str """ @@ -3642,8 +3635,8 @@ class MachineIpAddress(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.family = None - self.ip = None + self.family: Optional[Union[str, "_models.IPFamily"]] = None + self.ip: Optional[str] = None class MachineListResult(_serialization.Model): @@ -3652,7 +3645,7 @@ 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.v2025_01_02_preview.models.Machine] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine] :ivar next_link: The URL to get the next set of machine results. :vartype next_link: str """ @@ -3669,11 +3662,11 @@ class MachineListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.Machine"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of Machines in cluster. - :paramtype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.Machine] + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MachineNetworkProperties(_serialization.Model): @@ -3683,7 +3676,7 @@ class MachineNetworkProperties(_serialization.Model): :ivar ip_addresses: IPv4, IPv6 addresses of the machine. :vartype ip_addresses: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MachineIpAddress] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MachineIpAddress] """ _validation = { @@ -3697,7 +3690,7 @@ class MachineNetworkProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.ip_addresses = None + self.ip_addresses: Optional[List["_models.MachineIpAddress"]] = None class MachineProperties(_serialization.Model): @@ -3707,7 +3700,7 @@ class MachineProperties(_serialization.Model): :ivar network: network properties of the machine. :vartype network: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MachineNetworkProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MachineNetworkProperties :ivar resource_id: Arm resource id of the machine. It can be used to GET underlying VM Instance. :vartype resource_id: str @@ -3726,8 +3719,8 @@ class MachineProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.network = None - self.resource_id = None + self.network: Optional["_models.MachineNetworkProperties"] = None + self.resource_id: Optional[str] = None class MaintenanceConfiguration(SubResource): @@ -3744,16 +3737,16 @@ class MaintenanceConfiguration(SubResource): :ivar type: Resource type. :vartype type: str :ivar system_data: The system metadata relating to this resource. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - :vartype time_in_week: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TimeInWeek] + :vartype time_in_week: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TimeInWeek] :ivar not_allowed_time: Time slots on which upgrade is not allowed. :vartype not_allowed_time: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TimeSpan] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TimeSpan] :ivar maintenance_window: Maintenance window for the maintenance configuration. :vartype maintenance_window: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceWindow + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceWindow """ _validation = { @@ -3785,16 +3778,16 @@ def __init__( :keyword time_in_week: If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. :paramtype time_in_week: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TimeInWeek] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TimeInWeek] :keyword not_allowed_time: Time slots on which upgrade is not allowed. :paramtype not_allowed_time: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TimeSpan] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TimeSpan] :keyword maintenance_window: Maintenance window for the maintenance configuration. :paramtype maintenance_window: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceWindow + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceWindow """ super().__init__(**kwargs) - self.system_data = None + self.system_data: Optional["_models.SystemData"] = None self.time_in_week = time_in_week self.not_allowed_time = not_allowed_time self.maintenance_window = maintenance_window @@ -3807,7 +3800,7 @@ class MaintenanceConfigurationListResult(_serialization.Model): :ivar value: The list of maintenance configurations. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration] :ivar next_link: The URL to get the next set of maintenance configuration results. :vartype next_link: str """ @@ -3825,11 +3818,11 @@ def __init__(self, *, value: Optional[List["_models.MaintenanceConfiguration"]] """ :keyword value: The list of maintenance configurations. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MaintenanceWindow(_serialization.Model): @@ -3838,7 +3831,7 @@ class MaintenanceWindow(_serialization.Model): All required parameters must be populated in order to send to server. :ivar schedule: Recurrence schedule for the maintenance window. Required. - :vartype schedule: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Schedule + :vartype schedule: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Schedule :ivar duration_hours: Length of maintenance window range from 4 to 24 hours. :vartype duration_hours: int :ivar utc_offset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' @@ -3857,7 +3850,7 @@ class MaintenanceWindow(_serialization.Model): '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. :vartype not_allowed_dates: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.DateSpan] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.DateSpan] """ _validation = { @@ -3889,7 +3882,7 @@ def __init__( ) -> None: """ :keyword schedule: Recurrence schedule for the maintenance window. Required. - :paramtype schedule: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Schedule + :paramtype schedule: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Schedule :keyword duration_hours: Length of maintenance window range from 4 to 24 hours. :paramtype duration_hours: int :keyword utc_offset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and @@ -3908,7 +3901,7 @@ def __init__( '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time. :paramtype not_allowed_dates: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.DateSpan] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.DateSpan] """ super().__init__(**kwargs) self.schedule = schedule @@ -3928,7 +3921,7 @@ class TrackedResource(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3937,7 +3930,7 @@ class TrackedResource(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -3981,7 +3974,7 @@ class ManagedCluster(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3990,7 +3983,7 @@ class ManagedCluster(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -4001,23 +3994,23 @@ class ManagedCluster(TrackedResource): convention. :vartype e_tag: str :ivar sku: The managed cluster SKU. - :vartype sku: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKU + :vartype sku: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKU :ivar extended_location: The extended location of the Virtual Machine. :vartype extended_location: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ExtendedLocation + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ExtendedLocation :ivar identity: The identity of the managed cluster, if configured. :vartype identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIdentity :ivar kind: This is primarily used to expose different UI experiences in the portal for different kinds. :vartype kind: str :ivar provisioning_state: The current provisioning state. :vartype provisioning_state: str :ivar power_state: The Power State of the cluster. - :vartype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :vartype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar max_agent_pools: The max number of agent pools for the managed cluster. :vartype max_agent_pools: int :ivar kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor versions @@ -4042,39 +4035,39 @@ class ManagedCluster(TrackedResource): :vartype azure_portal_fqdn: str :ivar agent_pool_profiles: The agent pool properties. :vartype agent_pool_profiles: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAgentPoolProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAgentPoolProfile] :ivar linux_profile: The profile for Linux VMs in the Managed Cluster. :vartype linux_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceLinuxProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceLinuxProfile :ivar windows_profile: The profile for Windows VMs in the Managed Cluster. :vartype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWindowsProfile :ivar service_principal_profile: Information about a service principal identity for the cluster to use for manipulating Azure APIs. :vartype service_principal_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile :ivar addon_profiles: The profile of managed cluster add-on. :vartype addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAddonProfile] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAddonProfile] :ivar pod_identity_profile: See `use AAD pod identity `_ for more details on AAD pod identity integration. :vartype pod_identity_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProfile :ivar oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. :vartype oidc_issuer_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterOIDCIssuerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterOIDCIssuerProfile :ivar node_resource_group: The name of the resource group containing agent pool nodes. :vartype node_resource_group: str :ivar node_resource_group_profile: The node resource group configuration profile. :vartype node_resource_group_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNodeResourceGroupProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNodeResourceGroupProfile :ivar enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :vartype enable_rbac: bool :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.v2025_01_02_preview.models.KubernetesSupportPlan + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesSupportPlan :ivar enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. @@ -4085,34 +4078,34 @@ class ManagedCluster(TrackedResource): :vartype enable_namespace_resources: bool :ivar network_profile: The network configuration profile. :vartype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceNetworkProfile :ivar aad_profile: The Azure Active Directory configuration. :vartype aad_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile :ivar auto_upgrade_profile: The auto upgrade configuration. :vartype auto_upgrade_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAutoUpgradeProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAutoUpgradeProfile :ivar upgrade_settings: Settings for upgrading a cluster. :vartype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ClusterUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ClusterUpgradeSettings :ivar auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :vartype auto_scaler_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPropertiesAutoScalerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPropertiesAutoScalerProfile :ivar api_server_access_profile: The access profile for managed cluster API server. :vartype api_server_access_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAPIServerAccessProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAPIServerAccessProfile :ivar disk_encryption_set_id: This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. :vartype disk_encryption_set_id: str :ivar identity_profile: The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". :vartype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity] :ivar private_link_resources: Private link resources associated with the cluster. :vartype private_link_resources: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource] :ivar disable_local_accounts: If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see `disable local accounts @@ -4120,51 +4113,51 @@ class ManagedCluster(TrackedResource): :vartype disable_local_accounts: bool :ivar http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :vartype http_proxy_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterHTTPProxyConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterHTTPProxyConfig :ivar security_profile: Security profile for the managed cluster. :vartype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfile :ivar storage_profile: Storage profile for the managed cluster. :vartype storage_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfile :ivar ingress_profile: Ingress profile for the managed cluster. :vartype ingress_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIngressProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfile :ivar public_network_access: Allow or deny public network access for AKS. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PublicNetworkAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PublicNetworkAccess :ivar workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. :vartype workload_auto_scaler_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfile :ivar azure_monitor_profile: Prometheus addon profile for the container service cluster. :vartype azure_monitor_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfile :ivar safeguards_profile: The Safeguards profile holds all the safeguards information for a given cluster. :vartype safeguards_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsProfile :ivar service_mesh_profile: Service mesh profile for a managed cluster. :vartype service_mesh_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ServiceMeshProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ServiceMeshProfile :ivar resource_uid: The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence). :vartype resource_uid: str :ivar metrics_profile: Optional cluster metrics configuration. :vartype metrics_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterMetricsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAIToolchainOperatorProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAIToolchainOperatorProfile :ivar node_provisioning_profile: Node provisioning settings that apply to the whole cluster. :vartype node_provisioning_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNodeProvisioningProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNodeProvisioningProfile :ivar bootstrap_profile: Profile of the cluster bootstrap configuration. :vartype bootstrap_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterBootstrapProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterBootstrapProfile :ivar status: Contains read-only information about the Managed Cluster. - :vartype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStatus + :vartype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStatus """ _validation = { @@ -4326,19 +4319,19 @@ def __init__( # pylint: disable=too-many-locals :keyword location: The geo-location where the resource lives. Required. :paramtype location: str :keyword sku: The managed cluster SKU. - :paramtype sku: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKU + :paramtype sku: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKU :keyword extended_location: The extended location of the Virtual Machine. :paramtype extended_location: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ExtendedLocation + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ExtendedLocation :keyword identity: The identity of the managed cluster, if configured. :paramtype identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIdentity :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.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however @@ -4351,39 +4344,39 @@ def __init__( # pylint: disable=too-many-locals :paramtype fqdn_subdomain: str :keyword agent_pool_profiles: The agent pool properties. :paramtype agent_pool_profiles: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAgentPoolProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAgentPoolProfile] :keyword linux_profile: The profile for Linux VMs in the Managed Cluster. :paramtype linux_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceLinuxProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceLinuxProfile :keyword windows_profile: The profile for Windows VMs in the Managed Cluster. :paramtype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWindowsProfile :keyword service_principal_profile: Information about a service principal identity for the cluster to use for manipulating Azure APIs. :paramtype service_principal_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile :keyword addon_profiles: The profile of managed cluster add-on. :paramtype addon_profiles: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAddonProfile] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAddonProfile] :keyword pod_identity_profile: See `use AAD pod identity `_ for more details on AAD pod identity integration. :paramtype pod_identity_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProfile :keyword oidc_issuer_profile: The OIDC issuer profile of the Managed Cluster. :paramtype oidc_issuer_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterOIDCIssuerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterOIDCIssuerProfile :keyword node_resource_group: The name of the resource group containing agent pool nodes. :paramtype node_resource_group: str :keyword node_resource_group_profile: The node resource group configuration profile. :paramtype node_resource_group_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNodeResourceGroupProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNodeResourceGroupProfile :keyword enable_rbac: Whether to enable Kubernetes Role-Based Access Control. :paramtype enable_rbac: bool :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.v2025_01_02_preview.models.KubernetesSupportPlan + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesSupportPlan :keyword enable_pod_security_policy: (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. @@ -4394,34 +4387,34 @@ def __init__( # pylint: disable=too-many-locals :paramtype enable_namespace_resources: bool :keyword network_profile: The network configuration profile. :paramtype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ContainerServiceNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ContainerServiceNetworkProfile :keyword aad_profile: The Azure Active Directory configuration. :paramtype aad_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile :keyword auto_upgrade_profile: The auto upgrade configuration. :paramtype auto_upgrade_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAutoUpgradeProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAutoUpgradeProfile :keyword upgrade_settings: Settings for upgrading a cluster. :paramtype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ClusterUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ClusterUpgradeSettings :keyword auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. :paramtype auto_scaler_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPropertiesAutoScalerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPropertiesAutoScalerProfile :keyword api_server_access_profile: The access profile for managed cluster API server. :paramtype api_server_access_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAPIServerAccessProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAPIServerAccessProfile :keyword disk_encryption_set_id: This is of the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. :paramtype disk_encryption_set_id: str :keyword identity_profile: The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned identity is allowed. The only accepted key is "kubeletidentity", with value of "resourceId": - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". :paramtype identity_profile: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity] :keyword private_link_resources: Private link resources associated with the cluster. :paramtype private_link_resources: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource] :keyword disable_local_accounts: If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see `disable local accounts @@ -4430,66 +4423,66 @@ def __init__( # pylint: disable=too-many-locals :keyword http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. :paramtype http_proxy_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterHTTPProxyConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterHTTPProxyConfig :keyword security_profile: Security profile for the managed cluster. :paramtype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfile :keyword storage_profile: Storage profile for the managed cluster. :paramtype storage_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfile :keyword ingress_profile: Ingress profile for the managed cluster. :paramtype ingress_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIngressProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfile :keyword public_network_access: Allow or deny public network access for AKS. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PublicNetworkAccess + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PublicNetworkAccess :keyword workload_auto_scaler_profile: Workload Auto-scaler profile for the managed cluster. :paramtype workload_auto_scaler_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfile :keyword azure_monitor_profile: Prometheus addon profile for the container service cluster. :paramtype azure_monitor_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfile :keyword safeguards_profile: The Safeguards profile holds all the safeguards information for a given cluster. :paramtype safeguards_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsProfile :keyword service_mesh_profile: Service mesh profile for a managed cluster. :paramtype service_mesh_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ServiceMeshProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ServiceMeshProfile :keyword metrics_profile: Optional cluster metrics configuration. :paramtype metrics_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterMetricsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAIToolchainOperatorProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAIToolchainOperatorProfile :keyword node_provisioning_profile: Node provisioning settings that apply to the whole cluster. :paramtype node_provisioning_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterNodeProvisioningProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterNodeProvisioningProfile :keyword bootstrap_profile: Profile of the cluster bootstrap configuration. :paramtype bootstrap_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterBootstrapProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterBootstrapProfile :keyword status: Contains read-only information about the Managed Cluster. - :paramtype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStatus + :paramtype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStatus """ super().__init__(tags=tags, location=location, **kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.sku = sku self.extended_location = extended_location self.identity = identity self.kind = kind - self.provisioning_state = None - self.power_state = None + self.provisioning_state: Optional[str] = None + self.power_state: Optional["_models.PowerState"] = None self.creation_data = creation_data - self.max_agent_pools = None + self.max_agent_pools: Optional[int] = None self.kubernetes_version = kubernetes_version - self.current_kubernetes_version = None + self.current_kubernetes_version: Optional[str] = None self.dns_prefix = dns_prefix self.fqdn_subdomain = fqdn_subdomain - self.fqdn = None - self.private_fqdn = None - self.azure_portal_fqdn = None + self.fqdn: Optional[str] = None + self.private_fqdn: Optional[str] = None + self.azure_portal_fqdn: Optional[str] = None self.agent_pool_profiles = agent_pool_profiles self.linux_profile = linux_profile self.windows_profile = windows_profile @@ -4522,7 +4515,7 @@ def __init__( # pylint: disable=too-many-locals self.azure_monitor_profile = azure_monitor_profile self.safeguards_profile = safeguards_profile self.service_mesh_profile = service_mesh_profile - self.resource_uid = None + 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 @@ -4615,7 +4608,7 @@ class ManagedClusterAccessProfile(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -4624,7 +4617,7 @@ class ManagedClusterAccessProfile(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -4684,7 +4677,7 @@ class ManagedClusterAddonProfile(_serialization.Model): :vartype config: dict[str, str] :ivar identity: Information of user assigned identity used by this add-on. :vartype identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAddonProfileIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAddonProfileIdentity """ _validation = { @@ -4708,7 +4701,7 @@ def __init__(self, *, enabled: bool, config: Optional[Dict[str, str]] = None, ** super().__init__(**kwargs) self.enabled = enabled self.config = config - self.identity = None + self.identity: Optional["_models.ManagedClusterAddonProfileIdentity"] = None class UserAssignedIdentity(_serialization.Model): @@ -4790,15 +4783,15 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): `_. Known values are: "Managed" and "Ephemeral". :vartype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :vartype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -4807,27 +4800,27 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :vartype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int :ivar min_count: The minimum number of nodes for auto-scaling. @@ -4837,15 +4830,15 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :vartype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". - :vartype type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + :vartype type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :vartype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :vartype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :ivar orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -4864,14 +4857,14 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :vartype node_image_version: str :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :vartype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :vartype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :ivar availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :vartype availability_zones: list[str] @@ -4888,16 +4881,16 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): stores. Defaults to false. :vartype enable_custom_ca_trust: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :vartype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :vartype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -4919,9 +4912,9 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. - :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :ivar linux_os_config: The OS configuration of Linux agent nodes. - :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -4935,45 +4928,44 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): :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.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str :ivar windows_profile: The Windows agent pool's specific profile. :vartype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :ivar gpu_profile: The GPU settings of an agent pool. - :vartype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :vartype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. - :vartype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :vartype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus """ _validation = { @@ -5035,7 +5027,7 @@ class ManagedClusterAgentPoolProfileProperties(_serialization.Model): "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, "security_profile": {"key": "securityProfile", "type": "AgentPoolSecurityProfile"}, - "gpu_profile": {"key": "gpuProfile", "type": "AgentPoolGPUProfile"}, + "gpu_profile": {"key": "gpuProfile", "type": "GPUProfile"}, "artifact_streaming_profile": {"key": "artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile"}, "virtual_machines_profile": {"key": "virtualMachinesProfile", "type": "VirtualMachinesProfile"}, "virtual_machine_nodes_status": {"key": "virtualMachineNodesStatus", "type": "[VirtualMachineNodes]"}, @@ -5092,7 +5084,7 @@ def __init__( # pylint: disable=too-many-locals windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, - gpu_profile: Optional["_models.AgentPoolGPUProfile"] = None, + gpu_profile: Optional["_models.GPUProfile"] = None, artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[List["_models.VirtualMachineNodes"]] = None, @@ -5119,15 +5111,15 @@ def __init__( # pylint: disable=too-many-locals `_. Known values are: "Managed" and "Ephemeral". :paramtype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :paramtype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -5136,27 +5128,27 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :paramtype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int :keyword min_count: The minimum number of nodes for auto-scaling. @@ -5166,15 +5158,15 @@ def __init__( # pylint: disable=too-many-locals :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :paramtype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". - :paramtype type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + :paramtype type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :paramtype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :paramtype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :keyword orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -5187,12 +5179,12 @@ def __init__( # pylint: disable=too-many-locals :paramtype orchestrator_version: str :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :paramtype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :paramtype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :keyword availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :paramtype availability_zones: list[str] @@ -5200,7 +5192,7 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that @@ -5209,16 +5201,16 @@ def __init__( # pylint: disable=too-many-locals stores. Defaults to false. :paramtype enable_custom_ca_trust: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :paramtype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :paramtype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -5241,10 +5233,10 @@ def __init__( # pylint: disable=too-many-locals :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. :paramtype kubelet_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :keyword linux_os_config: The OS configuration of Linux agent nodes. :paramtype linux_os_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -5259,48 +5251,47 @@ def __init__( # pylint: disable=too-many-locals profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". :paramtype gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str :keyword windows_profile: The Windows agent pool's specific profile. :paramtype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :keyword gpu_profile: The GPU settings of an agent pool. - :paramtype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :paramtype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. - :paramtype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :paramtype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus """ super().__init__(**kwargs) - self.e_tag = None + self.e_tag: Optional[str] = None self.count = count self.vm_size = vm_size self.os_disk_size_gb = os_disk_size_gb @@ -5321,10 +5312,10 @@ def __init__( # pylint: disable=too-many-locals self.type = type self.mode = mode self.orchestrator_version = orchestrator_version - self.current_orchestrator_version = None - self.node_image_version = None + self.current_orchestrator_version: Optional[str] = None + self.node_image_version: Optional[str] = None self.upgrade_settings = upgrade_settings - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.power_state = power_state self.availability_zones = availability_zones self.enable_node_public_ip = enable_node_public_ip @@ -5388,15 +5379,15 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): `_. Known values are: "Managed" and "Ephemeral". :vartype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :ivar kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :vartype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :ivar workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :vartype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :ivar message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -5405,27 +5396,27 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype vnet_subnet_id: str :ivar pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :vartype pod_subnet_id: str :ivar pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :vartype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :ivar max_pods: The maximum number of pods that can run on a node. :vartype max_pods: int :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :ivar max_count: The maximum number of nodes for auto-scaling. :vartype max_count: int :ivar min_count: The minimum number of nodes for auto-scaling. @@ -5435,15 +5426,15 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :vartype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :ivar type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". - :vartype type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + :vartype type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :ivar mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :vartype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :vartype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :ivar orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -5462,14 +5453,14 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :vartype node_image_version: str :ivar upgrade_settings: Settings for upgrading the agentpool. :vartype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :ivar provisioning_state: The current deployment or provisioning state. :vartype provisioning_state: str :ivar power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :vartype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :vartype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :ivar availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :vartype availability_zones: list[str] @@ -5486,16 +5477,16 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): stores. Defaults to false. :vartype enable_custom_ca_trust: bool :ivar node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :vartype node_public_ip_prefix_id: str :ivar scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :vartype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :ivar scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :vartype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :ivar spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -5517,9 +5508,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :ivar proximity_placement_group_id: The ID for Proximity Placement Group. :vartype proximity_placement_group_id: str :ivar kubelet_config: The Kubelet configuration on the agent pool nodes. - :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + :vartype kubelet_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :ivar linux_os_config: The OS configuration of Linux agent nodes. - :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + :vartype linux_os_config: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :ivar enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -5533,45 +5524,44 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): :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.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :ivar creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :vartype capacity_reservation_group_id: str :ivar host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :vartype host_group_id: str :ivar windows_profile: The Windows agent pool's specific profile. :vartype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :ivar network_profile: Network-related settings of an agent pool. :vartype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :ivar security_profile: The security settings of an agent pool. :vartype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :ivar gpu_profile: The GPU settings of an agent pool. - :vartype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :vartype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :ivar artifact_streaming_profile: Configuration for using artifact streaming on AKS. :vartype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :ivar virtual_machines_profile: Specifications on VirtualMachines agent pool. :vartype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :ivar status: Contains read-only information about the Agent Pool. - :vartype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :vartype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus :ivar name: Windows agent pool names must be 6 characters or less. Required. :vartype name: str """ @@ -5636,7 +5626,7 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): "windows_profile": {"key": "windowsProfile", "type": "AgentPoolWindowsProfile"}, "network_profile": {"key": "networkProfile", "type": "AgentPoolNetworkProfile"}, "security_profile": {"key": "securityProfile", "type": "AgentPoolSecurityProfile"}, - "gpu_profile": {"key": "gpuProfile", "type": "AgentPoolGPUProfile"}, + "gpu_profile": {"key": "gpuProfile", "type": "GPUProfile"}, "artifact_streaming_profile": {"key": "artifactStreamingProfile", "type": "AgentPoolArtifactStreamingProfile"}, "virtual_machines_profile": {"key": "virtualMachinesProfile", "type": "VirtualMachinesProfile"}, "virtual_machine_nodes_status": {"key": "virtualMachineNodesStatus", "type": "[VirtualMachineNodes]"}, @@ -5695,7 +5685,7 @@ def __init__( # pylint: disable=too-many-locals windows_profile: Optional["_models.AgentPoolWindowsProfile"] = None, network_profile: Optional["_models.AgentPoolNetworkProfile"] = None, security_profile: Optional["_models.AgentPoolSecurityProfile"] = None, - gpu_profile: Optional["_models.AgentPoolGPUProfile"] = None, + gpu_profile: Optional["_models.GPUProfile"] = None, artifact_streaming_profile: Optional["_models.AgentPoolArtifactStreamingProfile"] = None, virtual_machines_profile: Optional["_models.VirtualMachinesProfile"] = None, virtual_machine_nodes_status: Optional[List["_models.VirtualMachineNodes"]] = None, @@ -5722,15 +5712,15 @@ def __init__( # pylint: disable=too-many-locals `_. Known values are: "Managed" and "Ephemeral". :paramtype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSDiskType :keyword kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. Known values are: "OS" and "Temporary". :paramtype kubelet_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletDiskType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletDiskType :keyword workload_runtime: Determines the type of workload a node can run. Known values are: "OCIContainer", "WasmWasi", and "KataMshvVmIsolation". :paramtype workload_runtime: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WorkloadRuntime + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WorkloadRuntime :keyword message_of_the_day: A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be @@ -5739,27 +5729,27 @@ def __init__( # pylint: disable=too-many-locals :keyword vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype vnet_subnet_id: str :keyword pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. :paramtype pod_subnet_id: str :keyword pod_ip_allocation_mode: The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'. Known values are: "DynamicIndividual" and "StaticBlock". :paramtype pod_ip_allocation_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PodIPAllocationMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PodIPAllocationMode :keyword max_pods: The maximum number of pods that can run on a node. :paramtype max_pods: int :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :keyword os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :paramtype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :keyword max_count: The maximum number of nodes for auto-scaling. :paramtype max_count: int :keyword min_count: The minimum number of nodes for auto-scaling. @@ -5769,15 +5759,15 @@ def __init__( # pylint: disable=too-many-locals :keyword scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Known values are: "Delete" and "Deallocate". :paramtype scale_down_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleDownMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleDownMode :keyword type: The type of Agent Pool. Known values are: "VirtualMachineScaleSets", "AvailabilitySet", and "VirtualMachines". - :paramtype type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolType + :paramtype type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolType :keyword mode: A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. Known values are: "System", "User", and "Gateway". - :paramtype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolMode + :paramtype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolMode :keyword orchestrator_version: Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created @@ -5790,12 +5780,12 @@ def __init__( # pylint: disable=too-many-locals :paramtype orchestrator_version: str :keyword upgrade_settings: Settings for upgrading the agentpool. :paramtype upgrade_settings: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeSettings + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeSettings :keyword power_state: When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. - :paramtype power_state: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PowerState + :paramtype power_state: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PowerState :keyword availability_zones: The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. :paramtype availability_zones: list[str] @@ -5803,7 +5793,7 @@ def __init__( # pylint: disable=too-many-locals their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see `assigning a public IP per node - `_. # pylint: disable=line-too-long + `_. The default is false. :paramtype enable_node_public_ip: bool :keyword enable_custom_ca_trust: When set to true, AKS adds a label to the node indicating that @@ -5812,16 +5802,16 @@ def __init__( # pylint: disable=too-many-locals stores. Defaults to false. :paramtype enable_custom_ca_trust: bool :keyword node_public_ip_prefix_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. :paramtype node_public_ip_prefix_id: str :keyword scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Known values are: "Spot" and "Regular". :paramtype scale_set_priority: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetPriority + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetPriority :keyword scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Known values are: "Delete" and "Deallocate". :paramtype scale_set_eviction_policy: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleSetEvictionPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleSetEvictionPolicy :keyword spot_max_price: Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see `spot VMs pricing `_. @@ -5844,10 +5834,10 @@ def __init__( # pylint: disable=too-many-locals :paramtype proximity_placement_group_id: str :keyword kubelet_config: The Kubelet configuration on the agent pool nodes. :paramtype kubelet_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubeletConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubeletConfig :keyword linux_os_config: The OS configuration of Linux agent nodes. :paramtype linux_os_config: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LinuxOSConfig + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LinuxOSConfig :keyword enable_encryption_at_host: This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. @@ -5862,45 +5852,44 @@ def __init__( # pylint: disable=too-many-locals profile for supported GPU VM SKU. Known values are: "MIG1g", "MIG2g", "MIG3g", "MIG4g", and "MIG7g". :paramtype gpu_instance_profile: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.GPUInstanceProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUInstanceProfile :keyword creation_data: CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword capacity_reservation_group_id: AKS will associate the specified agent pool with the Capacity Reservation Group. :paramtype capacity_reservation_group_id: str :keyword host_group_id: This is of the form: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see `Azure dedicated hosts `_. :paramtype host_group_id: str :keyword windows_profile: The Windows agent pool's specific profile. :paramtype windows_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolWindowsProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolWindowsProfile :keyword network_profile: Network-related settings of an agent pool. :paramtype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolNetworkProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolNetworkProfile :keyword security_profile: The security settings of an agent pool. :paramtype security_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolSecurityProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolSecurityProfile :keyword gpu_profile: The GPU settings of an agent pool. - :paramtype gpu_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolGPUProfile + :paramtype gpu_profile: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GPUProfile :keyword artifact_streaming_profile: Configuration for using artifact streaming on AKS. :paramtype artifact_streaming_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolArtifactStreamingProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolArtifactStreamingProfile :keyword virtual_machines_profile: Specifications on VirtualMachines agent pool. :paramtype virtual_machines_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.VirtualMachinesProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.VirtualMachineNodes] + list[~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.AgentPoolGatewayProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolGatewayProfile :keyword status: Contains read-only information about the Agent Pool. - :paramtype status: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolStatus + :paramtype status: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolStatus :keyword name: Windows agent pool names must be 6 characters or less. Required. :paramtype name: str """ @@ -6076,11 +6065,11 @@ class ManagedClusterAutoUpgradeProfile(_serialization.Model): `_. Known values are: "rapid", "stable", "patch", "node-image", and "none". :vartype upgrade_channel: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UpgradeChannel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UpgradeChannel :ivar node_os_upgrade_channel: The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. Known values are: "None", "Unmanaged", "SecurityPatch", and "NodeImage". :vartype node_os_upgrade_channel: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NodeOSUpgradeChannel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeOSUpgradeChannel """ _attribute_map = { @@ -6100,12 +6089,12 @@ def __init__( channel `_. Known values are: "rapid", "stable", "patch", "node-image", and "none". :paramtype upgrade_channel: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UpgradeChannel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UpgradeChannel :keyword node_os_upgrade_channel: The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. Known values are: "None", "Unmanaged", "SecurityPatch", and "NodeImage". :paramtype node_os_upgrade_channel: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NodeOSUpgradeChannel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeOSUpgradeChannel """ super().__init__(**kwargs) self.upgrade_channel = upgrade_channel @@ -6117,18 +6106,18 @@ class ManagedClusterAzureMonitorProfile(_serialization.Model): :ivar metrics: Metrics profile for the prometheus service addon. :vartype metrics: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileMetrics + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileContainerInsights + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoring + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoring """ _attribute_map = { @@ -6151,18 +6140,18 @@ def __init__( """ :keyword metrics: Metrics profile for the prometheus service addon. :paramtype metrics: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileMetrics + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileContainerInsights + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoring + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoring """ super().__init__(**kwargs) self.metrics = metrics @@ -6180,19 +6169,19 @@ class ManagedClusterAzureMonitorProfileAppMonitoring(_serialization.Model): # p SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. :vartype auto_instrumentation: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs """ _attribute_map = { @@ -6228,19 +6217,19 @@ def __init__( SDKs to collect OpenTelemetry metrics, logs and traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. :paramtype auto_instrumentation: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs """ super().__init__(**kwargs) self.auto_instrumentation = auto_instrumentation @@ -6449,7 +6438,7 @@ class ManagedClusterAzureMonitorProfileMetrics(_serialization.Model): :ivar kube_state_metrics: Kube State Metrics for prometheus addon profile for the container service cluster. :vartype kube_state_metrics: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics """ _validation = { @@ -6474,7 +6463,7 @@ def __init__( :keyword kube_state_metrics: Kube State Metrics for prometheus addon profile for the container service cluster. :paramtype kube_state_metrics: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAzureMonitorProfileKubeStateMetrics """ super().__init__(**kwargs) self.enabled = enabled @@ -6487,7 +6476,7 @@ class ManagedClusterBootstrapProfile(_serialization.Model): :ivar artifact_source: The source where the artifacts are downloaded from. Known values are: "Cache" and "Direct". :vartype artifact_source: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ArtifactSource + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ArtifactSource :ivar container_registry_id: The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. :vartype container_registry_id: str @@ -6509,7 +6498,7 @@ def __init__( :keyword artifact_source: The source where the artifacts are downloaded from. Known values are: "Cache" and "Direct". :paramtype artifact_source: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ArtifactSource + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ArtifactSource :keyword container_registry_id: The resource Id of Azure Container Registry. The registry must have private network access, premium SKU and zone redundancy. :paramtype container_registry_id: str @@ -6598,7 +6587,7 @@ def __init__( self.http_proxy = http_proxy self.https_proxy = https_proxy self.no_proxy = no_proxy - self.effective_no_proxy = None + self.effective_no_proxy: Optional[List[str]] = None self.trusted_ca = trusted_ca @@ -6617,16 +6606,16 @@ class ManagedClusterIdentity(_serialization.Model): `_. Known values are: "SystemAssigned", "UserAssigned", and "None". :vartype type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceIdentityType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceIdentityType :ivar delegated_resources: The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only. :vartype delegated_resources: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.DelegatedResource] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.DelegatedResource] :ivar user_assigned_identities: The keys must be ARM resource IDs in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] """ _validation = { @@ -6660,20 +6649,20 @@ def __init__( `_. Known values are: "SystemAssigned", "UserAssigned", and "None". :paramtype type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceIdentityType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceIdentityType :keyword delegated_resources: The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, and managed cluster only accept one delegated identity resource. Internal use only. :paramtype delegated_resources: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.DelegatedResource] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.DelegatedResource] :keyword user_assigned_identities: The keys must be ARM resource IDs in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. # pylint: disable=line-too-long + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedServiceIdentityUserAssignedIdentitiesValue] """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type self.delegated_resources = delegated_resources self.user_assigned_identities = user_assigned_identities @@ -6684,7 +6673,7 @@ class ManagedClusterIngressProfile(_serialization.Model): :ivar web_app_routing: Web App Routing settings for the ingress profile. :vartype web_app_routing: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIngressProfileWebAppRouting + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfileWebAppRouting """ _attribute_map = { @@ -6697,7 +6686,7 @@ def __init__( """ :keyword web_app_routing: Web App Routing settings for the ingress profile. :paramtype web_app_routing: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIngressProfileWebAppRouting + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfileWebAppRouting """ super().__init__(**kwargs) self.web_app_routing = web_app_routing @@ -6709,7 +6698,7 @@ class ManagedClusterIngressProfileNginx(_serialization.Model): :ivar default_ingress_controller_type: Ingress type for the default NginxIngressController custom resource. Known values are: "AnnotationControlled", "External", "Internal", and "None". :vartype default_ingress_controller_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NginxIngressControllerType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NginxIngressControllerType """ _attribute_map = { @@ -6726,7 +6715,7 @@ def __init__( :keyword default_ingress_controller_type: Ingress type for the default NginxIngressController custom resource. Known values are: "AnnotationControlled", "External", "Internal", and "None". :paramtype default_ingress_controller_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NginxIngressControllerType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NginxIngressControllerType """ super().__init__(**kwargs) self.default_ingress_controller_type = default_ingress_controller_type @@ -6747,13 +6736,13 @@ class ManagedClusterIngressProfileWebAppRouting(_serialization.Model): # pylint :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.v2025_01_02_preview.models.ManagedClusterIngressProfileNginx + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfileNginx :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 `_ for more instructions. - :vartype identity: ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity + :vartype identity: ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity """ _validation = { @@ -6785,15 +6774,15 @@ def __init__( 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. # pylint: disable=line-too-long + https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. :paramtype nginx: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterIngressProfileNginx + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterIngressProfileNginx """ super().__init__(**kwargs) self.enabled = enabled self.dns_zone_resource_ids = dns_zone_resource_ids self.nginx = nginx - self.identity = None + self.identity: Optional["_models.UserAssignedIdentity"] = None class ManagedClusterListResult(_serialization.Model): @@ -6802,7 +6791,7 @@ class ManagedClusterListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of managed clusters. - :vartype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :ivar next_link: The URL to get the next set of managed cluster results. :vartype next_link: str """ @@ -6819,11 +6808,11 @@ class ManagedClusterListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.ManagedCluster"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of managed clusters. - :paramtype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ManagedClusterLoadBalancerProfile(_serialization.Model): @@ -6833,17 +6822,17 @@ class ManagedClusterLoadBalancerProfile(_serialization.Model): :ivar managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :vartype managed_outbound_i_ps: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs :ivar outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load balancer. :vartype outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes :ivar outbound_i_ps: Desired outbound IP resources for the cluster load balancer. :vartype outbound_i_ps: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster load balancer. :vartype effective_outbound_i_ps: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] :ivar allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. @@ -6857,11 +6846,11 @@ 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.v2025_01_02_preview.models.BackendPoolType + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ClusterServiceLoadBalancerHealthProbeMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ClusterServiceLoadBalancerHealthProbeMode """ _validation = { @@ -6909,14 +6898,14 @@ def __init__( """ :keyword managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. :paramtype managed_outbound_i_ps: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs :keyword outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load balancer. :paramtype outbound_ip_prefixes: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes :keyword outbound_i_ps: Desired outbound IP resources for the cluster load balancer. :paramtype outbound_i_ps: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterLoadBalancerProfileOutboundIPs :keyword allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports. @@ -6930,17 +6919,17 @@ 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.v2025_01_02_preview.models.BackendPoolType + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ClusterServiceLoadBalancerHealthProbeMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ClusterServiceLoadBalancerHealthProbeMode """ super().__init__(**kwargs) self.managed_outbound_i_ps = managed_outbound_i_ps self.outbound_ip_prefixes = outbound_ip_prefixes self.outbound_i_ps = outbound_i_ps - self.effective_outbound_i_ps = None + self.effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None self.allocated_outbound_ports = allocated_outbound_ports self.idle_timeout_in_minutes = idle_timeout_in_minutes self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers @@ -6992,7 +6981,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(_serialization.Model): :ivar public_ip_prefixes: A list of public IP prefix resources. :vartype public_ip_prefixes: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] """ _attribute_map = { @@ -7005,7 +6994,7 @@ def __init__( """ :keyword public_ip_prefixes: A list of public IP prefix resources. :paramtype public_ip_prefixes: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] """ super().__init__(**kwargs) self.public_ip_prefixes = public_ip_prefixes @@ -7016,7 +7005,7 @@ class ManagedClusterLoadBalancerProfileOutboundIPs(_serialization.Model): # pyl :ivar public_i_ps: A list of public IP resources. :vartype public_i_ps: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] """ _attribute_map = { @@ -7027,7 +7016,7 @@ def __init__(self, *, public_i_ps: Optional[List["_models.ResourceReference"]] = """ :keyword public_i_ps: A list of public IP resources. :paramtype public_i_ps: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] """ super().__init__(**kwargs) self.public_i_ps = public_i_ps @@ -7064,7 +7053,7 @@ class ManagedClusterMetricsProfile(_serialization.Model): :ivar cost_analysis: The cost analysis configuration for the cluster. :vartype cost_analysis: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterCostAnalysis + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterCostAnalysis """ _attribute_map = { @@ -7075,7 +7064,7 @@ def __init__(self, *, cost_analysis: Optional["_models.ManagedClusterCostAnalysi """ :keyword cost_analysis: The cost analysis configuration for the cluster. :paramtype cost_analysis: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterCostAnalysis + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterCostAnalysis """ super().__init__(**kwargs) self.cost_analysis = cost_analysis @@ -7089,10 +7078,10 @@ class ManagedClusterNATGatewayProfile(_serialization.Model): :ivar managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. :vartype managed_outbound_ip_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterManagedOutboundIPProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterManagedOutboundIPProfile :ivar effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT gateway. :vartype effective_outbound_i_ps: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ResourceReference] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ResourceReference] :ivar idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 4 minutes. :vartype idle_timeout_in_minutes: int @@ -7123,14 +7112,14 @@ def __init__( :keyword managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster NAT gateway. :paramtype managed_outbound_ip_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterManagedOutboundIPProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterManagedOutboundIPProfile :keyword idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 4 minutes. :paramtype idle_timeout_in_minutes: int """ super().__init__(**kwargs) self.managed_outbound_ip_profile = managed_outbound_ip_profile - self.effective_outbound_i_ps = None + self.effective_outbound_i_ps: Optional[List["_models.ResourceReference"]] = None self.idle_timeout_in_minutes = idle_timeout_in_minutes @@ -7140,7 +7129,7 @@ class ManagedClusterNodeProvisioningProfile(_serialization.Model): :ivar mode: Once the mode it set to Auto, it cannot be changed back to Manual. Known values are: "Manual" and "Auto". :vartype mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NodeProvisioningMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeProvisioningMode """ _attribute_map = { @@ -7152,7 +7141,7 @@ def __init__(self, *, mode: Optional[Union[str, "_models.NodeProvisioningMode"]] :keyword mode: Once the mode it set to Auto, it cannot be changed back to Manual. Known values are: "Manual" and "Auto". :paramtype mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NodeProvisioningMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeProvisioningMode """ super().__init__(**kwargs) self.mode = mode @@ -7164,7 +7153,7 @@ class ManagedClusterNodeResourceGroupProfile(_serialization.Model): :ivar restriction_level: The restriction level applied to the cluster's node resource group. Known values are: "Unrestricted" and "ReadOnly". :vartype restriction_level: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RestrictionLevel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RestrictionLevel """ _attribute_map = { @@ -7178,7 +7167,7 @@ def __init__( :keyword restriction_level: The restriction level applied to the cluster's node resource group. Known values are: "Unrestricted" and "ReadOnly". :paramtype restriction_level: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RestrictionLevel + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RestrictionLevel """ super().__init__(**kwargs) self.restriction_level = restriction_level @@ -7210,7 +7199,7 @@ def __init__(self, *, enabled: Optional[bool] = None, **kwargs: Any) -> None: :paramtype enabled: bool """ super().__init__(**kwargs) - self.issuer_url = None + self.issuer_url: Optional[str] = None self.enabled = enabled @@ -7228,14 +7217,14 @@ class ManagedClusterPodIdentity(_serialization.Model): :ivar binding_selector: The binding selector to use for the AzureIdentityBinding resource. :vartype binding_selector: str :ivar identity: The user assigned identity details. Required. - :vartype identity: ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity + :vartype identity: ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity :ivar provisioning_state: The current provisioning state of the pod identity. Known values are: "Assigned", "Canceled", "Deleting", "Failed", "Succeeded", and "Updating". :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningState + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningState :ivar provisioning_info: :vartype provisioning_info: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningInfo + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningInfo """ _validation = { @@ -7273,15 +7262,15 @@ def __init__( :paramtype binding_selector: str :keyword identity: The user assigned identity details. Required. :paramtype identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity """ super().__init__(**kwargs) self.name = name self.namespace = namespace self.binding_selector = binding_selector self.identity = identity - self.provisioning_state = None - self.provisioning_info = None + self.provisioning_state: Optional[Union[str, "_models.ManagedClusterPodIdentityProvisioningState"]] = None + self.provisioning_info: Optional["_models.ManagedClusterPodIdentityProvisioningInfo"] = None class ManagedClusterPodIdentityException(_serialization.Model): @@ -7335,15 +7324,15 @@ class ManagedClusterPodIdentityProfile(_serialization.Model): :ivar allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet network plugin with AAD Pod Identity - `_ # pylint: disable=line-too-long + `_ for more information. :vartype allow_network_plugin_kubenet: bool :ivar user_assigned_identities: The pod identities to use in the cluster. :vartype user_assigned_identities: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentity] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentity] :ivar user_assigned_identity_exceptions: The pod identity exceptions to allow. :vartype user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityException] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityException] """ _attribute_map = { @@ -7371,15 +7360,15 @@ def __init__( :keyword allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet network plugin with AAD Pod Identity - `_ # pylint: disable=line-too-long + `_ for more information. :paramtype allow_network_plugin_kubenet: bool :keyword user_assigned_identities: The pod identities to use in the cluster. :paramtype user_assigned_identities: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentity] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentity] :keyword user_assigned_identity_exceptions: The pod identity exceptions to allow. :paramtype user_assigned_identity_exceptions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityException] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityException] """ super().__init__(**kwargs) self.enabled = enabled @@ -7393,7 +7382,7 @@ class ManagedClusterPodIdentityProvisioningError(_serialization.Model): # pylin :ivar error: Details about the error. :vartype error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody """ _attribute_map = { @@ -7406,7 +7395,7 @@ def __init__( """ :keyword error: Details about the error. :paramtype error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody """ super().__init__(**kwargs) self.error = error @@ -7426,7 +7415,7 @@ class ManagedClusterPodIdentityProvisioningErrorBody(_serialization.Model): # p :vartype target: str :ivar details: A list of additional details about the error. :vartype details: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] """ _attribute_map = { @@ -7457,7 +7446,7 @@ def __init__( :paramtype target: str :keyword details: A list of additional details about the error. :paramtype details: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningErrorBody] """ super().__init__(**kwargs) self.code = code @@ -7471,7 +7460,7 @@ class ManagedClusterPodIdentityProvisioningInfo(_serialization.Model): # pylint :ivar error: Pod identity assignment error (if any). :vartype error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningError + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningError """ _attribute_map = { @@ -7484,7 +7473,7 @@ def __init__( """ :keyword error: Pod identity assignment error (if any). :paramtype error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPodIdentityProvisioningError + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPodIdentityProvisioningError """ super().__init__(**kwargs) self.error = error @@ -7501,13 +7490,13 @@ class ManagedClusterPoolUpgradeProfile(_serialization.Model): :vartype name: str :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar upgrades: List of orchestrator types and versions available for upgrade. :vartype upgrades: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] :ivar components_by_releases: List of components grouped by kubernetes major.minor version. :vartype components_by_releases: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ComponentsByRelease] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ComponentsByRelease] """ _validation = { @@ -7540,13 +7529,13 @@ def __init__( :paramtype name: str :keyword os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :paramtype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :keyword upgrades: List of orchestrator types and versions available for upgrade. :paramtype upgrades: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfileUpgradesItem] :keyword components_by_releases: List of components grouped by kubernetes major.minor version. :paramtype components_by_releases: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ComponentsByRelease] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ComponentsByRelease] """ super().__init__(**kwargs) self.kubernetes_version = kubernetes_version @@ -7615,7 +7604,7 @@ class ManagedClusterPropertiesAutoScalerProfile(_serialization.Model): # pylint :vartype ignore_daemonsets_utilization: bool :ivar expander: Available values are: 'least-waste', 'most-pods', 'priority', 'random'. Known values are: "least-waste", "most-pods", "priority", and "random". - :vartype expander: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Expander + :vartype expander: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Expander :ivar max_empty_bulk_delete: The default is 10. :vartype max_empty_bulk_delete: str :ivar max_graceful_termination_sec: The default is 600. @@ -7723,7 +7712,7 @@ def __init__( :paramtype ignore_daemonsets_utilization: bool :keyword expander: Available values are: 'least-waste', 'most-pods', 'priority', 'random'. Known values are: "least-waste", "most-pods", "priority", and "random". - :paramtype expander: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Expander + :paramtype expander: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Expander :keyword max_empty_bulk_delete: The default is 10. :paramtype max_empty_bulk_delete: str :keyword max_graceful_termination_sec: The default is 600. @@ -7796,12 +7785,12 @@ class ManagedClusterPropertiesForSnapshot(_serialization.Model): :ivar kubernetes_version: The current kubernetes version. :vartype kubernetes_version: str :ivar sku: The current managed cluster sku. - :vartype sku: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKU + :vartype sku: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKU :ivar enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. :vartype enable_rbac: bool :ivar network_profile: The current network profile. :vartype network_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkProfileForSnapshot + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkProfileForSnapshot """ _validation = { @@ -7827,7 +7816,7 @@ def __init__( :keyword kubernetes_version: The current kubernetes version. :paramtype kubernetes_version: str :keyword sku: The current managed cluster sku. - :paramtype sku: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKU + :paramtype sku: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKU :keyword enable_rbac: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. :paramtype enable_rbac: bool @@ -7836,7 +7825,7 @@ def __init__( self.kubernetes_version = kubernetes_version self.sku = sku self.enable_rbac = enable_rbac - self.network_profile = None + self.network_profile: Optional["_models.NetworkProfileForSnapshot"] = None class ManagedClusterSecurityProfile(_serialization.Model): @@ -7844,31 +7833,31 @@ class ManagedClusterSecurityProfile(_serialization.Model): :ivar defender: Microsoft Defender settings for the security profile. :vartype defender: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefender + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileDefender :ivar azure_key_vault_kms: Azure Key Vault `key management service `_ settings for the security profile. :vartype azure_key_vault_kms: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AzureKeyVaultKms + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AzureKeyVaultKms :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. :vartype workload_identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity :ivar image_cleaner: Image Cleaner settings for the security profile. :vartype image_cleaner: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileImageCleaner + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterSecurityProfileImageIntegrity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileImageIntegrity :ivar node_restriction: `Node Restriction `_ settings for the security profile. :vartype node_restriction: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileNodeRestriction + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileNodeRestriction :ivar custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. @@ -7904,31 +7893,31 @@ def __init__( """ :keyword defender: Microsoft Defender settings for the security profile. :paramtype defender: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefender + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileDefender :keyword azure_key_vault_kms: Azure Key Vault `key management service `_ settings for the security profile. :paramtype azure_key_vault_kms: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AzureKeyVaultKms + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AzureKeyVaultKms :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. :paramtype workload_identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileWorkloadIdentity :keyword image_cleaner: Image Cleaner settings for the security profile. :paramtype image_cleaner: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileImageCleaner + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterSecurityProfileImageIntegrity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileImageIntegrity :keyword node_restriction: `Node Restriction `_ settings for the security profile. :paramtype node_restriction: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileNodeRestriction + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileNodeRestriction :keyword custom_ca_trust_certificates: A list of up to 10 base64 encoded CAs that will be added to the trust store on all nodes in the cluster. For more information see `Custom CA Trust Certificates `_. @@ -7955,13 +7944,13 @@ class ManagedClusterSecurityProfileDefender(_serialization.Model): :ivar security_monitoring: Microsoft Defender threat detection for Cloud settings for the security profile. :vartype security_monitoring: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGating + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGating """ _attribute_map = { @@ -7990,13 +7979,13 @@ def __init__( :keyword security_monitoring: Microsoft Defender threat detection for Cloud settings for the security profile. :paramtype security_monitoring: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGating + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGating """ super().__init__(**kwargs) self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id @@ -8018,7 +8007,7 @@ class ManagedClusterSecurityProfileDefenderSecurityGating(_serialization.Model): pull container images. Each identity provided should have federated identity credential attached to it. :vartype identities: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem] # pylint: disable=line-too-long + list[~azure.mgmt.containerservice.v2025_03_02_preview.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 @@ -8054,7 +8043,7 @@ def __init__( to pull container images. Each identity provided should have federated identity credential attached to it. :paramtype identities: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem] # pylint: disable=line-too-long + list[~azure.mgmt.containerservice.v2025_03_02_preview.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 @@ -8077,7 +8066,7 @@ class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem( 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.v2025_01_02_preview.models.UserAssignedIdentity + :vartype identity: ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity """ _attribute_map = { @@ -8098,7 +8087,7 @@ def __init__( :paramtype azure_container_registry: str :keyword identity: The identity object used to access the registry. :paramtype identity: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.UserAssignedIdentity + ~azure.mgmt.containerservice.v2025_03_02_preview.models.UserAssignedIdentity """ super().__init__(**kwargs) self.azure_container_registry = azure_container_registry @@ -8250,12 +8239,12 @@ class ManagedClusterSKU(_serialization.Model): :ivar name: The name of a managed cluster SKU. Known values are: "Base" and "Automatic". :vartype name: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKUName + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKUName :ivar tier: If not specified, the default is 'Free'. See `AKS Pricing Tier `_ for more details. Known values are: "Premium", "Standard", and "Free". :vartype tier: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKUTier + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKUTier """ _attribute_map = { @@ -8273,12 +8262,12 @@ def __init__( """ :keyword name: The name of a managed cluster SKU. Known values are: "Base" and "Automatic". :paramtype name: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKUName + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKUName :keyword tier: If not specified, the default is 'Free'. See `AKS Pricing Tier `_ for more details. Known values are: "Premium", "Standard", and "Free". :paramtype tier: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSKUTier + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSKUTier """ super().__init__(**kwargs) self.name = name @@ -8293,7 +8282,7 @@ class ManagedClusterSnapshot(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8302,22 +8291,22 @@ class ManagedClusterSnapshot(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar creation_data: CreationData to be used to specify the source resource ID to create this snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: "NodePool" and "ManagedCluster". :vartype snapshot_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SnapshotType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SnapshotType :ivar managed_cluster_properties_read_only: What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. :vartype managed_cluster_properties_read_only: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPropertiesForSnapshot + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPropertiesForSnapshot """ _validation = { @@ -8360,16 +8349,16 @@ def __init__( :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.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: "NodePool" and "ManagedCluster". :paramtype snapshot_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SnapshotType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SnapshotType """ super().__init__(tags=tags, location=location, **kwargs) self.creation_data = creation_data self.snapshot_type = snapshot_type - self.managed_cluster_properties_read_only = None + self.managed_cluster_properties_read_only: Optional["_models.ManagedClusterPropertiesForSnapshot"] = None class ManagedClusterSnapshotListResult(_serialization.Model): @@ -8379,7 +8368,7 @@ class ManagedClusterSnapshotListResult(_serialization.Model): :ivar value: The list of managed cluster snapshots. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot] :ivar next_link: The URL to get the next set of managed cluster snapshot results. :vartype next_link: str """ @@ -8397,11 +8386,11 @@ def __init__(self, *, value: Optional[List["_models.ManagedClusterSnapshot"]] = """ :keyword value: The list of managed cluster snapshots. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class ManagedClusterStaticEgressGatewayProfile(_serialization.Model): @@ -8432,7 +8421,7 @@ class ManagedClusterStatus(_serialization.Model): :ivar provisioning_error: Preserves the detailed info of failure. If there was no error, this field is omitted. :vartype provisioning_error: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CloudErrorBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CloudErrorBody """ _validation = { @@ -8446,7 +8435,7 @@ class ManagedClusterStatus(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.provisioning_error = None + self.provisioning_error: Optional["_models.CloudErrorBody"] = None class ManagedClusterStorageProfile(_serialization.Model): @@ -8454,16 +8443,16 @@ class ManagedClusterStorageProfile(_serialization.Model): :ivar disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :vartype disk_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver :ivar file_csi_driver: AzureFile CSI Driver settings for the storage profile. :vartype file_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileFileCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileFileCSIDriver :ivar snapshot_controller: Snapshot Controller settings for the storage profile. :vartype snapshot_controller: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileSnapshotController + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileSnapshotController :ivar blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. :vartype blob_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver """ _attribute_map = { @@ -8485,16 +8474,16 @@ def __init__( """ :keyword disk_csi_driver: AzureDisk CSI Driver settings for the storage profile. :paramtype disk_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileDiskCSIDriver :keyword file_csi_driver: AzureFile CSI Driver settings for the storage profile. :paramtype file_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileFileCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileFileCSIDriver :keyword snapshot_controller: Snapshot Controller settings for the storage profile. :paramtype snapshot_controller: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileSnapshotController + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileSnapshotController :keyword blob_csi_driver: AzureBlob CSI Driver settings for the storage profile. :paramtype blob_csi_driver: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterStorageProfileBlobCSIDriver """ super().__init__(**kwargs) self.disk_csi_driver = disk_csi_driver @@ -8605,10 +8594,10 @@ class ManagedClusterUpgradeProfile(_serialization.Model): :ivar control_plane_profile: The list of available upgrade versions for the control plane. Required. :vartype control_plane_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfile :ivar agent_pool_profiles: The list of available upgrade versions for agent pools. Required. :vartype agent_pool_profiles: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfile] """ _validation = { @@ -8638,15 +8627,15 @@ def __init__( :keyword control_plane_profile: The list of available upgrade versions for the control plane. Required. :paramtype control_plane_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfile :keyword agent_pool_profiles: The list of available upgrade versions for agent pools. Required. :paramtype agent_pool_profiles: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterPoolUpgradeProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterPoolUpgradeProfile] """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None self.control_plane_profile = control_plane_profile self.agent_pool_profiles = agent_pool_profiles @@ -8676,13 +8665,13 @@ class ManagedClusterWindowsProfile(_serialization.Model): `_ for more details. Known values are: "None" and "Windows_Server". :vartype license_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LicenseType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LicenseType :ivar enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo `_. :vartype enable_csi_proxy: bool :ivar gmsa_profile: The Windows gMSA Profile in the Managed Cluster. :vartype gmsa_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WindowsGmsaProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WindowsGmsaProfile """ _validation = { @@ -8728,13 +8717,13 @@ def __init__( `_ for more details. Known values are: "None" and "Windows_Server". :paramtype license_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LicenseType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LicenseType :keyword enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo `_. :paramtype enable_csi_proxy: bool :keyword gmsa_profile: The Windows gMSA Profile in the Managed Cluster. :paramtype gmsa_profile: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.WindowsGmsaProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.WindowsGmsaProfile """ super().__init__(**kwargs) self.admin_username = admin_username @@ -8750,10 +8739,10 @@ class ManagedClusterWorkloadAutoScalerProfile(_serialization.Model): :ivar keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. :vartype keda: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda :ivar vertical_pod_autoscaler: :vartype vertical_pod_autoscaler: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler """ _attribute_map = { @@ -8777,10 +8766,10 @@ def __init__( :keyword keda: KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. :paramtype keda: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfileKeda :keyword vertical_pod_autoscaler: :paramtype vertical_pod_autoscaler: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler # pylint: disable=line-too-long + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler """ super().__init__(**kwargs) self.keda = keda @@ -8825,7 +8814,7 @@ class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler( :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.v2025_01_02_preview.models.AddonAutoscaling + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AddonAutoscaling """ _validation = { @@ -8850,7 +8839,7 @@ def __init__( :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.v2025_01_02_preview.models.AddonAutoscaling + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AddonAutoscaling """ super().__init__(**kwargs) self.enabled = enabled @@ -8881,76 +8870,36 @@ class ManagedServiceIdentityUserAssignedIdentitiesValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.principal_id = None - self.client_id = None + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = None class ManualScaleProfile(_serialization.Model): """Specifications on number of machines. - :ivar sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', - 'Standard_D16s_v5']. AKS will use the first available one when scaling. If a VM size is - unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. - :vartype sizes: list[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 - :ivar os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every machine - in the master/agent pool. If you specify 0, it will apply the default osDisk size according to - the vmSize specified. - :vartype os_disk_size_gb: int - :ivar os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk - larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - after creation. For more information see `Ephemeral OS - `_. Known values are: - "Managed" and "Ephemeral". - :vartype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType """ - _validation = { - "os_disk_size_gb": {"maximum": 2048, "minimum": 0}, - } - _attribute_map = { - "sizes": {"key": "sizes", "type": "[str]"}, + "size": {"key": "size", "type": "str"}, "count": {"key": "count", "type": "int"}, - "os_disk_size_gb": {"key": "osDiskSizeGB", "type": "int"}, - "os_disk_type": {"key": "osDiskType", "type": "str"}, } - def __init__( - self, - *, - sizes: Optional[List[str]] = None, - count: Optional[int] = None, - os_disk_size_gb: Optional[int] = None, - os_disk_type: Optional[Union[str, "_models.OSDiskType"]] = None, - **kwargs: Any - ) -> None: + def __init__(self, *, size: Optional[str] = None, count: Optional[int] = None, **kwargs: Any) -> None: """ - :keyword sizes: The list of allowed vm sizes e.g. ['Standard_E4s_v3', 'Standard_E16s_v3', - 'Standard_D16s_v5']. AKS will use the first available one when scaling. If a VM size is - unavailable (e.g. due to quota or regional capacity reasons), AKS will use the next size. - :paramtype sizes: list[str] + :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 - :keyword os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every - machine in the master/agent pool. If you specify 0, it will apply the default osDisk size - according to the vmSize specified. - :paramtype os_disk_size_gb: int - :keyword os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk - larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed - after creation. For more information see `Ephemeral OS - `_. Known values are: - "Managed" and "Ephemeral". - :paramtype os_disk_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSDiskType """ super().__init__(**kwargs) - self.sizes = sizes + self.size = size self.count = count - self.os_disk_size_gb = os_disk_size_gb - self.os_disk_type = os_disk_type class MeshRevision(_serialization.Model): @@ -8963,7 +8912,7 @@ class MeshRevision(_serialization.Model): :ivar compatible_with: List of items this revision of service mesh is compatible with, and their associated versions. :vartype compatible_with: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CompatibleVersions] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CompatibleVersions] """ _attribute_map = { @@ -8988,7 +8937,7 @@ def __init__( :keyword compatible_with: List of items this revision of service mesh is compatible with, and their associated versions. :paramtype compatible_with: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CompatibleVersions] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CompatibleVersions] """ super().__init__(**kwargs) self.revision = revision @@ -9002,7 +8951,7 @@ class MeshRevisionProfile(ProxyResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9011,10 +8960,10 @@ class MeshRevisionProfile(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar properties: Mesh revision profile properties for a mesh. :vartype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfileProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfileProperties """ _validation = { @@ -9036,7 +8985,7 @@ def __init__(self, *, properties: Optional["_models.MeshRevisionProfilePropertie """ :keyword properties: Mesh revision profile properties for a mesh. :paramtype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfileProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfileProperties """ super().__init__(**kwargs) self.properties = properties @@ -9049,7 +8998,7 @@ class MeshRevisionProfileList(_serialization.Model): :ivar value: Array of service mesh add-on revision profiles for all supported mesh modes. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfile] :ivar next_link: The URL to get the next set of mesh revision profile. :vartype next_link: str """ @@ -9067,11 +9016,11 @@ def __init__(self, *, value: Optional[List["_models.MeshRevisionProfile"]] = Non """ :keyword value: Array of service mesh add-on revision profiles for all supported mesh modes. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfile] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MeshRevisionProfileProperties(_serialization.Model): @@ -9079,7 +9028,7 @@ class MeshRevisionProfileProperties(_serialization.Model): :ivar mesh_revisions: :vartype mesh_revisions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevision] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevision] """ _attribute_map = { @@ -9090,7 +9039,7 @@ def __init__(self, *, mesh_revisions: Optional[List["_models.MeshRevision"]] = N """ :keyword mesh_revisions: :paramtype mesh_revisions: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevision] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevision] """ super().__init__(**kwargs) self.mesh_revisions = mesh_revisions @@ -9102,7 +9051,7 @@ class MeshUpgradeProfile(ProxyResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9111,10 +9060,10 @@ class MeshUpgradeProfile(ProxyResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar properties: Mesh upgrade profile properties for a major.minor release. :vartype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfileProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfileProperties """ _validation = { @@ -9136,7 +9085,7 @@ def __init__(self, *, properties: Optional["_models.MeshUpgradeProfileProperties """ :keyword properties: Mesh upgrade profile properties for a major.minor release. :paramtype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfileProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfileProperties """ super().__init__(**kwargs) self.properties = properties @@ -9149,7 +9098,7 @@ class MeshUpgradeProfileList(_serialization.Model): :ivar value: Array of supported service mesh add-on upgrade profiles. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile] :ivar next_link: The URL to get the next set of mesh upgrade profile. :vartype next_link: str """ @@ -9167,11 +9116,11 @@ def __init__(self, *, value: Optional[List["_models.MeshUpgradeProfile"]] = None """ :keyword value: Array of supported service mesh add-on upgrade profiles. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class MeshUpgradeProfileProperties(MeshRevision): @@ -9184,9 +9133,235 @@ class MeshUpgradeProfileProperties(MeshRevision): :ivar compatible_with: List of items this revision of service mesh is compatible with, and their associated versions. :vartype compatible_with: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.CompatibleVersions] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.CompatibleVersions] + """ + + +class Namespace(SubResource): + """Namespace managed by ARM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData + :ivar tags: The tags to be persisted on the managed cluster namespace. + :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 location: The location of the namespace. + :vartype location: str + :ivar properties: Properties of a namespace. + :vartype properties: + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NamespaceProperties """ + _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"}, + "tags": {"key": "tags", "type": "{str}"}, + "e_tag": {"key": "eTag", "type": "str"}, + "location": {"key": "location", "type": "str"}, + "properties": {"key": "properties", "type": "NamespaceProperties"}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + location: Optional[str] = None, + properties: Optional["_models.NamespaceProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword tags: The tags to be persisted on the managed cluster namespace. + :paramtype tags: dict[str, str] + :keyword location: The location of the namespace. + :paramtype location: str + :keyword properties: Properties of a namespace. + :paramtype properties: + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NamespaceProperties + """ + super().__init__(**kwargs) + self.system_data: Optional["_models.SystemData"] = None + self.tags = tags + self.e_tag: Optional[str] = None + self.location = location + self.properties = properties + + +class NamespaceListResult(_serialization.Model): + """The result of a request to list namespaces in a managed cluster. + + :ivar value: The list of namespaces. + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :ivar next_link: The URI to fetch the next page of results, if any. + :vartype next_link: str + """ + + _attribute_map = { + "value": {"key": "value", "type": "[Namespace]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__( + self, *, value: Optional[List["_models.Namespace"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: + """ + :keyword value: The list of namespaces. + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :keyword next_link: The URI to fetch the next page of results, if any. + :paramtype next_link: str + """ + super().__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NamespaceProperties(_serialization.Model): + """Properties of a namespace managed by ARM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: The current provisioning state of the namespace. Known values are: + "Updating", "Deleting", "Creating", "Succeeded", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NamespaceProvisioningState + :ivar labels: The labels of managed namespace. + :vartype labels: dict[str, str] + :ivar annotations: The annotations of managed namespace. + :vartype annotations: dict[str, str] + :ivar default_resource_quota: The default resource quota enforced upon the namespace. Customers + can have other Kubernetes resource quota objects under the namespace. All the resource quotas + will be enforced. + :vartype default_resource_quota: + ~azure.mgmt.containerservice.v2025_03_02_preview.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. All the network policies + will be enforced. + :vartype default_network_policy: + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_03_02_preview.models.AdoptionPolicy + :ivar delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". + :vartype delete_policy: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.DeletePolicy + """ + + _validation = { + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "labels": {"key": "labels", "type": "{str}"}, + "annotations": {"key": "annotations", "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. All the + resource quotas will be enforced. + :paramtype default_resource_quota: + ~azure.mgmt.containerservice.v2025_03_02_preview.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. All the network + policies will be enforced. + :paramtype default_network_policy: + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_03_02_preview.models.AdoptionPolicy + :keyword delete_policy: Delete options of a namespace. Known values are: "Keep" and "Delete". + :paramtype delete_policy: str or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.DeletePolicy + """ + super().__init__(**kwargs) + self.provisioning_state: Optional[Union[str, "_models.NamespaceProvisioningState"]] = None + self.labels = labels + self.annotations = annotations + 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.v2025_03_02_preview.models.PolicyRule + :ivar egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :vartype egress: str or ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_03_02_preview.models.PolicyRule + :keyword egress: Egress policy for the network. Known values are: "DenyAll", "AllowAll", and + "AllowSameNamespace". + :paramtype egress: str or ~azure.mgmt.containerservice.v2025_03_02_preview.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. @@ -9194,22 +9369,22 @@ class NetworkProfileForSnapshot(_serialization.Model): :ivar network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". :vartype network_plugin: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPlugin + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPlugin :ivar network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "overlay" :vartype network_plugin_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPluginMode + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.NetworkPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPolicy :ivar network_mode: networkMode for managed cluster snapshot. Known values are: "transparent" and "bridge". :vartype network_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkMode :ivar load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: "standard" and "basic". :vartype load_balancer_sku: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancerSku + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancerSku """ _attribute_map = { @@ -9234,22 +9409,22 @@ def __init__( :keyword network_plugin: networkPlugin for managed cluster snapshot. Known values are: "azure", "kubenet", and "none". :paramtype network_plugin: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPlugin + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPlugin :keyword network_plugin_mode: NetworkPluginMode for managed cluster snapshot. "overlay" :paramtype network_plugin_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkPluginMode + ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.NetworkPolicy + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkPolicy :keyword network_mode: networkMode for managed cluster snapshot. Known values are: "transparent" and "bridge". :paramtype network_mode: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.NetworkMode + ~azure.mgmt.containerservice.v2025_03_02_preview.models.NetworkMode :keyword load_balancer_sku: loadBalancerSku for managed cluster snapshot. Known values are: "standard" and "basic". :paramtype load_balancer_sku: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancerSku + ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancerSku """ super().__init__(**kwargs) self.network_plugin = network_plugin @@ -9315,7 +9490,7 @@ class NodeImageVersionsListResult(_serialization.Model): 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.v2025_01_02_preview.models.NodeImageVersion] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeImageVersion] :ivar next_link: The URL to get the next set of machine results. :vartype next_link: str """ @@ -9333,11 +9508,11 @@ def __init__(self, *, value: Optional[List["_models.NodeImageVersion"]] = None, """ :keyword value: Array of AKS Node Image versions. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.NodeImageVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.NodeImageVersion] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class OperationListResult(_serialization.Model): @@ -9346,7 +9521,7 @@ class OperationListResult(_serialization.Model): 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.v2025_01_02_preview.models.OperationValue] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationValue] """ _validation = { @@ -9360,7 +9535,7 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.OperationValue"]] = None class OperationStatusResult(_serialization.Model): @@ -9387,9 +9562,9 @@ class OperationStatusResult(_serialization.Model): :vartype end_time: ~datetime.datetime :ivar operations: The operations list. :vartype operations: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationStatusResult] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult] :ivar error: If present, details of the operation error. - :vartype error: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorDetail """ _validation = { @@ -9438,13 +9613,13 @@ def __init__( :paramtype end_time: ~datetime.datetime :keyword operations: The operations list. :paramtype operations: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationStatusResult] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult] :keyword error: If present, details of the operation error. - :paramtype error: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ErrorDetail """ super().__init__(**kwargs) self.id = id - self.resource_id = None + self.resource_id: Optional[str] = None self.name = name self.status = status self.percent_complete = percent_complete @@ -9461,7 +9636,7 @@ class OperationStatusResultList(_serialization.Model): :ivar value: List of operations. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationStatusResult] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult] :ivar next_link: URL to get the next set of operation list results (if there are any). :vartype next_link: str """ @@ -9479,8 +9654,8 @@ class OperationStatusResultList(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.OperationStatusResult"]] = None + self.next_link: Optional[str] = None class OperationValue(_serialization.Model): @@ -9523,12 +9698,12 @@ class OperationValue(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.origin = None - self.name = None - self.operation = None - self.resource = None - self.description = None - self.provider = None + self.origin: Optional[str] = None + self.name: Optional[str] = None + self.operation: Optional[str] = None + self.resource: Optional[str] = None + self.description: Optional[str] = None + self.provider: Optional[str] = None class OutboundEnvironmentEndpoint(_serialization.Model): @@ -9539,7 +9714,7 @@ class OutboundEnvironmentEndpoint(_serialization.Model): :vartype category: str :ivar endpoints: The endpoints that AKS agent nodes connect to. :vartype endpoints: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.EndpointDependency] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.EndpointDependency] """ _attribute_map = { @@ -9560,7 +9735,7 @@ def __init__( :paramtype category: str :keyword endpoints: The endpoints that AKS agent nodes connect to. :paramtype endpoints: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.EndpointDependency] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.EndpointDependency] """ super().__init__(**kwargs) self.category = category @@ -9576,7 +9751,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): :ivar value: Collection of resources. Required. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundEnvironmentEndpoint] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundEnvironmentEndpoint] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -9595,11 +9770,11 @@ def __init__(self, *, value: List["_models.OutboundEnvironmentEndpoint"], **kwar """ :keyword value: Collection of resources. Required. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundEnvironmentEndpoint] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundEnvironmentEndpoint] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class PortRange(_serialization.Model): @@ -9612,7 +9787,7 @@ class PortRange(_serialization.Model): 65535, and be greater than or equal to portStart. :vartype port_end: int :ivar protocol: The network protocol of the port. Known values are: "TCP" and "UDP". - :vartype protocol: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Protocol + :vartype protocol: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Protocol """ _validation = { @@ -9642,7 +9817,7 @@ def __init__( to 65535, and be greater than or equal to portStart. :paramtype port_end: int :keyword protocol: The network protocol of the port. Known values are: "TCP" and "UDP". - :paramtype protocol: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Protocol + :paramtype protocol: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Protocol """ super().__init__(**kwargs) self.port_start = port_start @@ -9655,7 +9830,7 @@ class PowerState(_serialization.Model): :ivar code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". - :vartype code: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Code + :vartype code: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Code """ _attribute_map = { @@ -9666,7 +9841,7 @@ def __init__(self, *, code: Optional[Union[str, "_models.Code"]] = None, **kwarg """ :keyword code: Tells whether the cluster is Running or Stopped. Known values are: "Running" and "Stopped". - :paramtype code: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Code + :paramtype code: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Code """ super().__init__(**kwargs) self.code = code @@ -9706,14 +9881,14 @@ class PrivateEndpointConnection(_serialization.Model): :ivar provisioning_state: The current provisioning state. Known values are: "Canceled", "Creating", "Deleting", "Failed", and "Succeeded". :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnectionProvisioningState + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnectionProvisioningState :ivar private_endpoint: The resource of private endpoint. :vartype private_endpoint: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpoint + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpoint :ivar private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :vartype private_link_service_connection_state: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkServiceConnectionState + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkServiceConnectionState """ _validation = { @@ -9745,17 +9920,17 @@ def __init__( """ :keyword private_endpoint: The resource of private endpoint. :paramtype private_endpoint: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpoint + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpoint :keyword private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :paramtype private_link_service_connection_state: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkServiceConnectionState + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkServiceConnectionState """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.provisioning_state = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.PrivateEndpointConnectionProvisioningState"]] = None self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state @@ -9765,7 +9940,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): :ivar value: The collection value. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection] """ _attribute_map = { @@ -9776,7 +9951,7 @@ def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] """ :keyword value: The collection value. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection] """ super().__init__(**kwargs) self.value = value @@ -9843,7 +10018,7 @@ def __init__( self.type = type self.group_id = group_id self.required_members = required_members - self.private_link_service_id = None + self.private_link_service_id: Optional[str] = None class PrivateLinkResourcesListResult(_serialization.Model): @@ -9851,7 +10026,7 @@ class PrivateLinkResourcesListResult(_serialization.Model): :ivar value: The collection value. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource] """ _attribute_map = { @@ -9862,7 +10037,7 @@ def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = Non """ :keyword value: The collection value. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource] """ super().__init__(**kwargs) self.value = value @@ -9874,7 +10049,7 @@ class PrivateLinkServiceConnectionState(_serialization.Model): :ivar status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". :vartype status: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ConnectionStatus + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ConnectionStatus :ivar description: The private link service connection description. :vartype description: str """ @@ -9895,7 +10070,7 @@ def __init__( :keyword status: The private link service connection status. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". :paramtype status: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ConnectionStatus + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ConnectionStatus :keyword description: The private link service connection description. :paramtype description: str """ @@ -9937,10 +10112,10 @@ class RelativeMonthlySchedule(_serialization.Model): :ivar week_index: Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. Required. Known values are: "First", "Second", "Third", "Fourth", and "Last". - :vartype week_index: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Type + :vartype week_index: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Type :ivar day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :vartype day_of_week: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :vartype day_of_week: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay """ _validation = { @@ -9970,11 +10145,11 @@ def __init__( :keyword week_index: Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. Required. Known values are: "First", "Second", "Third", "Fourth", and "Last". - :paramtype week_index: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Type + :paramtype week_index: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Type :keyword day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay """ super().__init__(**kwargs) self.interval_months = interval_months @@ -9982,6 +10157,75 @@ def __init__( self.day_of_week = day_of_week +class ResourceQuota(_serialization.Model): + """Resource quota for the namespace. + + :ivar cpu_request: CPU request of the namespace in one-thousandth CPU form. See `CPU resource + units + `_ + for more details. + :vartype cpu_request: str + :ivar cpu_limit: CPU limit of the namespace in one-thousandth CPU form. See `CPU resource units + `_ + for more details. + :vartype cpu_limit: str + :ivar memory_request: Memory request of the namespace in the power-of-two equivalents form: Ei, + Pi, Ti, Gi, Mi, Ki. See `Memory resource units + `_ + for more details. + :vartype memory_request: str + :ivar memory_limit: Memory limit of the namespace in the power-of-two equivalents form: Ei, Pi, + Ti, Gi, Mi, Ki. See `Memory resource units + `_ + for more details. + :vartype memory_limit: str + """ + + _attribute_map = { + "cpu_request": {"key": "cpuRequest", "type": "str"}, + "cpu_limit": {"key": "cpuLimit", "type": "str"}, + "memory_request": {"key": "memoryRequest", "type": "str"}, + "memory_limit": {"key": "memoryLimit", "type": "str"}, + } + + def __init__( + self, + *, + cpu_request: Optional[str] = None, + cpu_limit: Optional[str] = None, + memory_request: Optional[str] = None, + memory_limit: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword cpu_request: CPU request of the namespace in one-thousandth CPU form. See `CPU + resource units + `_ + for more details. + :paramtype cpu_request: str + :keyword cpu_limit: CPU limit of the namespace in one-thousandth CPU form. See `CPU resource + units + `_ + for more details. + :paramtype cpu_limit: str + :keyword memory_request: Memory request of the namespace in the power-of-two equivalents form: + Ei, Pi, Ti, Gi, Mi, Ki. See `Memory resource units + `_ + for more details. + :paramtype memory_request: str + :keyword memory_limit: Memory limit of the namespace in the power-of-two equivalents form: Ei, + Pi, Ti, Gi, Mi, Ki. See `Memory resource units + `_ + for more details. + :paramtype memory_limit: str + """ + super().__init__(**kwargs) + self.cpu_request = cpu_request + self.cpu_limit = cpu_limit + self.memory_request = memory_request + self.memory_limit = memory_limit + + class ResourceReference(_serialization.Model): """A reference to an Azure resource. @@ -10086,13 +10330,13 @@ class RunCommandResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.provisioning_state = None - self.exit_code = None - self.started_at = None - self.finished_at = None - self.logs = None - self.reason = None + self.id: Optional[str] = None + self.provisioning_state: Optional[str] = None + self.exit_code: Optional[int] = None + self.started_at: Optional[datetime.datetime] = None + self.finished_at: Optional[datetime.datetime] = None + self.logs: Optional[str] = None + self.reason: Optional[str] = None class SafeguardsAvailableVersion(Resource): @@ -10103,7 +10347,7 @@ class SafeguardsAvailableVersion(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10112,10 +10356,10 @@ class SafeguardsAvailableVersion(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar properties: Whether the version is default or not and support info. Required. :vartype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersionsProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersionsProperties """ _validation = { @@ -10138,7 +10382,7 @@ def __init__(self, *, properties: "_models.SafeguardsAvailableVersionsProperties """ :keyword properties: Whether the version is default or not and support info. Required. :paramtype properties: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersionsProperties + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersionsProperties """ super().__init__(**kwargs) self.properties = properties @@ -10151,7 +10395,7 @@ class SafeguardsAvailableVersionsList(_serialization.Model): :ivar value: Array of AKS supported Safeguards versions. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersion] :ivar next_link: The URL to get the next Safeguards available version. :vartype next_link: str """ @@ -10169,11 +10413,11 @@ def __init__(self, *, value: Optional[List["_models.SafeguardsAvailableVersion"] """ :keyword value: Array of AKS supported Safeguards versions. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersion] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class SafeguardsAvailableVersionsProperties(_serialization.Model): @@ -10186,7 +10430,7 @@ class SafeguardsAvailableVersionsProperties(_serialization.Model): :ivar support: Whether the version is preview or stable. Known values are: "Preview" and "Stable". :vartype support: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsSupport + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsSupport """ _validation = { @@ -10202,8 +10446,8 @@ class SafeguardsAvailableVersionsProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.is_default_version = None - self.support = None + self.is_default_version: Optional[bool] = None + self.support: Optional[Union[str, "_models.SafeguardsSupport"]] = None class SafeguardsProfile(_serialization.Model): @@ -10221,7 +10465,7 @@ class SafeguardsProfile(_serialization.Model): :ivar level: The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces. Required. Known values are: "Off", "Warning", and "Enforcement". - :vartype level: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Level + :vartype level: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Level :ivar excluded_namespaces: List of namespaces excluded from Safeguards checks. :vartype excluded_namespaces: list[str] """ @@ -10252,12 +10496,12 @@ def __init__( :keyword level: The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces. Required. Known values are: "Off", "Warning", and "Enforcement". - :paramtype level: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Level + :paramtype level: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Level :keyword excluded_namespaces: List of namespaces excluded from Safeguards checks. :paramtype excluded_namespaces: list[str] """ super().__init__(**kwargs) - self.system_excluded_namespaces = None + self.system_excluded_namespaces: Optional[List[str]] = None self.version = version self.level = level self.excluded_namespaces = excluded_namespaces @@ -10268,33 +10512,31 @@ class ScaleProfile(_serialization.Model): :ivar manual: Specifications on how to scale the VirtualMachines agent pool to a fixed size. :vartype manual: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManualScaleProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManualScaleProfile] :ivar autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a - predefined size range. Currently, at most one AutoScaleProfile is allowed. - :vartype autoscale: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AutoScaleProfile] + predefined size range. + :vartype autoscale: JSON """ _attribute_map = { "manual": {"key": "manual", "type": "[ManualScaleProfile]"}, - "autoscale": {"key": "autoscale", "type": "[AutoScaleProfile]"}, + "autoscale": {"key": "autoscale", "type": "object"}, } def __init__( self, *, manual: Optional[List["_models.ManualScaleProfile"]] = None, - autoscale: Optional[List["_models.AutoScaleProfile"]] = None, + autoscale: Optional[JSON] = 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.v2025_01_02_preview.models.ManualScaleProfile] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManualScaleProfile] :keyword autoscale: Specifications on how to auto-scale the VirtualMachines agent pool within a - predefined size range. Currently, at most one AutoScaleProfile is allowed. - :paramtype autoscale: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.AutoScaleProfile] + predefined size range. + :paramtype autoscale: JSON """ super().__init__(**kwargs) self.manual = manual @@ -10306,17 +10548,17 @@ class Schedule(_serialization.Model): 'absoluteMonthly' or 'relativeMonthly' for your maintenance schedule. :ivar daily: For schedules like: 'recur every day' or 'recur every 3 days'. - :vartype daily: ~azure.mgmt.containerservice.v2025_01_02_preview.models.DailySchedule + :vartype daily: ~azure.mgmt.containerservice.v2025_03_02_preview.models.DailySchedule :ivar weekly: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - :vartype weekly: ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeeklySchedule + :vartype weekly: ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeeklySchedule :ivar absolute_monthly: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. :vartype absolute_monthly: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AbsoluteMonthlySchedule + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AbsoluteMonthlySchedule :ivar relative_monthly: For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. :vartype relative_monthly: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RelativeMonthlySchedule + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RelativeMonthlySchedule """ _attribute_map = { @@ -10337,18 +10579,18 @@ def __init__( ) -> None: """ :keyword daily: For schedules like: 'recur every day' or 'recur every 3 days'. - :paramtype daily: ~azure.mgmt.containerservice.v2025_01_02_preview.models.DailySchedule + :paramtype daily: ~azure.mgmt.containerservice.v2025_03_02_preview.models.DailySchedule :keyword weekly: For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. - :paramtype weekly: ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeeklySchedule + :paramtype weekly: ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeeklySchedule :keyword absolute_monthly: For schedules like: 'recur every month on the 15th' or 'recur every 3 months on the 20th'. :paramtype absolute_monthly: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AbsoluteMonthlySchedule + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AbsoluteMonthlySchedule :keyword relative_monthly: For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last Friday'. :paramtype relative_monthly: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RelativeMonthlySchedule + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RelativeMonthlySchedule """ super().__init__(**kwargs) self.daily = daily @@ -10363,9 +10605,9 @@ class ServiceMeshProfile(_serialization.Model): All required parameters must be populated in order to send to server. :ivar mode: Mode of the service mesh. Required. Known values are: "Istio" and "Disabled". - :vartype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.ServiceMeshMode + :vartype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.ServiceMeshMode :ivar istio: Istio service mesh configuration. - :vartype istio: ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioServiceMesh + :vartype istio: ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioServiceMesh """ _validation = { @@ -10386,9 +10628,9 @@ def __init__( ) -> None: """ :keyword mode: Mode of the service mesh. Required. Known values are: "Istio" and "Disabled". - :paramtype mode: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.ServiceMeshMode + :paramtype mode: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.ServiceMeshMode :keyword istio: Istio service mesh configuration. - :paramtype istio: ~azure.mgmt.containerservice.v2025_01_02_preview.models.IstioServiceMesh + :paramtype istio: ~azure.mgmt.containerservice.v2025_03_02_preview.models.IstioServiceMesh """ super().__init__(**kwargs) self.mode = mode @@ -10403,7 +10645,7 @@ class Snapshot(TrackedResource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10412,30 +10654,30 @@ class Snapshot(TrackedResource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar creation_data: CreationData to be used to specify the source agent pool resource ID to create this snapshot. - :vartype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :vartype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :ivar snapshot_type: The type of a snapshot. The default is NodePool. Known values are: "NodePool" and "ManagedCluster". :vartype snapshot_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SnapshotType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SnapshotType :ivar kubernetes_version: The version of Kubernetes. :vartype kubernetes_version: str :ivar node_image_version: The version of node image. :vartype node_image_version: str :ivar os_type: The operating system type. The default is Linux. Known values are: "Linux" and "Windows". - :vartype os_type: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSType + :vartype os_type: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSType :ivar os_sku: Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated. Known values are: "Ubuntu", "Mariner", "AzureLinux", "CBLMariner", "Windows2019", "Windows2022", and "WindowsAnnual". - :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.OSSKU + :vartype os_sku: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.OSSKU :ivar vm_size: The size of the VM. :vartype vm_size: str :ivar enable_fips: Whether to use a FIPS-enabled OS. @@ -10489,21 +10731,21 @@ def __init__( :paramtype location: str :keyword creation_data: CreationData to be used to specify the source agent pool resource ID to create this snapshot. - :paramtype creation_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreationData + :paramtype creation_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreationData :keyword snapshot_type: The type of a snapshot. The default is NodePool. Known values are: "NodePool" and "ManagedCluster". :paramtype snapshot_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.SnapshotType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.SnapshotType """ super().__init__(tags=tags, location=location, **kwargs) self.creation_data = creation_data self.snapshot_type = snapshot_type - self.kubernetes_version = None - self.node_image_version = None - self.os_type = None - self.os_sku = None - self.vm_size = None - self.enable_fips = None + self.kubernetes_version: Optional[str] = None + self.node_image_version: Optional[str] = None + self.os_type: Optional[Union[str, "_models.OSType"]] = None + self.os_sku: Optional[Union[str, "_models.OSSKU"]] = None + self.vm_size: Optional[str] = None + self.enable_fips: Optional[bool] = None class SnapshotListResult(_serialization.Model): @@ -10512,7 +10754,7 @@ class SnapshotListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The list of snapshots. - :vartype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] :ivar next_link: The URL to get the next set of snapshot results. :vartype next_link: str """ @@ -10529,11 +10771,11 @@ class SnapshotListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.Snapshot"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of snapshots. - :paramtype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + :paramtype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class SysctlConfig(_serialization.Model): @@ -10764,7 +11006,7 @@ class SystemData(_serialization.Model): :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype created_by_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreatedByType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -10772,7 +11014,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreatedByType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -10803,7 +11045,7 @@ def __init__( :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype created_by_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreatedByType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -10811,7 +11053,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.CreatedByType + ~azure.mgmt.containerservice.v2025_03_02_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -10849,7 +11091,7 @@ class TimeInWeek(_serialization.Model): :ivar day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :vartype day: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :vartype day: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay :ivar hour_slots: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. @@ -10871,7 +11113,7 @@ def __init__( """ :keyword day: The day of the week. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :paramtype day: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :paramtype day: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay :keyword hour_slots: Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. @@ -10923,7 +11165,7 @@ class TrustedAccessRole(_serialization.Model): Role `_. :vartype rules: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleRule] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleRule] """ _validation = { @@ -10941,9 +11183,9 @@ class TrustedAccessRole(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.source_resource_type = None - self.name = None - self.rules = None + self.source_resource_type: Optional[str] = None + self.name: Optional[str] = None + self.rules: Optional[List["_models.TrustedAccessRoleRule"]] = None class TrustedAccessRoleBinding(Resource): @@ -10954,7 +11196,7 @@ class TrustedAccessRoleBinding(Resource): 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}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10963,11 +11205,11 @@ class TrustedAccessRoleBinding(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SystemData + :vartype system_data: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SystemData :ivar provisioning_state: The current provisioning state of trusted access role binding. Known values are: "Canceled", "Deleting", "Failed", "Succeeded", and "Updating". :vartype provisioning_state: str or - ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBindingProvisioningState + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBindingProvisioningState :ivar source_resource_id: The ARM resource ID of source resource that trusted access is configured for. Required. :vartype source_resource_id: str @@ -11006,7 +11248,7 @@ def __init__(self, *, source_resource_id: str, roles: List[str], **kwargs: Any) :paramtype roles: list[str] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.TrustedAccessRoleBindingProvisioningState"]] = None self.source_resource_id = source_resource_id self.roles = roles @@ -11018,7 +11260,7 @@ class TrustedAccessRoleBindingListResult(_serialization.Model): :ivar value: Role binding list. :vartype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -11036,11 +11278,11 @@ def __init__(self, *, value: Optional[List["_models.TrustedAccessRoleBinding"]] """ :keyword value: Role binding list. :paramtype value: - list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] """ super().__init__(**kwargs) self.value = value - self.next_link = None + self.next_link: Optional[str] = None class TrustedAccessRoleListResult(_serialization.Model): @@ -11049,7 +11291,7 @@ class TrustedAccessRoleListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Role list. - :vartype value: list[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRole] + :vartype value: list[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRole] :ivar next_link: Link to next page of resources. :vartype next_link: str """ @@ -11067,8 +11309,8 @@ class TrustedAccessRoleListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.TrustedAccessRole"]] = None + self.next_link: Optional[str] = None class TrustedAccessRoleRule(_serialization.Model): @@ -11107,11 +11349,11 @@ class TrustedAccessRoleRule(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.verbs = None - self.api_groups = None - self.resources = None - self.resource_names = None - self.non_resource_ur_ls = None + self.verbs: Optional[List[str]] = None + self.api_groups: Optional[List[str]] = None + self.resources: Optional[List[str]] = None + self.resource_names: Optional[List[str]] = None + self.non_resource_ur_ls: Optional[List[str]] = None class UpgradeOverrideSettings(_serialization.Model): @@ -11182,7 +11424,7 @@ class VirtualMachinesProfile(_serialization.Model): """Specifications on VirtualMachines agent pool. :ivar scale: Specifications on how to scale a VirtualMachines agent pool. - :vartype scale: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleProfile + :vartype scale: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleProfile """ _attribute_map = { @@ -11192,7 +11434,7 @@ class VirtualMachinesProfile(_serialization.Model): def __init__(self, *, scale: Optional["_models.ScaleProfile"] = None, **kwargs: Any) -> None: """ :keyword scale: Specifications on how to scale a VirtualMachines agent pool. - :paramtype scale: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ScaleProfile + :paramtype scale: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ScaleProfile """ super().__init__(**kwargs) self.scale = scale @@ -11207,7 +11449,7 @@ class WeeklySchedule(_serialization.Model): :vartype interval_weeks: int :ivar day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :vartype day_of_week: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :vartype day_of_week: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay """ _validation = { @@ -11228,7 +11470,7 @@ def __init__(self, *, interval_weeks: int, day_of_week: Union[str, "_models.Week :keyword day_of_week: Specifies on which day of the week the maintenance occurs. Required. Known values are: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", and "Saturday". - :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.WeekDay + :paramtype day_of_week: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.WeekDay """ super().__init__(**kwargs) self.interval_weeks = interval_weeks diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_patch.py similarity index 61% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_patch.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/models/_patch.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# 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. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/__init__.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/__init__.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/__init__.py index 786209b6598f..f8fd4f978b64 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/__init__.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/__init__.py @@ -16,6 +16,7 @@ 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 ._namespaces_operations import NamespacesOperations # 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 @@ -37,6 +38,7 @@ "ManagedClustersOperations", "ContainerServiceOperations", "MaintenanceConfigurationsOperations", + "NamespacesOperations", "AgentPoolsOperations", "MachinesOperations", "PrivateEndpointConnectionsOperations", diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_agent_pools_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_agent_pools_operations.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_agent_pools_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_agent_pools_operations.py index 27fe44c31647..ba6bf7e8b264 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_agent_pools_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_agent_pools_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,14 +48,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -93,14 +91,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -133,14 +131,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -183,7 +181,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -191,7 +189,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -240,14 +238,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -289,14 +287,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -332,7 +330,7 @@ def build_delete_machines_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -340,7 +338,7 @@ def build_delete_machines_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -378,14 +376,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -418,14 +416,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -461,7 +459,7 @@ class AgentPoolsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`agent_pools` attribute. """ @@ -469,10 +467,10 @@ class AgentPoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") def _abort_latest_operation_initial( @@ -490,7 +488,7 @@ def _abort_latest_operation_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -560,7 +558,7 @@ def begin_abort_latest_operation( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -614,14 +612,14 @@ def list(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> I :type resource_name: str :return: An iterator like instance of either AgentPool or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolListResult] = kwargs.pop("cls", None) @@ -703,7 +701,7 @@ def get( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :return: AgentPool or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -718,7 +716,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) @@ -773,7 +771,7 @@ def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -850,7 +848,7 @@ def begin_create_or_update( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :param parameters: The agent pool to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -862,7 +860,7 @@ def begin_create_or_update( :paramtype content_type: str :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -903,7 +901,7 @@ def begin_create_or_update( :paramtype content_type: str :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -931,7 +929,7 @@ def begin_create_or_update( :type agent_pool_name: str :param parameters: The agent pool to create or update. Is either a AgentPool type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -941,14 +939,14 @@ def begin_create_or_update( :type if_none_match: str :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AgentPool] = kwargs.pop("cls", None) @@ -1017,7 +1015,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -1096,7 +1094,7 @@ def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1153,7 +1151,7 @@ def get_upgrade_profile( :param agent_pool_name: The name of the agent pool. Required. :type agent_pool_name: str :return: AgentPoolUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1168,7 +1166,7 @@ def get_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolUpgradeProfile] = kwargs.pop("cls", None) @@ -1221,7 +1219,7 @@ def _delete_machines_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -1299,7 +1297,7 @@ def begin_delete_machines( :type agent_pool_name: str :param machines: A list of machines from the agent pool to be deleted. Required. :type machines: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolDeleteMachinesParameter + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolDeleteMachinesParameter :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1363,7 +1361,7 @@ def begin_delete_machines( :param machines: A list of machines from the agent pool to be deleted. Is either a AgentPoolDeleteMachinesParameter type or a IO[bytes] type. Required. :type machines: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolDeleteMachinesParameter or + ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolDeleteMachinesParameter or IO[bytes] :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] @@ -1373,7 +1371,7 @@ def begin_delete_machines( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -1431,7 +1429,7 @@ def get_available_agent_pool_versions( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: AgentPoolAvailableVersions or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPoolAvailableVersions + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPoolAvailableVersions :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1446,7 +1444,7 @@ def get_available_agent_pool_versions( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.AgentPoolAvailableVersions] = kwargs.pop("cls", None) @@ -1493,7 +1491,7 @@ def _upgrade_node_image_version_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -1556,14 +1554,14 @@ def begin_upgrade_node_image_version( :type agent_pool_name: str :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.AgentPool] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.AgentPool] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_container_service_operations.py similarity index 88% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_container_service_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_container_service_operations.py index 3cd28c296a22..ae57d8c47f19 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_container_service_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_container_service_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,14 +40,14 @@ def build_list_node_image_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -72,7 +70,7 @@ class ContainerServiceOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`container_service` attribute. """ @@ -80,10 +78,10 @@ class ContainerServiceOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -98,14 +96,14 @@ def list_node_image_versions(self, location: str, **kwargs: Any) -> Iterable["_m :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.v2025_01_02_preview.models.NodeImageVersion] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.NodeImageVersionsListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_load_balancers_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_load_balancers_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_load_balancers_operations.py index 75a64b143d06..6a07a26925a2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_load_balancers_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_load_balancers_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,14 +48,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -89,14 +88,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -137,7 +136,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -145,7 +144,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -188,14 +187,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -236,7 +235,7 @@ class LoadBalancersOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`load_balancers` attribute. """ @@ -244,10 +243,10 @@ class LoadBalancersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -265,14 +264,14 @@ def list_by_managed_cluster( :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.v2025_01_02_preview.models.LoadBalancer] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.LoadBalancerListResult] = kwargs.pop("cls", None) @@ -354,7 +353,7 @@ def get( :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.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -369,7 +368,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) @@ -425,12 +424,12 @@ def create_or_update( :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.v2025_01_02_preview.models.LoadBalancer + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.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.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ @@ -462,7 +461,7 @@ def create_or_update( Default value is "application/json". :paramtype content_type: str :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ @@ -488,10 +487,10 @@ def create_or_update( :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.v2025_01_02_preview.models.LoadBalancer or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer or IO[bytes] :return: LoadBalancer or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.LoadBalancer + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.LoadBalancer :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -506,7 +505,7 @@ def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LoadBalancer] = kwargs.pop("cls", None) @@ -566,7 +565,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -632,7 +631,7 @@ def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_machines_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_machines_operations.py similarity index 92% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_machines_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_machines_operations.py index 6a7ac8e6c2f7..7173c8296f05 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_machines_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_machines_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,14 +43,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}/machines", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -92,14 +91,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}/machines/{machineName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -138,7 +137,7 @@ class MachinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`machines` attribute. """ @@ -146,10 +145,10 @@ class MachinesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -169,14 +168,14 @@ def list( :type agent_pool_name: str :return: An iterator like instance of either Machine or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Machine] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MachineListResult] = kwargs.pop("cls", None) @@ -261,7 +260,7 @@ def get( :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.v2025_01_02_preview.models.Machine + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Machine :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -276,7 +275,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.Machine] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_maintenance_configurations_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_maintenance_configurations_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_maintenance_configurations_operations.py index aa7af37f9fee..4d9186ea9bc8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_maintenance_configurations_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_maintenance_configurations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,14 +44,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -85,14 +84,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -126,7 +125,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -134,7 +133,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -170,14 +169,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -211,7 +210,7 @@ class MaintenanceConfigurationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`maintenance_configurations` attribute. """ @@ -219,10 +218,10 @@ class MaintenanceConfigurationsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -241,14 +240,14 @@ def list_by_managed_cluster( :return: An iterator like instance of either MaintenanceConfiguration or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MaintenanceConfigurationListResult] = kwargs.pop("cls", None) @@ -330,7 +329,7 @@ def get( :param config_name: The name of the maintenance configuration. Required. :type config_name: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -345,7 +344,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) @@ -402,12 +401,12 @@ def create_or_update( :type config_name: str :param parameters: The maintenance configuration to create or update. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -439,7 +438,7 @@ def create_or_update( Default value is "application/json". :paramtype content_type: str :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ @@ -466,9 +465,9 @@ def create_or_update( :param parameters: The maintenance configuration to create or update. Is either a MaintenanceConfiguration type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration or IO[bytes] :return: MaintenanceConfiguration or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MaintenanceConfiguration + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MaintenanceConfiguration :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -483,7 +482,7 @@ def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MaintenanceConfiguration] = kwargs.pop("cls", None) @@ -559,7 +558,7 @@ def delete( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_cluster_snapshots_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_cluster_snapshots_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_cluster_snapshots_operations.py index 59d663084e03..2e122ecee1d8 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_cluster_snapshots_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,13 +42,13 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -69,14 +68,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -99,14 +98,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -139,7 +138,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -147,7 +146,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -182,7 +181,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -190,7 +189,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -225,14 +224,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -265,7 +264,7 @@ class ManagedClusterSnapshotsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`managed_cluster_snapshots` attribute. """ @@ -273,10 +272,10 @@ class ManagedClusterSnapshotsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -288,14 +287,14 @@ def list(self, **kwargs: Any) -> Iterable["_models.ManagedClusterSnapshot"]: :return: An iterator like instance of either ManagedClusterSnapshot or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) @@ -373,14 +372,14 @@ def list_by_resource_group( :return: An iterator like instance of either ManagedClusterSnapshot or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshotListResult] = kwargs.pop("cls", None) @@ -457,7 +456,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m :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.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -472,7 +471,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -525,12 +524,12 @@ def create_or_update( :type resource_name: str :param parameters: The managed cluster snapshot to create or update. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -559,7 +558,7 @@ def create_or_update( Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -583,9 +582,9 @@ def create_or_update( :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.v2025_01_02_preview.models.ManagedClusterSnapshot or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot or IO[bytes] :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -600,7 +599,7 @@ def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -665,12 +664,12 @@ def update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update managed cluster snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -700,7 +699,7 @@ def update_tags( Default value is "application/json". :paramtype content_type: str :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -723,10 +722,10 @@ def update_tags( :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.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :return: ManagedClusterSnapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterSnapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterSnapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -741,7 +740,7 @@ def update_tags( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedClusterSnapshot] = kwargs.pop("cls", None) @@ -814,7 +813,7 @@ def delete( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_clusters_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_clusters_operations.py similarity index 96% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_clusters_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_clusters_operations.py index 72eaabe3918b..659eb77d4220 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_managed_clusters_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_managed_clusters_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -48,14 +46,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/kubernetesVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -76,7 +74,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,14 +100,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -134,14 +132,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -174,14 +172,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -220,14 +218,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -268,14 +266,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -317,14 +315,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -357,14 +355,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -403,7 +401,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -411,7 +409,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -450,7 +448,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -458,7 +456,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -501,14 +499,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -547,7 +545,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -555,7 +553,7 @@ def build_reset_service_principal_profile_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -590,7 +588,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -598,7 +596,7 @@ def build_reset_aad_profile_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -633,14 +631,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -673,14 +671,14 @@ def build_rotate_cluster_certificates_request( # pylint: disable=name-too-long _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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -713,14 +711,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -753,14 +751,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -793,14 +791,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -833,7 +831,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -841,7 +839,7 @@ def build_run_command_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -876,14 +874,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -917,14 +915,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -957,14 +955,14 @@ def build_get_guardrails_versions_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -986,14 +984,14 @@ def build_list_guardrails_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1016,14 +1014,14 @@ def build_get_safeguards_versions_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1045,14 +1043,14 @@ def build_list_safeguards_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1075,14 +1073,14 @@ def build_list_mesh_revision_profiles_request( # pylint: disable=name-too-long _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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1105,14 +1103,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -1143,14 +1141,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1183,14 +1181,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1231,7 +1229,7 @@ def build_rebalance_load_balancers_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -1239,7 +1237,7 @@ def build_rebalance_load_balancers_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -1274,7 +1272,7 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`managed_clusters` attribute. """ @@ -1282,10 +1280,10 @@ class ManagedClustersOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -1298,7 +1296,7 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube :param location: The name of the Azure region. Required. :type location: str :return: KubernetesVersionListResult or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.KubernetesVersionListResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.KubernetesVersionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1313,7 +1311,7 @@ def list_kubernetes_versions(self, location: str, **kwargs: Any) -> _models.Kube _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.KubernetesVersionListResult] = kwargs.pop("cls", None) @@ -1352,14 +1350,14 @@ def list(self, **kwargs: Any) -> Iterable["_models.ManagedCluster"]: :return: An iterator like instance of either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) @@ -1434,14 +1432,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :type resource_group_name: str :return: An iterator like instance of either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterListResult] = kwargs.pop("cls", None) @@ -1520,7 +1518,7 @@ def get_upgrade_profile( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: ManagedClusterUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1535,7 +1533,7 @@ def get_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterUpgradeProfile] = kwargs.pop("cls", None) @@ -1586,7 +1584,7 @@ def get_access_profile( :param role_name: The name of the role for managed cluster accessProfile resource. Required. :type role_name: str :return: ManagedClusterAccessProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAccessProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAccessProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1601,7 +1599,7 @@ def get_access_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedClusterAccessProfile] = kwargs.pop("cls", None) @@ -1650,7 +1648,7 @@ def list_cluster_admin_credentials( :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. :type server_fqdn: str :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1665,7 +1663,7 @@ def list_cluster_admin_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -1722,9 +1720,9 @@ def list_cluster_user_credentials( 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. Known values are: "azure", "exec", and "exec". Default value is None. - :type format: str or ~azure.mgmt.containerservice.v2025_01_02_preview.models.Format + :type format: str or ~azure.mgmt.containerservice.v2025_03_02_preview.models.Format :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1739,7 +1737,7 @@ def list_cluster_user_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -1789,7 +1787,7 @@ def list_cluster_monitoring_user_credentials( :param server_fqdn: server fqdn type for credentials to be returned. Default value is None. :type server_fqdn: str :return: CredentialResults or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.CredentialResults + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1804,7 +1802,7 @@ def list_cluster_monitoring_user_credentials( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) @@ -1849,7 +1847,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: ManagedCluster or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -1864,7 +1862,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -1917,7 +1915,7 @@ def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -1990,7 +1988,7 @@ def begin_create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The managed cluster to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -2003,7 +2001,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2042,7 +2040,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2067,7 +2065,7 @@ def begin_create_or_update( :type resource_name: str :param parameters: The managed cluster to create or update. Is either a ManagedCluster type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -2078,14 +2076,14 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -2152,7 +2150,7 @@ def _update_tags_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -2223,7 +2221,7 @@ def begin_update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :param if_match: The request should only proceed if an entity matches this string. Default value is None. :type if_match: str @@ -2233,7 +2231,7 @@ def begin_update_tags( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2268,7 +2266,7 @@ def begin_update_tags( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -2292,7 +2290,7 @@ def begin_update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :param if_match: The request should only proceed if an entity matches this string. Default value is None. @@ -2300,14 +2298,14 @@ def begin_update_tags( :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedCluster] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagedCluster] = kwargs.pop("cls", None) @@ -2373,7 +2371,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -2448,7 +2446,7 @@ def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2507,7 +2505,7 @@ def _reset_service_principal_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -2581,7 +2579,7 @@ def begin_reset_service_principal_profile( :type resource_name: str :param parameters: The service principal profile to set on the managed cluster. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2639,7 +2637,7 @@ def begin_reset_service_principal_profile( :param parameters: The service principal profile to set on the managed cluster. Is either a ManagedClusterServicePrincipalProfile type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterServicePrincipalProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterServicePrincipalProfile or IO[bytes] :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] @@ -2649,7 +2647,7 @@ def begin_reset_service_principal_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2711,7 +2709,7 @@ def _reset_aad_profile_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -2787,7 +2785,7 @@ def begin_reset_aad_profile( :type resource_name: str :param parameters: The AAD profile to set on the Managed Cluster. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2849,7 +2847,7 @@ def begin_reset_aad_profile( :param parameters: The AAD profile to set on the Managed Cluster. Is either a ManagedClusterAADProfile type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.ManagedClusterAADProfile or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.ManagedClusterAADProfile 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: @@ -2858,7 +2856,7 @@ def begin_reset_aad_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -2916,7 +2914,7 @@ def _abort_latest_operation_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -2983,7 +2981,7 @@ def begin_abort_latest_operation( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3038,7 +3036,7 @@ def _rotate_cluster_certificates_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -3101,7 +3099,7 @@ def begin_rotate_cluster_certificates( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3156,7 +3154,7 @@ def _rotate_service_account_signing_keys_initial( # pylint: disable=name-too-lo _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -3218,7 +3216,7 @@ def begin_rotate_service_account_signing_keys( # pylint: disable=name-too-long _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3271,7 +3269,7 @@ def _stop_initial(self, resource_group_name: str, resource_name: str, **kwargs: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -3335,7 +3333,7 @@ def begin_stop(self, resource_group_name: str, resource_name: str, **kwargs: Any _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3388,7 +3386,7 @@ def _start_initial(self, resource_group_name: str, resource_name: str, **kwargs: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -3449,7 +3447,7 @@ def begin_start(self, resource_group_name: str, resource_name: str, **kwargs: An _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3508,7 +3506,7 @@ def _run_command_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -3584,14 +3582,14 @@ def begin_run_command( :type resource_name: str :param request_payload: The run command request. Required. :type request_payload: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandRequest + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -3624,7 +3622,7 @@ def begin_run_command( :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -3650,18 +3648,18 @@ def begin_run_command( :param request_payload: The run command request. Is either a RunCommandRequest type or a IO[bytes] type. Required. :type request_payload: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandRequest or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandRequest or IO[bytes] :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RunCommandResult] = kwargs.pop("cls", None) @@ -3724,7 +3722,7 @@ def get_command_result( :param command_id: Id of the command. Required. :type command_id: str :return: RunCommandResult or None or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.RunCommandResult or None + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.RunCommandResult or None :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3739,7 +3737,7 @@ def get_command_result( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Optional[_models.RunCommandResult]] = kwargs.pop("cls", None) @@ -3782,7 +3780,6 @@ def get_command_result( def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-long self, resource_group_name: str, resource_name: str, **kwargs: Any ) -> Iterable["_models.OutboundEnvironmentEndpoint"]: - # pylint: disable=line-too-long """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. @@ -3797,14 +3794,14 @@ def list_outbound_network_dependencies_endpoints( # pylint: disable=name-too-lo :return: An iterator like instance of either OutboundEnvironmentEndpoint or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OutboundEnvironmentEndpoint] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.OutboundEnvironmentEndpoint] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OutboundEnvironmentEndpointCollection] = kwargs.pop("cls", None) @@ -3881,7 +3878,7 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> :param version: Safeguards version. Required. :type version: str :return: GuardrailsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.GuardrailsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -3896,7 +3893,7 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.GuardrailsAvailableVersion] = kwargs.pop("cls", None) @@ -3930,7 +3927,6 @@ def get_guardrails_versions(self, location: str, version: str, **kwargs: Any) -> @distributed_trace def list_guardrails_versions(self, location: str, **kwargs: Any) -> Iterable["_models.GuardrailsAvailableVersion"]: - # pylint: disable=line-too-long """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 @@ -3941,14 +3937,14 @@ def list_guardrails_versions(self, location: str, **kwargs: Any) -> Iterable["_m :return: An iterator like instance of either GuardrailsAvailableVersion or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.GuardrailsAvailableVersion] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.GuardrailsAvailableVersionsList] = kwargs.pop("cls", None) @@ -4024,7 +4020,7 @@ def get_safeguards_versions(self, location: str, version: str, **kwargs: Any) -> :param version: Safeguards version. Required. :type version: str :return: SafeguardsAvailableVersion or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.SafeguardsAvailableVersion :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4039,7 +4035,7 @@ def get_safeguards_versions(self, location: str, version: str, **kwargs: Any) -> _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SafeguardsAvailableVersion] = kwargs.pop("cls", None) @@ -4073,7 +4069,6 @@ def get_safeguards_versions(self, location: str, version: str, **kwargs: Any) -> @distributed_trace def list_safeguards_versions(self, location: str, **kwargs: Any) -> Iterable["_models.SafeguardsAvailableVersion"]: - # pylint: disable=line-too-long """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 @@ -4084,14 +4079,14 @@ def list_safeguards_versions(self, location: str, **kwargs: Any) -> Iterable["_m :return: An iterator like instance of either SafeguardsAvailableVersion or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.SafeguardsAvailableVersion] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SafeguardsAvailableVersionsList] = kwargs.pop("cls", None) @@ -4167,14 +4162,14 @@ def list_mesh_revision_profiles(self, location: str, **kwargs: Any) -> Iterable[ :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.v2025_01_02_preview.models.MeshRevisionProfile] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshRevisionProfileList] = kwargs.pop("cls", None) @@ -4251,7 +4246,7 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> :param mode: The mode of the mesh. Required. :type mode: str :return: MeshRevisionProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshRevisionProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshRevisionProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4266,7 +4261,7 @@ def get_mesh_revision_profile(self, location: str, mode: str, **kwargs: Any) -> _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshRevisionProfile] = kwargs.pop("cls", None) @@ -4313,14 +4308,14 @@ def list_mesh_upgrade_profiles( :type resource_name: str :return: An iterator like instance of either MeshUpgradeProfile or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshUpgradeProfileList] = kwargs.pop("cls", None) @@ -4402,7 +4397,7 @@ def get_mesh_upgrade_profile( :param mode: The mode of the mesh. Required. :type mode: str :return: MeshUpgradeProfile or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.MeshUpgradeProfile + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.MeshUpgradeProfile :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -4417,7 +4412,7 @@ def get_mesh_upgrade_profile( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.MeshUpgradeProfile] = kwargs.pop("cls", None) @@ -4469,7 +4464,7 @@ def _rebalance_load_balancers_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -4544,7 +4539,7 @@ def begin_rebalance_load_balancers( :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.v2025_01_02_preview.models.RebalanceLoadBalancersRequestBody + ~azure.mgmt.containerservice.v2025_03_02_preview.models.RebalanceLoadBalancersRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -4604,7 +4599,7 @@ def begin_rebalance_load_balancers( balancers will be rebalanced. Is either a RebalanceLoadBalancersRequestBody type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.RebalanceLoadBalancersRequestBody or + ~azure.mgmt.containerservice.v2025_03_02_preview.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] @@ -4614,7 +4609,7 @@ def begin_rebalance_load_balancers( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_namespaces_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_namespaces_operations.py new file mode 100644 index 000000000000..bd0245d8de72 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_namespaces_operations.py @@ -0,0 +1,1052 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from collections.abc import MutableMapping +from io import IOBase +from typing import Any, Callable, Dict, IO, Iterable, 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 ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_managed_cluster_request( + resource_group_name: str, resource_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/namespaces", + ) + 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, namespace_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-03-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/namespaces/{namespaceName}", + ) + 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]$", + ), + "namespaceName": _SERIALIZER.url( + "namespace_name", + namespace_name, + "str", + max_length=63, + min_length=1, + pattern=r"[a-z0-9]([-a-z0-9]*[a-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, namespace_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-03-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}/namespaces/{namespaceName}", + ) + 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]$", + ), + "namespaceName": _SERIALIZER.url( + "namespace_name", + namespace_name, + "str", + max_length=63, + min_length=1, + pattern=r"[a-z0-9]([-a-z0-9]*[a-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_delete_request( + resource_group_name: str, resource_name: str, namespace_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-03-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/namespaces/{namespaceName}", + ) + 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]$", + ), + "namespaceName": _SERIALIZER.url( + "namespace_name", + namespace_name, + "str", + max_length=63, + min_length=1, + pattern=r"[a-z0-9]([-a-z0-9]*[a-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) + + +def build_update_request( + resource_group_name: str, resource_name: str, namespace_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-03-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}/namespaces/{namespaceName}", + ) + 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]$", + ), + "namespaceName": _SERIALIZER.url( + "namespace_name", + namespace_name, + "str", + max_length=63, + min_length=1, + pattern=r"[a-z0-9]([-a-z0-9]*[a-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_list_credential_request( + resource_group_name: str, resource_name: str, namespace_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-03-02-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/namespaces/{namespaceName}/listCredential", + ) + 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]$", + ), + "namespaceName": _SERIALIZER.url( + "namespace_name", + namespace_name, + "str", + max_length=63, + min_length=1, + pattern=r"[a-z0-9]([-a-z0-9]*[a-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="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class NamespacesOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s + :attr:`namespaces` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + 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") + self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") + + @distributed_trace + def list_by_managed_cluster( + self, resource_group_name: str, resource_name: str, **kwargs: Any + ) -> Iterable["_models.Namespace"]: + """Gets a list of managed namespaces in the specified managed cluster. + + Gets a list of managed namespaces in the specified managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :return: An iterator like instance of either Namespace or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :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._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.NamespaceListResult] = 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._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("NamespaceListResult", 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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + @distributed_trace + def get( + self, resource_group_name: str, resource_name: str, namespace_name: str, **kwargs: Any + ) -> _models.Namespace: + """Gets the specified namespace of a managed cluster. + + Gets the specified namespace of a managed cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.Namespace] = kwargs.pop("cls", None) + + _request = build_get_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Namespace", 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, + namespace_name: str, + parameters: Union[_models.Namespace, 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._api_version or "2025-03-02-preview") + ) + 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, "Namespace") + + _request = build_create_or_update_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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, + namespace_name: str, + parameters: _models.Namespace, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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 Namespace or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> LROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: An instance of LROPoller that returns either Namespace or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def begin_create_or_update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: Union[_models.Namespace, IO[bytes]], + **kwargs: Any + ) -> LROPoller[_models.Namespace]: + """Creates or updates a namespace in the specified managed cluster. + + Creates or updates a namespace 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 namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: The namespace to create or update. Is either a Namespace type or a IO[bytes] + type. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace or + IO[bytes] + :return: An instance of LROPoller that returns either Namespace or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace] + :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._api_version or "2025-03-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Namespace] = 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, + namespace_name=namespace_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("Namespace", 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.Namespace].from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller[_models.Namespace]( + self._client, raw_result, get_long_running_output, polling_method # type: ignore + ) + + def _delete_initial( + self, resource_group_name: str, resource_name: str, namespace_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._api_version or "2025-03-02-preview") + ) + cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) + + _request = build_delete_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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, namespace_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Deletes a namespace. + + Deletes a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_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._api_version or "2025-03-02-preview") + ) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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 + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: _models.TagsObject, + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject + :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. + Default value is "application/json". + :paramtype content_type: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @overload + def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: IO[bytes], + *, + content_type: str = "application/json", + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Required. + :type parameters: IO[bytes] + :keyword content_type: Body Parameter content-type. Content type parameter for binary body. + Default value is "application/json". + :paramtype content_type: str + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :raises ~azure.core.exceptions.HttpResponseError: + """ + + @distributed_trace + def update( + self, + resource_group_name: str, + resource_name: str, + namespace_name: str, + parameters: Union[_models.TagsObject, IO[bytes]], + **kwargs: Any + ) -> _models.Namespace: + """Updates tags on a namespace. + + Updates tags on a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :param parameters: Parameters supplied to the patch namespace operation, we only support patch + tags for now. Is either a TagsObject type or a IO[bytes] type. Required. + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or + IO[bytes] + :return: Namespace or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Namespace + :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._api_version or "2025-03-02-preview") + ) + content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + cls: ClsType[_models.Namespace] = 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_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("Namespace", pipeline_response.http_response) + + if cls: + return cls(pipeline_response, deserialized, {}) # type: ignore + + return deserialized # type: ignore + + @distributed_trace + def list_credential( + self, resource_group_name: str, resource_name: str, namespace_name: str, **kwargs: Any + ) -> _models.CredentialResults: + """Lists the credentials of a namespace. + + Lists the credentials of a namespace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. Required. + :type resource_name: str + :param namespace_name: The name of the namespace. Required. + :type namespace_name: str + :return: CredentialResults or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.CredentialResults + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map: MutableMapping = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop( + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") + ) + cls: ClsType[_models.CredentialResults] = kwargs.pop("cls", None) + + _request = build_list_credential_request( + resource_group_name=resource_group_name, + resource_name=resource_name, + namespace_name=namespace_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) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("CredentialResults", 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/v2025_01_02_preview/operations/_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operation_status_result_operations.py similarity index 93% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_operation_status_result_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operation_status_result_operations.py index 6bb4aaa248f2..a3dcaeeca95a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_operation_status_result_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operation_status_result_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,14 +43,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -84,14 +83,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -130,14 +129,14 @@ def build_get_by_agent_pool_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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-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}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -174,7 +173,7 @@ class OperationStatusResultOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`operation_status_result` attribute. """ @@ -182,10 +181,10 @@ class OperationStatusResultOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -204,14 +203,14 @@ def list( :return: An iterator like instance of either OperationStatusResult or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationStatusResult] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResultList] = kwargs.pop("cls", None) @@ -293,7 +292,7 @@ def get( :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.v2025_01_02_preview.models.OperationStatusResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -308,7 +307,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) @@ -359,7 +358,7 @@ def get_by_agent_pool( :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.v2025_01_02_preview.models.OperationStatusResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationStatusResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -374,7 +373,7 @@ def get_by_agent_pool( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationStatusResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operations.py similarity index 87% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operations.py index be35b5c8e0b8..2d02e0a1499b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +40,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -63,7 +61,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`operations` attribute. """ @@ -71,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -85,14 +83,14 @@ def list(self, **kwargs: Any) -> Iterable["_models.OperationValue"]: :return: An iterator like instance of either OperationValue or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.OperationValue] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.OperationValue] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_patch.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_patch.py new file mode 100644 index 000000000000..8bcb627aa475 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_patch.py @@ -0,0 +1,21 @@ +# 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. +# -------------------------------------------------------------------------- +"""Customize generated code here. + +Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize +""" +from typing import List + +__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + + +def patch_sdk(): + """Do not remove from this file. + + `patch_sdk` is a last resort escape hatch that allows you to do customizations + you can't accomplish using the techniques described in + https://aka.ms/azsdk/python/dpcodegen/python/customize + """ diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_endpoint_connections_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_endpoint_connections_operations.py index 504c04c9a06f..f98f4aa4902f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_endpoint_connections_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -28,12 +30,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,14 +46,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -91,14 +90,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -138,7 +137,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +145,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -188,14 +187,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -231,7 +230,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -239,10 +238,10 @@ class PrivateEndpointConnectionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -261,7 +260,7 @@ def list( :type resource_name: str :return: PrivateEndpointConnectionListResult or the result of cls(response) :rtype: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnectionListResult + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -276,7 +275,7 @@ def list( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) @@ -325,7 +324,7 @@ def get( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -340,7 +339,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -397,12 +396,12 @@ def update( :type private_endpoint_connection_name: str :param parameters: The updated private endpoint connection. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -434,7 +433,7 @@ def update( Default value is "application/json". :paramtype content_type: str :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ @@ -461,9 +460,9 @@ def update( :param parameters: The updated private endpoint connection. Is either a PrivateEndpointConnection type or a IO[bytes] type. Required. :type parameters: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection or IO[bytes] :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -478,7 +477,7 @@ def update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) @@ -538,7 +537,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -599,7 +598,7 @@ def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_link_resources_operations.py similarity index 86% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_link_resources_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_link_resources_operations.py index ba6206c9ab62..3183c94d1a38 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_private_link_resources_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_private_link_resources_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,14 +41,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -82,7 +81,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`private_link_resources` attribute. """ @@ -90,10 +89,10 @@ class PrivateLinkResourcesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -111,7 +110,7 @@ def list( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: PrivateLinkResourcesListResult or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResourcesListResult + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResourcesListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -126,7 +125,7 @@ def list( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.PrivateLinkResourcesListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_resolve_private_link_service_id_operations.py similarity index 88% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_resolve_private_link_service_id_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_resolve_private_link_service_id_operations.py index 64284eb30697..ed92bfa46ca6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_resolve_private_link_service_id_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_resolve_private_link_service_id_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +42,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -51,7 +50,7 @@ def build_post_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -86,7 +85,7 @@ class ResolvePrivateLinkServiceIdOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`resolve_private_link_service_id` attribute. """ @@ -94,10 +93,10 @@ class ResolvePrivateLinkServiceIdOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @overload @@ -120,12 +119,12 @@ def post( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -154,7 +153,7 @@ def post( Default value is "application/json". :paramtype content_type: str :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -177,10 +176,10 @@ def post( :type resource_name: str :param parameters: Parameters required in order to resolve a private link service ID. Is either a PrivateLinkResource type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource or IO[bytes] :return: PrivateLinkResource or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -195,7 +194,7 @@ def post( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_snapshots_operations.py similarity index 94% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_snapshots_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_snapshots_operations.py index e1982a834736..6c7745f39a2c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_snapshots_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +42,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,14 +66,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -97,14 +96,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -137,7 +136,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -145,7 +144,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -180,7 +179,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +187,7 @@ def build_update_tags_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -223,14 +222,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -263,7 +262,7 @@ class SnapshotsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`snapshots` attribute. """ @@ -271,10 +270,10 @@ class SnapshotsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -285,14 +284,14 @@ def list(self, **kwargs: Any) -> Iterable["_models.Snapshot"]: :return: An iterator like instance of either Snapshot or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) @@ -367,14 +366,14 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :type resource_group_name: str :return: An iterator like instance of either Snapshot or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.SnapshotListResult] = kwargs.pop("cls", None) @@ -451,7 +450,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -466,7 +465,7 @@ def get(self, resource_group_name: str, resource_name: str, **kwargs: Any) -> _m _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -518,12 +517,12 @@ def create_or_update( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: The snapshot to create or update. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -552,7 +551,7 @@ def create_or_update( Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -575,9 +574,9 @@ def create_or_update( :type resource_name: str :param parameters: The snapshot to create or update. Is either a Snapshot type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot or IO[bytes] + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot or IO[bytes] :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -592,7 +591,7 @@ def create_or_update( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -656,12 +655,12 @@ def update_tags( :param resource_name: The name of the managed cluster resource. Required. :type resource_name: str :param parameters: Parameters supplied to the Update snapshot Tags operation. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -690,7 +689,7 @@ def update_tags( Default value is "application/json". :paramtype content_type: str :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ @@ -713,10 +712,10 @@ def update_tags( :type resource_name: str :param parameters: Parameters supplied to the Update snapshot Tags operation. Is either a TagsObject type or a IO[bytes] type. Required. - :type parameters: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TagsObject or + :type parameters: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TagsObject or IO[bytes] :return: Snapshot or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.Snapshot + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.Snapshot :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -731,7 +730,7 @@ def update_tags( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Snapshot] = kwargs.pop("cls", None) @@ -804,7 +803,7 @@ def delete( # pylint: disable=inconsistent-return-statements _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_role_bindings_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_role_bindings_operations.py similarity index 95% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_role_bindings_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_role_bindings_operations.py index a426f8628c3b..527b84b85d72 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_role_bindings_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_role_bindings_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # 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 -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,14 +48,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -93,14 +92,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -145,7 +144,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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -153,7 +152,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -200,14 +199,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url( @@ -248,7 +247,7 @@ class TrustedAccessRoleBindingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`trusted_access_role_bindings` attribute. """ @@ -256,10 +255,10 @@ class TrustedAccessRoleBindingsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -278,14 +277,14 @@ def list( :return: An iterator like instance of either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleBindingListResult] = kwargs.pop("cls", None) @@ -367,7 +366,7 @@ def get( :param trusted_access_role_binding_name: The name of trusted access role binding. Required. :type trusted_access_role_binding_name: str :return: TrustedAccessRoleBinding or the result of cls(response) - :rtype: ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding + :rtype: ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding :raises ~azure.core.exceptions.HttpResponseError: """ error_map: MutableMapping = { @@ -382,7 +381,7 @@ def get( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) @@ -435,7 +434,7 @@ def _create_or_update_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -510,14 +509,14 @@ def begin_create_or_update( :type trusted_access_role_binding_name: str :param trusted_access_role_binding: A trusted access role binding. Required. :type trusted_access_role_binding: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :return: An instance of LROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -551,7 +550,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -578,18 +577,18 @@ def begin_create_or_update( :param trusted_access_role_binding: A trusted access role binding. Is either a TrustedAccessRoleBinding type or a IO[bytes] type. Required. :type trusted_access_role_binding: - ~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding or IO[bytes] + ~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding or IO[bytes] :return: An instance of LROPoller that returns either TrustedAccessRoleBinding or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRoleBinding] + ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRoleBinding] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TrustedAccessRoleBinding] = kwargs.pop("cls", None) @@ -650,7 +649,7 @@ def _delete_initial( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) @@ -716,7 +715,7 @@ def begin_delete( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) api_version: str = kwargs.pop( - "api_version", _params.pop("api-version", self._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_roles_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_roles_operations.py similarity index 88% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_roles_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_roles_operations.py index 9f84bd6e3f09..b5465d3a442b 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/operations/_trusted_access_roles_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/operations/_trusted_access_roles_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from ..._serialization import Serializer +from ..._serialization import Deserializer, Serializer +from .._configuration import ContainerServiceClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,14 +40,14 @@ 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-01-02-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-02-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "location": _SERIALIZER.url("location", location, "str", min_length=1), @@ -72,7 +70,7 @@ class TrustedAccessRolesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~azure.mgmt.containerservice.v2025_01_02_preview.ContainerServiceClient`'s + :class:`~azure.mgmt.containerservice.v2025_03_02_preview.ContainerServiceClient`'s :attr:`trusted_access_roles` attribute. """ @@ -80,10 +78,10 @@ class TrustedAccessRolesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + 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") self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version") @distributed_trace @@ -96,14 +94,14 @@ def list(self, location: str, **kwargs: Any) -> Iterable["_models.TrustedAccessR :type location: str :return: An iterator like instance of either TrustedAccessRole or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_01_02_preview.models.TrustedAccessRole] + ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2025_03_02_preview.models.TrustedAccessRole] :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._api_version or "2025-01-02-preview") + "api_version", _params.pop("api-version", self._api_version or "2025-03-02-preview") ) cls: ClsType[_models.TrustedAccessRoleListResult] = kwargs.pop("cls", None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/py.typed b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/py.typed similarity index 100% rename from sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_01_02_preview/py.typed rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2025_03_02_preview/py.typed 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 c1357ebf8734..0e1a6117a5b0 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsAbortOperation.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/AgentPoolsAbortOperation.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_associate_crg.py new file mode 100644 index 000000000000..a711080beaa6 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_associate_crg.py @@ -0,0 +1,53 @@ +# 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_associate_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, + 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": { + "capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1", + "count": 3, + "orchestratorVersion": "", + "osType": "Linux", + "vmSize": "Standard_DS2_v2", + } + }, + ).result() + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/AgentPoolsAssociate_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 28f66689f4e5..fd1331e6669a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -67,6 +68,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_CustomNodeConfig.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7aed444c28fc..2142beeb0676 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_DedicatedHostGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_custom_ca_trust.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_custom_ca_trust.py new file mode 100644 index 000000000000..dbf5d38ca660 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_custom_ca_trust.py @@ -0,0 +1,53 @@ +# 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_enable_custom_ca_trust.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": { + "count": 3, + "enableCustomCATrust": True, + "orchestratorVersion": "", + "osType": "Linux", + "vmSize": "Standard_DS2_v2", + } + }, + ).result() + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.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 052980e94f61..3e60e6740d91 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7fc0ead9a97b..7abeb081613d 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_EnableFIPS.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 aed6d7406b94..332b81ec63a4 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_EnableUltraSSD.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 98c7592b8c2d..ad2990455dee 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_Ephemeral.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 72aace08257b..cbaa0b09fec5 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -68,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_GPUMIG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 74138f565b86..4ed4e9211a5c 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_MessageOfTheDay.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 b5266cf774e8..544e0044e410 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -68,6 +69,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_OSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 0f8d846b98f4..975e09262561 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_PPG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 406eec8e0c80..9584f2b44cfe 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,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": "", @@ -50,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_Snapshot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 3efe6c630740..469599ef7b9f 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -51,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_Spot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..51251eda9679 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines.py @@ -0,0 +1,59 @@ +# 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.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.9.6", + "osType": "Linux", + "tags": {"name1": "val1"}, + "type": "VirtualMachines", + "virtualMachinesProfile": { + "scale": { + "manual": [{"count": 3, "size": "Standard_D2_v2"}, {"count": 2, "size": "Standard_D2_v3"}] + } + }, + } + }, + ).result() + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..8db52e4e3d0f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_type_virtual_machines_autoscale.py @@ -0,0 +1,57 @@ +# 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-03-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 df4235302c65..9a4b55df64da 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 fcd21e1fce7e..77ebf4869c85 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_WasmWasi.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 3684d8f0f9f8..afeba12ca646 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 b4f052688ca3..ca7c3814cb10 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsCreate_WindowsOSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 2b5b17e62af0..1057f2eccdc2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..7c5915aa69ee --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete_ignore_pod_disruption_budget.py @@ -0,0 +1,43 @@ +# 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-03-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 e17df4af1659..31e6e1b6fd09 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsDeleteMachines.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 8c414b652809..093b9d271dd4 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 add5d0275de8..f9b49e6baed2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 178aafe4632e..1caf3a5f7483 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsGetUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 d908ffa71880..e26f5b38808a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 440d918c9054..a9be50079daa 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPools_Start.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 dbb343f38666..442c576d1172 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPools_Stop.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 75c2a63ffbac..147b5c0f13bb 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPools_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7deb421954be..2d8a9b7dccc8 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/AgentPoolsUpgradeNodeImageVersion.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..8a1486e602c8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_guardrails_versions.py @@ -0,0 +1,43 @@ +# 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-03-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 new file mode 100644 index 000000000000..0de003a79dba --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/get_safeguards_versions.py @@ -0,0 +1,43 @@ +# 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-03-02-preview/examples/GetSafeguardsVersions.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 3e19b3a892ae..eb7f9c639e99 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/KubernetesVersions_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..b7b87269d147 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_guardrails_versions.py @@ -0,0 +1,43 @@ +# 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-03-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 new file mode 100644 index 000000000000..e29d21d1a845 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/list_safeguards_versions.py @@ -0,0 +1,43 @@ +# 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-03-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 new file mode 100644 index 000000000000..b791de801593 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_create_or_update.py @@ -0,0 +1,45 @@ +# 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-03-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 new file mode 100644 index 000000000000..bea134a7a696 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_delete.py @@ -0,0 +1,43 @@ +# 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-03-02-preview/examples/LoadBalancers_Delete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py new file mode 100644 index 000000000000..c448e018ed1b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_get.py @@ -0,0 +1,44 @@ +# 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_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.load_balancers.get( + 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-03-02-preview/examples/LoadBalancers_Get.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py new file mode 100644 index 000000000000..89d45716f83b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_list.py @@ -0,0 +1,44 @@ +# 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-03-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 new file mode 100644 index 000000000000..bf1e92d85c0f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/load_balancers_rebalance.py @@ -0,0 +1,43 @@ +# 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-03-02-preview/examples/LoadBalancers_Rebalance.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 b3ff9fa30589..11f0389408f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = ContainerServiceClient( credential=DefaultAzureCredential(), - subscription_id="26fe00f8-9173-4872-9134-bb1d2e00343a", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.machines.get( @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MachineGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 3e1ca699a5f7..e02cfedf9f81 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/machine_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -27,7 +28,7 @@ def main(): client = ContainerServiceClient( credential=DefaultAzureCredential(), - subscription_id="26fe00f8-9173-4872-9134-bb1d2e00343a", + subscription_id="00000000-0000-0000-0000-000000000000", ) response = client.machines.list( @@ -39,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MachineList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MachineList.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py index ac9f793167d4..a817b9896316 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsCreate_Update.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 507ebc42e4c6..335f451f00a8 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -53,6 +54,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py index faf7d1d9b03c..0f5f05bf81c6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsDelete.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 b60b852427f3..d73e3491dba2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py index d17923f884e9..dd86cd78c22f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsGet.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 c8d80af4c3f9..6bf7ad02ca52 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py index 5b7f488817ef..8fcf74595c0a 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/MaintenanceConfigurationsList.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 5f19632615cd..fe768c822388 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..2845b9972230 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_create.py @@ -0,0 +1,52 @@ +# 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-03-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 new file mode 100644 index 000000000000..bd8ff9d5f8c0 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_delete.py @@ -0,0 +1,42 @@ +# 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-03-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 new file mode 100644 index 000000000000..f7750790b4fa --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_get.py @@ -0,0 +1,43 @@ +# 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-03-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 new file mode 100644 index 000000000000..9b849cc76d09 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list.py @@ -0,0 +1,41 @@ +# 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-03-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 new file mode 100644 index 000000000000..e2e722d470b9 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_list_by_resource_group.py @@ -0,0 +1,43 @@ +# 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-03-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 new file mode 100644 index 000000000000..e42258b47d87 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_cluster_snapshots_update_tags.py @@ -0,0 +1,44 @@ +# 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-03-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 6e1c3c48fdb6..b0534ca3a370 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersAbortOperation.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/ManagedClustersAbortOperation.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_associate_crg.py new file mode 100644 index 000000000000..705f8d493952 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_associate_crg.py @@ -0,0 +1,77 @@ +# 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_associate_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, + 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": [ + { + "capacityReservationGroupID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1", + "count": 3, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_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", + "enablePodSecurityPolicy": 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-03-02-preview/examples/ManagedClustersAssociate_CRG.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 682a0cf1e4a7..341369f81fdb 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -75,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 1b243beea348..6b7502330f66 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -54,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -77,7 +78,7 @@ def main(): } }, "components": { - "egressGateways": [{"enabled": True}], + "egressGateways": [{"enabled": True, "name": "istioegress1"}], "ingressGateways": [{"enabled": True, "mode": "Internal"}], }, }, @@ -93,6 +94,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_AzureServiceMesh.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.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 4216063f016b..4886527e36a8 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,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", "enablePodSecurityPolicy": False, "enableRBAC": True, @@ -70,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_DedicatedHostGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 069204b6661b..d443dca7baa7 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_DisableRunCommand.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 c36745610b63..b86a00439b29 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,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", @@ -65,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -87,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_DualStackNetworking.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..75bfccfcf590 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ai_toolchain_operator.py @@ -0,0 +1,76 @@ +# 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-03-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_custom_ca_trust.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_custom_ca_trust.py new file mode 100644 index 000000000000..5c082c75b27c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_custom_ca_trust.py @@ -0,0 +1,80 @@ +# 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_custom_ca_trust.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, + "enableCustomCATrust": True, + "enableNodePublicIP": True, + "mode": "System", + "name": "nodepool1", + "osType": "Linux", + "type": "VirtualMachineScaleSets", + "vmSize": "Standard_DS2_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", + "enablePodSecurityPolicy": True, + "enableRBAC": True, + "kubernetesVersion": "", + "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, + "networkProfile": { + "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, + "loadBalancerSku": "standard", + "outboundType": "loadBalancer", + }, + "securityProfile": { + "customCATrustCertificates": ["ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ="] + }, + "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-03-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.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 78ed41a2c784..991a3af05eaa 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 cff7600e29d9..e9638e7c7cc9 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_EnableUltraSSD.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 914f5fdec08f..c8017c78daf0 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": False, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_EnabledFIPS.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 c1928d57f832..12a6495293b7 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -77,6 +78,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_GPUMIG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 8ed526a98a52..708e4d5c5ebc 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -76,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_HTTPProxy.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/ManagedClustersCreate_HTTPProxy.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 9ee756749cc9..086422d178cc 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 9af1ba2a10d6..4cb18773e250 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -70,6 +71,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_ManagedNATGateway.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..b42a44edf08c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_mcsnapshot.py @@ -0,0 +1,69 @@ +# 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-03-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 new file mode 100644 index 000000000000..d0018d6fc9cd --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_auto_provisioning.py @@ -0,0 +1,76 @@ +# 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", + "enablePodSecurityPolicy": True, + "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-03-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 e44b9881b7e7..aec871dfcd85 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 e3973847ad6f..2a11a51c0dda 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -77,6 +78,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_OSSKU.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 6d7c9da984ea..8928ea249b43 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_PodIdentity.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 8d01ae4e8a61..0627b02eb287 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -50,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_PPG.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 86a9713c91a0..aa23e7a78c59 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -72,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_Premium.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 53ecca69ae6f..3f928f24d9b2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -74,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 4f658d0ecfc2..5281952fd3e2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -71,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7a18422f7a96..8d27fe6156ca 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -58,9 +59,21 @@ 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"}, @@ -70,6 +83,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_SecurityProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 abe7c4c4bd5c..0013a9fe76df 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,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, @@ -53,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", "enablePodSecurityPolicy": False, "enableRBAC": True, @@ -74,6 +75,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_Snapshot.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 33a58ee054f9..a4137090a7ac 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,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", @@ -65,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -77,7 +78,7 @@ def main(): "outboundType": "loadBalancer", }, "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "upgradeSettings": {"overrideSettings": {"forceUpgrade": False, "until": "2022-11-01T13:00:00Z"}}, + "upgradeSettings": {"overrideSettings": {"forceUpgrade": True, "until": "2022-11-01T13:00:00Z"}}, "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, }, "sku": {"name": "Basic", "tier": "Free"}, @@ -87,6 +88,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_Update.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 1197ce600af0..d9d6648dac0a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,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", @@ -56,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -81,6 +82,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 38f413e9a306..e68e0b9b96fa 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,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", @@ -56,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -81,6 +82,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_UpdateWithAHUB.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7025f81d64f2..a93aa2d9c1ea 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -51,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -72,6 +73,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..9fa6cd046ea5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_namespace_resources.py @@ -0,0 +1,78 @@ +# 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, + "enablePodSecurityPolicy": 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-03-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 f2dc406ab6f1..a0d72a25b37f 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,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", "enablePodSecurityPolicy": True, "enableRBAC": True, @@ -66,6 +67,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..d866fd2db88a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_virtual_machines.py @@ -0,0 +1,74 @@ +# 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", + "enablePodSecurityPolicy": False, + "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-03-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 fe7865bbae5d..50b9367df927 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 57a043ae0e22..4f6f36f40179 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 89ce23d5646d..96e5f306e825 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersGetAccessProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 640d7484035f..21a3b4944e34 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersGet_MeshRevisionProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 9bff40459873..d442be5b6feb 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersGet_MeshUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 2e7bd59c6594..434264ffa623 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersGetUpgradeProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 049b5281eee3..9b0b540240cd 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 137dffe5b03e..bdd9fbcf7752 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersListByResourceGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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_credential_result.py new file mode 100644 index 000000000000..a9a3e5e3458f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_credential_result.py @@ -0,0 +1,43 @@ +# 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_list_cluster_credential_result.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_cluster_admin_credentials( + resource_group_name="rg1", + resource_name="clustername1", + ) + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/ManagedClustersListClusterCredentialResult.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 cceba68e3b41..ea46fc78f518 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersList_MeshRevisionProfiles.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 ec36a1caf63d..e4ed793ece8d 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersList_MeshUpgradeProfiles.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 c60f7c7bb33b..06ebf06c7be0 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -42,6 +43,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersResetAADProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 f63a669f94fd..34173a8e1db5 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersResetServicePrincipalProfile.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 6c0e8cc6f9f0..95f7da0b25e0 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersRotateClusterCertificates.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 1be25bd47822..4ea04138444a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 ed0f8d93f804..246ff20056de 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersStart.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 3c398590cf8c..c12eed6bcb32 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersStop.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 78b4d22f798a..c96f6fca381d 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ManagedClustersUpdateTags.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/ManagedClustersUpdateTags.json if __name__ == "__main__": main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_create_update.py new file mode 100644 index 000000000000..f84dfbfb5594 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_create_update.py @@ -0,0 +1,60 @@ +# 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 namespaces_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.namespaces.begin_create_or_update( + resource_group_name="rg1", + resource_name="clustername1", + namespace_name="namespace1", + parameters={ + "properties": { + "adoptionPolicy": "IfIdentical", + "annotations": {"annatationKey": "annatationValue"}, + "defaultNetworkPolicy": {"egress": "AllowAll", "ingress": "AllowSameNamespace"}, + "defaultResourceQuota": { + "cpuLimit": "3m", + "cpuRequest": "3m", + "memoryLimit": "5Gi", + "memoryRequest": "5Gi", + }, + "deletePolicy": "Keep", + "labels": {"kubernetes.io/metadata.name": "true"}, + }, + "tags": {"tagKey1": "tagValue1"}, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/NamespacesCreate_Update.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_delete.py new file mode 100644 index 000000000000..e2d0d78df029 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_delete.py @@ -0,0 +1,43 @@ +# 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 namespaces_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.namespaces.begin_delete( + resource_group_name="rg1", + resource_name="clustername1", + namespace_name="namespace1", + ).result() + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/NamespacesDelete.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_get.py new file mode 100644 index 000000000000..13aceae9dfa8 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_get.py @@ -0,0 +1,44 @@ +# 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 namespaces_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.namespaces.get( + resource_group_name="rg1", + resource_name="clustername1", + namespace_name="namespace1", + ) + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/NamespacesGet.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list.py new file mode 100644 index 000000000000..230ba9075a60 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list.py @@ -0,0 +1,44 @@ +# 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 namespaces_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.namespaces.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-03-02-preview/examples/NamespacesList.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list_credential_result.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list_credential_result.py new file mode 100644 index 000000000000..ad08ace815d5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_list_credential_result.py @@ -0,0 +1,44 @@ +# 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 namespaces_list_credential_result.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.namespaces.list_credential( + resource_group_name="rg1", + resource_name="clustername1", + namespace_name="namespace1", + ) + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/NamespacesListCredentialResult.json +if __name__ == "__main__": + main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_update_tags.py new file mode 100644 index 000000000000..89c456a13536 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/namespaces_update_tags.py @@ -0,0 +1,45 @@ +# 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 namespaces_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.namespaces.update( + resource_group_name="rg1", + resource_name="clustername1", + namespace_name="namespace1", + parameters={"tags": {"tagKey1": "tagValue1", "tagKey2": "tagValue2"}}, + ) + print(response) + + +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/examples/NamespacesUpdateTags.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 new file mode 100644 index 000000000000..1cadfefcca75 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/node_image_versions_list.py @@ -0,0 +1,43 @@ +# 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-03-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 79403f29d1dd..85dc726dcf24 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/Operation_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 new file mode 100644 index 000000000000..236bce4e49cc --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get.py @@ -0,0 +1,44 @@ +# 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-03-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 new file mode 100644 index 000000000000..9fba2a99ee8e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_get_by_agent_pool.py @@ -0,0 +1,45 @@ +# 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-03-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 new file mode 100644 index 000000000000..0124a94e700e --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_status_result_list.py @@ -0,0 +1,44 @@ +# 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-03-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 714e14244395..bfe915865f53 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/OutboundNetworkDependenciesEndpointsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 d11a87c729fd..5d4e77a4f4d5 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/PrivateEndpointConnectionsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 60e8339e0d5b..67f7893a502a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/PrivateEndpointConnectionsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 2d3c7857105e..81e1be4220c0 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/PrivateEndpointConnectionsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 f438cdff10e1..714e10abec85 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/PrivateEndpointConnectionsUpdate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 79167749e701..dbdcabe64d46 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/PrivateLinkResourcesList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 1b49385576bf..c50bb3779280 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/ResolvePrivateLinkServiceId.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 1d064eaba16e..776753d9bad6 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/RunCommandRequest.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 e1436c67b30c..ad10096e4bab 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/RunCommandResultFailed.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 3d35742ead80..282f0488a32c 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/RunCommandResultSucceed.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 58a4421516ca..14905d7a227f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsCreate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 81083d599655..e38dc1ffd276 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsDelete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 c235c5a9d778..ed325c0e0093 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsGet.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 7a07bea22a1e..50ae339ebebe 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsList.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 56c958ae5909..8d42112a512f 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsListByResourceGroup.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 bcb94d6b7116..0a637ae3d604 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/SnapshotsUpdateTags.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 36b1ef96991b..b069d07513d2 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 ac83c52f670a..fbeff79d4447 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/TrustedAccessRoleBindings_Delete.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 03ada8f5cd49..afd725650bfe 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/TrustedAccessRoleBindings_Get.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 e6fa1ead1e47..75ddfede75a1 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/TrustedAccessRoleBindings_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 9bb99e2b4a99..7eec2e9c565f 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-02-01/examples/TrustedAccessRoles_List.json +# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-03-02-preview/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 c69023c959a1..7d14022f888b 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ).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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -64,6 +64,7 @@ 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, @@ -71,12 +72,14 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "currentOrchestratorVersion": "str", "eTag": "str", "enableAutoScaling": bool, + "enableCustomCATrust": bool, "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, "enableUltraSSD": bool, + "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": {"driver": "str", "driverType": "str"}, "hostGroupID": "str", "id": "str", "kubeletConfig": { @@ -90,6 +93,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, + "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -140,6 +144,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -148,6 +153,7 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "osDiskType": "str", "osSKU": "str", "osType": "Linux", + "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, "provisioningState": "str", @@ -155,17 +161,27 @@ def test_agent_pools_begin_create_or_update(self, resource_group): "scaleDownMode": "str", "scaleSetEvictionPolicy": "Delete", "scaleSetPriority": "Regular", - "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool}, + "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool, "sshAccess": "str"}, "spotMaxPrice": -1, + "status": {"provisioningError": {"code": "str", "details": [...], "message": "str", "target": "str"}}, "tags": {"str": "str"}, "type": "str", - "upgradeSettings": {"drainTimeoutInMinutes": 0, "maxSurge": "str", "nodeSoakDurationInMinutes": 0}, + "upgradeSettings": { + "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", + "maxSurge": "str", + "maxUnavailable": "str", + "nodeSoakDurationInMinutes": 0, + "undrainableNodeBehavior": "str", + }, + "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], + "virtualMachinesProfile": {"scale": {"autoscale": {}, "manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, "workloadRuntime": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -178,7 +194,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -191,7 +207,7 @@ 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -205,7 +221,7 @@ def test_agent_pools_begin_delete_machines(self, resource_group): resource_name="str", agent_pool_name="str", machines={"machineNames": ["str"]}, - api_version="2025-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -217,7 +233,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -230,7 +246,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-02-01", + api_version="2025-03-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_agent_pools_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_agent_pools_operations_async.py index 8d48196f1715..44f4f33ce196 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) ).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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -68,6 +68,7 @@ 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, @@ -75,12 +76,14 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "currentOrchestratorVersion": "str", "eTag": "str", "enableAutoScaling": bool, + "enableCustomCATrust": bool, "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, "enableUltraSSD": bool, + "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": {"driver": "str", "driverType": "str"}, "hostGroupID": "str", "id": "str", "kubeletConfig": { @@ -94,6 +97,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, + "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -144,6 +148,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -152,6 +157,7 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "osDiskType": "str", "osSKU": "str", "osType": "Linux", + "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, "provisioningState": "str", @@ -159,17 +165,29 @@ async def test_agent_pools_begin_create_or_update(self, resource_group): "scaleDownMode": "str", "scaleSetEvictionPolicy": "Delete", "scaleSetPriority": "Regular", - "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool}, + "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool, "sshAccess": "str"}, "spotMaxPrice": -1, + "status": { + "provisioningError": {"code": "str", "details": [...], "message": "str", "target": "str"} + }, "tags": {"str": "str"}, "type": "str", - "upgradeSettings": {"drainTimeoutInMinutes": 0, "maxSurge": "str", "nodeSoakDurationInMinutes": 0}, + "upgradeSettings": { + "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", + "maxSurge": "str", + "maxUnavailable": "str", + "nodeSoakDurationInMinutes": 0, + "undrainableNodeBehavior": "str", + }, + "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], + "virtualMachinesProfile": {"scale": {"autoscale": {}, "manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, "workloadRuntime": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -184,7 +202,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -198,7 +216,7 @@ 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -213,7 +231,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -226,7 +244,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -240,7 +258,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py new file mode 100644 index 000000000000..4e3df58c8faf --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceContainerServiceOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_container_service_list_node_image_versions(self, resource_group): + response = self.client.container_service.list_node_image_versions( + location="str", + api_version="2025-03-02-preview", + ) + result = [r for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py new file mode 100644 index 000000000000..1f94d819657d --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_container_service_operations_async.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceContainerServiceOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_container_service_list_node_image_versions(self, resource_group): + response = self.client.container_service.list_node_image_versions( + location="str", + api_version="2025-03-02-preview", + ) + result = [r async for r in response] + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py index 3429107a8870..8a323f73ceb0 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_managed_cluster(self, resource_group): + def test_load_balancers_list_by_managed_cluster(self, resource_group): response = self.client.load_balancers.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list_by_managed_cluster(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_load_balancers_get(self, resource_group): response = self.client.load_balancers.get( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -45,12 +45,40 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_load_balancers_create_or_update(self, resource_group): response = self.client.load_balancers.create_or_update( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + parameters={ + "allowServicePlacement": bool, + "id": "str", + "name": "str", + "nodeSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "primaryAgentPoolName": "str", + "provisioningState": "str", + "serviceLabelSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceNamespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -58,12 +86,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_load_balancers_begin_delete(self, resource_group): response = self.client.load_balancers.begin_delete( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-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_load_balancers_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py index 12060765f3df..c10ba3e56d27 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_load_balancers_operations_async.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_managed_cluster(self, resource_group): + async def test_load_balancers_list_by_managed_cluster(self, resource_group): response = self.client.load_balancers.list_by_managed_cluster( resource_group_name=resource_group.name, resource_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list_by_managed_cluster(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_load_balancers_get(self, resource_group): response = await self.client.load_balancers.get( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -46,12 +46,40 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_load_balancers_create_or_update(self, resource_group): response = await self.client.load_balancers.create_or_update( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + parameters={ + "allowServicePlacement": bool, + "id": "str", + "name": "str", + "nodeSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "primaryAgentPoolName": "str", + "provisioningState": "str", + "serviceLabelSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "serviceNamespaceSelector": { + "matchExpressions": [{"key": "str", "operator": "str", "values": ["str"]}], + "matchLabels": ["str"], + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "type": "str", + }, + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -59,13 +87,13 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_load_balancers_begin_delete(self, resource_group): response = await ( await self.client.load_balancers.begin_delete( resource_group_name=resource_group.name, resource_name="str", load_balancer_name="str", - api_version="2024-03-02-preview", + api_version="2025-03-02-preview", ) ).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 5729ad07ad2e..cdc1c4e7d9f8 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -39,7 +39,7 @@ def test_machines_get(self, resource_group): resource_name="str", agent_pool_name="str", machine_name="str", - api_version="2025-02-01", + api_version="2025-03-02-preview", ) # 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 efb7eb9e951c..c06f4a7df3da 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -40,7 +40,7 @@ async def test_machines_get(self, resource_group): resource_name="str", agent_pool_name="str", machine_name="str", - api_version="2025-02-01", + api_version="2025-03-02-preview", ) # 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 4f0b1e11977d..18ef282b470b 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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 6604cc8b7448..33c67590b797 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py index 3c4a64630511..9f92ba111547 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -20,9 +20,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_managed_cluster_snapshots_list(self, resource_group): response = self.client.managed_cluster_snapshots.list( - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -30,10 +30,10 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_resource_group(self, resource_group): + def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): response = self.client.managed_cluster_snapshots.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -41,11 +41,11 @@ def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_managed_cluster_snapshots_get(self, resource_group): response = self.client.managed_cluster_snapshots.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -53,7 +53,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_create_or_update(self, resource_group): + def test_managed_cluster_snapshots_create_or_update(self, resource_group): response = self.client.managed_cluster_snapshots.create_or_update( resource_group_name=resource_group.name, resource_name="str", @@ -67,7 +67,8 @@ def test_create_or_update(self, resource_group): "networkProfile": { "loadBalancerSku": "str", "networkMode": "str", - "networkPlugin": "kubenet", + "networkPlugin": "str", + "networkPluginMode": "str", "networkPolicy": "str", }, "sku": {"name": "str", "tier": "str"}, @@ -85,7 +86,7 @@ def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -93,12 +94,12 @@ def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update_tags(self, resource_group): + def test_managed_cluster_snapshots_update_tags(self, resource_group): response = self.client.managed_cluster_snapshots.update_tags( resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -106,11 +107,11 @@ def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete(self, resource_group): + def test_managed_cluster_snapshots_delete(self, resource_group): response = self.client.managed_cluster_snapshots.delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py index 6d7dfdc5241f..18f50dfb1c6c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_managed_cluster_snapshots_operations_async.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -21,9 +21,9 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_managed_cluster_snapshots_list(self, resource_group): response = self.client.managed_cluster_snapshots.list( - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -31,10 +31,10 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_resource_group(self, resource_group): + async def test_managed_cluster_snapshots_list_by_resource_group(self, resource_group): response = self.client.managed_cluster_snapshots.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -42,11 +42,11 @@ async def test_list_by_resource_group(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_managed_cluster_snapshots_get(self, resource_group): response = await self.client.managed_cluster_snapshots.get( resource_group_name=resource_group.name, resource_name="str", - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -54,7 +54,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_create_or_update(self, resource_group): + async def test_managed_cluster_snapshots_create_or_update(self, resource_group): response = await self.client.managed_cluster_snapshots.create_or_update( resource_group_name=resource_group.name, resource_name="str", @@ -68,7 +68,8 @@ async def test_create_or_update(self, resource_group): "networkProfile": { "loadBalancerSku": "str", "networkMode": "str", - "networkPlugin": "kubenet", + "networkPlugin": "str", + "networkPluginMode": "str", "networkPolicy": "str", }, "sku": {"name": "str", "tier": "str"}, @@ -86,7 +87,7 @@ async def test_create_or_update(self, resource_group): "tags": {"str": "str"}, "type": "str", }, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -94,12 +95,12 @@ async def test_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update_tags(self, resource_group): + async def test_managed_cluster_snapshots_update_tags(self, resource_group): response = await self.client.managed_cluster_snapshots.update_tags( resource_group_name=resource_group.name, resource_name="str", parameters={"tags": {"str": "str"}}, - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -107,11 +108,11 @@ async def test_update_tags(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete(self, resource_group): + async def test_managed_cluster_snapshots_delete(self, resource_group): response = await self.client.managed_cluster_snapshots.delete( resource_group_name=resource_group.name, resource_name="str", - api_version="2022-02-02-preview", + api_version="2025-03-02-preview", ) # 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 fba8269b9fd0..c53ec89a263e 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -150,6 +150,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "agentPoolProfiles": [ { "name": "str", + "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -157,12 +158,14 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "currentOrchestratorVersion": "str", "eTag": "str", "enableAutoScaling": bool, + "enableCustomCATrust": bool, "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, "enableUltraSSD": bool, + "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": {"driver": "str", "driverType": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -175,6 +178,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, + "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -224,6 +228,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -232,6 +237,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "osDiskType": "str", "osSKU": "str", "osType": "Linux", + "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, "provisioningState": "str", @@ -239,27 +245,38 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "scaleDownMode": "str", "scaleSetEvictionPolicy": "Delete", "scaleSetPriority": "Regular", - "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool}, + "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool, "sshAccess": "str"}, "spotMaxPrice": -1, + "status": { + "provisioningError": {"code": "str", "details": [...], "message": "str", "target": "str"} + }, "tags": {"str": "str"}, "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", + "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, + "undrainableNodeBehavior": "str", }, + "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], + "virtualMachinesProfile": {"scale": {"autoscale": {}, "manual": [{"count": 0, "size": "str"}]}}, "vmSize": "str", "vnetSubnetID": "str", "windowsProfile": {"disableOutboundNat": bool}, "workloadRuntime": "str", } ], + "aiToolchainOperatorProfile": {"enabled": bool}, "apiServerAccessProfile": { "authorizedIPRanges": ["str"], "disableRunCommand": bool, "enablePrivateCluster": bool, "enablePrivateClusterPublicFQDN": bool, + "enableVnetIntegration": bool, "privateDNSZone": "str", + "subnetId": "str", }, "autoScalerProfile": { "balance-similar-node-groups": "str", @@ -285,24 +302,44 @@ 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, "enablePodSecurityPolicy": bool, "enableRBAC": bool, "extendedLocation": {"name": "str", "type": "str"}, "fqdn": "str", "fqdnSubdomain": "str", - "httpProxyConfig": {"httpProxy": "str", "httpsProxy": "str", "noProxy": ["str"], "trustedCa": "str"}, + "httpProxyConfig": { + "effectiveNoProxy": ["str"], + "httpProxy": "str", + "httpsProxy": "str", + "noProxy": ["str"], + "trustedCa": "str", + }, "id": "str", "identity": { "delegatedResources": { @@ -322,6 +359,7 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "nginx": {"defaultIngressControllerType": "str"}, } }, + "kind": "str", "kubernetesVersion": "str", "linuxProfile": {"adminUsername": "str", "ssh": {"publicKeys": [{"keyData": "str"}]}}, "maxAgentPools": 0, @@ -331,13 +369,24 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "advancedNetworking": { "enabled": bool, "observability": {"enabled": bool}, - "security": {"enabled": bool}, + "security": {"advancedNetworkPolicies": "str", "enabled": bool, "transitEncryption": "str"}, }, "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, @@ -359,9 +408,12 @@ 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}, }, + "nodeProvisioningProfile": {"mode": "str"}, "nodeResourceGroup": "str", "nodeResourceGroupProfile": {"restrictionLevel": "str"}, "oidcIssuerProfile": {"enabled": bool, "issuerURL": "str"}, @@ -399,6 +451,12 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "resourceUID": "str", + "safeguardsProfile": { + "level": "str", + "excludedNamespaces": ["str"], + "systemExcludedNamespaces": ["str"], + "version": "str", + }, "securityProfile": { "azureKeyVaultKms": { "enabled": bool, @@ -407,8 +465,23 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): "keyVaultResourceId": "str", }, "customCATrustCertificates": [bytes("bytes", encoding="utf-8")], - "defender": {"logAnalyticsWorkspaceResourceId": "str", "securityMonitoring": {"enabled": bool}}, + "defender": { + "logAnalyticsWorkspaceResourceId": "str", + "securityGating": { + "allowSecretAccess": bool, + "enabled": bool, + "identities": [ + { + "azureContainerRegistry": "str", + "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, + } + ], + }, + "securityMonitoring": {"enabled": bool}, + }, "imageCleaner": {"enabled": bool, "intervalHours": 0}, + "imageIntegrity": {"enabled": bool}, + "nodeRestriction": {"enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -424,7 +497,9 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): } }, "components": { - "egressGateways": [{"enabled": bool}], + "egressGateways": [ + {"enabled": bool, "name": "str", "gatewayConfigurationName": "str", "namespace": "str"} + ], "ingressGateways": [{"enabled": bool, "mode": "str"}], }, "revisions": ["str"], @@ -432,9 +507,10 @@ def test_managed_clusters_begin_create_or_update(self, resource_group): }, "servicePrincipalProfile": {"clientId": "str", "secret": "str"}, "sku": {"name": "str", "tier": "str"}, + "status": {"provisioningError": {"code": "str", "details": [...], "message": "str", "target": "str"}}, "storageProfile": { "blobCSIDriver": {"enabled": bool}, - "diskCSIDriver": {"enabled": bool}, + "diskCSIDriver": {"enabled": bool, "version": "str"}, "fileCSIDriver": {"enabled": bool}, "snapshotController": {"enabled": bool}, }, @@ -457,9 +533,12 @@ 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}}, + "workloadAutoScalerProfile": { + "keda": {"enabled": bool}, + "verticalPodAutoscaler": {"enabled": False, "addonAutoscaling": "Disabled"}, + }, }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -472,7 +551,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -484,7 +563,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -497,7 +576,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -518,7 +597,7 @@ def test_managed_clusters_begin_reset_aad_profile(self, resource_group): "serverAppSecret": "str", "tenantID": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -526,11 +605,11 @@ def test_managed_clusters_begin_reset_aad_profile(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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -538,11 +617,11 @@ def test_managed_clusters_begin_rotate_cluster_certificates(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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -554,7 +633,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -566,7 +645,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -578,7 +657,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -591,7 +670,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-02-01", + api_version="2025-03-02-preview", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -604,7 +683,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -616,7 +695,53 @@ 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-02-01", + api_version="2025-03-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-03-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-03-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-03-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-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -627,7 +752,7 @@ def test_managed_clusters_list_outbound_network_dependencies_endpoints(self, res 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-02-01", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -639,7 +764,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -651,7 +776,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-02-01", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -664,8 +789,21 @@ 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-02-01", + api_version="2025-03-02-preview", ) # 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-03-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 9c7735fdb229..06b6fe705812 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -152,6 +152,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "agentPoolProfiles": [ { "name": "str", + "artifactStreamingProfile": {"enabled": bool}, "availabilityZones": ["str"], "capacityReservationGroupID": "str", "count": 0, @@ -159,12 +160,14 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "currentOrchestratorVersion": "str", "eTag": "str", "enableAutoScaling": bool, + "enableCustomCATrust": bool, "enableEncryptionAtHost": bool, "enableFIPS": bool, "enableNodePublicIP": bool, "enableUltraSSD": bool, + "gatewayProfile": {"publicIPPrefixSize": 31}, "gpuInstanceProfile": "str", - "gpuProfile": {"driver": "str"}, + "gpuProfile": {"driver": "str", "driverType": "str"}, "hostGroupID": "str", "kubeletConfig": { "allowedUnsafeSysctls": ["str"], @@ -177,6 +180,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "imageGcHighThreshold": 0, "imageGcLowThreshold": 0, "podMaxPids": 0, + "seccompDefault": "str", "topologyManagerPolicy": "str", }, "kubeletDiskType": "str", @@ -226,6 +230,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "nodePublicIPTags": [{"ipTagType": "str", "tag": "str"}], }, "nodeImageVersion": "str", + "nodeInitializationTaints": ["str"], "nodeLabels": {"str": "str"}, "nodePublicIPPrefixID": "str", "nodeTaints": ["str"], @@ -234,6 +239,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "osDiskType": "str", "osSKU": "str", "osType": "Linux", + "podIPAllocationMode": "str", "podSubnetID": "str", "powerState": {"code": "str"}, "provisioningState": "str", @@ -241,14 +247,29 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "scaleDownMode": "str", "scaleSetEvictionPolicy": "Delete", "scaleSetPriority": "Regular", - "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool}, + "securityProfile": {"enableSecureBoot": bool, "enableVTPM": bool, "sshAccess": "str"}, "spotMaxPrice": -1, + "status": { + "provisioningError": { + "code": "str", + "details": [...], + "message": "str", + "target": "str", + } + }, "tags": {"str": "str"}, "type": "str", "upgradeSettings": { "drainTimeoutInMinutes": 0, + "maxBlockedNodes": "str", "maxSurge": "str", + "maxUnavailable": "str", "nodeSoakDurationInMinutes": 0, + "undrainableNodeBehavior": "str", + }, + "virtualMachineNodesStatus": [{"count": 0, "size": "str"}], + "virtualMachinesProfile": { + "scale": {"autoscale": {}, "manual": [{"count": 0, "size": "str"}]} }, "vmSize": "str", "vnetSubnetID": "str", @@ -256,12 +277,15 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "workloadRuntime": "str", } ], + "aiToolchainOperatorProfile": {"enabled": bool}, "apiServerAccessProfile": { "authorizedIPRanges": ["str"], "disableRunCommand": bool, "enablePrivateCluster": bool, "enablePrivateClusterPublicFQDN": bool, + "enableVnetIntegration": bool, "privateDNSZone": "str", + "subnetId": "str", }, "autoScalerProfile": { "balance-similar-node-groups": "str", @@ -287,24 +311,39 @@ 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, "enablePodSecurityPolicy": bool, "enableRBAC": bool, "extendedLocation": {"name": "str", "type": "str"}, "fqdn": "str", "fqdnSubdomain": "str", "httpProxyConfig": { + "effectiveNoProxy": ["str"], "httpProxy": "str", "httpsProxy": "str", "noProxy": ["str"], @@ -334,6 +373,7 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "nginx": {"defaultIngressControllerType": "str"}, } }, + "kind": "str", "kubernetesVersion": "str", "linuxProfile": {"adminUsername": "str", "ssh": {"publicKeys": [{"keyData": "str"}]}}, "maxAgentPools": 0, @@ -343,13 +383,24 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "advancedNetworking": { "enabled": bool, "observability": {"enabled": bool}, - "security": {"enabled": bool}, + "security": {"advancedNetworkPolicies": "str", "enabled": bool, "transitEncryption": "str"}, }, "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, @@ -371,9 +422,12 @@ 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}, }, + "nodeProvisioningProfile": {"mode": "str"}, "nodeResourceGroup": "str", "nodeResourceGroupProfile": {"restrictionLevel": "str"}, "oidcIssuerProfile": {"enabled": bool, "issuerURL": "str"}, @@ -413,6 +467,12 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "provisioningState": "str", "publicNetworkAccess": "str", "resourceUID": "str", + "safeguardsProfile": { + "level": "str", + "excludedNamespaces": ["str"], + "systemExcludedNamespaces": ["str"], + "version": "str", + }, "securityProfile": { "azureKeyVaultKms": { "enabled": bool, @@ -421,8 +481,23 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): "keyVaultResourceId": "str", }, "customCATrustCertificates": [bytes("bytes", encoding="utf-8")], - "defender": {"logAnalyticsWorkspaceResourceId": "str", "securityMonitoring": {"enabled": bool}}, + "defender": { + "logAnalyticsWorkspaceResourceId": "str", + "securityGating": { + "allowSecretAccess": bool, + "enabled": bool, + "identities": [ + { + "azureContainerRegistry": "str", + "identity": {"clientId": "str", "objectId": "str", "resourceId": "str"}, + } + ], + }, + "securityMonitoring": {"enabled": bool}, + }, "imageCleaner": {"enabled": bool, "intervalHours": 0}, + "imageIntegrity": {"enabled": bool}, + "nodeRestriction": {"enabled": bool}, "workloadIdentity": {"enabled": bool}, }, "serviceMeshProfile": { @@ -438,7 +513,14 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): } }, "components": { - "egressGateways": [{"enabled": bool}], + "egressGateways": [ + { + "enabled": bool, + "name": "str", + "gatewayConfigurationName": "str", + "namespace": "str", + } + ], "ingressGateways": [{"enabled": bool, "mode": "str"}], }, "revisions": ["str"], @@ -446,9 +528,12 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "servicePrincipalProfile": {"clientId": "str", "secret": "str"}, "sku": {"name": "str", "tier": "str"}, + "status": { + "provisioningError": {"code": "str", "details": [...], "message": "str", "target": "str"} + }, "storageProfile": { "blobCSIDriver": {"enabled": bool}, - "diskCSIDriver": {"enabled": bool}, + "diskCSIDriver": {"enabled": bool, "version": "str"}, "fileCSIDriver": {"enabled": bool}, "snapshotController": {"enabled": bool}, }, @@ -473,10 +558,10 @@ async def test_managed_clusters_begin_create_or_update(self, resource_group): }, "workloadAutoScalerProfile": { "keda": {"enabled": bool}, - "verticalPodAutoscaler": {"enabled": False}, + "verticalPodAutoscaler": {"enabled": False, "addonAutoscaling": "Disabled"}, }, }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -491,7 +576,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -505,7 +590,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -520,7 +605,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -543,7 +628,7 @@ async def test_managed_clusters_begin_reset_aad_profile(self, resource_group): "serverAppSecret": "str", "tenantID": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -552,12 +637,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_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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -566,12 +651,12 @@ async def test_managed_clusters_begin_rotate_cluster_certificates(self, resource @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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -585,7 +670,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -599,7 +684,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -613,7 +698,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -628,7 +713,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-02-01", + api_version="2025-03-02-preview", ) ).result() # call '.result()' to poll until service return final result @@ -642,7 +727,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -654,7 +739,53 @@ 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-02-01", + api_version="2025-03-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-03-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-03-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-03-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-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -665,7 +796,7 @@ async def test_managed_clusters_list_outbound_network_dependencies_endpoints(sel 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-02-01", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -677,7 +808,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-02-01", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -689,7 +820,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-02-01", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -702,8 +833,23 @@ 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-02-01", + api_version="2025-03-02-preview", ) # 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-03-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_namespaces_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_namespaces_operations.py new file mode 100644 index 000000000000..5b411f5d21d6 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_namespaces_operations.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceNamespacesOperations(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_namespaces_list_by_managed_cluster(self, resource_group): + response = self.client.namespaces.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + api_version="2025-03-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_namespaces_get(self, resource_group): + response = self.client.namespaces.get( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_namespaces_begin_create_or_update(self, resource_group): + response = self.client.namespaces.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + parameters={ + "eTag": "str", + "id": "str", + "location": "str", + "name": "str", + "properties": { + "adoptionPolicy": "str", + "annotations": {"str": "str"}, + "defaultNetworkPolicy": {"egress": "str", "ingress": "str"}, + "defaultResourceQuota": { + "cpuLimit": "str", + "cpuRequest": "str", + "memoryLimit": "str", + "memoryRequest": "str", + }, + "deletePolicy": "str", + "labels": {"str": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-03-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_namespaces_begin_delete(self, resource_group): + response = self.client.namespaces.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-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_namespaces_update(self, resource_group): + response = self.client.namespaces.update( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + parameters={"tags": {"str": "str"}}, + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy + def test_namespaces_list_credential(self, resource_group): + response = self.client.namespaces.list_credential( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_namespaces_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_namespaces_operations_async.py new file mode 100644 index 000000000000..96e1bfd4d912 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_namespaces_operations_async.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import pytest +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient + +from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer +from devtools_testutils.aio import recorded_by_proxy_async + +AZURE_LOCATION = "eastus" + + +@pytest.mark.skip("you may need to update the auto-generated test case before run it") +class TestContainerServiceNamespacesOperationsAsync(AzureMgmtRecordedTestCase): + def setup_method(self, method): + self.client = self.create_mgmt_client(ContainerServiceClient, is_async=True) + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_namespaces_list_by_managed_cluster(self, resource_group): + response = self.client.namespaces.list_by_managed_cluster( + resource_group_name=resource_group.name, + resource_name="str", + api_version="2025-03-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_namespaces_get(self, resource_group): + response = await self.client.namespaces.get( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_namespaces_begin_create_or_update(self, resource_group): + response = await ( + await self.client.namespaces.begin_create_or_update( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + parameters={ + "eTag": "str", + "id": "str", + "location": "str", + "name": "str", + "properties": { + "adoptionPolicy": "str", + "annotations": {"str": "str"}, + "defaultNetworkPolicy": {"egress": "str", "ingress": "str"}, + "defaultResourceQuota": { + "cpuLimit": "str", + "cpuRequest": "str", + "memoryLimit": "str", + "memoryRequest": "str", + }, + "deletePolicy": "str", + "labels": {"str": "str"}, + "provisioningState": "str", + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, + "tags": {"str": "str"}, + "type": "str", + }, + api_version="2025-03-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_namespaces_begin_delete(self, resource_group): + response = await ( + await self.client.namespaces.begin_delete( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-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_namespaces_update(self, resource_group): + response = await self.client.namespaces.update( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + parameters={"tags": {"str": "str"}}, + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... + + @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) + @recorded_by_proxy_async + async def test_namespaces_list_credential(self, resource_group): + response = await self.client.namespaces.list_credential( + resource_group_name=resource_group.name, + resource_name="str", + namespace_name="str", + api_version="2025-03-02-preview", + ) + + # please add some check logic here by yourself + # ... diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py index 1f65de5f183b..eb816bb300f2 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -20,11 +20,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_operation_status_result_list(self, resource_group): response = self.client.operation_status_result.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) result = [r for r in response] # please add some check logic here by yourself @@ -32,12 +32,12 @@ def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_operation_status_result_get(self, resource_group): response = self.client.operation_status_result.get( resource_group_name=resource_group.name, resource_name="str", operation_id="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -45,13 +45,13 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_agent_pool(self, resource_group): + def test_operation_status_result_get_by_agent_pool(self, resource_group): response = self.client.operation_status_result.get_by_agent_pool( resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", operation_id="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py index 47ab06412f48..6ec98e83beec 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py +++ b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_operation_status_result_operations_async.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -21,11 +21,11 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_operation_status_result_list(self, resource_group): response = self.client.operation_status_result.list( resource_group_name=resource_group.name, resource_name="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself @@ -33,12 +33,12 @@ async def test_list(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_operation_status_result_get(self, resource_group): response = await self.client.operation_status_result.get( resource_group_name=resource_group.name, resource_name="str", operation_id="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) # please add some check logic here by yourself @@ -46,13 +46,13 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_agent_pool(self, resource_group): + async def test_operation_status_result_get_by_agent_pool(self, resource_group): response = await self.client.operation_status_result.get_by_agent_pool( resource_group_name=resource_group.name, resource_name="str", agent_pool_name="str", operation_id="str", - api_version="2023-10-02-preview", + api_version="2025-03-02-preview", ) # 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 fbaf61e9314e..d67ec8bc7b5d 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) 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 c6ba7057d1ae..a07190fc042b 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) 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 461cf9deb795..ce068c726aef 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-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_private_endpoint_connections_operations_async.py b/sdk/containerservice/azure-mgmt-containerservice/generated_tests/test_container_service_private_endpoint_connections_operations_async.py index ee94c675fa06..59d2018fc417 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) ).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 cf65541f98f2..4766f86560d2 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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 09de5c39c52b..c6ad5a4c8cc0 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) # 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 2bbbc272ea99..57cc86774f39 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -32,7 +32,7 @@ def test_resolve_private_link_service_id_post(self, resource_group): "requiredMembers": ["str"], "type": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ) # 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 9baf2684241a..d20449dd6c5d 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -33,7 +33,7 @@ async def test_resolve_private_link_service_id_post(self, resource_group): "requiredMembers": ["str"], "type": "str", }, - api_version="2025-02-01", + api_version="2025-03-02-preview", ) # 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 c9af94f0cb8a..570b241bbdf2 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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 d92b4cd41755..b8e623e6e5fe 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) # 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 671d1524d5f7..9ad13a025810 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ).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-02-01", + api_version="2025-03-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_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 3c12d36eea85..8f03e00b0835 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) 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-02-01", + api_version="2025-03-02-preview", ) # 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-02-01", + api_version="2025-03-02-preview", ) ).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-02-01", + api_version="2025-03-02-preview", ) ).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 92f473d441e5..effa3f53aec8 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy @@ -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-02-01", + api_version="2025-03-02-preview", ) 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 f23db3638235..44804bd9dde6 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 @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import pytest -from azure.mgmt.containerservice.aio import ContainerServiceClient +from azure.mgmt.containerservice.v2025_03_02_preview.aio import ContainerServiceClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer from devtools_testutils.aio import recorded_by_proxy_async @@ -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-02-01", + api_version="2025-03-02-preview", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/containerservice/azure-mgmt-containerservice/setup.py b/sdk/containerservice/azure-mgmt-containerservice/setup.py index 2aae6908860b..510295f89ee7 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/setup.py +++ b/sdk/containerservice/azure-mgmt-containerservice/setup.py @@ -53,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -77,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", )