Skip to content

Commit

Permalink
[AutoRelease] t2-cosmosdb-2024-12-02-73672(can only be merged by SDK …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
3 people authored Dec 23, 2024
1 parent 737adb2 commit 8259791
Show file tree
Hide file tree
Showing 467 changed files with 35,594 additions and 7,133 deletions.
43 changes: 43 additions & 0 deletions sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Release History

## 10.0.0b5 (2024-12-23)

### Features Added

- Model `CommandPostBody` added property `readwrite`
- Model `ErrorResponse` added property `error`
- Model `ErrorResponseAutoGenerated` added property `code`
- Model `ErrorResponseAutoGenerated` added property `message`
- Model `IndexingPolicy` added property `vector_indexes`
- Model `RestorableSqlContainerPropertiesResourceContainer` added property `vector_embedding_policy`
- Model `SqlContainerGetPropertiesResource` added property `vector_embedding_policy`
- Model `SqlContainerResource` added property `vector_embedding_policy`
- Model `ThroughputSettingsGetPropertiesResource` added property `throughput_buckets`
- Model `ThroughputSettingsResource` added property `throughput_buckets`
- Added model `CommandAsyncPostBody`
- Added enum `DistanceFunction`
- Added model `PermissionAutoGenerated`
- Added model `TableRoleAssignmentListResult`
- Added model `TableRoleAssignmentResource`
- Added model `TableRoleDefinitionListResult`
- Added model `TableRoleDefinitionResource`
- Added model `ThroughputBucketResource`
- Added enum `VectorDataType`
- Added model `VectorEmbedding`
- Added model `VectorEmbeddingPolicy`
- Added model `VectorIndex`
- Added enum `VectorIndexType`
- Operation group `TableResourcesOperations` added method `begin_create_update_table_role_assignment`
- Operation group `TableResourcesOperations` added method `begin_create_update_table_role_definition`
- Operation group `TableResourcesOperations` added method `begin_delete_table_role_assignment`
- Operation group `TableResourcesOperations` added method `begin_delete_table_role_definition`
- Operation group `TableResourcesOperations` added method `get_table_role_assignment`
- Operation group `TableResourcesOperations` added method `get_table_role_definition`
- Operation group `TableResourcesOperations` added method `list_table_role_assignments`
- Operation group `TableResourcesOperations` added method `list_table_role_definitions`

### Breaking Changes

- Model `CommandPostBody` deleted or renamed its instance variable `read_write`
- Model `ErrorResponse` deleted or renamed its instance variable `code`
- Model `ErrorResponse` deleted or renamed its instance variable `message`
- Model `ErrorResponseAutoGenerated` deleted or renamed its instance variable `error`

## 9.7.0 (2024-11-18)

### Features Added
Expand Down
6 changes: 3 additions & 3 deletions sdk/cosmos/azure-mgmt-cosmosdb/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "00d50cba07376c494f3b50647b847cd4ba348a04",
"commit": "4aad50a36767f7c36673f2c7982bb4055dbf5ed4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.19.0",
"@autorest/python@6.26.4",
"@autorest/[email protected]"
],
"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",
"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",
"readme": "specification/cosmos-db/resource-manager/readme.md"
}
12 changes: 9 additions & 3 deletions sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._cosmos_db_management_client import CosmosDBManagementClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._cosmos_db_management_client import CosmosDBManagementClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"CosmosDBManagementClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,26 @@
from ._version import VERSION

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


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

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-11-15")
api_version: str = kwargs.pop("api_version", "2024-12-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 @@ -22,16 +22,20 @@
CassandraClustersOperations,
CassandraDataCentersOperations,
CassandraResourcesOperations,
ChaosFaultOperations,
CollectionOperations,
CollectionPartitionOperations,
CollectionPartitionRegionOperations,
CollectionRegionOperations,
DataTransferJobsOperations,
DatabaseAccountRegionOperations,
DatabaseAccountsOperations,
DatabaseOperations,
GraphResourcesOperations,
GremlinResourcesOperations,
LocationsOperations,
MongoDBResourcesOperations,
NetworkSecurityPerimeterConfigurationsOperations,
NotebookWorkspacesOperations,
Operations,
PartitionKeyRangeIdOperations,
Expand All @@ -56,16 +60,21 @@
ServiceOperations,
SqlResourcesOperations,
TableResourcesOperations,
ThroughputPoolAccountOperations,
ThroughputPoolAccountsOperations,
ThroughputPoolOperations,
ThroughputPoolsOperations,
)

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


class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Azure Cosmos DB Database Service Resource Provider REST API.
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
"""Azure Cosmos DB Chaos Fault REST API.
:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
:ivar database_accounts: DatabaseAccountsOperations operations
:vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
:ivar operations: Operations operations
Expand Down Expand Up @@ -96,6 +105,8 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
:vartype partition_key_range_id_region:
azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
: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 @@ -108,10 +119,16 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations
:ivar locations: LocationsOperations operations
:vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations
:ivar data_transfer_jobs: DataTransferJobsOperations operations
:vartype data_transfer_jobs: azure.mgmt.cosmosdb.operations.DataTransferJobsOperations
:ivar cassandra_clusters: CassandraClustersOperations operations
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
:vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations
: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
Expand Down Expand Up @@ -156,14 +173,24 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
azure.mgmt.cosmosdb.operations.RestorableTableResourcesOperations
:ivar service: ServiceOperations operations
:vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
:ivar throughput_pools: ThroughputPoolsOperations operations
:vartype throughput_pools: azure.mgmt.cosmosdb.operations.ThroughputPoolsOperations
:ivar throughput_pool: ThroughputPoolOperations operations
:vartype throughput_pool: azure.mgmt.cosmosdb.operations.ThroughputPoolOperations
:ivar throughput_pool_accounts: ThroughputPoolAccountsOperations operations
:vartype throughput_pool_accounts:
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountsOperations
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
:vartype throughput_pool_account:
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-11-15". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2024-12-01-preview". 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 @@ -203,6 +230,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
self.database_accounts = DatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -234,6 +262,7 @@ def __init__(
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
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 @@ -246,12 +275,18 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.data_transfer_jobs = DataTransferJobsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.cassandra_clusters = CassandraClustersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.cassandra_data_centers = CassandraDataCentersOperations(
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 Down Expand Up @@ -298,6 +333,16 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.service = ServiceOperations(self._client, self._config, self._serialize, self._deserialize)
self.throughput_pools = ThroughputPoolsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.throughput_pool = ThroughputPoolOperations(self._client, self._config, self._serialize, self._deserialize)
self.throughput_pool_accounts = ThroughputPoolAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.throughput_pool_account = ThroughputPoolAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)

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

0 comments on commit 8259791

Please sign in to comment.