|
15 | 15 | HttpResponseError,
|
16 | 16 | ResourceExistsError,
|
17 | 17 | ResourceNotFoundError,
|
| 18 | + ResourceNotModifiedError, |
18 | 19 | map_error,
|
19 | 20 | )
|
20 | 21 | from azure.core.pipeline import PipelineResponse
|
@@ -82,7 +83,12 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.ClusterR
|
82 | 83 | api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
|
83 | 84 | cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters]
|
84 | 85 |
|
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 | + } |
86 | 92 | error_map.update(kwargs.pop("error_map", {}) or {})
|
87 | 93 |
|
88 | 94 | def prepare_request(next_link=None):
|
@@ -154,7 +160,12 @@ def list_by_resource_group(
|
154 | 160 | api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
|
155 | 161 | cls = kwargs.pop("cls", None) # type: ClsType[_models.ListClusters]
|
156 | 162 |
|
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 | + } |
158 | 169 | error_map.update(kwargs.pop("error_map", {}) or {})
|
159 | 170 |
|
160 | 171 | def prepare_request(next_link=None):
|
@@ -221,7 +232,12 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
|
221 | 232 | :rtype: ~azure.mgmt.cosmosdb.models.ClusterResource
|
222 | 233 | :raises ~azure.core.exceptions.HttpResponseError:
|
223 | 234 | """
|
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 | + } |
225 | 241 | error_map.update(kwargs.pop("error_map", {}) or {})
|
226 | 242 |
|
227 | 243 | _headers = kwargs.pop("headers", {}) or {}
|
@@ -264,7 +280,12 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
|
264 | 280 | async def _delete_initial( # pylint: disable=inconsistent-return-statements
|
265 | 281 | self, resource_group_name: str, cluster_name: str, **kwargs: Any
|
266 | 282 | ) -> 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 | + } |
268 | 289 | error_map.update(kwargs.pop("error_map", {}) or {})
|
269 | 290 |
|
270 | 291 | _headers = kwargs.pop("headers", {}) or {}
|
@@ -365,7 +386,12 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
|
365 | 386 | async def _create_update_initial(
|
366 | 387 | self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any
|
367 | 388 | ) -> _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 | + } |
369 | 395 | error_map.update(kwargs.pop("error_map", {}) or {})
|
370 | 396 |
|
371 | 397 | _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -577,7 +603,12 @@ def get_long_running_output(pipeline_response):
|
577 | 603 | async def _update_initial(
|
578 | 604 | self, resource_group_name: str, cluster_name: str, body: Union[_models.ClusterResource, IO], **kwargs: Any
|
579 | 605 | ) -> _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 | + } |
581 | 612 | error_map.update(kwargs.pop("error_map", {}) or {})
|
582 | 613 |
|
583 | 614 | _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -784,7 +815,12 @@ def get_long_running_output(pipeline_response):
|
784 | 815 | async def _invoke_command_initial(
|
785 | 816 | self, resource_group_name: str, cluster_name: str, body: Union[_models.CommandPostBody, IO], **kwargs: Any
|
786 | 817 | ) -> _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 | + } |
788 | 824 | error_map.update(kwargs.pop("error_map", {}) or {})
|
789 | 825 |
|
790 | 826 | _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
|
@@ -1006,7 +1042,12 @@ def list_backups(
|
1006 | 1042 | api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str
|
1007 | 1043 | cls = kwargs.pop("cls", None) # type: ClsType[_models.ListBackups]
|
1008 | 1044 |
|
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 | + } |
1010 | 1051 | error_map.update(kwargs.pop("error_map", {}) or {})
|
1011 | 1052 |
|
1012 | 1053 | def prepare_request(next_link=None):
|
@@ -1078,7 +1119,12 @@ async def get_backup(
|
1078 | 1119 | :rtype: ~azure.mgmt.cosmosdb.models.BackupResource
|
1079 | 1120 | :raises ~azure.core.exceptions.HttpResponseError:
|
1080 | 1121 | """
|
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 | + } |
1082 | 1128 | error_map.update(kwargs.pop("error_map", {}) or {})
|
1083 | 1129 |
|
1084 | 1130 | _headers = kwargs.pop("headers", {}) or {}
|
@@ -1122,7 +1168,12 @@ async def get_backup(
|
1122 | 1168 | async def _deallocate_initial( # pylint: disable=inconsistent-return-statements
|
1123 | 1169 | self, resource_group_name: str, cluster_name: str, **kwargs: Any
|
1124 | 1170 | ) -> 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 | + } |
1126 | 1177 | error_map.update(kwargs.pop("error_map", {}) or {})
|
1127 | 1178 |
|
1128 | 1179 | _headers = kwargs.pop("headers", {}) or {}
|
@@ -1227,7 +1278,12 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
|
1227 | 1278 | async def _start_initial( # pylint: disable=inconsistent-return-statements
|
1228 | 1279 | self, resource_group_name: str, cluster_name: str, **kwargs: Any
|
1229 | 1280 | ) -> 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 | + } |
1231 | 1287 | error_map.update(kwargs.pop("error_map", {}) or {})
|
1232 | 1288 |
|
1233 | 1289 | _headers = kwargs.pop("headers", {}) or {}
|
@@ -1343,7 +1399,12 @@ async def status(
|
1343 | 1399 | :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus
|
1344 | 1400 | :raises ~azure.core.exceptions.HttpResponseError:
|
1345 | 1401 | """
|
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 | + } |
1347 | 1408 | error_map.update(kwargs.pop("error_map", {}) or {})
|
1348 | 1409 |
|
1349 | 1410 | _headers = kwargs.pop("headers", {}) or {}
|
|
0 commit comments