Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2,162 changes: 231 additions & 1,931 deletions sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions sdk/cosmos/azure-mgmt-cosmosdb/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"apiVersion": "2026-03-15",
"apiVersion": "2026-04-01-preview",
"apiVersions": {
"Microsoft.DocumentDB": "2026-03-15"
"Microsoft.DocumentDB": "2026-04-01-preview"
},
"commit": "9ee5902c9557817bc4a859ebc13f757515aac5d7",
"commit": "9f5271b1ab4f354780443f12755bd097f148f9bc",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB",
"emitterVersion": "0.63.2",
"httpClientPythonVersion": "^0.34.0"
"emitterVersion": "0.63.5",
"httpClientPythonVersion": "^0.36.0"
}
10,058 changes: 7,306 additions & 2,752 deletions sdk/cosmos/azure-mgmt-cosmosdb/api.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/cosmos/azure-mgmt-cosmosdb/api.metadata.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiMdSha256: bb5e955fa86d927ddfc7f300e2fed8ec6c99d9e7bc8d3fd2b6dea6566014580d
parserVersion: 0.3.28
pythonVersion: 3.13.13
apiMdSha256: 7d63bde47bed9d7f9cb7bd2254d79dd01b620e5c2a32df1f10c6e9a1146c77df
parserVersion: 0.3.31
pythonVersion: 3.13.15
304 changes: 302 additions & 2 deletions sdk/cosmos/azure-mgmt-cosmosdb/apiview-properties.json

Large diffs are not rendered by default.

89 changes: 85 additions & 4 deletions sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -23,20 +24,27 @@
CassandraClustersOperations,
CassandraDataCentersOperations,
CassandraResourcesOperations,
ChaosFaultOperations,
CollectionOperations,
CollectionPartitionOperations,
CollectionPartitionRegionOperations,
CollectionRegionOperations,
CopyJobsOperations,
DataTransferJobsOperations,
DatabaseAccountRegionOperations,
DatabaseAccountsOperations,
DatabaseOperations,
FleetAnalyticsOperations,
FleetOperations,
FleetspaceAccountOperations,
FleetspaceOperations,
GarnetClustersOperations,
GraphResourcesOperations,
GremlinResourcesOperations,
LocationsOperations,
MongoDBResourcesOperations,
MongoMIResourcesOperations,
NetworkSecurityPerimeterConfigurationsOperations,
NotebookWorkspacesOperations,
Operations,
PartitionKeyRangeIdOperations,
Expand All @@ -59,8 +67,15 @@
RestorableTableResourcesOperations,
RestorableTablesOperations,
ServiceOperations,
SoftDeletedDatabaseAccountsOperations,
SoftDeletedSqlContainersOperations,
SoftDeletedSqlDatabasesOperations,
SqlResourcesOperations,
TableResourcesOperations,
ThroughputPoolAccountOperations,
ThroughputPoolAccountsOperations,
ThroughputPoolOperations,
ThroughputPoolsOperations,
)

if sys.version_info >= (3, 11):
Expand All @@ -73,13 +88,17 @@
from azure.core.credentials import TokenCredential


class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes,docstring-keyword-should-match-keyword-only
"""Azure Cosmos DB Throughput Pool REST API.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.cosmosdb.operations.Operations
:ivar database_accounts: DatabaseAccountsOperations operations
:vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
:ivar copy_jobs: CopyJobsOperations operations
:vartype copy_jobs: azure.mgmt.cosmosdb.operations.CopyJobsOperations
:ivar graph_resources: GraphResourcesOperations operations
:vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
:ivar sql_resources: SqlResourcesOperations operations
:vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
:ivar mongo_db_resources: MongoDBResourcesOperations operations
Expand All @@ -90,13 +109,32 @@ class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
:vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations
:ivar gremlin_resources: GremlinResourcesOperations operations
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
:ivar data_transfer_jobs: DataTransferJobsOperations operations
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
:ivar garnet_clusters: GarnetClustersOperations operations
:vartype garnet_clusters: azure.mgmt.cosmosdb.operations.GarnetClustersOperations
:ivar network_security_perimeter_configurations:
NetworkSecurityPerimeterConfigurationsOperations operations
:vartype network_security_perimeter_configurations:
azure.mgmt.cosmosdb.operations.NetworkSecurityPerimeterConfigurationsOperations
:ivar notebook_workspaces: NotebookWorkspacesOperations operations
:vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
:vartype private_endpoint_connections:
azure.mgmt.cosmosdb.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.cosmosdb.operations.PrivateLinkResourcesOperations
:ivar soft_deleted_database_accounts: SoftDeletedDatabaseAccountsOperations operations
:vartype soft_deleted_database_accounts:
azure.mgmt.cosmosdb.operations.SoftDeletedDatabaseAccountsOperations
:ivar soft_deleted_sql_databases: SoftDeletedSqlDatabasesOperations operations
:vartype soft_deleted_sql_databases:
azure.mgmt.cosmosdb.operations.SoftDeletedSqlDatabasesOperations
:ivar soft_deleted_sql_containers: SoftDeletedSqlContainersOperations operations
:vartype soft_deleted_sql_containers:
azure.mgmt.cosmosdb.operations.SoftDeletedSqlContainersOperations
:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
:ivar database: DatabaseOperations operations
:vartype database: azure.mgmt.cosmosdb.operations.DatabaseOperations
:ivar collection: CollectionOperations operations
Expand Down Expand Up @@ -166,10 +204,22 @@ class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
azure.mgmt.cosmosdb.operations.RestorableTableResourcesOperations
:ivar service: ServiceOperations operations
:vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
:ivar throughput_pool: ThroughputPoolOperations operations
:vartype throughput_pool: azure.mgmt.cosmosdb.operations.ThroughputPoolOperations
:ivar throughput_pools: ThroughputPoolsOperations operations
:vartype throughput_pools: azure.mgmt.cosmosdb.operations.ThroughputPoolsOperations
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
:vartype throughput_pool_account:
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountOperations
:ivar throughput_pool_accounts: ThroughputPoolAccountsOperations operations
:vartype throughput_pool_accounts:
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountsOperations
:ivar mongo_mi_resources: MongoMIResourcesOperations operations
:vartype mongo_mi_resources: azure.mgmt.cosmosdb.operations.MongoMIResourcesOperations
:ivar fleet: FleetOperations operations
:vartype fleet: azure.mgmt.cosmosdb.operations.FleetOperations
:ivar fleet_analytics: FleetAnalyticsOperations operations
:vartype fleet_analytics: azure.mgmt.cosmosdb.operations.FleetAnalyticsOperations
:ivar fleetspace: FleetspaceOperations operations
:vartype fleetspace: azure.mgmt.cosmosdb.operations.FleetspaceOperations
:ivar fleetspace_account: FleetspaceAccountOperations operations
Expand All @@ -183,9 +233,10 @@ class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
:keyword api_version: The API version to use for this operation. Known values are "2026-03-15"
and None. Default value is None. If not set, the operation's default API version will be used.
Note that overriding this default value may result in unsupported behavior.
:keyword api_version: The API version to use for this operation. Known values are
"2026-04-01-preview" and None. Default value is None. If not set, the operation's default API
version will be used. Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down Expand Up @@ -242,6 +293,8 @@ def __init__(
self.database_accounts = DatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.copy_jobs = CopyJobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.graph_resources = GraphResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sql_resources = SqlResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
self.mongo_db_resources = MongoDBResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
Expand All @@ -253,6 +306,13 @@ def __init__(
self.gremlin_resources = GremlinResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.data_transfer_jobs = DataTransferJobsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.garnet_clusters = GarnetClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.notebook_workspaces = NotebookWorkspacesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -262,6 +322,16 @@ def __init__(
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.soft_deleted_database_accounts = SoftDeletedDatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.soft_deleted_sql_databases = SoftDeletedSqlDatabasesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.soft_deleted_sql_containers = SoftDeletedSqlContainersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
self.database = DatabaseOperations(self._client, self._config, self._serialize, self._deserialize)
self.collection = CollectionOperations(self._client, self._config, self._serialize, self._deserialize)
self.collection_region = CollectionRegionOperations(
Expand Down Expand Up @@ -333,10 +403,21 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize)
self.throughput_pool = ThroughputPoolOperations(self._client, self._config, self._serialize, self._deserialize)
self.throughput_pools = ThroughputPoolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.throughput_pool_account = ThroughputPoolAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.throughput_pool_accounts = ThroughputPoolAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.mongo_mi_resources = MongoMIResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.fleet = FleetOperations(self._client, self._config, self._serialize, self._deserialize)
self.fleet_analytics = FleetAnalyticsOperations(self._client, self._config, self._serialize, self._deserialize)
self.fleetspace = FleetspaceOperations(self._client, self._config, self._serialize, self._deserialize)
self.fleetspace_account = FleetspaceAccountOperations(
self._client, self._config, self._serialize, self._deserialize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -18,7 +19,7 @@
from azure.core.credentials import TokenCredential


class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,docstring-keyword-should-match-keyword-only
"""Configuration for CosmosDBManagementClient.

Note that all parameters used to create this instance are saved as instance
Expand All @@ -33,9 +34,10 @@ class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instanc
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
:keyword api_version: The API version to use for this operation. Known values are "2026-03-15"
and None. Default value is None. If not set, the operation's default API version will be used.
Note that overriding this default value may result in unsupported behavior.
:keyword api_version: The API version to use for this operation. Known values are
"2026-04-01-preview" and None. Default value is None. If not set, the operation's default API
version will be used. Note that overriding this default value may result in unsupported
behavior.
:paramtype api_version: str
"""

Expand All @@ -47,7 +49,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2026-03-15")
api_version: str = kwargs.pop("api_version", "2026-04-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""


__all__: list[str] = [] # Add all objects you want publicly available to users at this package level


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,15 @@ def _is_readonly(p):


class SdkJSONEncoder(JSONEncoder):
"""A JSON encoder that's capable of serializing datetime objects and bytes."""
"""A JSON encoder that's capable of serializing datetime objects and bytes.

:param args: Additional positional arguments passed to the base ``JSONEncoder``.
:type args: typing.Any
:keyword exclude_readonly: Whether to exclude readonly properties. Defaults to False.
:paramtype exclude_readonly: bool
:keyword format: The format to use for serialization. Defaults to None.
:paramtype format: typing.Optional[str]
"""

def __init__(self, *args, exclude_readonly: bool = False, format: typing.Optional[str] = None, **kwargs):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -342,6 +350,12 @@ def _deserialize_int_as_str(attr):
return int(attr)


def _deserialize_bool_as_str(attr):
if isinstance(attr, bool):
return attr
return attr.lower() == "true"


_DESERIALIZE_MAPPING = {
datetime: _deserialize_datetime,
date: _deserialize_date,
Expand Down Expand Up @@ -369,6 +383,8 @@ def _deserialize_int_as_str(attr):
def get_deserializer(annotation: typing.Any, rf: typing.Optional["_RestField"] = None):
if annotation is int and rf and rf._format == "str":
return _deserialize_int_as_str
if annotation is bool and rf and rf._format == "str":
return _deserialize_bool_as_str
if annotation is str and rf and rf._format in _ARRAY_ENCODE_MAPPING:
return functools.partial(_deserialize_array_encoded, _ARRAY_ENCODE_MAPPING[rf._format])
if rf and rf._format:
Expand Down Expand Up @@ -458,21 +474,21 @@ def __ne__(self, other: typing.Any) -> bool:

def keys(self) -> typing.KeysView[str]:
"""
:returns: a set-like object providing a view on D's keys
:returns: a set-like object providing a view on the mapping's keys
:rtype: ~typing.KeysView
"""
return self._data.keys()

def values(self) -> typing.ValuesView[typing.Any]:
"""
:returns: an object providing a view on D's values
:returns: an object providing a view on the mapping's values
:rtype: ~typing.ValuesView
"""
return self._data.values()

def items(self) -> typing.ItemsView[str, typing.Any]:
"""
:returns: set-like object providing a view on D's items
:returns: a set-like object providing a view on the mapping's items
:rtype: ~typing.ItemsView
"""
return self._data.items()
Expand All @@ -482,7 +498,7 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any:
Get the value for key if key is in the dictionary, else default.
:param str key: The key to look up.
:param any default: The value to return if key is not in the dictionary. Defaults to None
:returns: D[k] if k in D, else d.
:returns: The value for key if key is in the dictionary, else default.
:rtype: any
"""
try:
Expand Down Expand Up @@ -517,19 +533,19 @@ def popitem(self) -> tuple[str, typing.Any]:
Removes and returns some (key, value) pair
:returns: The (key, value) pair.
:rtype: tuple
:raises KeyError: if D is empty.
:raises KeyError: if the dictionary is empty.
"""
return self._data.popitem()

def clear(self) -> None:
"""
Remove all items from D.
Remove all items from the dictionary.
"""
self._data.clear()

def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ
"""
Updates D from mapping/iterable E and F.
Update the dictionary from a mapping or an iterable of key-value pairs.
:param any args: Either a mapping object or an iterable of key-value pairs.
"""
self._data.update(*args, **kwargs)
Expand All @@ -542,10 +558,11 @@ def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint

def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
"""
Same as calling D.get(k, d), and setting D[k]=d if k not found
Return the value for key if key is in the dictionary; otherwise set the key to
default and return default.
:param str key: The key to look up.
:param any default: The value to set if key is not in the dictionary
:returns: D[k] if k in D, else d.
:returns: The value for key if key is in the dictionary, else default.
:rtype: any
"""
if default is _UNSET:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _decode_attribute_map_key(key):


class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
"""Request object model serializer.
:param classes: Mapping of model names to model types, used to resolve models during serialization.
:type classes: typing.Optional[typing.Mapping[str, type]]
"""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}

Expand Down
Loading
Loading