Skip to content

Commit b841baf

Browse files
author
SDKAuto
committed
CodeGen from PR 34074 in Azure/azure-rest-api-specs
Merge 88dd673965de03f570f7c4915c95cb40e3c8d090 into 7fce9fb91eae7c0f6f0ae348bb79119772e89f5f
1 parent 1063688 commit b841baf

26 files changed

+883
-871
lines changed

sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md

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

3+
## 1.2.0b3 (2025-05-13)
4+
5+
### Features Added
6+
7+
- Model `Operation` added property `is_data_action`
8+
- Model `Operation` added property `origin`
9+
- Model `Operation` added property `action_type`
10+
- Model `Resource` added property `system_data`
11+
- Model `TrackedResource` added property `system_data`
12+
- Added enum `ActionType`
13+
- Added enum `Origin`
14+
15+
### Breaking Changes
16+
17+
- Method `ConnectedClusterList.__init__` removed default value `None` from its parameter `value`
18+
- Deleted or renamed model `LastModifiedByType`
19+
320
## 1.2.0b2 (2025-03-24)
421

522
### Features Added

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

Lines changed: 3 additions & 3 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 Hybrid Kubernetes 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
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "ecee919199a39cc0d864410f540aa105bf7cdb64",
2+
"commit": "88ae2ee3303629a5c3b114661d139ec94700251b",
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.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/hybridkubernetes/resource-manager/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/hybridkubernetes/resource-manager/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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/hybridkubernetes/resource-manager/readme.md"
1111
}

sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_connected_kubernetes_client.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import ConnectedKubernetesClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import ConnectedClusterOperations, Operations
2224

2325
if TYPE_CHECKING:
@@ -27,15 +29,15 @@
2729
class ConnectedKubernetesClient:
2830
"""Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
2931
30-
:ivar connected_cluster: ConnectedClusterOperations operations
31-
:vartype connected_cluster: azure.mgmt.hybridkubernetes.operations.ConnectedClusterOperations
3232
:ivar operations: Operations operations
3333
:vartype operations: azure.mgmt.hybridkubernetes.operations.Operations
34+
:ivar connected_cluster: ConnectedClusterOperations operations
35+
:vartype connected_cluster: azure.mgmt.hybridkubernetes.operations.ConnectedClusterOperations
3436
:param credential: Credential needed for the client to connect to Azure. Required.
3537
:type credential: ~azure.core.credentials.TokenCredential
3638
:param subscription_id: The ID of the target subscription. Required.
3739
:type subscription_id: str
38-
:param base_url: Service URL. Default value is "https://management.azure.com".
40+
:param base_url: Service URL. Default value is None.
3941
:type base_url: str
4042
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
4143
this default value may result in unsupported behavior.
@@ -45,15 +47,17 @@ class ConnectedKubernetesClient:
4547
"""
4648

4749
def __init__(
48-
self,
49-
credential: "TokenCredential",
50-
subscription_id: str,
51-
base_url: str = "https://management.azure.com",
52-
**kwargs: Any
50+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5351
) -> None:
52+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
53+
_endpoints = get_arm_endpoints(_cloud)
54+
if not base_url:
55+
base_url = _endpoints["resource_manager"]
56+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5457
self._config = ConnectedKubernetesClientConfiguration(
55-
credential=credential, subscription_id=subscription_id, **kwargs
58+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
5659
)
60+
5761
_policies = kwargs.pop("policies", None)
5862
if _policies is None:
5963
_policies = [
@@ -72,16 +76,16 @@ def __init__(
7276
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7377
self._config.http_logging_policy,
7478
]
75-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
79+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
7680

7781
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
7882
self._serialize = Serializer(client_models)
7983
self._deserialize = Deserializer(client_models)
8084
self._serialize.client_side_validation = False
85+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
8186
self.connected_cluster = ConnectedClusterOperations(
8287
self._client, self._config, self._serialize, self._deserialize
8388
)
84-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
8589

8690
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
8791
"""Runs the network request through the client's chained policies.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)