Skip to content

Commit 5579689

Browse files
author
SDKAuto
committed
CodeGen from PR 20715 in Azure/azure-rest-api-specs
Merge 8d01c9609d0948cf0b6fdfe22ca8ec507d3a6008 into af1be2677e619e483210064ff658e62ec25053aa
1 parent c121ae3 commit 5579689

18 files changed

+416
-72
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.8.4",
33
"use": [
4-
"@autorest/python@6.1.4",
4+
"@autorest/python@6.1.5",
55
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "30ffead0fbaed3aaa8154418d5c55ef6f5e11f42",
7+
"commit": "31e07db992a06ea70e020fee6c5ee53462f9615a",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/redis/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.4 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
9+
"autorest_command": "autorest specification/redis/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.5 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/redis/resource-manager/readme.md"
1111
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "14.0.0"
9+
VERSION = "12.0.0b1"

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_async_operation_status_operations.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
HttpResponseError,
1414
ResourceExistsError,
1515
ResourceNotFoundError,
16+
ResourceNotModifiedError,
1617
map_error,
1718
)
1819
from azure.core.pipeline import PipelineResponse
@@ -62,7 +63,12 @@ async def get(self, location: str, operation_id: str, **kwargs: Any) -> _models.
6263
:rtype: ~azure.mgmt.redis.models.OperationStatus
6364
:raises ~azure.core.exceptions.HttpResponseError:
6465
"""
65-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
66+
error_map = {
67+
401: ClientAuthenticationError,
68+
404: ResourceNotFoundError,
69+
409: ResourceExistsError,
70+
304: ResourceNotModifiedError,
71+
}
6672
error_map.update(kwargs.pop("error_map", {}) or {})
6773

6874
_headers = kwargs.pop("headers", {}) or {}

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_firewall_rules_operations.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -78,7 +79,12 @@ def list(
7879
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
7980
cls = kwargs.pop("cls", None) # type: ClsType[_models.RedisFirewallRuleListResult]
8081

81-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
82+
error_map = {
83+
401: ClientAuthenticationError,
84+
404: ResourceNotFoundError,
85+
409: ResourceExistsError,
86+
304: ResourceNotModifiedError,
87+
}
8288
error_map.update(kwargs.pop("error_map", {}) or {})
8389

8490
def prepare_request(next_link=None):
@@ -223,7 +229,12 @@ async def create_or_update(
223229
:rtype: ~azure.mgmt.redis.models.RedisFirewallRule
224230
:raises ~azure.core.exceptions.HttpResponseError:
225231
"""
226-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
232+
error_map = {
233+
401: ClientAuthenticationError,
234+
404: ResourceNotFoundError,
235+
409: ResourceExistsError,
236+
304: ResourceNotModifiedError,
237+
}
227238
error_map.update(kwargs.pop("error_map", {}) or {})
228239

229240
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -298,7 +309,12 @@ async def get(
298309
:rtype: ~azure.mgmt.redis.models.RedisFirewallRule
299310
:raises ~azure.core.exceptions.HttpResponseError:
300311
"""
301-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
312+
error_map = {
313+
401: ClientAuthenticationError,
314+
404: ResourceNotFoundError,
315+
409: ResourceExistsError,
316+
304: ResourceNotModifiedError,
317+
}
302318
error_map.update(kwargs.pop("error_map", {}) or {})
303319

304320
_headers = kwargs.pop("headers", {}) or {}
@@ -357,7 +373,12 @@ async def delete( # pylint: disable=inconsistent-return-statements
357373
:rtype: None
358374
:raises ~azure.core.exceptions.HttpResponseError:
359375
"""
360-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
376+
error_map = {
377+
401: ClientAuthenticationError,
378+
404: ResourceNotFoundError,
379+
409: ResourceExistsError,
380+
304: ResourceNotModifiedError,
381+
}
361382
error_map.update(kwargs.pop("error_map", {}) or {})
362383

363384
_headers = kwargs.pop("headers", {}) or {}

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_linked_server_operations.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -67,7 +68,12 @@ async def _create_initial(
6768
parameters: Union[_models.RedisLinkedServerCreateParameters, IO],
6869
**kwargs: Any
6970
) -> _models.RedisLinkedServerWithProperties:
70-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
71+
error_map = {
72+
401: ClientAuthenticationError,
73+
404: ResourceNotFoundError,
74+
409: ResourceExistsError,
75+
304: ResourceNotModifiedError,
76+
}
7177
error_map.update(kwargs.pop("error_map", {}) or {})
7278

7379
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -293,7 +299,12 @@ def get_long_running_output(pipeline_response):
293299
async def _delete_initial( # pylint: disable=inconsistent-return-statements
294300
self, resource_group_name: str, name: str, linked_server_name: str, **kwargs: Any
295301
) -> None:
296-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
302+
error_map = {
303+
401: ClientAuthenticationError,
304+
404: ResourceNotFoundError,
305+
409: ResourceExistsError,
306+
304: ResourceNotModifiedError,
307+
}
297308
error_map.update(kwargs.pop("error_map", {}) or {})
298309

299310
_headers = kwargs.pop("headers", {}) or {}
@@ -415,7 +426,12 @@ async def get(
415426
:rtype: ~azure.mgmt.redis.models.RedisLinkedServerWithProperties
416427
:raises ~azure.core.exceptions.HttpResponseError:
417428
"""
418-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
429+
error_map = {
430+
401: ClientAuthenticationError,
431+
404: ResourceNotFoundError,
432+
409: ResourceExistsError,
433+
304: ResourceNotModifiedError,
434+
}
419435
error_map.update(kwargs.pop("error_map", {}) or {})
420436

421437
_headers = kwargs.pop("headers", {}) or {}
@@ -480,7 +496,12 @@ def list(
480496
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
481497
cls = kwargs.pop("cls", None) # type: ClsType[_models.RedisLinkedServerWithPropertiesList]
482498

483-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
499+
error_map = {
500+
401: ClientAuthenticationError,
501+
404: ResourceNotFoundError,
502+
409: ResourceExistsError,
503+
304: ResourceNotModifiedError,
504+
}
484505
error_map.update(kwargs.pop("error_map", {}) or {})
485506

486507
def prepare_request(next_link=None):

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_operations.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -66,7 +67,12 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
6667
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
6768
cls = kwargs.pop("cls", None) # type: ClsType[_models.OperationListResult]
6869

69-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
70+
error_map = {
71+
401: ClientAuthenticationError,
72+
404: ResourceNotFoundError,
73+
409: ResourceExistsError,
74+
304: ResourceNotModifiedError,
75+
}
7076
error_map.update(kwargs.pop("error_map", {}) or {})
7177

7278
def prepare_request(next_link=None):

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_patch_schedules_operations.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -78,7 +79,12 @@ def list_by_redis_resource(
7879
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
7980
cls = kwargs.pop("cls", None) # type: ClsType[_models.RedisPatchScheduleListResult]
8081

81-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
82+
error_map = {
83+
401: ClientAuthenticationError,
84+
404: ResourceNotFoundError,
85+
409: ResourceExistsError,
86+
304: ResourceNotModifiedError,
87+
}
8288
error_map.update(kwargs.pop("error_map", {}) or {})
8389

8490
def prepare_request(next_link=None):
@@ -224,7 +230,12 @@ async def create_or_update(
224230
:rtype: ~azure.mgmt.redis.models.RedisPatchSchedule
225231
:raises ~azure.core.exceptions.HttpResponseError:
226232
"""
227-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
233+
error_map = {
234+
401: ClientAuthenticationError,
235+
404: ResourceNotFoundError,
236+
409: ResourceExistsError,
237+
304: ResourceNotModifiedError,
238+
}
228239
error_map.update(kwargs.pop("error_map", {}) or {})
229240

230241
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -300,7 +311,12 @@ async def delete( # pylint: disable=inconsistent-return-statements
300311
:rtype: None
301312
:raises ~azure.core.exceptions.HttpResponseError:
302313
"""
303-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
314+
error_map = {
315+
401: ClientAuthenticationError,
316+
404: ResourceNotFoundError,
317+
409: ResourceExistsError,
318+
304: ResourceNotModifiedError,
319+
}
304320
error_map.update(kwargs.pop("error_map", {}) or {})
305321

306322
_headers = kwargs.pop("headers", {}) or {}
@@ -356,7 +372,12 @@ async def get(
356372
:rtype: ~azure.mgmt.redis.models.RedisPatchSchedule
357373
:raises ~azure.core.exceptions.HttpResponseError:
358374
"""
359-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
375+
error_map = {
376+
401: ClientAuthenticationError,
377+
404: ResourceNotFoundError,
378+
409: ResourceExistsError,
379+
304: ResourceNotModifiedError,
380+
}
360381
error_map.update(kwargs.pop("error_map", {}) or {})
361382

362383
_headers = kwargs.pop("headers", {}) or {}

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_private_endpoint_connections_operations.py

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -82,7 +83,12 @@ def list(
8283
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
8384
cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateEndpointConnectionListResult]
8485

85-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
86+
error_map = {
87+
401: ClientAuthenticationError,
88+
404: ResourceNotFoundError,
89+
409: ResourceExistsError,
90+
304: ResourceNotModifiedError,
91+
}
8692
error_map.update(kwargs.pop("error_map", {}) or {})
8793

8894
def prepare_request(next_link=None):
@@ -155,7 +161,12 @@ async def get(
155161
:rtype: ~azure.mgmt.redis.models.PrivateEndpointConnection
156162
:raises ~azure.core.exceptions.HttpResponseError:
157163
"""
158-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
164+
error_map = {
165+
401: ClientAuthenticationError,
166+
404: ResourceNotFoundError,
167+
409: ResourceExistsError,
168+
304: ResourceNotModifiedError,
169+
}
159170
error_map.update(kwargs.pop("error_map", {}) or {})
160171

161172
_headers = kwargs.pop("headers", {}) or {}
@@ -205,7 +216,12 @@ async def _put_initial(
205216
properties: Union[_models.PrivateEndpointConnection, IO],
206217
**kwargs: Any
207218
) -> _models.PrivateEndpointConnection:
208-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
219+
error_map = {
220+
401: ClientAuthenticationError,
221+
404: ResourceNotFoundError,
222+
409: ResourceExistsError,
223+
304: ResourceNotModifiedError,
224+
}
209225
error_map.update(kwargs.pop("error_map", {}) or {})
210226

211227
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -245,12 +261,16 @@ async def _put_initial(
245261

246262
response = pipeline_response.http_response
247263

248-
if response.status_code not in [201]:
264+
if response.status_code not in [200, 201]:
249265
map_error(status_code=response.status_code, response=response, error_map=error_map)
250266
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
251267
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
252268

253-
deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
269+
if response.status_code == 200:
270+
deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
271+
272+
if response.status_code == 201:
273+
deserialized = self._deserialize("PrivateEndpointConnection", pipeline_response)
254274

255275
if cls:
256276
return cls(pipeline_response, deserialized, {})
@@ -439,7 +459,12 @@ async def delete( # pylint: disable=inconsistent-return-statements
439459
:rtype: None
440460
:raises ~azure.core.exceptions.HttpResponseError:
441461
"""
442-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
462+
error_map = {
463+
401: ClientAuthenticationError,
464+
404: ResourceNotFoundError,
465+
409: ResourceExistsError,
466+
304: ResourceNotModifiedError,
467+
}
443468
error_map.update(kwargs.pop("error_map", {}) or {})
444469

445470
_headers = kwargs.pop("headers", {}) or {}

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/aio/operations/_private_link_resources_operations.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
HttpResponseError,
1616
ResourceExistsError,
1717
ResourceNotFoundError,
18+
ResourceNotModifiedError,
1819
map_error,
1920
)
2021
from azure.core.pipeline import PipelineResponse
@@ -72,7 +73,12 @@ def list_by_redis_cache(
7273
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
7374
cls = kwargs.pop("cls", None) # type: ClsType[_models.PrivateLinkResourceListResult]
7475

75-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
76+
error_map = {
77+
401: ClientAuthenticationError,
78+
404: ResourceNotFoundError,
79+
409: ResourceExistsError,
80+
304: ResourceNotModifiedError,
81+
}
7682
error_map.update(kwargs.pop("error_map", {}) or {})
7783

7884
def prepare_request(next_link=None):

0 commit comments

Comments
 (0)