Skip to content

Commit beea62f

Browse files
author
SDKAuto
committed
CodeGen from PR 34270 in Azure/azure-rest-api-specs
Merge c5c31b0506df39bc9e78f53a9678914719c1964d into a19648565889eaae019e531c15f3045d1244c7ce
1 parent 6c30600 commit beea62f

Some content is hidden

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

43 files changed

+926
-455
lines changed

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

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

3+
## 1.1.0b1 (2025-05-13)
4+
5+
### Features Added
6+
7+
- Added model `Quota`
8+
- Added model `QuotaName`
9+
- Model `FabricCapacitiesOperations` added method `list_usages`
10+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
11+
- Method `Quota.__init__` has a new overload `def __init__(self: None, unit: str, current_value: int, limit: int)`
12+
- Method `Quota.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
13+
- Method `QuotaName.__init__` has a new overload `def __init__(self: None, value: Optional[str], localized_value: Optional[str])`
14+
- Method `QuotaName.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
15+
316
## 1.0.0 (2024-10-21)
417

518
### Other Changes

sdk/fabric/azure-mgmt-fabric/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 Fabric 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "9ce76c4f113368361dac4de5d0a71eb058602756",
2+
"commit": "079f70d6f2b754db6b736e117196104efd2dd496",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/fabric/Microsoft.Fabric.Management",
5-
"@azure-tools/typespec-python": "0.36.0"
5+
"@azure-tools/typespec-python": "0.44.2"
66
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.Fabric",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.fabric.models.CapacityAdministration": "Microsoft.Fabric.CapacityAdministration",
5+
"azure.mgmt.fabric.models.CheckNameAvailabilityRequest": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityRequest",
6+
"azure.mgmt.fabric.models.CheckNameAvailabilityResponse": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityResponse",
7+
"azure.mgmt.fabric.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
8+
"azure.mgmt.fabric.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
9+
"azure.mgmt.fabric.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
10+
"azure.mgmt.fabric.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
11+
"azure.mgmt.fabric.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
12+
"azure.mgmt.fabric.models.FabricCapacity": "Microsoft.Fabric.FabricCapacity",
13+
"azure.mgmt.fabric.models.FabricCapacityProperties": "Microsoft.Fabric.FabricCapacityProperties",
14+
"azure.mgmt.fabric.models.FabricCapacityUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
15+
"azure.mgmt.fabric.models.FabricCapacityUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
16+
"azure.mgmt.fabric.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
17+
"azure.mgmt.fabric.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
18+
"azure.mgmt.fabric.models.Quota": "Microsoft.Fabric.Quota",
19+
"azure.mgmt.fabric.models.QuotaName": "Microsoft.Fabric.QuotaName",
20+
"azure.mgmt.fabric.models.RpSku": "Microsoft.Fabric.RpSku",
21+
"azure.mgmt.fabric.models.RpSkuDetailsForExistingResource": "Microsoft.Fabric.RpSkuDetailsForExistingResource",
22+
"azure.mgmt.fabric.models.RpSkuDetailsForNewResource": "Microsoft.Fabric.RpSkuDetailsForNewResource",
23+
"azure.mgmt.fabric.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
24+
"azure.mgmt.fabric.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
25+
"azure.mgmt.fabric.models.ProvisioningState": "Microsoft.Fabric.ProvisioningState",
26+
"azure.mgmt.fabric.models.ResourceState": "Microsoft.Fabric.ResourceState",
27+
"azure.mgmt.fabric.models.RpSkuTier": "Microsoft.Fabric.RpSkuTier",
28+
"azure.mgmt.fabric.models.CheckNameAvailabilityReason": "Azure.ResourceManager.CommonTypes.CheckNameAvailabilityReason",
29+
"azure.mgmt.fabric.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
30+
"azure.mgmt.fabric.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
31+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.get": "Microsoft.Fabric.FabricCapacities.get",
32+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.get": "Microsoft.Fabric.FabricCapacities.get",
33+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.begin_create_or_update": "Microsoft.Fabric.FabricCapacities.createOrUpdate",
34+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.begin_create_or_update": "Microsoft.Fabric.FabricCapacities.createOrUpdate",
35+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.begin_update": "Microsoft.Fabric.FabricCapacities.update",
36+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.begin_update": "Microsoft.Fabric.FabricCapacities.update",
37+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.begin_delete": "Microsoft.Fabric.FabricCapacities.delete",
38+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.begin_delete": "Microsoft.Fabric.FabricCapacities.delete",
39+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.list_by_resource_group": "Microsoft.Fabric.FabricCapacities.listByResourceGroup",
40+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.list_by_resource_group": "Microsoft.Fabric.FabricCapacities.listByResourceGroup",
41+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.list_by_subscription": "Microsoft.Fabric.FabricCapacities.listBySubscription",
42+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.list_by_subscription": "Microsoft.Fabric.FabricCapacities.listBySubscription",
43+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.begin_resume": "Microsoft.Fabric.FabricCapacities.resume",
44+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.begin_resume": "Microsoft.Fabric.FabricCapacities.resume",
45+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.begin_suspend": "Microsoft.Fabric.FabricCapacities.suspend",
46+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.begin_suspend": "Microsoft.Fabric.FabricCapacities.suspend",
47+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.check_name_availability": "Microsoft.Fabric.FabricCapacities.checkNameAvailability",
48+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.check_name_availability": "Microsoft.Fabric.FabricCapacities.checkNameAvailability",
49+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.list_skus_for_capacity": "Microsoft.Fabric.FabricCapacities.listSkusForCapacity",
50+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.list_skus_for_capacity": "Microsoft.Fabric.FabricCapacities.listSkusForCapacity",
51+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.list_skus": "Microsoft.Fabric.FabricCapacities.listSkus",
52+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.list_skus": "Microsoft.Fabric.FabricCapacities.listSkus",
53+
"azure.mgmt.fabric.operations.FabricCapacitiesOperations.list_usages": "Microsoft.Fabric.FabricCapacities.listUsages",
54+
"azure.mgmt.fabric.aio.operations.FabricCapacitiesOperations.list_usages": "Microsoft.Fabric.FabricCapacities.listUsages",
55+
"azure.mgmt.fabric.operations.Operations.list": "Azure.ResourceManager.Operations.list",
56+
"azure.mgmt.fabric.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list"
57+
}
58+
}

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,21 @@
55
# Code generated by Microsoft (R) Python 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 ._client import FabricMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import FabricMgmtClient # 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

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_client.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
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 ._configuration import FabricMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import FabricCapacitiesOperations, Operations
2123

2224
if TYPE_CHECKING:
@@ -34,26 +36,33 @@ class FabricMgmtClient:
3436
:type credential: ~azure.core.credentials.TokenCredential
3537
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3638
:type subscription_id: str
37-
:param base_url: Service host. Default value is "https://management.azure.com".
39+
:param base_url: Service host. Default value is None.
3840
:type base_url: str
39-
:keyword api_version: The API version to use for this operation. Default value is "2023-11-01".
40-
Note that overriding this default value may result in unsupported behavior.
41+
:keyword api_version: The API version to use for this operation. Default value is
42+
"2025-01-15-preview". Note that overriding this default value may result in unsupported
43+
behavior.
4144
:paramtype api_version: str
4245
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4346
Retry-After header is present.
4447
"""
4548

4649
def __init__(
47-
self,
48-
credential: "TokenCredential",
49-
subscription_id: str,
50-
base_url: str = "https://management.azure.com",
51-
**kwargs: Any
50+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5251
) -> None:
5352
_endpoint = "{endpoint}"
53+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
54+
_endpoints = get_arm_endpoints(_cloud)
55+
if not base_url:
56+
base_url = _endpoints["resource_manager"]
57+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5458
self._config = FabricMgmtClientConfiguration(
55-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
59+
credential=credential,
60+
subscription_id=subscription_id,
61+
base_url=cast(str, base_url),
62+
credential_scopes=credential_scopes,
63+
**kwargs
5664
)
65+
5766
_policies = kwargs.pop("policies", None)
5867
if _policies is None:
5968
_policies = [
@@ -72,7 +81,7 @@ def __init__(
7281
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7382
self._config.http_logging_policy,
7483
]
75-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
84+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
7685

7786
self._serialize = Serializer()
7887
self._deserialize = Deserializer()

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ class FabricMgmtClientConfiguration: # pylint: disable=too-many-instance-attrib
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is "2023-11-01".
33-
Note that overriding this default value may result in unsupported behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is
33+
"2025-01-15-preview". Note that overriding this default value may result in unsupported
34+
behavior.
3435
:paramtype api_version: str
3536
"""
3637

@@ -41,7 +42,7 @@ def __init__(
4142
base_url: str = "https://management.azure.com",
4243
**kwargs: Any
4344
) -> None:
44-
api_version: str = kwargs.pop("api_version", "2023-11-01")
45+
api_version: str = kwargs.pop("api_version", "2025-01-15-preview")
4546

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

sdk/fabric/azure-mgmt-fabric/azure/mgmt/fabric/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
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) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)