Skip to content

Commit db215f5

Browse files
[AutoPR azure-mgmt-kubernetesconfiguration-extensions]-generated-from-SDK Generation - Python-6014614 (#45712)
* Configurations: 'specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/tspconfig.yaml', API Version: 2024-11-01, SDK Release Type: stable, and CommitSHA: 'bf2f971b4319da9f5624da7f3c13d487be477897' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6014614 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Update CHANGELOG.md * update azure-mgmt-kubernetesconfiguration-extensions version to 1.0.0b2 * Update CHANGELOG.md --------- Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
1 parent 7a78705 commit db215f5

50 files changed

Lines changed: 3901 additions & 2141 deletions

Some content is hidden

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

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release History
22

3+
## 1.0.0b2 (2026-03-18)
4+
5+
### Features Added
6+
7+
- Client `KubernetesConfigurationExtensionsMgmtClient` added parameter `cloud_setting` in method `__init__`
8+
- Client `KubernetesConfigurationExtensionsMgmtClient` added method `send_request`
9+
- Model `ProxyResource` added property `system_data`
10+
- Model `Resource` added property `system_data`
11+
- Added model `PatchExtensionProperties`
12+
- Added enum `ResourceIdentityType`
13+
14+
### Breaking Changes
15+
16+
- This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
17+
- For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration.
18+
- Model `PatchExtension` moved instance variable `auto_upgrade_minor_version`, `release_train`, `version`, `configuration_settings` and `configuration_protected_settings` under property `properties`
19+
- Method `ExtensionsOperations.begin_delete` changed its parameter `force_delete` from `positional_or_keyword` to `keyword_only`
20+
21+
### Other Changes
22+
23+
- Deleted model `ExtensionsList` which actually was not used by SDK users
24+
325
## 1.0.0b1 (2025-05-19)
426

527
### Other Changes
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
include _meta.json
2-
recursive-include tests *.py *.json
3-
recursive-include samples *.py *.md
41
include *.md
2+
include LICENSE
3+
include azure/mgmt/kubernetesconfiguration/extensions/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
56
include azure/__init__.py
67
include azure/mgmt/__init__.py
78
include azure/mgmt/kubernetesconfiguration/__init__.py
8-
include LICENSE
9-
include azure/mgmt/kubernetesconfiguration/extensions/py.typed

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/_meta.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"apiVersion": "2024-11-01",
3+
"apiVersions": {
4+
"Microsoft.KubernetesConfiguration": "2024-11-01"
5+
},
6+
"commit": "bf2f971b4319da9f5624da7f3c13d487be477897",
7+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
8+
"typespec_src": "specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions",
9+
"emitterVersion": "0.61.0"
10+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.KubernetesConfiguration",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.kubernetesconfiguration.extensions.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
5+
"azure.mgmt.kubernetesconfiguration.extensions.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
6+
"azure.mgmt.kubernetesconfiguration.extensions.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
7+
"azure.mgmt.kubernetesconfiguration.extensions.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
8+
"azure.mgmt.kubernetesconfiguration.extensions.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
9+
"azure.mgmt.kubernetesconfiguration.extensions.models.Extension": "Microsoft.KubernetesConfiguration.Extension",
10+
"azure.mgmt.kubernetesconfiguration.extensions.models.ExtensionProperties": "Microsoft.KubernetesConfiguration.ExtensionProperties",
11+
"azure.mgmt.kubernetesconfiguration.extensions.models.ExtensionPropertiesAksAssignedIdentity": "Microsoft.KubernetesConfiguration.ExtensionPropertiesAksAssignedIdentity",
12+
"azure.mgmt.kubernetesconfiguration.extensions.models.ExtensionStatus": "Microsoft.KubernetesConfiguration.ExtensionStatus",
13+
"azure.mgmt.kubernetesconfiguration.extensions.models.Identity": "Azure.ResourceManager.CommonTypes.Identity",
14+
"azure.mgmt.kubernetesconfiguration.extensions.models.OperationStatusResult": "Microsoft.KubernetesConfiguration.OperationStatusResult",
15+
"azure.mgmt.kubernetesconfiguration.extensions.models.PatchExtension": "Microsoft.KubernetesConfiguration.PatchExtension",
16+
"azure.mgmt.kubernetesconfiguration.extensions.models.PatchExtensionProperties": "Microsoft.KubernetesConfiguration.PatchExtensionProperties",
17+
"azure.mgmt.kubernetesconfiguration.extensions.models.Plan": "Azure.ResourceManager.CommonTypes.Plan",
18+
"azure.mgmt.kubernetesconfiguration.extensions.models.Scope": "Microsoft.KubernetesConfiguration.Scope",
19+
"azure.mgmt.kubernetesconfiguration.extensions.models.ScopeCluster": "Microsoft.KubernetesConfiguration.ScopeCluster",
20+
"azure.mgmt.kubernetesconfiguration.extensions.models.ScopeNamespace": "Microsoft.KubernetesConfiguration.ScopeNamespace",
21+
"azure.mgmt.kubernetesconfiguration.extensions.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
22+
"azure.mgmt.kubernetesconfiguration.extensions.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
23+
"azure.mgmt.kubernetesconfiguration.extensions.models.ProvisioningState": "Microsoft.KubernetesConfiguration.ProvisioningState",
24+
"azure.mgmt.kubernetesconfiguration.extensions.models.LevelType": "Microsoft.KubernetesConfiguration.LevelType",
25+
"azure.mgmt.kubernetesconfiguration.extensions.models.AKSIdentityType": "Microsoft.KubernetesConfiguration.AKSIdentityType",
26+
"azure.mgmt.kubernetesconfiguration.extensions.models.ResourceIdentityType": "Azure.ResourceManager.CommonTypes.ResourceIdentityType",
27+
"azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations.get": "Microsoft.KubernetesConfiguration.Extensions.get",
28+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.ExtensionsOperations.get": "Microsoft.KubernetesConfiguration.Extensions.get",
29+
"azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations.begin_create": "Microsoft.KubernetesConfiguration.Extensions.create",
30+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.ExtensionsOperations.begin_create": "Microsoft.KubernetesConfiguration.Extensions.create",
31+
"azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations.begin_update": "Microsoft.KubernetesConfiguration.Extensions.update",
32+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.ExtensionsOperations.begin_update": "Microsoft.KubernetesConfiguration.Extensions.update",
33+
"azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations.begin_delete": "Microsoft.KubernetesConfiguration.Extensions.delete",
34+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.ExtensionsOperations.begin_delete": "Microsoft.KubernetesConfiguration.Extensions.delete",
35+
"azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations.list": "Microsoft.KubernetesConfiguration.Extensions.list",
36+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.ExtensionsOperations.list": "Microsoft.KubernetesConfiguration.Extensions.list",
37+
"azure.mgmt.kubernetesconfiguration.extensions.operations.OperationStatusOperations.get": "Microsoft.KubernetesConfiguration.Extensions.operationStatusGet",
38+
"azure.mgmt.kubernetesconfiguration.extensions.aio.operations.OperationStatusOperations.get": "Microsoft.KubernetesConfiguration.Extensions.operationStatusGet"
39+
}
40+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# pylint: disable=line-too-long,useless-suppression
21
# coding=utf-8
32
# --------------------------------------------------------------------------
43
# Copyright (c) Microsoft Corporation. All rights reserved.
54
# Licensed under the MIT License. See License.txt in the project root for license information.
6-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
76
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
87
# --------------------------------------------------------------------------
98
# pylint: disable=wrong-import-position
@@ -13,7 +12,7 @@
1312
if TYPE_CHECKING:
1413
from ._patch import * # pylint: disable=unused-wildcard-import
1514

16-
from ._kubernetes_configuration_extensions_mgmt_client import KubernetesConfigurationExtensionsMgmtClient # type: ignore
15+
from ._client import KubernetesConfigurationExtensionsMgmtClient # type: ignore
1716
from ._version import VERSION
1817

1918
__version__ = VERSION

sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_kubernetes_configuration_extensions_mgmt_client.py renamed to sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration-extensions/azure/mgmt/kubernetesconfiguration/extensions/_client.py

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -17,47 +17,63 @@
1717
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1818
from azure.mgmt.core.tools import get_arm_endpoints
1919

20-
from . import models as _models
2120
from ._configuration import KubernetesConfigurationExtensionsMgmtClientConfiguration
2221
from ._utils.serialization import Deserializer, Serializer
2322
from .operations import ExtensionsOperations, OperationStatusOperations
2423

2524
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2626
from azure.core.credentials import TokenCredential
2727

2828

2929
class KubernetesConfigurationExtensionsMgmtClient: # pylint: disable=name-too-long
30-
"""KubernetesConfiguration Extensions Client.
30+
"""Use these APIs to create extension resources through ARM, for Kubernetes Clusters.
3131
3232
:ivar extensions: ExtensionsOperations operations
3333
:vartype extensions:
3434
azure.mgmt.kubernetesconfiguration.extensions.operations.ExtensionsOperations
3535
:ivar operation_status: OperationStatusOperations operations
3636
:vartype operation_status:
3737
azure.mgmt.kubernetesconfiguration.extensions.operations.OperationStatusOperations
38-
:param credential: Credential needed for the client to connect to Azure. Required.
38+
:param credential: Credential used to authenticate requests to the service. Required.
3939
:type credential: ~azure.core.credentials.TokenCredential
40-
:param subscription_id: The ID of the target subscription. Required.
40+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4141
:type subscription_id: str
42-
:param base_url: Service URL. Default value is None.
42+
:param base_url: Service host. Default value is None.
4343
:type base_url: str
44-
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
45-
default value may result in unsupported behavior.
44+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
45+
None.
46+
:paramtype cloud_setting: ~azure.core.AzureClouds
47+
:keyword api_version: The API version to use for this operation. Known values are "2024-11-01"
48+
and None. Default value is "2024-11-01". Note that overriding this default value may result in
49+
unsupported behavior.
4650
:paramtype api_version: str
4751
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4852
Retry-After header is present.
4953
"""
5054

5155
def __init__(
52-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
56+
self,
57+
credential: "TokenCredential",
58+
subscription_id: str,
59+
base_url: Optional[str] = None,
60+
*,
61+
cloud_setting: Optional["AzureClouds"] = None,
62+
**kwargs: Any
5363
) -> None:
54-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
64+
_endpoint = "{endpoint}"
65+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5566
_endpoints = get_arm_endpoints(_cloud)
5667
if not base_url:
5768
base_url = _endpoints["resource_manager"]
5869
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5970
self._config = KubernetesConfigurationExtensionsMgmtClientConfiguration(
60-
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
71+
credential=credential,
72+
subscription_id=subscription_id,
73+
base_url=cast(str, base_url),
74+
cloud_setting=cloud_setting,
75+
credential_scopes=credential_scopes,
76+
**kwargs
6177
)
6278

6379
_policies = kwargs.pop("policies", None)
@@ -78,24 +94,23 @@ def __init__(
7894
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7995
self._config.http_logging_policy,
8096
]
81-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
97+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
8298

83-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
84-
self._serialize = Serializer(client_models)
85-
self._deserialize = Deserializer(client_models)
99+
self._serialize = Serializer()
100+
self._deserialize = Deserializer()
86101
self._serialize.client_side_validation = False
87102
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
88103
self.operation_status = OperationStatusOperations(
89104
self._client, self._config, self._serialize, self._deserialize
90105
)
91106

92-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
107+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
93108
"""Runs the network request through the client's chained policies.
94109
95110
>>> from azure.core.rest import HttpRequest
96111
>>> request = HttpRequest("GET", "https://www.example.org/")
97112
<HttpRequest [GET], url: 'https://www.example.org/'>
98-
>>> response = client._send_request(request)
113+
>>> response = client.send_request(request)
99114
<HttpResponse: 200 OK>
100115
101116
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -108,7 +123,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
108123
"""
109124

110125
request_copy = deepcopy(request)
111-
request_copy.url = self._client.format_url(request_copy.url)
126+
path_format_arguments = {
127+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
128+
}
129+
130+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
112131
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
113132

114133
def close(self) -> None:

0 commit comments

Comments
 (0)