Skip to content

Commit 6db5edb

Browse files
[AutoRelease] t2-cosmosdb-2024-09-11-21177(can only be merged by SDK owner) (#37286)
* code and test * update-testcase * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 754bb7f commit 6db5edb

File tree

366 files changed

+11797
-2673
lines changed

Some content is hidden

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

366 files changed

+11797
-2673
lines changed

sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md

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

3+
## 9.6.0 (2024-09-18)
4+
5+
### Features Added
6+
7+
- Model `ResourceRestoreParameters` added property `restore_with_ttl_disabled`
8+
- Model `RestoreParameters` added parameter `restore_with_ttl_disabled` in method `__init__`
9+
- Model `RestoreParametersBase` added property `restore_with_ttl_disabled`
10+
- Enum `ServerVersion` added member `SEVEN0`
11+
- Added model `ErrorAdditionalInfo`
12+
- Added model `ErrorDetail`
13+
- Added model `ErrorResponseAutoGenerated`
14+
315
## 9.5.1 (2024-06-19)
416

517
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "f1546dc981fa5d164d7ecd13588520457462c22c",
2+
"commit": "3519c80fe510a268f6e59a29ccac8a53fdec15b6",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.19",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2024-05 --use=@autorest/python@6.13.19 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-2024-08 --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --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
@@ -28,13 +28,13 @@ class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instanc
2828
:type credential: ~azure.core.credentials.TokenCredential
2929
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-05-15". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-08-15". Note that overriding this
3232
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-05-15")
37+
api_version: str = kwargs.pop("api_version", "2024-08-15")
3838

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -161,7 +162,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
161162
:type subscription_id: str
162163
:param base_url: Service URL. Default value is "https://management.azure.com".
163164
:type base_url: str
164-
:keyword api_version: Api Version. Default value is "2024-05-15". Note that overriding this
165+
:keyword api_version: Api Version. Default value is "2024-08-15". Note that overriding this
165166
default value may result in unsupported behavior.
166167
:paramtype api_version: str
167168
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -323,7 +324,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
323324
def close(self) -> None:
324325
self._client.close()
325326

326-
def __enter__(self) -> "CosmosDBManagementClient":
327+
def __enter__(self) -> Self:
327328
self._client.__enter__()
328329
return self
329330

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod

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

Lines changed: 0 additions & 16 deletions
This file was deleted.

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 = "9.5.1"
9+
VERSION = "9.6.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
@@ -28,13 +28,13 @@ class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instanc
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
2929
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-05-15". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-08-15". Note that overriding this
3232
default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-05-15")
37+
api_version: str = kwargs.pop("api_version", "2024-08-15")
3838

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

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, Awaitable, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import AsyncHttpResponse, HttpRequest
@@ -164,7 +165,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
164165
:type subscription_id: str
165166
:param base_url: Service URL. Default value is "https://management.azure.com".
166167
:type base_url: str
167-
:keyword api_version: Api Version. Default value is "2024-05-15". Note that overriding this
168+
:keyword api_version: Api Version. Default value is "2024-08-15". Note that overriding this
168169
default value may result in unsupported behavior.
169170
:paramtype api_version: str
170171
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -328,7 +329,7 @@ def _send_request(
328329
async def close(self) -> None:
329330
await self._client.close()
330331

331-
async def __aenter__(self) -> "CosmosDBManagementClient":
332+
async def __aenter__(self) -> Self:
332333
await self._client.__aenter__()
333334
return self
334335

0 commit comments

Comments
 (0)