Skip to content

Commit 441fff3

Browse files
author
SDKAuto
committed
CodeGen from PR 34119 in Azure/azure-rest-api-specs
Merge 39e1b36adea167d530f0e877834ca2bae01cd308 into 908f30f83295f8afe862310153344468510e3b88
1 parent 1310d7e commit 441fff3

Some content is hidden

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

45 files changed

+4054
-1005
lines changed

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

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

3+
## 3.0.0b1 (2025-04-22)
4+
5+
### Features Added
6+
7+
- Model `CustomLocations` added property `operations`
8+
- Model `CustomLocations` added property `resource_sync_rules`
9+
- Model `ProxyResource` added property `system_data`
10+
- Model `Resource` added property `system_data`
11+
- Model `TrackedResource` added property `system_data`
12+
- Added enum `ActionType`
13+
- Added model `CustomLocationFindTargetResourceGroupProperties`
14+
- Added model `CustomLocationFindTargetResourceGroupResult`
15+
- Added model `EnabledResourceTypeListResult`
16+
- Added model `MatchExpressionsProperties`
17+
- Added model `Operation`
18+
- Added model `OperationDisplay`
19+
- Added model `OperationListResult`
20+
- Added enum `Origin`
21+
- Added model `PatchableResourceSyncRule`
22+
- Added model `ResourceSyncRule`
23+
- Added model `ResourceSyncRuleListResult`
24+
- Added model `ResourceSyncRulePropertiesSelector`
25+
- Model `CustomLocationsOperations` added method `find_target_resource_group`
26+
- Added model `Operations`
27+
- Added model `ResourceSyncRulesOperations`
28+
- Method `CustomLocationsOperations.find_target_resource_group` has a new overload `def find_target_resource_group(self: None, resource_group_name: str, resource_name: str, parameters: CustomLocationFindTargetResourceGroupProperties, content_type: str)`
29+
- Method `CustomLocationsOperations.find_target_resource_group` has a new overload `def find_target_resource_group(self: None, resource_group_name: str, resource_name: str, parameters: IO[bytes], content_type: str)`
30+
- Method `ResourceSyncRulesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, resource_name: str, child_resource_name: str, parameters: ResourceSyncRule, content_type: str)`
31+
- Method `ResourceSyncRulesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, resource_name: str, child_resource_name: str, parameters: IO[bytes], content_type: str)`
32+
33+
### Breaking Changes
34+
35+
- Deleted or renamed model `CustomLocationOperation`
36+
- Deleted or renamed model `CustomLocationOperationsList`
37+
- Deleted or renamed method `CustomLocationsOperations.list_operations`
38+
339
## 2.0.0 (2024-10-30)
440

541
### Breaking Changes

sdk/extendedlocation/azure-mgmt-extendedlocation/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 Extended Location 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": "2776cb32cd6ca9ea953a13ae26c954b989e83367",
2+
"commit": "fc2a7c6437506ec99e1a605a88504e64a1b90bb2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/extendedlocation/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 --tag=package-2021-08-15 --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/extendedlocation/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.33.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/extendedlocation/resource-manager/readme.md"
1111
}

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._custom_locations import CustomLocations
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._custom_locations import CustomLocations # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"CustomLocations",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_configuration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class CustomLocationsConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class CustomLocationsConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for CustomLocations.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class CustomLocationsConfiguration: # pylint: disable=too-many-instance-attribu
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2021-08-15". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2021-08-31-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2021-08-15")
36+
api_version: str = kwargs.pop("api_version", "2021-08-31-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/extendedlocation/azure-mgmt-extendedlocation/azure/mgmt/extendedlocation/_custom_locations.py

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,60 @@
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 CustomLocationsConfiguration
2022
from ._serialization import Deserializer, Serializer
21-
from .operations import CustomLocationsOperations
23+
from .operations import CustomLocationsOperations, Operations, ResourceSyncRulesOperations
2224

2325
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
2526
from azure.core.credentials import TokenCredential
2627

2728

28-
class CustomLocations: # pylint: disable=client-accepts-api-version-keyword
29+
class CustomLocations:
2930
"""The customLocations Rest API spec.
3031
32+
:ivar operations: Operations operations
33+
:vartype operations: azure.mgmt.extendedlocation.operations.Operations
3134
:ivar custom_locations: CustomLocationsOperations operations
3235
:vartype custom_locations: azure.mgmt.extendedlocation.operations.CustomLocationsOperations
36+
:ivar resource_sync_rules: ResourceSyncRulesOperations operations
37+
:vartype resource_sync_rules:
38+
azure.mgmt.extendedlocation.operations.ResourceSyncRulesOperations
3339
:param credential: Credential needed for the client to connect to Azure. Required.
3440
:type credential: ~azure.core.credentials.TokenCredential
3541
:param subscription_id: The ID of the target subscription. Required.
3642
:type subscription_id: str
37-
:param base_url: Service URL. Default value is "https://management.azure.com".
43+
:param base_url: Service URL. Default value is None.
3844
:type base_url: str
39-
:keyword api_version: Api Version. Default value is "2021-08-15". Note that overriding this
40-
default value may result in unsupported behavior.
45+
:keyword api_version: Api Version. Default value is "2021-08-31-preview". Note that overriding
46+
this default value may result in unsupported behavior.
4147
:paramtype api_version: str
4248
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4349
Retry-After header is present.
4450
"""
4551

4652
def __init__(
47-
self,
48-
credential: "TokenCredential",
49-
subscription_id: str,
50-
base_url: str = "https://management.azure.com",
51-
**kwargs: Any
53+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5254
) -> None:
53-
self._config = CustomLocationsConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
55+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
56+
_endpoints = get_arm_endpoints(_cloud)
57+
if not base_url:
58+
base_url = _endpoints["resource_manager"]
59+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
60+
self._config = CustomLocationsConfiguration(
61+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
62+
)
63+
5464
_policies = kwargs.pop("policies", None)
5565
if _policies is None:
5666
_policies = [
@@ -69,15 +79,19 @@ def __init__(
6979
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7080
self._config.http_logging_policy,
7181
]
72-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
82+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
7383

7484
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
7585
self._serialize = Serializer(client_models)
7686
self._deserialize = Deserializer(client_models)
7787
self._serialize.client_side_validation = False
88+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
7889
self.custom_locations = CustomLocationsOperations(
7990
self._client, self._config, self._serialize, self._deserialize
8091
)
92+
self.resource_sync_rules = ResourceSyncRulesOperations(
93+
self._client, self._config, self._serialize, self._deserialize
94+
)
8195

8296
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
8397
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)