Skip to content

Commit 942b75e

Browse files
azure-sdkChenxiJiang333msyyc
authored
[AutoPR azure-mgmt-storagecache]-generated-from-SDK Generation - Python-6355480 (#47154)
* Configurations: 'specification/storagecache/resource-manager/Microsoft.StorageCache/StorageCache/tspconfig.yaml', API Version: 2026-01-01, SDK Release Type: beta, and CommitSHA: '52f376ac684569106909a4854a792c6ed89a2c61' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6355480 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * update * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Chenxi Jiang (WICRESOFT NORTH AMERICA LTD) <v-chenjiang@microsoft.com> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent a0a5628 commit 942b75e

148 files changed

Lines changed: 29574 additions & 23968 deletions

File tree

Some content is hidden

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

sdk/storage/azure-mgmt-storagecache/CHANGELOG.md

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

3+
## 4.0.0b1 (2026-05-27)
4+
5+
### Features Added
6+
7+
- Client `StorageCacheManagementClient` added method `send_request`
8+
- Client `StorageCacheManagementClient` added operation group `expansion_jobs`
9+
- Enum `AmlFilesystemHealthStateType` added member `EXPANDING`
10+
- Added model `AutoExportJobPropertiesStatus`
11+
- Added model `AutoImportJobPropertiesStatus`
12+
- Added model `CloudError`
13+
- Added model `ExpansionJob`
14+
- Added model `ExpansionJobProperties`
15+
- Added enum `ExpansionJobPropertiesProvisioningState`
16+
- Added model `ExpansionJobPropertiesStatus`
17+
- Added enum `ExpansionJobStatusType`
18+
- Added model `ExpansionJobUpdate`
19+
- Added model `ImportJobPropertiesStatus`
20+
- Added model `ProxyResource`
21+
- Added operation group `ExpansionJobsOperations`
22+
23+
### Breaking Changes
24+
25+
- 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.
26+
- For the method breakings, please refer to https://aka.ms/azsdk/python/migrate/operations for migration.
27+
- Model `Restriction` renamed its instance variable `values` to `values_property`
28+
- Method `StorageTargetsOperations.begin_delete` changed its parameter `force` from `positional_or_keyword` to `keyword_only`
29+
30+
### Other Changes
31+
32+
- Deleted model `ResourceSkusResult`/`StorageTargetsResult`/`UsageModelsResult`/`UserAssignedIdentitiesValueAutoGenerated`/`StorageTargetResource` which actually were not used by SDK users
33+
334
## 3.0.1 (2025-10-09)
435

536
### Bugs Fixed

sdk/storage/azure-mgmt-storagecache/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 Storage Cache Management Client Library.
4-
This package has been tested with Python 3.9+.
4+
This package has been tested with Python 3.10+.
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.9+ is required to use this package.
15+
- Python 3.10+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
2-
"commit": "e976bdf4af8961332863ff779839f30fb2aec77a",
2+
"apiVersion": "2026-01-01",
3+
"apiVersions": {
4+
"Microsoft.StorageCache": "2026-01-01"
5+
},
6+
"commit": "52f376ac684569106909a4854a792c6ed89a2c61",
37
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/python@6.39.0",
7-
"@autorest/modelerfour@4.27.0"
8-
],
9-
"autorest_command": "autorest specification/storagecache/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.39.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/storagecache/resource-manager/readme.md"
8+
"typespec_src": "specification/storagecache/resource-manager/Microsoft.StorageCache/StorageCache",
9+
"emitterVersion": "0.62.1"
1110
}

sdk/storage/azure-mgmt-storagecache/apiview-properties.json

Lines changed: 261 additions & 239 deletions
Large diffs are not rendered by default.

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/__init__.py

Lines changed: 2 additions & 2 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
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._storage_cache_management_client import StorageCacheManagementClient # type: ignore
15+
from ._client import StorageCacheManagementClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py renamed to sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_client.py

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
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

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

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
@@ -17,7 +17,6 @@
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 StorageCacheManagementClientConfiguration
2221
from ._utils.serialization import Deserializer, Serializer
2322
from .operations import (
@@ -27,6 +26,7 @@
2726
AutoExportJobsOperations,
2827
AutoImportJobsOperations,
2928
CachesOperations,
29+
ExpansionJobsOperations,
3030
ImportJobsOperations,
3131
Operations,
3232
SkusOperations,
@@ -36,6 +36,11 @@
3636
_StorageCacheManagementClientOperationsMixin,
3737
)
3838

39+
if sys.version_info >= (3, 11):
40+
from typing import Self
41+
else:
42+
from typing_extensions import Self # type: ignore
43+
3944
if TYPE_CHECKING:
4045
from azure.core import AzureClouds
4146
from azure.core.credentials import TokenCredential
@@ -44,10 +49,12 @@
4449
class StorageCacheManagementClient(
4550
_StorageCacheManagementClientOperationsMixin
4651
): # pylint: disable=too-many-instance-attributes
47-
"""Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob
48-
storage, for use on demand. These operations create and manage Azure Managed Lustre file
49-
systems.
52+
"""A Storage Cache provides scalable caching service for NAS clients, serving data from either
53+
NFSv3 or Blob at-rest storage (referred to as "Storage Targets"). These operations allow you to
54+
manage Caches.
5055
56+
:ivar operations: Operations operations
57+
:vartype operations: azure.mgmt.storagecache.operations.Operations
5158
:ivar aml_filesystems: AmlFilesystemsOperations operations
5259
:vartype aml_filesystems: azure.mgmt.storagecache.operations.AmlFilesystemsOperations
5360
:ivar auto_export_jobs: AutoExportJobsOperations operations
@@ -56,8 +63,14 @@ class StorageCacheManagementClient(
5663
:vartype import_jobs: azure.mgmt.storagecache.operations.ImportJobsOperations
5764
:ivar auto_import_jobs: AutoImportJobsOperations operations
5865
:vartype auto_import_jobs: azure.mgmt.storagecache.operations.AutoImportJobsOperations
59-
:ivar operations: Operations operations
60-
:vartype operations: azure.mgmt.storagecache.operations.Operations
66+
:ivar expansion_jobs: ExpansionJobsOperations operations
67+
:vartype expansion_jobs: azure.mgmt.storagecache.operations.ExpansionJobsOperations
68+
:ivar caches: CachesOperations operations
69+
:vartype caches: azure.mgmt.storagecache.operations.CachesOperations
70+
:ivar storage_targets: StorageTargetsOperations operations
71+
:vartype storage_targets: azure.mgmt.storagecache.operations.StorageTargetsOperations
72+
:ivar storage_target: StorageTargetOperations operations
73+
:vartype storage_target: azure.mgmt.storagecache.operations.StorageTargetOperations
6174
:ivar skus: SkusOperations operations
6275
:vartype skus: azure.mgmt.storagecache.operations.SkusOperations
6376
:ivar usage_models: UsageModelsOperations operations
@@ -66,23 +79,18 @@ class StorageCacheManagementClient(
6679
:vartype asc_operations: azure.mgmt.storagecache.operations.AscOperationsOperations
6780
:ivar asc_usages: AscUsagesOperations operations
6881
:vartype asc_usages: azure.mgmt.storagecache.operations.AscUsagesOperations
69-
:ivar caches: CachesOperations operations
70-
:vartype caches: azure.mgmt.storagecache.operations.CachesOperations
71-
:ivar storage_targets: StorageTargetsOperations operations
72-
:vartype storage_targets: azure.mgmt.storagecache.operations.StorageTargetsOperations
73-
:ivar storage_target: StorageTargetOperations operations
74-
:vartype storage_target: azure.mgmt.storagecache.operations.StorageTargetOperations
75-
:param credential: Credential needed for the client to connect to Azure. Required.
82+
:param credential: Credential used to authenticate requests to the service. Required.
7683
:type credential: ~azure.core.credentials.TokenCredential
77-
:param subscription_id: The ID of the target subscription. Required.
84+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
7885
:type subscription_id: str
79-
:param base_url: Service URL. Default value is None.
86+
:param base_url: Service host. Default value is None.
8087
:type base_url: str
8188
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
8289
None.
8390
:paramtype cloud_setting: ~azure.core.AzureClouds
84-
:keyword api_version: Api Version. Default value is "2025-07-01". Note that overriding this
85-
default value may result in unsupported behavior.
91+
:keyword api_version: The API version to use for this operation. Known values are "2026-01-01"
92+
and None. Default value is None. If not set, the operation's default API version will be used.
93+
Note that overriding this default value may result in unsupported behavior.
8694
:paramtype api_version: str
8795
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
8896
Retry-After header is present.
@@ -97,6 +105,7 @@ def __init__(
97105
cloud_setting: Optional["AzureClouds"] = None,
98106
**kwargs: Any
99107
) -> None:
108+
_endpoint = "{endpoint}"
100109
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
101110
_endpoints = get_arm_endpoints(_cloud)
102111
if not base_url:
@@ -105,6 +114,7 @@ def __init__(
105114
self._config = StorageCacheManagementClientConfiguration(
106115
credential=credential,
107116
subscription_id=subscription_id,
117+
base_url=cast(str, base_url),
108118
cloud_setting=cloud_setting,
109119
credential_scopes=credential_scopes,
110120
**kwargs
@@ -128,32 +138,32 @@ def __init__(
128138
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
129139
self._config.http_logging_policy,
130140
]
131-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
141+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
132142

133-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
134-
self._serialize = Serializer(client_models)
135-
self._deserialize = Deserializer(client_models)
143+
self._serialize = Serializer()
144+
self._deserialize = Deserializer()
136145
self._serialize.client_side_validation = False
146+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
137147
self.aml_filesystems = AmlFilesystemsOperations(self._client, self._config, self._serialize, self._deserialize)
138148
self.auto_export_jobs = AutoExportJobsOperations(self._client, self._config, self._serialize, self._deserialize)
139149
self.import_jobs = ImportJobsOperations(self._client, self._config, self._serialize, self._deserialize)
140150
self.auto_import_jobs = AutoImportJobsOperations(self._client, self._config, self._serialize, self._deserialize)
141-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
151+
self.expansion_jobs = ExpansionJobsOperations(self._client, self._config, self._serialize, self._deserialize)
152+
self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
153+
self.storage_targets = StorageTargetsOperations(self._client, self._config, self._serialize, self._deserialize)
154+
self.storage_target = StorageTargetOperations(self._client, self._config, self._serialize, self._deserialize)
142155
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
143156
self.usage_models = UsageModelsOperations(self._client, self._config, self._serialize, self._deserialize)
144157
self.asc_operations = AscOperationsOperations(self._client, self._config, self._serialize, self._deserialize)
145158
self.asc_usages = AscUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
146-
self.caches = CachesOperations(self._client, self._config, self._serialize, self._deserialize)
147-
self.storage_targets = StorageTargetsOperations(self._client, self._config, self._serialize, self._deserialize)
148-
self.storage_target = StorageTargetOperations(self._client, self._config, self._serialize, self._deserialize)
149159

150-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
160+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
151161
"""Runs the network request through the client's chained policies.
152162
153163
>>> from azure.core.rest import HttpRequest
154164
>>> request = HttpRequest("GET", "https://www.example.org/")
155165
<HttpRequest [GET], url: 'https://www.example.org/'>
156-
>>> response = client._send_request(request)
166+
>>> response = client.send_request(request)
157167
<HttpResponse: 200 OK>
158168
159169
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -166,7 +176,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
166176
"""
167177

168178
request_copy = deepcopy(request)
169-
request_copy.url = self._client.format_url(request_copy.url)
179+
path_format_arguments = {
180+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
181+
}
182+
183+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
170184
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
171185

172186
def close(self) -> None:

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_configuration.py

Lines changed: 11 additions & 6 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

@@ -24,26 +24,30 @@ class StorageCacheManagementClientConfiguration: # pylint: disable=too-many-ins
2424
Note that all parameters used to create this instance are saved as instance
2525
attributes.
2626
27-
:param credential: Credential needed for the client to connect to Azure. Required.
27+
:param credential: Credential used to authenticate requests to the service. Required.
2828
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3030
:type subscription_id: str
31+
:param base_url: Service host. Default value is "https://management.azure.com".
32+
:type base_url: str
3133
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
3234
None.
3335
:type cloud_setting: ~azure.core.AzureClouds
34-
:keyword api_version: Api Version. Default value is "2025-07-01". Note that overriding this
35-
default value may result in unsupported behavior.
36+
:keyword api_version: The API version to use for this operation. Known values are "2026-01-01"
37+
and None. Default value is None. If not set, the operation's default API version will be used.
38+
Note that overriding this default value may result in unsupported behavior.
3639
:paramtype api_version: str
3740
"""
3841

3942
def __init__(
4043
self,
4144
credential: "TokenCredential",
4245
subscription_id: str,
46+
base_url: str = "https://management.azure.com",
4347
cloud_setting: Optional["AzureClouds"] = None,
4448
**kwargs: Any
4549
) -> None:
46-
api_version: str = kwargs.pop("api_version", "2025-07-01")
50+
api_version: str = kwargs.pop("api_version", "2026-01-01")
4751

4852
if credential is None:
4953
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,6 +56,7 @@ def __init__(
5256

5357
self.credential = credential
5458
self.subscription_id = subscription_id
59+
self.base_url = base_url
5560
self.cloud_setting = cloud_setting
5661
self.api_version = api_version
5762
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
#
43
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
#
6-
# The MIT License (MIT)
7-
#
8-
# Permission is hereby granted, free of charge, to any person obtaining a copy
9-
# of this software and associated documentation files (the ""Software""), to
10-
# deal in the Software without restriction, including without limitation the
11-
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12-
# sell copies of the Software, and to permit persons to whom the Software is
13-
# furnished to do so, subject to the following conditions:
14-
#
15-
# The above copyright notice and this permission notice shall be included in
16-
# all copies or substantial portions of the Software.
17-
#
18-
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23-
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24-
# IN THE SOFTWARE.
25-
#
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
265
# --------------------------------------------------------------------------
6+
"""Customize generated code here.
7+
8+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
9+
"""
10+
11+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
2712

2813

29-
# This file is used for handwritten extensions to the generated code. Example:
30-
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3114
def patch_sdk():
32-
pass
15+
"""Do not remove from this file.
16+
17+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
18+
you can't accomplish using the techniques described in
19+
https://aka.ms/azsdk/python/dpcodegen/python/customize
20+
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# --------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# Code generated by Microsoft (R) AutoRest Code Generator.
4+
# Code generated by Microsoft (R) Python Code Generator.
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)