Skip to content

Commit 57874cd

Browse files
author
SDKAuto
committed
CodeGen from PR 20419 in Azure/azure-rest-api-specs
Merge 7ac0c63a3d7c9bde26d219ff21d1affb36637166 into 7d73a80fd4a2f19f223718e35293c11f3f7f12cb
1 parent 7fe4a1f commit 57874cd

File tree

90 files changed

+41581
-295
lines changed

Some content is hidden

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

90 files changed

+41581
-295
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.0.1",
4+
"@autorest/python@6.1.5",
55
"@autorest/[email protected]"
66
],
7-
"commit": "4b5383a3c9fb089d361d2e11f65d0d04c76e94ac",
7+
"commit": "a92bd9c31b39fa3cf5a4c5800aaf981a14f06423",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --models-mode=msrest --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.0.1 --use=@autorest/[email protected] --version=3.8.4 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cosmos-db/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/[email protected] --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/cosmos-db/resource-manager/readme.md"
1111
}

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: The ID of the target subscription. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-05-15-preview". Note that overriding
32+
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
3333
this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-05-15-preview") # type: str
39+
api_version = kwargs.pop("api_version", "2022-08-15-preview") # type: str
4040

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

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
165165
:type subscription_id: str
166166
:param base_url: Service URL. Default value is "https://management.azure.com".
167167
:type base_url: str
168-
:keyword api_version: Api Version. Default value is "2022-05-15-preview". Note that overriding
168+
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
169169
this default value may result in unsupported behavior.
170170
:paramtype api_version: str
171171
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
15051505
try:
15061506
return self(target_obj, data, content_type=content_type)
15071507
except:
1508-
_LOGGER.warning(
1508+
_LOGGER.debug(
15091509
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
15101510
)
15111511
return None

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_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 = "8.0.0b2"
9+
VERSION = "0.7.0"

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: The ID of the target subscription. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-05-15-preview". Note that overriding
32+
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
3333
this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-05-15-preview") # type: str
39+
api_version = kwargs.pop("api_version", "2022-08-15-preview") # type: str
4040

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

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
168168
:type subscription_id: str
169169
:param base_url: Service URL. Default value is "https://management.azure.com".
170170
:type base_url: str
171-
:keyword api_version: Api Version. Default value is "2022-05-15-preview". Note that overriding
171+
:keyword api_version: Api Version. Default value is "2022-08-15-preview". Note that overriding
172172
this default value may result in unsupported behavior.
173173
:paramtype api_version: str
174174
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py

Lines changed: 73 additions & 12 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_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ClusterR
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.ListClusters]
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):
@@ -154,7 +160,12 @@ def list_by_resource_group(
154160
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
155161
cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters]
156162

157-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
163+
error_map = {
164+
401: ClientAuthenticationError,
165+
404: ResourceNotFoundError,
166+
409: ResourceExistsError,
167+
304: ResourceNotModifiedError,
168+
}
158169
error_map.update(kwargs.pop("error_map", {}) or {})
159170

160171
def prepare_request(next_link=None):
@@ -221,7 +232,12 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
221232
:rtype: ~azure.mgmt.cosmosdb.models.ClusterResource
222233
:raises ~azure.core.exceptions.HttpResponseError:
223234
"""
224-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
235+
error_map = {
236+
401: ClientAuthenticationError,
237+
404: ResourceNotFoundError,
238+
409: ResourceExistsError,
239+
304: ResourceNotModifiedError,
240+
}
225241
error_map.update(kwargs.pop("error_map", {}) or {})
226242

227243
_headers = kwargs.pop("headers", {}) or {}
@@ -264,7 +280,12 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
264280
async def _delete_initial( # pylint: disable=inconsistent-return-statements
265281
self, resource_group_name: str, cluster_name: str, **kwargs: Any
266282
) -> None:
267-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
283+
error_map = {
284+
401: ClientAuthenticationError,
285+
404: ResourceNotFoundError,
286+
409: ResourceExistsError,
287+
304: ResourceNotModifiedError,
288+
}
268289
error_map.update(kwargs.pop("error_map", {}) or {})
269290

270291
_headers = kwargs.pop("headers", {}) or {}
@@ -365,7 +386,12 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
365386
async def _create_update_initial(
366387
self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any
367388
) -> _models.ClusterResource:
368-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
389+
error_map = {
390+
401: ClientAuthenticationError,
391+
404: ResourceNotFoundError,
392+
409: ResourceExistsError,
393+
304: ResourceNotModifiedError,
394+
}
369395
error_map.update(kwargs.pop("error_map", {}) or {})
370396

371397
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -577,7 +603,12 @@ def get_long_running_output(pipeline_response):
577603
async def _update_initial(
578604
self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any
579605
) -> _models.ClusterResource:
580-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
606+
error_map = {
607+
401: ClientAuthenticationError,
608+
404: ResourceNotFoundError,
609+
409: ResourceExistsError,
610+
304: ResourceNotModifiedError,
611+
}
581612
error_map.update(kwargs.pop("error_map", {}) or {})
582613

583614
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -784,7 +815,12 @@ def get_long_running_output(pipeline_response):
784815
async def _invoke_command_initial(
785816
self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any
786817
) -> _models.CommandOutput:
787-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
818+
error_map = {
819+
401: ClientAuthenticationError,
820+
404: ResourceNotFoundError,
821+
409: ResourceExistsError,
822+
304: ResourceNotModifiedError,
823+
}
788824
error_map.update(kwargs.pop("error_map", {}) or {})
789825

790826
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -1006,7 +1042,12 @@ def list_backups(
10061042
api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
10071043
cls = kwargs.pop("cls", None) # type: ClsType[_models.ListBackups]
10081044

1009-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
1045+
error_map = {
1046+
401: ClientAuthenticationError,
1047+
404: ResourceNotFoundError,
1048+
409: ResourceExistsError,
1049+
304: ResourceNotModifiedError,
1050+
}
10101051
error_map.update(kwargs.pop("error_map", {}) or {})
10111052

10121053
def prepare_request(next_link=None):
@@ -1078,7 +1119,12 @@ async def get_backup(
10781119
:rtype: ~azure.mgmt.cosmosdb.models.BackupResource
10791120
:raises ~azure.core.exceptions.HttpResponseError:
10801121
"""
1081-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
1122+
error_map = {
1123+
401: ClientAuthenticationError,
1124+
404: ResourceNotFoundError,
1125+
409: ResourceExistsError,
1126+
304: ResourceNotModifiedError,
1127+
}
10821128
error_map.update(kwargs.pop("error_map", {}) or {})
10831129

10841130
_headers = kwargs.pop("headers", {}) or {}
@@ -1122,7 +1168,12 @@ async def get_backup(
11221168
async def _deallocate_initial( # pylint: disable=inconsistent-return-statements
11231169
self, resource_group_name: str, cluster_name: str, **kwargs: Any
11241170
) -> None:
1125-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
1171+
error_map = {
1172+
401: ClientAuthenticationError,
1173+
404: ResourceNotFoundError,
1174+
409: ResourceExistsError,
1175+
304: ResourceNotModifiedError,
1176+
}
11261177
error_map.update(kwargs.pop("error_map", {}) or {})
11271178

11281179
_headers = kwargs.pop("headers", {}) or {}
@@ -1227,7 +1278,12 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
12271278
async def _start_initial( # pylint: disable=inconsistent-return-statements
12281279
self, resource_group_name: str, cluster_name: str, **kwargs: Any
12291280
) -> None:
1230-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
1281+
error_map = {
1282+
401: ClientAuthenticationError,
1283+
404: ResourceNotFoundError,
1284+
409: ResourceExistsError,
1285+
304: ResourceNotModifiedError,
1286+
}
12311287
error_map.update(kwargs.pop("error_map", {}) or {})
12321288

12331289
_headers = kwargs.pop("headers", {}) or {}
@@ -1343,7 +1399,12 @@ async def status(
13431399
:rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus
13441400
:raises ~azure.core.exceptions.HttpResponseError:
13451401
"""
1346-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
1402+
error_map = {
1403+
401: ClientAuthenticationError,
1404+
404: ResourceNotFoundError,
1405+
409: ResourceExistsError,
1406+
304: ResourceNotModifiedError,
1407+
}
13471408
error_map.update(kwargs.pop("error_map", {}) or {})
13481409

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

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py

Lines changed: 31 additions & 5 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.ListDataCenters]
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):
@@ -154,7 +160,12 @@ async def get(
154160
:rtype: ~azure.mgmt.cosmosdb.models.DataCenterResource
155161
:raises ~azure.core.exceptions.HttpResponseError:
156162
"""
157-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
163+
error_map = {
164+
401: ClientAuthenticationError,
165+
404: ResourceNotFoundError,
166+
409: ResourceExistsError,
167+
304: ResourceNotModifiedError,
168+
}
158169
error_map.update(kwargs.pop("error_map", {}) or {})
159170

160171
_headers = kwargs.pop("headers", {}) or {}
@@ -198,7 +209,12 @@ async def get(
198209
async def _delete_initial( # pylint: disable=inconsistent-return-statements
199210
self, resource_group_name: str, cluster_name: str, data_center_name: str, **kwargs: Any
200211
) -> None:
201-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
212+
error_map = {
213+
401: ClientAuthenticationError,
214+
404: ResourceNotFoundError,
215+
409: ResourceExistsError,
216+
304: ResourceNotModifiedError,
217+
}
202218
error_map.update(kwargs.pop("error_map", {}) or {})
203219

204220
_headers = kwargs.pop("headers", {}) or {}
@@ -310,7 +326,12 @@ async def _create_update_initial(
310326
body: Union[_models.DataCenterResource, IO],
311327
**kwargs: Any
312328
) -> _models.DataCenterResource:
313-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
329+
error_map = {
330+
401: ClientAuthenticationError,
331+
404: ResourceNotFoundError,
332+
409: ResourceExistsError,
333+
304: ResourceNotModifiedError,
334+
}
314335
error_map.update(kwargs.pop("error_map", {}) or {})
315336

316337
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
@@ -540,7 +561,12 @@ async def _update_initial(
540561
body: Union[_models.DataCenterResource, IO],
541562
**kwargs: Any
542563
) -> _models.DataCenterResource:
543-
error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
564+
error_map = {
565+
401: ClientAuthenticationError,
566+
404: ResourceNotFoundError,
567+
409: ResourceExistsError,
568+
304: ResourceNotModifiedError,
569+
}
544570
error_map.update(kwargs.pop("error_map", {}) or {})
545571

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

0 commit comments

Comments
 (0)