Skip to content

Commit 4b15ec2

Browse files
author
SDKAuto
committed
CodeGen from PR 34098 in Azure/azure-rest-api-specs
Merge 14956ceb7e0a4bbaa6201470a69b9385a66dcd29 into a55917cb512540bc3d0aec760d4e28712c3a4ae0
1 parent 4d0a196 commit 4b15ec2

File tree

238 files changed

+1704
-1719
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+1704
-1719
lines changed

sdk/containerservice/azure-mgmt-containerservice/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Container Service Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package

sdk/containerservice/azure-mgmt-containerservice/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "d18ba009da04dd6afc04402c39f87e032051fe9b",
2+
"commit": "09d618d1c34bf45e65d0f2268aed36f6396e51ee",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"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/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"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/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md",
1111
"package-2024-05": "2024-07-10 04:37:35 +0800 794e29ee5f8eca63ce0ddf007c60da7df37baaad stable/2024-05-01/managedClusters.json",
1212
"package-preview-2024-04": "2024-08-27 19:55:39 -0700 4bc9b37173bd5fe0ed19f21edfb8a195e89caaf6 preview/2024-04-02-preview/managedClusters.json",

sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import Any, Optional, TYPE_CHECKING
12+
from typing import Any, Optional, TYPE_CHECKING, cast
1313
from typing_extensions import Self
1414

1515
from azure.core.pipeline import policies
16+
from azure.core.settings import settings
1617
from azure.mgmt.core import ARMPipelineClient
1718
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
19+
from azure.mgmt.core.tools import get_arm_endpoints
1820
from azure.profiles import KnownProfiles, ProfileDefinition
1921
from azure.profiles.multiapiclient import MultiApiClientMixin
2022

@@ -27,7 +29,7 @@
2729

2830
class _SDKClient(object):
2931
def __init__(self, *args, **kwargs):
30-
"""This is a fake class to support current implemetation of MultiApiClientMixin."
32+
"""This is a fake class to support current implementation of MultiApiClientMixin."
3133
Will be removed in final version of multiapi azure-core based client
3234
"""
3335
pass
@@ -76,13 +78,18 @@ def __init__(
7678
credential: "TokenCredential",
7779
subscription_id: str,
7880
api_version: Optional[str]=None,
79-
base_url: str = "https://management.azure.com",
81+
base_url: Optional[str] = None,
8082
profile: KnownProfiles=KnownProfiles.default,
8183
**kwargs: Any
8284
):
8385
if api_version:
8486
kwargs.setdefault('api_version', api_version)
85-
self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs)
87+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
88+
_endpoints = get_arm_endpoints(_cloud)
89+
if not base_url:
90+
base_url = _endpoints["resource_manager"]
91+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
92+
self._config = ContainerServiceClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs)
8693
_policies = kwargs.pop("policies", None)
8794
if _policies is None:
8895
_policies = [
@@ -101,7 +108,7 @@ def __init__(
101108
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
102109
self._config.http_logging_policy,
103110
]
104-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
111+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
105112
super(ContainerServiceClient, self).__init__(
106113
api_version=api_version,
107114
profile=profile

0 commit comments

Comments
 (0)