Skip to content

Commit 8259791

Browse files
[AutoRelease] t2-cosmosdb-2024-12-02-73672(can only be merged by SDK owner) (Azure#38739)
* code and test * update testcases * update format * Update release date in CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 737adb2 commit 8259791

File tree

467 files changed

+35594
-7133
lines changed

Some content is hidden

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

467 files changed

+35594
-7133
lines changed

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

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

3+
## 10.0.0b5 (2024-12-23)
4+
5+
### Features Added
6+
7+
- Model `CommandPostBody` added property `readwrite`
8+
- Model `ErrorResponse` added property `error`
9+
- Model `ErrorResponseAutoGenerated` added property `code`
10+
- Model `ErrorResponseAutoGenerated` added property `message`
11+
- Model `IndexingPolicy` added property `vector_indexes`
12+
- Model `RestorableSqlContainerPropertiesResourceContainer` added property `vector_embedding_policy`
13+
- Model `SqlContainerGetPropertiesResource` added property `vector_embedding_policy`
14+
- Model `SqlContainerResource` added property `vector_embedding_policy`
15+
- Model `ThroughputSettingsGetPropertiesResource` added property `throughput_buckets`
16+
- Model `ThroughputSettingsResource` added property `throughput_buckets`
17+
- Added model `CommandAsyncPostBody`
18+
- Added enum `DistanceFunction`
19+
- Added model `PermissionAutoGenerated`
20+
- Added model `TableRoleAssignmentListResult`
21+
- Added model `TableRoleAssignmentResource`
22+
- Added model `TableRoleDefinitionListResult`
23+
- Added model `TableRoleDefinitionResource`
24+
- Added model `ThroughputBucketResource`
25+
- Added enum `VectorDataType`
26+
- Added model `VectorEmbedding`
27+
- Added model `VectorEmbeddingPolicy`
28+
- Added model `VectorIndex`
29+
- Added enum `VectorIndexType`
30+
- Operation group `TableResourcesOperations` added method `begin_create_update_table_role_assignment`
31+
- Operation group `TableResourcesOperations` added method `begin_create_update_table_role_definition`
32+
- Operation group `TableResourcesOperations` added method `begin_delete_table_role_assignment`
33+
- Operation group `TableResourcesOperations` added method `begin_delete_table_role_definition`
34+
- Operation group `TableResourcesOperations` added method `get_table_role_assignment`
35+
- Operation group `TableResourcesOperations` added method `get_table_role_definition`
36+
- Operation group `TableResourcesOperations` added method `list_table_role_assignments`
37+
- Operation group `TableResourcesOperations` added method `list_table_role_definitions`
38+
39+
### Breaking Changes
40+
41+
- Model `CommandPostBody` deleted or renamed its instance variable `read_write`
42+
- Model `ErrorResponse` deleted or renamed its instance variable `code`
43+
- Model `ErrorResponse` deleted or renamed its instance variable `message`
44+
- Model `ErrorResponseAutoGenerated` deleted or renamed its instance variable `error`
45+
346
## 9.7.0 (2024-11-18)
447

548
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "00d50cba07376c494f3b50647b847cd4ba348a04",
2+
"commit": "4aad50a36767f7c36673f2c7982bb4055dbf5ed4",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.26.4",
77
"@autorest/[email protected]"
88
],
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=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --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=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.26.4 --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/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._cosmos_db_management_client import CosmosDBManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._cosmos_db_management_client import CosmosDBManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"CosmosDBManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for CosmosDBManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
2524
attributes.
2625
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-11-15". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-11-15")
36+
api_version: str = kwargs.pop("api_version", "2024-12-01-preview")
3837

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

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

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@
2222
CassandraClustersOperations,
2323
CassandraDataCentersOperations,
2424
CassandraResourcesOperations,
25+
ChaosFaultOperations,
2526
CollectionOperations,
2627
CollectionPartitionOperations,
2728
CollectionPartitionRegionOperations,
2829
CollectionRegionOperations,
30+
DataTransferJobsOperations,
2931
DatabaseAccountRegionOperations,
3032
DatabaseAccountsOperations,
3133
DatabaseOperations,
34+
GraphResourcesOperations,
3235
GremlinResourcesOperations,
3336
LocationsOperations,
3437
MongoDBResourcesOperations,
38+
NetworkSecurityPerimeterConfigurationsOperations,
3539
NotebookWorkspacesOperations,
3640
Operations,
3741
PartitionKeyRangeIdOperations,
@@ -56,16 +60,21 @@
5660
ServiceOperations,
5761
SqlResourcesOperations,
5862
TableResourcesOperations,
63+
ThroughputPoolAccountOperations,
64+
ThroughputPoolAccountsOperations,
65+
ThroughputPoolOperations,
66+
ThroughputPoolsOperations,
5967
)
6068

6169
if TYPE_CHECKING:
62-
# pylint: disable=unused-import,ungrouped-imports
6370
from azure.core.credentials import TokenCredential
6471

6572

66-
class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
67-
"""Azure Cosmos DB Database Service Resource Provider REST API.
73+
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
74+
"""Azure Cosmos DB Chaos Fault REST API.
6875
76+
:ivar chaos_fault: ChaosFaultOperations operations
77+
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
6978
:ivar database_accounts: DatabaseAccountsOperations operations
7079
:vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
7180
:ivar operations: Operations operations
@@ -96,6 +105,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
96105
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
97106
:vartype partition_key_range_id_region:
98107
azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
108+
:ivar graph_resources: GraphResourcesOperations operations
109+
:vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
99110
:ivar sql_resources: SqlResourcesOperations operations
100111
:vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
101112
:ivar mongo_db_resources: MongoDBResourcesOperations operations
@@ -108,10 +119,16 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
108119
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
109120
:ivar locations: LocationsOperations operations
110121
:vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations
122+
:ivar data_transfer_jobs: DataTransferJobsOperations operations
123+
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
111124
:ivar cassandra_clusters: CassandraClustersOperations operations
112125
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
113126
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
114127
:vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations
128+
:ivar network_security_perimeter_configurations:
129+
NetworkSecurityPerimeterConfigurationsOperations operations
130+
:vartype network_security_perimeter_configurations:
131+
azure.mgmt.cosmosdb.operations.NetworkSecurityPerimeterConfigurationsOperations
115132
:ivar notebook_workspaces: NotebookWorkspacesOperations operations
116133
:vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations
117134
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
@@ -156,14 +173,24 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
156173
azure.mgmt.cosmosdb.operations.RestorableTableResourcesOperations
157174
:ivar service: ServiceOperations operations
158175
:vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
176+
:ivar throughput_pools: ThroughputPoolsOperations operations
177+
:vartype throughput_pools: azure.mgmt.cosmosdb.operations.ThroughputPoolsOperations
178+
:ivar throughput_pool: ThroughputPoolOperations operations
179+
:vartype throughput_pool: azure.mgmt.cosmosdb.operations.ThroughputPoolOperations
180+
:ivar throughput_pool_accounts: ThroughputPoolAccountsOperations operations
181+
:vartype throughput_pool_accounts:
182+
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountsOperations
183+
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
184+
:vartype throughput_pool_account:
185+
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountOperations
159186
:param credential: Credential needed for the client to connect to Azure. Required.
160187
:type credential: ~azure.core.credentials.TokenCredential
161-
:param subscription_id: The ID of the target subscription. Required.
188+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
162189
:type subscription_id: str
163190
:param base_url: Service URL. Default value is "https://management.azure.com".
164191
:type base_url: str
165-
:keyword api_version: Api Version. Default value is "2024-11-15". Note that overriding this
166-
default value may result in unsupported behavior.
192+
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
193+
this default value may result in unsupported behavior.
167194
:paramtype api_version: str
168195
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
169196
Retry-After header is present.
@@ -203,6 +230,7 @@ def __init__(
203230
self._serialize = Serializer(client_models)
204231
self._deserialize = Deserializer(client_models)
205232
self._serialize.client_side_validation = False
233+
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
206234
self.database_accounts = DatabaseAccountsOperations(
207235
self._client, self._config, self._serialize, self._deserialize
208236
)
@@ -234,6 +262,7 @@ def __init__(
234262
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
235263
self._client, self._config, self._serialize, self._deserialize
236264
)
265+
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
237266
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
238267
self.mongo_db_resources = MongoDBResourcesOperations(
239268
self._client, self._config, self._serialize, self._deserialize
@@ -246,12 +275,18 @@ def __init__(
246275
self._client, self._config, self._serialize, self._deserialize
247276
)
248277
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
278+
self.data_transfer_jobs = DataTransferJobsOperations(
279+
self._client, self._config, self._serialize, self._deserialize
280+
)
249281
self.cassandra_clusters = CassandraClustersOperations(
250282
self._client, self._config, self._serialize, self._deserialize
251283
)
252284
self.cassandra_data_centers = CassandraDataCentersOperations(
253285
self._client, self._config, self._serialize, self._deserialize
254286
)
287+
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
288+
self._client, self._config, self._serialize, self._deserialize
289+
)
255290
self.notebook_workspaces = NotebookWorkspacesOperations(
256291
self._client, self._config, self._serialize, self._deserialize
257292
)
@@ -298,6 +333,16 @@ def __init__(
298333
self._client, self._config, self._serialize, self._deserialize
299334
)
300335
self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize)
336+
self.throughput_pools = ThroughputPoolsOperations(
337+
self._client, self._config, self._serialize, self._deserialize
338+
)
339+
self.throughput_pool = ThroughputPoolOperations(self._client, self._config, self._serialize, self._deserialize)
340+
self.throughput_pool_accounts = ThroughputPoolAccountsOperations(
341+
self._client, self._config, self._serialize, self._deserialize
342+
)
343+
self.throughput_pool_account = ThroughputPoolAccountOperations(
344+
self._client, self._config, self._serialize, self._deserialize
345+
)
301346

302347
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
303348
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)