Skip to content

Commit 1de1400

Browse files
azure-sdkmsyyc
andauthored
[AutoPR azure-mgmt-storage]-generated-from-SDK Generation - Python-6051758 (#45866)
* Configurations: 'specification/storage/resource-manager/readme.md', API Version: 2025-06-01, SDK Release Type: stable, and CommitSHA: 'ef72f8c9c0b8ef57b1ea289f565751668e314cc7' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6051758 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * update version --------- Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 4e84079 commit 1de1400

37 files changed

Lines changed: 778 additions & 82 deletions

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

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

3+
## 24.0.1 (2026-03-24)
4+
5+
### Other Changes
6+
7+
- Refresh SDK code with latest code generation tool
8+
39
## 24.0.0 (2025-10-22)
410

511
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "ca9d05ed67fe556197b01fe795e80e4e2dc41e86",
2+
"commit": "ef72f8c9c0b8ef57b1ea289f565751668e314cc7",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.41.3",
6+
"@autorest/python@6.50.0",
77
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/storage/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.41.3 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/storage/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/s/azure-sdk-for-python/sdk --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/storage/resource-manager/readme.md"
1111
}

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_utils/serialization.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,13 +821,20 @@ def serialize_basic(cls, data, data_type, **kwargs):
821821
:param str data_type: Type of object in the iterable.
822822
:rtype: str, int, float, bool
823823
:return: serialized object
824+
:raises TypeError: raise if data_type is not one of str, int, float, bool.
824825
"""
825826
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
826827
if custom_serializer:
827828
return custom_serializer(data)
828829
if data_type == "str":
829830
return cls.serialize_unicode(data)
830-
return eval(data_type)(data) # nosec # pylint: disable=eval-used
831+
if data_type == "int":
832+
return int(data)
833+
if data_type == "float":
834+
return float(data)
835+
if data_type == "bool":
836+
return bool(data)
837+
raise TypeError("Unknown basic data type: {}".format(data_type))
831838

832839
@classmethod
833840
def serialize_unicode(cls, data):
@@ -1757,7 +1764,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return
17571764
:param str data_type: deserialization data type.
17581765
:return: Deserialized basic type.
17591766
:rtype: str, int, float or bool
1760-
:raises TypeError: if string format is not valid.
1767+
:raises TypeError: if string format is not valid or data_type is not one of str, int, float, bool.
17611768
"""
17621769
# If we're here, data is supposed to be a basic type.
17631770
# If it's still an XML node, take the text
@@ -1783,7 +1790,11 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return
17831790

17841791
if data_type == "str":
17851792
return self.deserialize_unicode(attr)
1786-
return eval(data_type)(attr) # nosec # pylint: disable=eval-used
1793+
if data_type == "int":
1794+
return int(attr)
1795+
if data_type == "float":
1796+
return float(attr)
1797+
raise TypeError("Unknown basic data type: {}".format(data_type))
17871798

17881799
@staticmethod
17891800
def deserialize_unicode(data):

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "24.0.0"
8+
VERSION = "24.0.1"

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_blob_inventory_policies_operations.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,10 @@ async def get_next(next_link=None):
419419

420420
if response.status_code not in [200]:
421421
map_error(status_code=response.status_code, response=response, error_map=error_map)
422-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
422+
error = self._deserialize.failsafe_deserialize(
423+
_models.ErrorResponse,
424+
pipeline_response,
425+
)
423426
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
424427

425428
return pipeline_response

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_deleted_accounts_operations.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ async def get_next(next_link=None):
123123

124124
if response.status_code not in [200]:
125125
map_error(status_code=response.status_code, response=response, error_map=error_map)
126-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
126+
error = self._deserialize.failsafe_deserialize(
127+
_models.ErrorResponse,
128+
pipeline_response,
129+
)
127130
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
128131

129132
return pipeline_response
@@ -175,7 +178,10 @@ async def get(self, deleted_account_name: str, location: str, **kwargs: Any) ->
175178

176179
if response.status_code not in [200]:
177180
map_error(status_code=response.status_code, response=response, error_map=error_map)
178-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
181+
error = self._deserialize.failsafe_deserialize(
182+
_models.ErrorResponse,
183+
pipeline_response,
184+
)
179185
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
180186

181187
deserialized = self._deserialize("DeletedAccount", pipeline_response.http_response)

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_encryption_scopes_operations.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ async def put(
215215

216216
if response.status_code not in [200, 201]:
217217
map_error(status_code=response.status_code, response=response, error_map=error_map)
218-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
218+
error = self._deserialize.failsafe_deserialize(
219+
_models.ErrorResponse,
220+
pipeline_response,
221+
)
219222
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
220223

221224
deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)
@@ -374,7 +377,10 @@ async def patch(
374377

375378
if response.status_code not in [200]:
376379
map_error(status_code=response.status_code, response=response, error_map=error_map)
377-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
380+
error = self._deserialize.failsafe_deserialize(
381+
_models.ErrorResponse,
382+
pipeline_response,
383+
)
378384
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
379385

380386
deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)
@@ -440,7 +446,10 @@ async def get(
440446

441447
if response.status_code not in [200]:
442448
map_error(status_code=response.status_code, response=response, error_map=error_map)
443-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
449+
error = self._deserialize.failsafe_deserialize(
450+
_models.ErrorResponse,
451+
pipeline_response,
452+
)
444453
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
445454

446455
deserialized = self._deserialize("EncryptionScope", pipeline_response.http_response)

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_local_users_operations.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ async def get_next(next_link=None):
160160

161161
if response.status_code not in [200]:
162162
map_error(status_code=response.status_code, response=response, error_map=error_map)
163-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
163+
error = self._deserialize.failsafe_deserialize(
164+
_models.ErrorResponse,
165+
pipeline_response,
166+
)
164167
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
165168

166169
return pipeline_response
@@ -219,7 +222,10 @@ async def get(self, resource_group_name: str, account_name: str, username: str,
219222

220223
if response.status_code not in [200]:
221224
map_error(status_code=response.status_code, response=response, error_map=error_map)
222-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
225+
error = self._deserialize.failsafe_deserialize(
226+
_models.ErrorResponse,
227+
pipeline_response,
228+
)
223229
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
224230

225231
deserialized = self._deserialize("LocalUser", pipeline_response.http_response)
@@ -372,7 +378,10 @@ async def create_or_update(
372378

373379
if response.status_code not in [200]:
374380
map_error(status_code=response.status_code, response=response, error_map=error_map)
375-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
381+
error = self._deserialize.failsafe_deserialize(
382+
_models.ErrorResponse,
383+
pipeline_response,
384+
)
376385
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
377386

378387
deserialized = self._deserialize("LocalUser", pipeline_response.http_response)
@@ -434,7 +443,10 @@ async def delete(self, resource_group_name: str, account_name: str, username: st
434443

435444
if response.status_code not in [200, 204]:
436445
map_error(status_code=response.status_code, response=response, error_map=error_map)
437-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
446+
error = self._deserialize.failsafe_deserialize(
447+
_models.ErrorResponse,
448+
pipeline_response,
449+
)
438450
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
439451

440452
if cls:
@@ -494,7 +506,10 @@ async def list_keys(
494506

495507
if response.status_code not in [200]:
496508
map_error(status_code=response.status_code, response=response, error_map=error_map)
497-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
509+
error = self._deserialize.failsafe_deserialize(
510+
_models.ErrorResponse,
511+
pipeline_response,
512+
)
498513
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
499514

500515
deserialized = self._deserialize("LocalUserKeys", pipeline_response.http_response)
@@ -558,7 +573,10 @@ async def regenerate_password(
558573

559574
if response.status_code not in [200]:
560575
map_error(status_code=response.status_code, response=response, error_map=error_map)
561-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
576+
error = self._deserialize.failsafe_deserialize(
577+
_models.ErrorResponse,
578+
pipeline_response,
579+
)
562580
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
563581

564582
deserialized = self._deserialize("LocalUserRegeneratePasswordResult", pipeline_response.http_response)

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_network_security_perimeter_configurations_operations.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ async def get_next(next_link=None):
144144

145145
if response.status_code not in [200]:
146146
map_error(status_code=response.status_code, response=response, error_map=error_map)
147-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
147+
error = self._deserialize.failsafe_deserialize(
148+
_models.ErrorResponseAutoGenerated,
149+
pipeline_response,
150+
)
148151
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
149152

150153
return pipeline_response
@@ -209,7 +212,10 @@ async def get(
209212

210213
if response.status_code not in [200]:
211214
map_error(status_code=response.status_code, response=response, error_map=error_map)
212-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
215+
error = self._deserialize.failsafe_deserialize(
216+
_models.ErrorResponseAutoGenerated,
217+
pipeline_response,
218+
)
213219
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
214220

215221
deserialized = self._deserialize("NetworkSecurityPerimeterConfiguration", pipeline_response.http_response)
@@ -265,7 +271,10 @@ async def _reconcile_initial(
265271
except (StreamConsumedError, StreamClosedError):
266272
pass
267273
map_error(status_code=response.status_code, response=response, error_map=error_map)
268-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
274+
error = self._deserialize.failsafe_deserialize(
275+
_models.ErrorResponseAutoGenerated,
276+
pipeline_response,
277+
)
269278
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
270279

271280
response_headers = {}

sdk/storage/azure-mgmt-storage/azure/mgmt/storage/aio/operations/_object_replication_policies_operations.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ async def get_next(next_link=None):
142142

143143
if response.status_code not in [200]:
144144
map_error(status_code=response.status_code, response=response, error_map=error_map)
145-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
145+
error = self._deserialize.failsafe_deserialize(
146+
_models.ErrorResponse,
147+
pipeline_response,
148+
)
146149
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
147150

148151
return pipeline_response
@@ -205,7 +208,10 @@ async def get(
205208

206209
if response.status_code not in [200]:
207210
map_error(status_code=response.status_code, response=response, error_map=error_map)
208-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
211+
error = self._deserialize.failsafe_deserialize(
212+
_models.ErrorResponse,
213+
pipeline_response,
214+
)
209215
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
210216

211217
deserialized = self._deserialize("ObjectReplicationPolicy", pipeline_response.http_response)
@@ -364,7 +370,10 @@ async def create_or_update(
364370

365371
if response.status_code not in [200]:
366372
map_error(status_code=response.status_code, response=response, error_map=error_map)
367-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
373+
error = self._deserialize.failsafe_deserialize(
374+
_models.ErrorResponse,
375+
pipeline_response,
376+
)
368377
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
369378

370379
deserialized = self._deserialize("ObjectReplicationPolicy", pipeline_response.http_response)
@@ -430,7 +439,10 @@ async def delete(
430439

431440
if response.status_code not in [200, 204]:
432441
map_error(status_code=response.status_code, response=response, error_map=error_map)
433-
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
442+
error = self._deserialize.failsafe_deserialize(
443+
_models.ErrorResponse,
444+
pipeline_response,
445+
)
434446
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
435447

436448
if cls:

0 commit comments

Comments
 (0)