diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json index 1a63359dc479..4a1bb47b4416 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json +++ b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "c731fa175f77b7b53ef0579eb877c61b5d0467d6", + "commit": "89c076604c6311b477134d8719befe1bed9cbd01", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/cosmos-db/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py index 6864edcac3c3..729a4f963fbc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-11-15-preview" + self.api_version = "2022-02-15-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json index f2a4eed5b3db..7ea7a25bd752 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-11-15-preview", - "total_api_version_list": ["2021-11-15-preview"], + "chosen_version": "2022-02-15-preview", + "total_api_version_list": ["2022-02-15-preview"], "client": { "name": "CosmosDBManagementClient", "filename": "_cosmos_db_management_client", diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py index e5366921ebbc..a712687790e5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0b3" +VERSION = "0.7.0" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py index f660b7e44d50..fd85dcb0905f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-11-15-preview" + self.api_version = "2022-02-15-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py index 44c2df8afff2..b66068cfd9c0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py @@ -22,7 +22,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._mongo_db_resources_operations import build_create_update_mongo_db_collection_request_initial, build_create_update_mongo_db_database_request_initial, build_create_update_mongo_role_definition_request_initial, build_create_update_mongo_user_definition_request_initial, build_delete_mongo_db_collection_request_initial, build_delete_mongo_db_database_request_initial, build_delete_mongo_role_definition_request_initial, build_delete_mongo_user_definition_request_initial, build_get_mongo_db_collection_request, build_get_mongo_db_collection_throughput_request, build_get_mongo_db_database_request, build_get_mongo_db_database_throughput_request, build_get_mongo_role_definition_request, build_get_mongo_user_definition_request, build_list_mongo_db_collections_request, build_list_mongo_db_databases_request, build_list_mongo_role_definitions_request, build_list_mongo_user_definitions_request, build_migrate_mongo_db_collection_to_autoscale_request_initial, build_migrate_mongo_db_collection_to_manual_throughput_request_initial, build_migrate_mongo_db_database_to_autoscale_request_initial, build_migrate_mongo_db_database_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_mongo_db_collection_throughput_request_initial, build_update_mongo_db_database_throughput_request_initial +from ...operations._mongo_db_resources_operations import build_create_update_mongo_db_collection_request_initial, build_create_update_mongo_db_database_request_initial, build_create_update_mongo_role_definition_request_initial, build_create_update_mongo_user_definition_request_initial, build_delete_mongo_db_collection_request_initial, build_delete_mongo_db_database_request_initial, build_delete_mongo_role_definition_request_initial, build_delete_mongo_user_definition_request_initial, build_get_mongo_db_collection_request, build_get_mongo_db_collection_throughput_request, build_get_mongo_db_database_request, build_get_mongo_db_database_throughput_request, build_get_mongo_role_definition_request, build_get_mongo_user_definition_request, build_list_mongo_db_collection_partition_merge_request_initial, build_list_mongo_db_collections_request, build_list_mongo_db_databases_request, build_list_mongo_role_definitions_request, build_list_mongo_user_definitions_request, build_migrate_mongo_db_collection_to_autoscale_request_initial, build_migrate_mongo_db_collection_to_manual_throughput_request_initial, build_migrate_mongo_db_database_to_autoscale_request_initial, build_migrate_mongo_db_database_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_mongo_db_collection_throughput_request_initial, build_update_mongo_db_database_throughput_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -1197,6 +1197,137 @@ def get_long_running_output(pipeline_response): begin_delete_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'} # type: ignore + async def _list_mongo_db_collection_partition_merge_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(merge_parameters, 'MergeParameters') + + request = build_list_mongo_db_collection_partition_merge_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + content_type=content_type, + json=_json, + template_url=self._list_mongo_db_collection_partition_merge_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_mongo_db_collection_partition_merge_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge'} # type: ignore + + + @distributed_trace_async + async def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + """Merges the partitions of a MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_mongo_db_collection_partition_merge_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + merge_parameters=merge_parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_mongo_db_collection_partition_merge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge'} # type: ignore + @distributed_trace_async async def get_mongo_db_collection_throughput( self, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py index 7feb41389d48..737cbc53c504 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py @@ -22,7 +22,7 @@ from ... import models as _models from ..._vendor import _convert_request -from ...operations._sql_resources_operations import build_create_update_client_encryption_key_request_initial, build_create_update_sql_container_request_initial, build_create_update_sql_database_request_initial, build_create_update_sql_role_assignment_request_initial, build_create_update_sql_role_definition_request_initial, build_create_update_sql_stored_procedure_request_initial, build_create_update_sql_trigger_request_initial, build_create_update_sql_user_defined_function_request_initial, build_delete_sql_container_request_initial, build_delete_sql_database_request_initial, build_delete_sql_role_assignment_request_initial, build_delete_sql_role_definition_request_initial, build_delete_sql_stored_procedure_request_initial, build_delete_sql_trigger_request_initial, build_delete_sql_user_defined_function_request_initial, build_get_client_encryption_key_request, build_get_sql_container_request, build_get_sql_container_throughput_request, build_get_sql_database_request, build_get_sql_database_throughput_request, build_get_sql_role_assignment_request, build_get_sql_role_definition_request, build_get_sql_stored_procedure_request, build_get_sql_trigger_request, build_get_sql_user_defined_function_request, build_list_client_encryption_keys_request, build_list_sql_containers_request, build_list_sql_databases_request, build_list_sql_role_assignments_request, build_list_sql_role_definitions_request, build_list_sql_stored_procedures_request, build_list_sql_triggers_request, build_list_sql_user_defined_functions_request, build_migrate_sql_container_to_autoscale_request_initial, build_migrate_sql_container_to_manual_throughput_request_initial, build_migrate_sql_database_to_autoscale_request_initial, build_migrate_sql_database_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_sql_container_throughput_request_initial, build_update_sql_database_throughput_request_initial +from ...operations._sql_resources_operations import build_create_update_client_encryption_key_request_initial, build_create_update_sql_container_request_initial, build_create_update_sql_database_request_initial, build_create_update_sql_role_assignment_request_initial, build_create_update_sql_role_definition_request_initial, build_create_update_sql_stored_procedure_request_initial, build_create_update_sql_trigger_request_initial, build_create_update_sql_user_defined_function_request_initial, build_delete_sql_container_request_initial, build_delete_sql_database_request_initial, build_delete_sql_role_assignment_request_initial, build_delete_sql_role_definition_request_initial, build_delete_sql_stored_procedure_request_initial, build_delete_sql_trigger_request_initial, build_delete_sql_user_defined_function_request_initial, build_get_client_encryption_key_request, build_get_sql_container_request, build_get_sql_container_throughput_request, build_get_sql_database_request, build_get_sql_database_throughput_request, build_get_sql_role_assignment_request, build_get_sql_role_definition_request, build_get_sql_stored_procedure_request, build_get_sql_trigger_request, build_get_sql_user_defined_function_request, build_list_client_encryption_keys_request, build_list_sql_container_partition_merge_request_initial, build_list_sql_containers_request, build_list_sql_databases_request, build_list_sql_role_assignments_request, build_list_sql_role_definitions_request, build_list_sql_stored_procedures_request, build_list_sql_triggers_request, build_list_sql_user_defined_functions_request, build_migrate_sql_container_to_autoscale_request_initial, build_migrate_sql_container_to_manual_throughput_request_initial, build_migrate_sql_database_to_autoscale_request_initial, build_migrate_sql_database_to_manual_throughput_request_initial, build_retrieve_continuous_backup_information_request_initial, build_update_sql_container_throughput_request_initial, build_update_sql_database_throughput_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -1468,6 +1468,137 @@ def get_long_running_output(pipeline_response): begin_delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}'} # type: ignore + async def _list_sql_container_partition_merge_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(merge_parameters, 'MergeParameters') + + request = build_list_sql_container_partition_merge_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + content_type=content_type, + json=_json, + template_url=self._list_sql_container_partition_merge_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_sql_container_partition_merge_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge'} # type: ignore + + + @distributed_trace_async + async def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + """Merges the partitions of a SQL Container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + PhysicalPartitionStorageInfoCollection or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_sql_container_partition_merge_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + merge_parameters=merge_parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_sql_container_partition_merge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge'} # type: ignore + @distributed_trace_async async def get_sql_container_throughput( self, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index d6f56c6b1575..19f1da33eb16 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -45,11 +45,13 @@ from ._models_py3 import CassandraViewListResult from ._models_py3 import CassandraViewResource from ._models_py3 import Certificate +from ._models_py3 import ClientEncryptionIncludedPath from ._models_py3 import ClientEncryptionKeyCreateUpdateParameters from ._models_py3 import ClientEncryptionKeyGetPropertiesResource from ._models_py3 import ClientEncryptionKeyGetResults from ._models_py3 import ClientEncryptionKeyResource from ._models_py3 import ClientEncryptionKeysListResult +from ._models_py3 import ClientEncryptionPolicy from ._models_py3 import ClusterKey from ._models_py3 import ClusterResource from ._models_py3 import ClusterResourceProperties @@ -66,6 +68,7 @@ from ._models_py3 import ContinuousBackupInformation from ._models_py3 import ContinuousBackupRestoreLocation from ._models_py3 import ContinuousModeBackupPolicy +from ._models_py3 import ContinuousModeProperties from ._models_py3 import CorsPolicy from ._models_py3 import CosmosCassandraDataTransferDataSourceSink from ._models_py3 import CosmosSqlDataTransferDataSourceSink @@ -137,6 +140,7 @@ from ._models_py3 import MaterializedViewsBuilderRegionalServiceResource from ._models_py3 import MaterializedViewsBuilderServiceResource from ._models_py3 import MaterializedViewsBuilderServiceResourceProperties +from ._models_py3 import MergeParameters from ._models_py3 import Metric from ._models_py3 import MetricAvailability from ._models_py3 import MetricDefinition @@ -183,6 +187,8 @@ from ._models_py3 import PeriodicModeBackupPolicy from ._models_py3 import PeriodicModeProperties from ._models_py3 import Permission +from ._models_py3 import PhysicalPartitionStorageInfo +from ._models_py3 import PhysicalPartitionStorageInfoCollection from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionListResult from ._models_py3 import PrivateEndpointProperty @@ -299,6 +305,7 @@ ConflictResolutionMode, ConnectionState, ConnectorOffer, + ContinuousTier, CreateMode, CreatedByType, DataTransferComponent, @@ -373,11 +380,13 @@ 'CassandraViewListResult', 'CassandraViewResource', 'Certificate', + 'ClientEncryptionIncludedPath', 'ClientEncryptionKeyCreateUpdateParameters', 'ClientEncryptionKeyGetPropertiesResource', 'ClientEncryptionKeyGetResults', 'ClientEncryptionKeyResource', 'ClientEncryptionKeysListResult', + 'ClientEncryptionPolicy', 'ClusterKey', 'ClusterResource', 'ClusterResourceProperties', @@ -394,6 +403,7 @@ 'ContinuousBackupInformation', 'ContinuousBackupRestoreLocation', 'ContinuousModeBackupPolicy', + 'ContinuousModeProperties', 'CorsPolicy', 'CosmosCassandraDataTransferDataSourceSink', 'CosmosSqlDataTransferDataSourceSink', @@ -465,6 +475,7 @@ 'MaterializedViewsBuilderRegionalServiceResource', 'MaterializedViewsBuilderServiceResource', 'MaterializedViewsBuilderServiceResourceProperties', + 'MergeParameters', 'Metric', 'MetricAvailability', 'MetricDefinition', @@ -511,6 +522,8 @@ 'PeriodicModeBackupPolicy', 'PeriodicModeProperties', 'Permission', + 'PhysicalPartitionStorageInfo', + 'PhysicalPartitionStorageInfoCollection', 'PrivateEndpointConnection', 'PrivateEndpointConnectionListResult', 'PrivateEndpointProperty', @@ -624,6 +637,7 @@ 'ConflictResolutionMode', 'ConnectionState', 'ConnectorOffer', + 'ContinuousTier', 'CreateMode', 'CreatedByType', 'DataTransferComponent', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py index 75925850a542..9bffeab08041 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py @@ -94,6 +94,13 @@ class ConnectorOffer(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SMALL = "Small" +class ContinuousTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Enum to indicate type of Continuous backup tier. + """ + + CONTINUOUS7_DAYS = "Continuous7Days" + CONTINUOUS30_DAYS = "Continuous30Days" + class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. """ @@ -298,6 +305,7 @@ class ServerVersion(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): THREE2 = "3.2" THREE6 = "3.6" FOUR0 = "4.0" + FOUR2 = "4.2" class ServiceSize(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Instance type for the service. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py index 77f25720a473..4848791a0aaf 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -46,7 +46,7 @@ class ApiProperties(msrest.serialization.Model): """ApiProperties. :ivar server_version: Describes the ServerVersion of an a MongoDB account. Possible values - include: "3.2", "3.6", "4.0". + include: "3.2", "3.6", "4.0", "4.2". :vartype server_version: str or ~azure.mgmt.cosmosdb.models.ServerVersion """ @@ -62,7 +62,7 @@ def __init__( ): """ :keyword server_version: Describes the ServerVersion of an a MongoDB account. Possible values - include: "3.2", "3.6", "4.0". + include: "3.2", "3.6", "4.0", "4.2". :paramtype server_version: str or ~azure.mgmt.cosmosdb.models.ServerVersion """ super(ApiProperties, self).__init__(**kwargs) @@ -1873,6 +1873,67 @@ def __init__( self.pem = pem +class ClientEncryptionIncludedPath(msrest.serialization.Model): + """. + + All required parameters must be populated in order to send to Azure. + + :ivar path: Required. Path that needs to be encrypted. + :vartype path: str + :ivar client_encryption_key_id: Required. The identifier of the Client Encryption Key to be + used to encrypt the path. + :vartype client_encryption_key_id: str + :ivar encryption_type: Required. The type of encryption to be performed. Eg - Deterministic, + Randomized. + :vartype encryption_type: str + :ivar encryption_algorithm: Required. The encryption algorithm which will be used. Eg - + AEAD_AES_256_CBC_HMAC_SHA256. + :vartype encryption_algorithm: str + """ + + _validation = { + 'path': {'required': True}, + 'client_encryption_key_id': {'required': True}, + 'encryption_type': {'required': True}, + 'encryption_algorithm': {'required': True}, + } + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'client_encryption_key_id': {'key': 'clientEncryptionKeyId', 'type': 'str'}, + 'encryption_type': {'key': 'encryptionType', 'type': 'str'}, + 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, + } + + def __init__( + self, + *, + path: str, + client_encryption_key_id: str, + encryption_type: str, + encryption_algorithm: str, + **kwargs + ): + """ + :keyword path: Required. Path that needs to be encrypted. + :paramtype path: str + :keyword client_encryption_key_id: Required. The identifier of the Client Encryption Key to be + used to encrypt the path. + :paramtype client_encryption_key_id: str + :keyword encryption_type: Required. The type of encryption to be performed. Eg - Deterministic, + Randomized. + :paramtype encryption_type: str + :keyword encryption_algorithm: Required. The encryption algorithm which will be used. Eg - + AEAD_AES_256_CBC_HMAC_SHA256. + :paramtype encryption_algorithm: str + """ + super(ClientEncryptionIncludedPath, self).__init__(**kwargs) + self.path = path + self.client_encryption_key_id = client_encryption_key_id + self.encryption_type = encryption_type + self.encryption_algorithm = encryption_algorithm + + class ClientEncryptionKeyCreateUpdateParameters(msrest.serialization.Model): """Parameters to create and update ClientEncryptionKey. @@ -2098,6 +2159,48 @@ def __init__( self.value = None +class ClientEncryptionPolicy(msrest.serialization.Model): + """Cosmos DB client encryption policy. + + All required parameters must be populated in order to send to Azure. + + :ivar included_paths: Required. Paths of the item that need encryption along with path-specific + settings. + :vartype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath] + :ivar policy_format_version: Version of the client encryption policy definition. Please note, + user passed value is ignored. Default policy version is 1. + :vartype policy_format_version: int + """ + + _validation = { + 'included_paths': {'required': True}, + } + + _attribute_map = { + 'included_paths': {'key': 'includedPaths', 'type': '[ClientEncryptionIncludedPath]'}, + 'policy_format_version': {'key': 'policyFormatVersion', 'type': 'int'}, + } + + def __init__( + self, + *, + included_paths: List["ClientEncryptionIncludedPath"], + policy_format_version: Optional[int] = 1, + **kwargs + ): + """ + :keyword included_paths: Required. Paths of the item that need encryption along with + path-specific settings. + :paramtype included_paths: list[~azure.mgmt.cosmosdb.models.ClientEncryptionIncludedPath] + :keyword policy_format_version: Version of the client encryption policy definition. Please + note, user passed value is ignored. Default policy version is 1. + :paramtype policy_format_version: int + """ + super(ClientEncryptionPolicy, self).__init__(**kwargs) + self.included_paths = included_paths + self.policy_format_version = policy_format_version + + class ClusterKey(msrest.serialization.Model): """Cosmos DB Cassandra table cluster key. @@ -3068,6 +3171,8 @@ class ContinuousModeBackupPolicy(BackupPolicy): :ivar migration_state: The object representing the state of the migration between the backup policies. :vartype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState + :ivar continuous_mode_properties: Configuration values for continuous mode backup. + :vartype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties """ _validation = { @@ -3077,21 +3182,53 @@ class ContinuousModeBackupPolicy(BackupPolicy): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, + 'continuous_mode_properties': {'key': 'continuousModeProperties', 'type': 'ContinuousModeProperties'}, } def __init__( self, *, migration_state: Optional["BackupPolicyMigrationState"] = None, + continuous_mode_properties: Optional["ContinuousModeProperties"] = None, **kwargs ): """ :keyword migration_state: The object representing the state of the migration between the backup policies. :paramtype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState + :keyword continuous_mode_properties: Configuration values for continuous mode backup. + :paramtype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties """ super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) self.type = 'Continuous' # type: str + self.continuous_mode_properties = continuous_mode_properties + + +class ContinuousModeProperties(msrest.serialization.Model): + """Configuration values for periodic mode backup. + + :ivar tier: Enum to indicate type of Continuos backup mode. Possible values include: + "Continuous7Days", "Continuous30Days". + :vartype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier + """ + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + tier: Optional[Union[str, "ContinuousTier"]] = None, + **kwargs + ): + """ + :keyword tier: Enum to indicate type of Continuos backup mode. Possible values include: + "Continuous7Days", "Continuous30Days". + :paramtype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier + """ + super(ContinuousModeProperties, self).__init__(**kwargs) + self.tier = tier class CorsPolicy(msrest.serialization.Model): @@ -6602,12 +6739,15 @@ class KeyWrapMetadata(msrest.serialization.Model): :vartype type: str :ivar value: Reference / link to the KeyEncryptionKey. :vartype value: str + :ivar algorithm: Algorithm used in wrapping and unwrapping of the data encryption key. + :vartype algorithm: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, + 'algorithm': {'key': 'algorithm', 'type': 'str'}, } def __init__( @@ -6616,6 +6756,7 @@ def __init__( name: Optional[str] = None, type: Optional[str] = None, value: Optional[str] = None, + algorithm: Optional[str] = None, **kwargs ): """ @@ -6625,11 +6766,14 @@ def __init__( :paramtype type: str :keyword value: Reference / link to the KeyEncryptionKey. :paramtype value: str + :keyword algorithm: Algorithm used in wrapping and unwrapping of the data encryption key. + :paramtype algorithm: str """ super(KeyWrapMetadata, self).__init__(**kwargs) self.name = name self.type = type self.value = value + self.algorithm = algorithm class ListBackups(msrest.serialization.Model): @@ -7172,6 +7316,31 @@ def __init__( self.locations = None +class MergeParameters(msrest.serialization.Model): + """The properties of an Azure Cosmos DB merge operations. + + :ivar is_dry_run: Specifies whether the operation is a real merge operation or a simulation. + :vartype is_dry_run: bool + """ + + _attribute_map = { + 'is_dry_run': {'key': 'isDryRun', 'type': 'bool'}, + } + + def __init__( + self, + *, + is_dry_run: Optional[bool] = None, + **kwargs + ): + """ + :keyword is_dry_run: Specifies whether the operation is a real merge operation or a simulation. + :paramtype is_dry_run: bool + """ + super(MergeParameters, self).__init__(**kwargs) + self.is_dry_run = is_dry_run + + class Metric(msrest.serialization.Model): """Metric data. @@ -9262,6 +9431,67 @@ def __init__( self.not_data_actions = not_data_actions +class PhysicalPartitionStorageInfo(msrest.serialization.Model): + """The storage of a physical partition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique identifier of the partition. + :vartype id: str + :ivar storage_in_kb: The storage in KB for the physical partition. + :vartype storage_in_kb: float + """ + + _validation = { + 'id': {'readonly': True}, + 'storage_in_kb': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'storage_in_kb': {'key': 'storageInKB', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PhysicalPartitionStorageInfo, self).__init__(**kwargs) + self.id = None + self.storage_in_kb = None + + +class PhysicalPartitionStorageInfoCollection(msrest.serialization.Model): + """List of physical partitions and their properties returned by a merge operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar physical_partition_storage_info_collection: List of physical partitions and their + properties. + :vartype physical_partition_storage_info_collection: + list[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfo] + """ + + _validation = { + 'physical_partition_storage_info_collection': {'readonly': True}, + } + + _attribute_map = { + 'physical_partition_storage_info_collection': {'key': 'physicalPartitionStorageInfoCollection', 'type': '[PhysicalPartitionStorageInfo]'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(PhysicalPartitionStorageInfoCollection, self).__init__(**kwargs) + self.physical_partition_storage_info_collection = None + + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -9686,6 +9916,9 @@ class RestorableDatabaseAccountGetResult(msrest.serialization.Model): :vartype account_name: str :ivar creation_time: The creation time of the restorable database account (ISO-8601 format). :vartype creation_time: ~datetime.datetime + :ivar oldest_restorable_time: The least recent time at which the database account can be + restored to (ISO-8601 format). + :vartype oldest_restorable_time: ~datetime.datetime :ivar deletion_time: The time at which the restorable database account has been deleted (ISO-8601 format). :vartype deletion_time: ~datetime.datetime @@ -9712,6 +9945,7 @@ class RestorableDatabaseAccountGetResult(msrest.serialization.Model): 'location': {'key': 'location', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, + 'oldest_restorable_time': {'key': 'properties.oldestRestorableTime', 'type': 'iso-8601'}, 'deletion_time': {'key': 'properties.deletionTime', 'type': 'iso-8601'}, 'api_type': {'key': 'properties.apiType', 'type': 'str'}, 'restorable_locations': {'key': 'properties.restorableLocations', 'type': '[RestorableLocationResource]'}, @@ -9723,6 +9957,7 @@ def __init__( location: Optional[str] = None, account_name: Optional[str] = None, creation_time: Optional[datetime.datetime] = None, + oldest_restorable_time: Optional[datetime.datetime] = None, deletion_time: Optional[datetime.datetime] = None, **kwargs ): @@ -9733,6 +9968,9 @@ def __init__( :paramtype account_name: str :keyword creation_time: The creation time of the restorable database account (ISO-8601 format). :paramtype creation_time: ~datetime.datetime + :keyword oldest_restorable_time: The least recent time at which the database account can be + restored to (ISO-8601 format). + :paramtype oldest_restorable_time: ~datetime.datetime :keyword deletion_time: The time at which the restorable database account has been deleted (ISO-8601 format). :paramtype deletion_time: ~datetime.datetime @@ -9744,6 +9982,7 @@ def __init__( self.location = location self.account_name = account_name self.creation_time = creation_time + self.oldest_restorable_time = oldest_restorable_time self.deletion_time = deletion_time self.api_type = None self.restorable_locations = None @@ -10479,6 +10718,8 @@ class SqlContainerResource(msrest.serialization.Model): :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the container. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :ivar client_encryption_policy: The client encryption policy for the container. + :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: long """ @@ -10494,6 +10735,7 @@ class SqlContainerResource(msrest.serialization.Model): 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, } @@ -10506,6 +10748,7 @@ def __init__( default_ttl: Optional[int] = None, unique_key_policy: Optional["UniqueKeyPolicy"] = None, conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, **kwargs ): @@ -10525,6 +10768,8 @@ def __init__( :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the container. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :keyword client_encryption_policy: The client encryption policy for the container. + :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: long """ @@ -10535,6 +10780,7 @@ def __init__( self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy + self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl @@ -10560,6 +10806,8 @@ class RestorableSqlContainerPropertiesResourceContainer(ExtendedResourceProperti :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the container. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :ivar client_encryption_policy: The client encryption policy for the container. + :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: long :ivar rid: A system generated property. A unique identifier. @@ -10589,6 +10837,7 @@ class RestorableSqlContainerPropertiesResourceContainer(ExtendedResourceProperti 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, @@ -10605,6 +10854,7 @@ def __init__( default_ttl: Optional[int] = None, unique_key_policy: Optional["UniqueKeyPolicy"] = None, conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, **kwargs ): @@ -10624,16 +10874,19 @@ def __init__( :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the container. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :keyword client_encryption_policy: The client encryption policy for the container. + :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: long """ - super(RestorableSqlContainerPropertiesResourceContainer, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super(RestorableSqlContainerPropertiesResourceContainer, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, client_encryption_policy=client_encryption_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy + self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl self.self_property = None self.rid = None @@ -11485,6 +11738,8 @@ class SqlContainerGetPropertiesResource(ExtendedResourceProperties, SqlContainer :vartype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :ivar conflict_resolution_policy: The conflict resolution policy for the container. :vartype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :ivar client_encryption_policy: The client encryption policy for the container. + :vartype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :ivar analytical_storage_ttl: Analytical TTL. :vartype analytical_storage_ttl: long :ivar rid: A system generated property. A unique identifier. @@ -11510,6 +11765,7 @@ class SqlContainerGetPropertiesResource(ExtendedResourceProperties, SqlContainer 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + 'client_encryption_policy': {'key': 'clientEncryptionPolicy', 'type': 'ClientEncryptionPolicy'}, 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, @@ -11525,6 +11781,7 @@ def __init__( default_ttl: Optional[int] = None, unique_key_policy: Optional["UniqueKeyPolicy"] = None, conflict_resolution_policy: Optional["ConflictResolutionPolicy"] = None, + client_encryption_policy: Optional["ClientEncryptionPolicy"] = None, analytical_storage_ttl: Optional[int] = None, **kwargs ): @@ -11544,16 +11801,19 @@ def __init__( :paramtype unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy :keyword conflict_resolution_policy: The conflict resolution policy for the container. :paramtype conflict_resolution_policy: ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :keyword client_encryption_policy: The client encryption policy for the container. + :paramtype client_encryption_policy: ~azure.mgmt.cosmosdb.models.ClientEncryptionPolicy :keyword analytical_storage_ttl: Analytical TTL. :paramtype analytical_storage_ttl: long """ - super(SqlContainerGetPropertiesResource, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) + super(SqlContainerGetPropertiesResource, self).__init__(id=id, indexing_policy=indexing_policy, partition_key=partition_key, default_ttl=default_ttl, unique_key_policy=unique_key_policy, conflict_resolution_policy=conflict_resolution_policy, client_encryption_policy=client_encryption_policy, analytical_storage_ttl=analytical_storage_ttl, **kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl self.unique_key_policy = unique_key_policy self.conflict_resolution_policy = conflict_resolution_policy + self.client_encryption_policy = client_encryption_policy self.analytical_storage_ttl = analytical_storage_ttl self.rid = None self.ts = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py index 1c937bfc8d36..b12894dfb4c6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py @@ -33,7 +33,7 @@ def build_list_by_subscription_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters') @@ -65,7 +65,7 @@ def build_list_by_resource_group_request( resource_group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters') @@ -99,7 +99,7 @@ def build_get_request( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}') @@ -134,7 +134,7 @@ def build_delete_request_initial( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}') @@ -174,7 +174,7 @@ def build_create_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}') @@ -218,7 +218,7 @@ def build_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}') @@ -262,7 +262,7 @@ def build_invoke_command_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand') @@ -301,7 +301,7 @@ def build_list_backups_request( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups') @@ -337,7 +337,7 @@ def build_get_backup_request( backup_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}') @@ -373,7 +373,7 @@ def build_deallocate_request_initial( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate') @@ -408,7 +408,7 @@ def build_start_request_initial( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start') @@ -443,7 +443,7 @@ def build_status_request( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py index 6861e867c49f..ae4397698060 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py @@ -35,7 +35,7 @@ def build_list_request( cluster_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters') @@ -71,7 +71,7 @@ def build_get_request( data_center_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}') @@ -108,7 +108,7 @@ def build_delete_request_initial( data_center_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}') @@ -150,7 +150,7 @@ def build_create_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}') @@ -196,7 +196,7 @@ def build_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py index 10ac49cf777a..e3350eba8e0d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py @@ -35,7 +35,7 @@ def build_list_cassandra_keyspaces_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces') @@ -71,7 +71,7 @@ def build_get_cassandra_keyspace_request( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}') @@ -113,7 +113,7 @@ def build_create_update_cassandra_keyspace_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}') @@ -154,7 +154,7 @@ def build_delete_cassandra_keyspace_request_initial( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}') path_format_arguments = { @@ -185,7 +185,7 @@ def build_get_cassandra_keyspace_throughput_request( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default') @@ -227,7 +227,7 @@ def build_update_cassandra_keyspace_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default') @@ -268,7 +268,7 @@ def build_migrate_cassandra_keyspace_to_autoscale_request_initial( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale') @@ -305,7 +305,7 @@ def build_migrate_cassandra_keyspace_to_manual_throughput_request_initial( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput') @@ -342,7 +342,7 @@ def build_list_cassandra_tables_request( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables') @@ -380,7 +380,7 @@ def build_get_cassandra_table_request( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}') @@ -424,7 +424,7 @@ def build_create_update_cassandra_table_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}') @@ -467,7 +467,7 @@ def build_delete_cassandra_table_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}') path_format_arguments = { @@ -500,7 +500,7 @@ def build_get_cassandra_table_throughput_request( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default') @@ -544,7 +544,7 @@ def build_update_cassandra_table_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default') @@ -587,7 +587,7 @@ def build_migrate_cassandra_table_to_autoscale_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale') @@ -626,7 +626,7 @@ def build_migrate_cassandra_table_to_manual_throughput_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput') @@ -664,7 +664,7 @@ def build_list_cassandra_views_request( keyspace_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views') @@ -702,7 +702,7 @@ def build_get_cassandra_view_request( view_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}') @@ -746,7 +746,7 @@ def build_create_update_cassandra_view_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}') @@ -789,7 +789,7 @@ def build_delete_cassandra_view_request_initial( view_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}') path_format_arguments = { @@ -822,7 +822,7 @@ def build_get_cassandra_view_throughput_request( view_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default') @@ -866,7 +866,7 @@ def build_update_cassandra_view_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default') @@ -909,7 +909,7 @@ def build_migrate_cassandra_view_to_autoscale_request_initial( view_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale') @@ -948,7 +948,7 @@ def build_migrate_cassandra_view_to_manual_throughput_request_initial( view_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 4f47f2af9a59..52911657a057 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -36,7 +36,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics') @@ -78,7 +78,7 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages') @@ -119,7 +119,7 @@ def build_list_metric_definitions_request( collection_rid: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index 89d92fbbd48c..ae6819893604 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -36,7 +36,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics') @@ -78,7 +78,7 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index 9c5bc2461964..8a2c43038bfd 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -37,7 +37,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index 4b655183a4b6..a265354abce3 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -37,7 +37,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_data_transfer_jobs_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_data_transfer_jobs_operations.py index eb3957ce61f4..5ed547d7a705 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_data_transfer_jobs_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_data_transfer_jobs_operations.py @@ -39,7 +39,7 @@ def build_create_request( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}') @@ -80,7 +80,7 @@ def build_get_request( job_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}') @@ -116,7 +116,7 @@ def build_list_by_database_account_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index 657799df4e66..13b63b6cc42a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -35,7 +35,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 88b30d9beec1..d1564efce376 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -35,7 +35,7 @@ def build_get_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}') @@ -75,7 +75,7 @@ def build_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}') @@ -119,7 +119,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}') @@ -158,7 +158,7 @@ def build_delete_request_initial( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}') path_format_arguments = { @@ -192,7 +192,7 @@ def build_failover_priority_change_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange') path_format_arguments = { @@ -227,7 +227,7 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts') @@ -259,7 +259,7 @@ def build_list_by_resource_group_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts') @@ -293,7 +293,7 @@ def build_list_keys_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys') @@ -328,7 +328,7 @@ def build_list_connection_strings_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings') @@ -368,7 +368,7 @@ def build_offline_region_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion') @@ -412,7 +412,7 @@ def build_online_region_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion') @@ -451,7 +451,7 @@ def build_get_read_only_keys_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys') @@ -486,7 +486,7 @@ def build_list_read_only_keys_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys') @@ -526,7 +526,7 @@ def build_regenerate_key_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey') path_format_arguments = { @@ -561,7 +561,7 @@ def build_check_name_exists_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}') path_format_arguments = { @@ -590,7 +590,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics') @@ -628,7 +628,7 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages') @@ -665,7 +665,7 @@ def build_list_metric_definitions_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index 428109f1b7c3..06f1e4f9aa22 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -35,7 +35,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metrics') @@ -75,7 +75,7 @@ def build_list_usages_request( filter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/usages') @@ -114,7 +114,7 @@ def build_list_metric_definitions_request( database_rid: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/metricDefinitions') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_graph_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_graph_resources_operations.py index f3fce4728d11..671bc65a82b6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_graph_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_graph_resources_operations.py @@ -35,7 +35,7 @@ def build_list_graphs_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs') @@ -71,7 +71,7 @@ def build_get_graph_request( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}') @@ -113,7 +113,7 @@ def build_create_update_graph_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}') @@ -154,7 +154,7 @@ def build_delete_graph_resource_request_initial( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}') path_format_arguments = { diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py index 45122a22f9e2..a87b67c1e0ab 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py @@ -35,7 +35,7 @@ def build_list_gremlin_databases_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases') @@ -71,7 +71,7 @@ def build_get_gremlin_database_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}') @@ -113,7 +113,7 @@ def build_create_update_gremlin_database_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}') @@ -154,7 +154,7 @@ def build_delete_gremlin_database_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}') path_format_arguments = { @@ -185,7 +185,7 @@ def build_get_gremlin_database_throughput_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default') @@ -227,7 +227,7 @@ def build_update_gremlin_database_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default') @@ -268,7 +268,7 @@ def build_migrate_gremlin_database_to_autoscale_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale') @@ -305,7 +305,7 @@ def build_migrate_gremlin_database_to_manual_throughput_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput') @@ -342,7 +342,7 @@ def build_list_gremlin_graphs_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs') @@ -380,7 +380,7 @@ def build_get_gremlin_graph_request( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}') @@ -424,7 +424,7 @@ def build_create_update_gremlin_graph_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}') @@ -467,7 +467,7 @@ def build_delete_gremlin_graph_request_initial( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}') path_format_arguments = { @@ -500,7 +500,7 @@ def build_get_gremlin_graph_throughput_request( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default') @@ -544,7 +544,7 @@ def build_update_gremlin_graph_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default') @@ -587,7 +587,7 @@ def build_migrate_gremlin_graph_to_autoscale_request_initial( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToAutoscale') @@ -626,7 +626,7 @@ def build_migrate_gremlin_graph_to_manual_throughput_request_initial( graph_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/throughputSettings/default/migrateToManualThroughput') @@ -670,7 +670,7 @@ def build_retrieve_continuous_backup_information_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py index 08d4924ef665..8b5b1ece0a80 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py @@ -30,7 +30,7 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations') @@ -62,7 +62,7 @@ def build_get_request( location: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py index 9d95da1670d3..7757cf9cc595 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py @@ -35,7 +35,7 @@ def build_list_mongo_db_databases_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases') @@ -71,7 +71,7 @@ def build_get_mongo_db_database_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}') @@ -113,7 +113,7 @@ def build_create_update_mongo_db_database_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}') @@ -154,7 +154,7 @@ def build_delete_mongo_db_database_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}') path_format_arguments = { @@ -185,7 +185,7 @@ def build_get_mongo_db_database_throughput_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default') @@ -227,7 +227,7 @@ def build_update_mongo_db_database_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default') @@ -268,7 +268,7 @@ def build_migrate_mongo_db_database_to_autoscale_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale') @@ -305,7 +305,7 @@ def build_migrate_mongo_db_database_to_manual_throughput_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput') @@ -342,7 +342,7 @@ def build_list_mongo_db_collections_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections') @@ -380,7 +380,7 @@ def build_get_mongo_db_collection_request( collection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}') @@ -424,7 +424,7 @@ def build_create_update_mongo_db_collection_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}') @@ -467,7 +467,7 @@ def build_delete_mongo_db_collection_request_initial( collection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}') path_format_arguments = { @@ -492,6 +492,54 @@ def build_delete_mongo_db_collection_request_initial( ) +def build_list_mongo_db_collection_partition_merge_request_initial( + subscription_id: str, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-02-15-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + json=json, + content=content, + **kwargs + ) + + def build_get_mongo_db_collection_throughput_request( subscription_id: str, resource_group_name: str, @@ -500,7 +548,7 @@ def build_get_mongo_db_collection_throughput_request( collection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default') @@ -544,7 +592,7 @@ def build_update_mongo_db_collection_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default') @@ -587,7 +635,7 @@ def build_migrate_mongo_db_collection_to_autoscale_request_initial( collection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToAutoscale') @@ -626,7 +674,7 @@ def build_migrate_mongo_db_collection_to_manual_throughput_request_initial( collection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput') @@ -664,7 +712,7 @@ def build_get_mongo_role_definition_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}') @@ -706,7 +754,7 @@ def build_create_update_mongo_role_definition_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}') @@ -747,7 +795,7 @@ def build_delete_mongo_role_definition_request_initial( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}') @@ -783,7 +831,7 @@ def build_list_mongo_role_definitions_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions') @@ -819,7 +867,7 @@ def build_get_mongo_user_definition_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}') @@ -861,7 +909,7 @@ def build_create_update_mongo_user_definition_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}') @@ -902,7 +950,7 @@ def build_delete_mongo_user_definition_request_initial( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}') @@ -938,7 +986,7 @@ def build_list_mongo_user_definitions_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions') @@ -980,7 +1028,7 @@ def build_retrieve_continuous_backup_information_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation') @@ -2178,6 +2226,137 @@ def get_long_running_output(pipeline_response): begin_delete_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'} # type: ignore + def _list_mongo_db_collection_partition_merge_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(merge_parameters, 'MergeParameters') + + request = build_list_mongo_db_collection_partition_merge_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + content_type=content_type, + json=_json, + template_url=self._list_mongo_db_collection_partition_merge_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_mongo_db_collection_partition_merge_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge'} # type: ignore + + + @distributed_trace + def begin_list_mongo_db_collection_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> LROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + """Merges the partitions of a MongoDB Collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param merge_parameters: The parameters for the merge operation. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_mongo_db_collection_partition_merge_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + merge_parameters=merge_parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_mongo_db_collection_partition_merge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge'} # type: ignore + @distributed_trace def get_mongo_db_collection_throughput( self, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py index da0e8eabdf3c..7c778d60654c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py @@ -35,7 +35,7 @@ def build_list_by_database_account_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces') @@ -71,7 +71,7 @@ def build_get_request( notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}') @@ -113,7 +113,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}') @@ -154,7 +154,7 @@ def build_delete_request_initial( notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}') @@ -191,7 +191,7 @@ def build_list_connection_info_request( notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo') @@ -228,7 +228,7 @@ def build_regenerate_auth_token_request_initial( notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken') @@ -265,7 +265,7 @@ def build_start_request_initial( notebook_workspace_name: Union[str, "_models.NotebookWorkspaceName"], **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index 8988e9d53e6f..6f71e121b6a7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -29,7 +29,7 @@ def build_list_request( **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/providers/Microsoft.DocumentDB/operations') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index a033222df0d0..bcc95856721a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -37,7 +37,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index 7e7d30e2e168..bbc45ba3cf7f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -38,7 +38,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/region/{region}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index d23c336d5a21..f16152d72c7a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -34,7 +34,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/percentile/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index 909200a53993..18022cf937f4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -36,7 +36,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sourceRegion/{sourceRegion}/targetRegion/{targetRegion}/percentile/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index 8453af895a34..4f03ed814089 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -35,7 +35,7 @@ def build_list_metrics_request( filter: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/targetRegion/{targetRegion}/percentile/metrics') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py index 3d98a8459517..a94be7f9f2a1 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py @@ -35,7 +35,7 @@ def build_list_by_database_account_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections') @@ -71,7 +71,7 @@ def build_get_request( private_endpoint_connection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}') @@ -113,7 +113,7 @@ def build_create_or_update_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}') @@ -154,7 +154,7 @@ def build_delete_request_initial( private_endpoint_connection_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py index 60e82b2363a4..7ad8233410ff 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py @@ -32,7 +32,7 @@ def build_list_by_database_account_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources') @@ -68,7 +68,7 @@ def build_get_request( group_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateLinkResources/{groupName}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py index 0bb616b0c261..b91974d0d4c1 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py @@ -31,7 +31,7 @@ def build_list_by_location_request( location: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts') @@ -63,7 +63,7 @@ def build_list_request( subscription_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts') @@ -96,7 +96,7 @@ def build_get_by_location_request( instance_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_databases_operations.py index 3692465b86a1..360d3708742f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_databases_operations.py @@ -32,7 +32,7 @@ def build_list_request( instance_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_graphs_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_graphs_operations.py index b90c8a5fbadc..431cb4b4722a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_graphs_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_graphs_operations.py @@ -36,7 +36,7 @@ def build_list_request( end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py index 22470d062dd7..3094dcfa8559 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_gremlin_resources_operations.py @@ -35,7 +35,7 @@ def build_list_request( restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py index 2f251c47a555..52cde7a7746c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py @@ -36,7 +36,7 @@ def build_list_request( end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py index fdd9e1643738..ca4dcfb00642 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py @@ -32,7 +32,7 @@ def build_list_request( instance_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py index 863c4935f548..0215aaa0dae0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py @@ -35,7 +35,7 @@ def build_list_request( restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py index 0878d31ef082..78bc0f2e06e7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py @@ -36,7 +36,7 @@ def build_list_request( end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py index 288c447d9196..53b970e8f419 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py @@ -32,7 +32,7 @@ def build_list_request( instance_id: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py index 97ec200d11d3..815350d6afc8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py @@ -35,7 +35,7 @@ def build_list_request( restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_table_resources_operations.py index 60038728aad6..ba8b963caf5f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_table_resources_operations.py @@ -35,7 +35,7 @@ def build_list_request( restore_timestamp_in_utc: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_tables_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_tables_operations.py index 6d75c4247309..ee2ab3226fce 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_tables_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_tables_operations.py @@ -35,7 +35,7 @@ def build_list_request( end_time: Optional[str] = None, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_service_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_service_operations.py index 53e4c0d68eb8..6ee845bb5c38 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_service_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_service_operations.py @@ -35,7 +35,7 @@ def build_list_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services') @@ -76,7 +76,7 @@ def build_create_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}') @@ -117,7 +117,7 @@ def build_get_request( service_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}') @@ -154,7 +154,7 @@ def build_delete_request_initial( service_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py index 136d70087591..6ca97f625b19 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py @@ -35,7 +35,7 @@ def build_list_sql_databases_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases') @@ -71,7 +71,7 @@ def build_get_sql_database_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}') @@ -113,7 +113,7 @@ def build_create_update_sql_database_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}') @@ -154,7 +154,7 @@ def build_delete_sql_database_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}') path_format_arguments = { @@ -185,7 +185,7 @@ def build_get_sql_database_throughput_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default') @@ -227,7 +227,7 @@ def build_update_sql_database_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default') @@ -268,7 +268,7 @@ def build_migrate_sql_database_to_autoscale_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale') @@ -305,7 +305,7 @@ def build_migrate_sql_database_to_manual_throughput_request_initial( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput') @@ -342,7 +342,7 @@ def build_list_client_encryption_keys_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys') @@ -380,7 +380,7 @@ def build_get_client_encryption_key_request( client_encryption_key_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}') @@ -424,7 +424,7 @@ def build_create_update_client_encryption_key_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}') @@ -466,7 +466,7 @@ def build_list_sql_containers_request( database_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers') @@ -504,7 +504,7 @@ def build_get_sql_container_request( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}') @@ -548,7 +548,7 @@ def build_create_update_sql_container_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}') @@ -591,7 +591,7 @@ def build_delete_sql_container_request_initial( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}') path_format_arguments = { @@ -616,6 +616,54 @@ def build_delete_sql_container_request_initial( ) +def build_list_sql_container_partition_merge_request_initial( + subscription_id: str, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2022-02-15-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "accountName": _SERIALIZER.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + "databaseName": _SERIALIZER.url("database_name", database_name, 'str'), + "containerName": _SERIALIZER.url("container_name", container_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + json=json, + content=content, + **kwargs + ) + + def build_get_sql_container_throughput_request( subscription_id: str, resource_group_name: str, @@ -624,7 +672,7 @@ def build_get_sql_container_throughput_request( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default') @@ -668,7 +716,7 @@ def build_update_sql_container_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default') @@ -711,7 +759,7 @@ def build_migrate_sql_container_to_autoscale_request_initial( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToAutoscale') @@ -750,7 +798,7 @@ def build_migrate_sql_container_to_manual_throughput_request_initial( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/migrateToManualThroughput') @@ -789,7 +837,7 @@ def build_list_sql_stored_procedures_request( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures') @@ -829,7 +877,7 @@ def build_get_sql_stored_procedure_request( stored_procedure_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}') @@ -875,7 +923,7 @@ def build_create_update_sql_stored_procedure_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}') @@ -920,7 +968,7 @@ def build_delete_sql_stored_procedure_request_initial( stored_procedure_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/{storedProcedureName}') path_format_arguments = { @@ -954,7 +1002,7 @@ def build_list_sql_user_defined_functions_request( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions') @@ -994,7 +1042,7 @@ def build_get_sql_user_defined_function_request( user_defined_function_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}') @@ -1040,7 +1088,7 @@ def build_create_update_sql_user_defined_function_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}') @@ -1085,7 +1133,7 @@ def build_delete_sql_user_defined_function_request_initial( user_defined_function_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/{userDefinedFunctionName}') path_format_arguments = { @@ -1119,7 +1167,7 @@ def build_list_sql_triggers_request( container_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers') @@ -1159,7 +1207,7 @@ def build_get_sql_trigger_request( trigger_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}') @@ -1205,7 +1253,7 @@ def build_create_update_sql_trigger_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}') @@ -1250,7 +1298,7 @@ def build_delete_sql_trigger_request_initial( trigger_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}') path_format_arguments = { @@ -1283,7 +1331,7 @@ def build_get_sql_role_definition_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}') @@ -1325,7 +1373,7 @@ def build_create_update_sql_role_definition_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}') @@ -1366,7 +1414,7 @@ def build_delete_sql_role_definition_request_initial( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}') @@ -1402,7 +1450,7 @@ def build_list_sql_role_definitions_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions') @@ -1438,7 +1486,7 @@ def build_get_sql_role_assignment_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}') @@ -1480,7 +1528,7 @@ def build_create_update_sql_role_assignment_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}') @@ -1521,7 +1569,7 @@ def build_delete_sql_role_assignment_request_initial( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}') @@ -1557,7 +1605,7 @@ def build_list_sql_role_assignments_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments') @@ -1599,7 +1647,7 @@ def build_retrieve_continuous_backup_information_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/retrieveContinuousBackupInformation') @@ -3070,6 +3118,137 @@ def get_long_running_output(pipeline_response): begin_delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}'} # type: ignore + def _list_sql_container_partition_merge_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> Optional["_models.PhysicalPartitionStorageInfoCollection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PhysicalPartitionStorageInfoCollection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(merge_parameters, 'MergeParameters') + + request = build_list_sql_container_partition_merge_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + content_type=content_type, + json=_json, + template_url=self._list_sql_container_partition_merge_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _list_sql_container_partition_merge_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge'} # type: ignore + + + @distributed_trace + def begin_list_sql_container_partition_merge( + self, + resource_group_name: str, + account_name: str, + database_name: str, + container_name: str, + merge_parameters: "_models.MergeParameters", + **kwargs: Any + ) -> LROPoller["_models.PhysicalPartitionStorageInfoCollection"]: + """Merges the partitions of a SQL Container. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str + :param merge_parameters: The parameters for the merge operation. + :type merge_parameters: ~azure.mgmt.cosmosdb.models.MergeParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either PhysicalPartitionStorageInfoCollection or + the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.PhysicalPartitionStorageInfoCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PhysicalPartitionStorageInfoCollection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_sql_container_partition_merge_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + container_name=container_name, + merge_parameters=merge_parameters, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('PhysicalPartitionStorageInfoCollection', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_list_sql_container_partition_merge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge'} # type: ignore + @distributed_trace def get_sql_container_throughput( self, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py index 333eb2f42375..617c4a9181ad 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py @@ -35,7 +35,7 @@ def build_list_tables_request( account_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables') @@ -71,7 +71,7 @@ def build_get_table_request( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}') @@ -113,7 +113,7 @@ def build_create_update_table_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}') @@ -154,7 +154,7 @@ def build_delete_table_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}') path_format_arguments = { @@ -185,7 +185,7 @@ def build_get_table_throughput_request( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default') @@ -227,7 +227,7 @@ def build_update_table_throughput_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default') @@ -268,7 +268,7 @@ def build_migrate_table_to_autoscale_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToAutoscale') @@ -305,7 +305,7 @@ def build_migrate_table_to_manual_throughput_request_initial( table_name: str, **kwargs: Any ) -> HttpRequest: - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput') @@ -347,7 +347,7 @@ def build_retrieve_continuous_backup_information_request_initial( ) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-11-15-preview" + api_version = "2022-02-15-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation')