diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md index c8de94f0c9bf..7a9232e8879d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md +++ b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md @@ -1,5 +1,76 @@ # Release History +## 7.0.0b2 (2021-10-26) + +**Features** + + - Model DataCenterResourceProperties has a new parameter disk_capacity + - Model DataCenterResourceProperties has a new parameter disk_sku + - Model DataCenterResourceProperties has a new parameter managed_disk_customer_key_uri + - Model DataCenterResourceProperties has a new parameter sku + - Model DataCenterResourceProperties has a new parameter availability_zone + - Model DataCenterResourceProperties has a new parameter backup_storage_customer_key_uri + - Model DatabaseAccountCreateUpdateParameters has a new parameter capacity + - Model DatabaseAccountUpdateParameters has a new parameter capacity + - Model ClusterResourceProperties has a new parameter cassandra_audit_logging_enabled + - Model ClusterResourceProperties has a new parameter deallocated + - Model DatabaseAccountGetResults has a new parameter capacity + - Added operation MongoDBResourcesOperations.begin_retrieve_continuous_backup_information + - Added operation CassandraClustersOperations.begin_invoke_command + - Added operation CassandraClustersOperations.begin_start + - Added operation CassandraClustersOperations.begin_deallocate + - Added operation CassandraClustersOperations.status + - Added operation group LocationsOperations + +**Breaking changes** + + - Model MongoDBDatabaseGetResults no longer has parameter identity + - Model MongoDBDatabaseCreateUpdateParameters no longer has parameter identity + - Model SqlContainerGetResults no longer has parameter identity + - Model SqlUserDefinedFunctionGetResults no longer has parameter identity + - Model GremlinDatabaseGetResults no longer has parameter identity + - Model SqlTriggerCreateUpdateParameters no longer has parameter identity + - Model SqlContainerCreateUpdateParameters no longer has parameter identity + - Model SqlDatabaseCreateUpdateParameters no longer has parameter identity + - Model LocationProperties no longer has parameter status + - Model DatabaseAccountCreateUpdateParameters no longer has parameter diagnostic_log_settings + - Model ThroughputSettingsGetResults no longer has parameter identity + - Model DatabaseAccountUpdateParameters no longer has parameter diagnostic_log_settings + - Model ARMResourceProperties no longer has parameter identity + - Model CassandraTableGetResults no longer has parameter identity + - Model GremlinGraphGetResults no longer has parameter identity + - Model CassandraKeyspaceCreateUpdateParameters no longer has parameter identity + - Model GremlinDatabaseCreateUpdateParameters no longer has parameter identity + - Model SqlTriggerGetResults no longer has parameter identity + - Model GremlinGraphCreateUpdateParameters no longer has parameter identity + - Model MongoDBCollectionGetResults no longer has parameter identity + - Model TableGetResults no longer has parameter identity + - Model CassandraKeyspaceGetResults no longer has parameter identity + - Model MongoDBCollectionCreateUpdateParameters no longer has parameter identity + - Model SqlStoredProcedureGetResults no longer has parameter identity + - Model SqlStoredProcedureCreateUpdateParameters no longer has parameter identity + - Model ThroughputSettingsUpdateParameters no longer has parameter identity + - Model SqlUserDefinedFunctionCreateUpdateParameters no longer has parameter identity + - Model TableCreateUpdateParameters no longer has parameter identity + - Model DatabaseAccountGetResults no longer has parameter diagnostic_log_settings + - Model SqlDatabaseGetResults no longer has parameter identity + - Model CassandraTableCreateUpdateParameters no longer has parameter identity + - Removed operation CassandraResourcesOperations.begin_create_update_cassandra_view + - Removed operation CassandraResourcesOperations.get_cassandra_view + - Removed operation CassandraResourcesOperations.list_cassandra_views + - Removed operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_autoscale + - Removed operation CassandraResourcesOperations.begin_update_cassandra_view_throughput + - Removed operation CassandraResourcesOperations.get_cassandra_view_throughput + - Removed operation CassandraResourcesOperations.begin_delete_cassandra_view + - Removed operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_manual_throughput + - Removed operation CassandraClustersOperations.begin_request_repair + - Removed operation CassandraClustersOperations.begin_fetch_node_status + - Removed operation CassandraClustersOperations.get_backup + - Removed operation CassandraClustersOperations.list_backups + - Removed operation group ServiceOperations + - Removed operation group CosmosDBManagementClientOperationsMixin + - Removed operation group GraphResourcesOperations + ## 7.0.0b1 (2021-09-17) **Features** diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json index 85684c2620c9..0d0bba2c035c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json +++ b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "f7bdc95b45115dd1d5d7aec82d1b88ea17a938a7", + "commit": "a87e536b2060dfe47c4d2bbf24a7f32d67944f9c", "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/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/cosmos-db/resource-manager/readme.md" 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 6ff3e742876e..0f4b69bd6638 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-07-01-preview" + self.api_version = "2021-10-15" 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/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py index c5abb79574e1..dfcc310e043d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py @@ -32,13 +32,12 @@ from .operations import CollectionPartitionOperations from .operations import PartitionKeyRangeIdOperations from .operations import PartitionKeyRangeIdRegionOperations -from .operations import GraphResourcesOperations from .operations import SqlResourcesOperations from .operations import MongoDBResourcesOperations from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations -from .operations import CosmosDBManagementClientOperationsMixin +from .operations import LocationsOperations from .operations import NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -51,11 +50,10 @@ from .operations import RestorableMongodbResourcesOperations from .operations import CassandraClustersOperations from .operations import CassandraDataCentersOperations -from .operations import ServiceOperations from . import models -class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): +class CosmosDBManagementClient(object): """Azure Cosmos DB Database Service Resource Provider REST API. :ivar database_accounts: DatabaseAccountsOperations operations @@ -84,8 +82,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype partition_key_range_id: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdOperations :ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations :vartype partition_key_range_id_region: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations - :ivar graph_resources: GraphResourcesOperations operations - :vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations :ivar sql_resources: SqlResourcesOperations operations :vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations :ivar mongo_db_resources: MongoDBResourcesOperations operations @@ -96,6 +92,8 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResourcesOperations operations :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations :ivar notebook_workspaces: NotebookWorkspacesOperations operations :vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -120,8 +118,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations :ivar cassandra_data_centers: CassandraDataCentersOperations operations :vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -174,8 +170,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations( self._client, self._config, self._serialize, self._deserialize) - self.graph_resources = GraphResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) self.sql_resources = SqlResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.mongo_db_resources = MongoDBResourcesOperations( @@ -186,6 +180,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.notebook_workspaces = NotebookWorkspacesOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( @@ -210,8 +206,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.cassandra_data_centers = CassandraDataCentersOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse 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 8024166e0557..d319ba43be11 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-07-01-preview", - "total_api_version_list": ["2021-07-01-preview"], + "chosen_version": "2021-10-15", + "total_api_version_list": ["2021-10-15"], "client": { "name": "CosmosDBManagementClient", "filename": "_cosmos_db_management_client", @@ -10,8 +10,8 @@ "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"], \"._operations_mixin\": [\"CosmosDBManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"], \"._operations_mixin\": [\"CosmosDBManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -111,12 +111,12 @@ "collection_partition": "CollectionPartitionOperations", "partition_key_range_id": "PartitionKeyRangeIdOperations", "partition_key_range_id_region": "PartitionKeyRangeIdRegionOperations", - "graph_resources": "GraphResourcesOperations", "sql_resources": "SqlResourcesOperations", "mongo_db_resources": "MongoDBResourcesOperations", "table_resources": "TableResourcesOperations", "cassandra_resources": "CassandraResourcesOperations", "gremlin_resources": "GremlinResourcesOperations", + "locations": "LocationsOperations", "notebook_workspaces": "NotebookWorkspacesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_resources": "PrivateLinkResourcesOperations", @@ -128,37 +128,6 @@ "restorable_mongodb_collections": "RestorableMongodbCollectionsOperations", "restorable_mongodb_resources": "RestorableMongodbResourcesOperations", "cassandra_clusters": "CassandraClustersOperations", - "cassandra_data_centers": "CassandraDataCentersOperations", - "service": "ServiceOperations" - }, - "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "operations": { - "location_list" : { - "sync": { - "signature": "def location_list(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def location_list(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.LocationListResult\"]:\n", - "doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "location_get" : { - "sync": { - "signature": "def location_get(\n self,\n location, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def location_get(\n self,\n location: str,\n **kwargs: Any\n) -\u003e \"_models.LocationGetResult\":\n", - "doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "location" - } - } + "cassandra_data_centers": "CassandraDataCentersOperations" } } \ No newline at end of file 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 efe7276fe05f..b094b52a6bba 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.0b1" +VERSION = "7.0.0b2" 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 60bb9254b97f..0ca152e43125 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-07-01-preview" + self.api_version = "2021-10-15" 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/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py index 4de01d4be8a7..6e5209321296 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py @@ -30,13 +30,12 @@ from .operations import CollectionPartitionOperations from .operations import PartitionKeyRangeIdOperations from .operations import PartitionKeyRangeIdRegionOperations -from .operations import GraphResourcesOperations from .operations import SqlResourcesOperations from .operations import MongoDBResourcesOperations from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations -from .operations import CosmosDBManagementClientOperationsMixin +from .operations import LocationsOperations from .operations import NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -49,11 +48,10 @@ from .operations import RestorableMongodbResourcesOperations from .operations import CassandraClustersOperations from .operations import CassandraDataCentersOperations -from .operations import ServiceOperations from .. import models -class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): +class CosmosDBManagementClient(object): """Azure Cosmos DB Database Service Resource Provider REST API. :ivar database_accounts: DatabaseAccountsOperations operations @@ -82,8 +80,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype partition_key_range_id: azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdOperations :ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations :vartype partition_key_range_id_region: azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdRegionOperations - :ivar graph_resources: GraphResourcesOperations operations - :vartype graph_resources: azure.mgmt.cosmosdb.aio.operations.GraphResourcesOperations :ivar sql_resources: SqlResourcesOperations operations :vartype sql_resources: azure.mgmt.cosmosdb.aio.operations.SqlResourcesOperations :ivar mongo_db_resources: MongoDBResourcesOperations operations @@ -94,6 +90,8 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_resources: azure.mgmt.cosmosdb.aio.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResourcesOperations operations :vartype gremlin_resources: azure.mgmt.cosmosdb.aio.operations.GremlinResourcesOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.cosmosdb.aio.operations.LocationsOperations :ivar notebook_workspaces: NotebookWorkspacesOperations operations :vartype notebook_workspaces: azure.mgmt.cosmosdb.aio.operations.NotebookWorkspacesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -118,8 +116,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_clusters: azure.mgmt.cosmosdb.aio.operations.CassandraClustersOperations :ivar cassandra_data_centers: CassandraDataCentersOperations operations :vartype cassandra_data_centers: azure.mgmt.cosmosdb.aio.operations.CassandraDataCentersOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.cosmosdb.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -171,8 +167,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations( self._client, self._config, self._serialize, self._deserialize) - self.graph_resources = GraphResourcesOperations( - self._client, self._config, self._serialize, self._deserialize) self.sql_resources = SqlResourcesOperations( self._client, self._config, self._serialize, self._deserialize) self.mongo_db_resources = MongoDBResourcesOperations( @@ -183,6 +177,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.notebook_workspaces = NotebookWorkspacesOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( @@ -207,8 +203,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.cassandra_data_centers = CassandraDataCentersOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py index a7c7808a801a..ebbc5bb38263 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py @@ -19,13 +19,12 @@ from ._collection_partition_operations import CollectionPartitionOperations from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations -from ._graph_resources_operations import GraphResourcesOperations from ._sql_resources_operations import SqlResourcesOperations from ._mongo_db_resources_operations import MongoDBResourcesOperations from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations -from ._cosmos_db_management_client_operations import CosmosDBManagementClientOperationsMixin +from ._locations_operations import LocationsOperations from ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -38,7 +37,6 @@ from ._restorable_mongodb_resources_operations import RestorableMongodbResourcesOperations from ._cassandra_clusters_operations import CassandraClustersOperations from ._cassandra_data_centers_operations import CassandraDataCentersOperations -from ._service_operations import ServiceOperations __all__ = [ 'DatabaseAccountsOperations', @@ -54,13 +52,12 @@ 'CollectionPartitionOperations', 'PartitionKeyRangeIdOperations', 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', 'SqlResourcesOperations', 'MongoDBResourcesOperations', 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', + 'LocationsOperations', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -73,5 +70,4 @@ 'RestorableMongodbResourcesOperations', 'CassandraClustersOperations', 'CassandraDataCentersOperations', - 'ServiceOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py index 1d4def896931..b5d2b9f1208f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py @@ -59,7 +59,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -201,7 +201,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -248,7 +248,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -357,7 +357,7 @@ async def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -486,7 +486,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -602,24 +602,24 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} # type: ignore - async def _request_repair_initial( + async def _invoke_command_initial( self, resource_group_name: str, cluster_name: str, - body: "_models.RepairPostBody", + body: "_models.CommandPostBody", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.CommandOutput": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._request_repair_initial.metadata['url'] # type: ignore + url = self._invoke_command_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -637,55 +637,58 @@ async def _request_repair_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'RepairPostBody') + body_content = self._serialize.body(body, 'CommandPostBody') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _request_repair_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + return deserialized + _invoke_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - async def begin_request_repair( + async def begin_invoke_command( self, resource_group_name: str, cluster_name: str, - body: "_models.RepairPostBody", + body: "_models.CommandPostBody", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Request that repair begin on this cluster as soon as possible. + ) -> AsyncLROPoller["_models.CommandOutput"]: + """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param body: Specification of what keyspaces and tables to run repair on. - :type body: ~azure.mgmt.cosmosdb.models.RepairPostBody + :param body: Specification which command to run where. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody :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 None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either CommandOutput or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] 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._request_repair_initial( + raw_result = await self._invoke_command_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, @@ -697,8 +700,11 @@ async def begin_request_repair( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -718,24 +724,24 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_request_repair.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + begin_invoke_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - async def _fetch_node_status_initial( + async def _deallocate_initial( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Optional["_models.ClusterNodeStatus"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterNodeStatus"]] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self._fetch_node_status_initial.metadata['url'] # type: ignore + url = self._deallocate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -755,27 +761,24 @@ async def _fetch_node_status_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [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('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _fetch_node_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + _deallocate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - async def begin_fetch_node_status( + async def begin_deallocate( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ClusterNodeStatus"]: - """Request the status of all nodes in the cluster (as returned by 'nodetool status'). + ) -> AsyncLROPoller[None]: + """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -787,19 +790,19 @@ async def begin_fetch_node_status( 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 ClusterNodeStatus or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterNodeStatus] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterNodeStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[None] 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._fetch_node_status_initial( + raw_result = await self._deallocate_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, cls=lambda x,y,z: x, @@ -810,11 +813,8 @@ async def begin_fetch_node_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -834,117 +834,149 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_fetch_node_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def list_backups( + async def _start_initial( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ListBackups"]: - """List the backups of this cluster that are available to restore. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('ListBackups', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - async def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - return pipeline_response + async def begin_start( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + virtual machine of this cluster with reserved data disk. This won't do anything on an already + running cluster. Use Deallocate to deallocate the cluster. - return AsyncItemPaged( - get_next, extract_data + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. + :type cluster_name: str + :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 None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - async def get_backup( + async def status( self, resource_group_name: str, cluster_name: str, - backup_id: str, **kwargs: Any - ) -> "_models.BackupResource": - """Get the properties of an individual backup of this cluster that is available to restore. + ) -> "_models.CassandraClusterPublicStatus": + """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. - :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.BackupResource + :return: CassandraClusterPublicStatus, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self.get_backup.metadata['url'] # type: ignore + url = self.status.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - 'backupId': self._serialize.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$'), } url = self._client.format_url(url, **path_format_arguments) @@ -964,10 +996,10 @@ async def get_backup( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}'} # type: ignore + status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py index 0e07a7e4289c..dbf2c167b009 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -191,7 +191,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -307,7 +307,7 @@ async def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -443,7 +443,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py index 058af5373e55..e6afae125368 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py @@ -65,7 +65,7 @@ def list_cassandra_keyspaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_cassandra_keyspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_keyspace_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_cassandra_keyspace_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_cassandra_keyspace_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_cassandra_keyspace_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_cassandra_keyspace_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_cassandra_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_cassandra_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_table_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_cassandra_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_cassandra_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_cassandra_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_cassandra_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1742,876 +1742,3 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_cassandra_table_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore - - def list_cassandra_views( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.CassandraViewListResult"]: - """Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraViewListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cassandra_views.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('CassandraViewListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_cassandra_views.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views'} # type: ignore - - async def get_cassandra_view( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.CassandraViewGetResults": - """Gets the Cassandra view under an existing Azure Cosmos DB database account. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraViewGetResults, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.CassandraViewGetResults - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_cassandra_view.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - async def _create_update_cassandra_view_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", - **kwargs: Any - ) -> Optional["_models.CassandraViewGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraViewGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_update_cassandra_view_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(create_update_cassandra_view_parameters, 'CassandraViewCreateUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - 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('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_update_cassandra_view_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - async def begin_create_update_cassandra_view( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - create_update_cassandra_view_parameters: "_models.CassandraViewCreateUpdateParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.CassandraViewGetResults"]: - """Create or update an Azure Cosmos DB Cassandra View. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :param create_update_cassandra_view_parameters: The parameters to provide for the current - Cassandra View. - :type create_update_cassandra_view_parameters: ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters - :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 CassandraViewGetResults or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - 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._create_update_cassandra_view_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - create_update_cassandra_view_parameters=create_update_cassandra_view_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_create_update_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - async def _delete_cassandra_view_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - - # Construct URL - url = self._delete_cassandra_view_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_cassandra_view_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - async def begin_delete_cassandra_view( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes an existing Azure Cosmos DB Cassandra view. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - 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._delete_cassandra_view_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_delete_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - async def get_cassandra_view_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> "_models.ThroughputSettingsGetResults": - """Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database - account with the provided name. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_cassandra_view_throughput.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cassandra_view_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - async def _update_cassandra_view_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_cassandra_view_throughput_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_cassandra_view_throughput_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - async def begin_update_cassandra_view_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - update_throughput_parameters: "_models.ThroughputSettingsUpdateParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: - """Update RUs per second of an Azure Cosmos DB Cassandra view. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra view. - :type update_throughput_parameters: ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._update_cassandra_view_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - update_throughput_parameters=update_throughput_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_update_cassandra_view_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - async def _migrate_cassandra_view_to_autoscale_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self._migrate_cassandra_view_to_autoscale_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _migrate_cassandra_view_to_autoscale_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale'} # type: ignore - - async def begin_migrate_cassandra_view_to_autoscale( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: - """Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._migrate_cassandra_view_to_autoscale_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_migrate_cassandra_view_to_autoscale.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale'} # type: ignore - - async def _migrate_cassandra_view_to_manual_throughput_initial( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> Optional["_models.ThroughputSettingsGetResults"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self._migrate_cassandra_view_to_manual_throughput_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _migrate_cassandra_view_to_manual_throughput_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore - - async def begin_migrate_cassandra_view_to_manual_throughput( - self, - resource_group_name: str, - account_name: str, - keyspace_name: str, - view_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.ThroughputSettingsGetResults"]: - """Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._migrate_cassandra_view_to_manual_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_migrate_cassandra_view_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py index d6e7d2667ae0..e6e996a43f9f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py @@ -75,7 +75,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -162,7 +162,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -246,7 +246,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py index c8346c18f1a4..b459e55f2ff4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py @@ -75,7 +75,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -162,7 +162,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py index 8e255eec67d1..979d472ba996 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py index 3f5b718e1a36..5b3fa9f1cf96 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py index 16cef787b1de..3f198398c295 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py @@ -71,7 +71,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py index be33c45d9367..5b2628c7b5da 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -113,7 +113,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -237,7 +237,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -468,7 +468,7 @@ async def _failover_priority_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -591,7 +591,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -660,7 +660,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -733,7 +733,7 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -791,7 +791,7 @@ async def list_connection_strings( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -839,7 +839,7 @@ async def _offline_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -958,7 +958,7 @@ async def _online_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1087,7 +1087,7 @@ async def get_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1145,7 +1145,7 @@ async def list_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1193,7 +1193,7 @@ async def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1318,7 +1318,7 @@ async def check_name_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self.check_name_exists.metadata['url'] # type: ignore @@ -1375,7 +1375,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1454,7 +1454,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1530,7 +1530,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py index d9ae67a82759..a4ac9707bc68 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py @@ -72,7 +72,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -155,7 +155,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -235,7 +235,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py index 0b2dbd845006..0bc7fffca75f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py @@ -65,7 +65,7 @@ def list_gremlin_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_gremlin_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_gremlin_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_gremlin_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_gremlin_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_gremlin_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_gremlin_graphs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_gremlin_graph( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_graph_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_gremlin_graph_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_gremlin_graph_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_gremlin_graph_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_gremlin_graph_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py new file mode 100644 index 000000000000..bff2c5e3c574 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class LocationsOperations: + """LocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cosmosdb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.LocationListResult"]: + """List Cosmos DB locations and their properties. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('LocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations'} # type: ignore + + async def get( + self, + location: str, + **kwargs: Any + ) -> "_models.LocationGetResult": + """Get the properties of an existing Cosmos DB location. + + :param location: Cosmos DB region, with spaces between words and each word capitalized. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationGetResult, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocationGetResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}'} # type: ignore 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 8e75deeb3117..f1e61dd74645 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 @@ -65,7 +65,7 @@ def list_mongo_db_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_mongo_db_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_mongo_db_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_mongo_db_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_mongo_db_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_mongo_db_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_mongo_db_collections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_mongo_db_collection( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_collection_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_mongo_db_collection_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_mongo_db_collection_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_mongo_db_collection_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_mongo_db_collection_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1742,3 +1742,143 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore + + async def _retrieve_continuous_backup_information_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: "_models.ContinuousBackupRestoreLocation", + **kwargs: Any + ) -> Optional["_models.BackupInformation"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._retrieve_continuous_backup_information_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _retrieve_continuous_backup_information_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore + + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: "_models.ContinuousBackupRestoreLocation", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackupInformation"]: + """Retrieves continuous backup information for 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 location: The name of the continuous backup restore location. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :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 BackupInformation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] + 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._retrieve_continuous_backup_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **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_retrieve_continuous_backup_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py index 5488f88866d4..3b20c59ac444 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py @@ -65,7 +65,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -455,7 +455,7 @@ async def list_connection_info( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -505,7 +505,7 @@ async def _regenerate_auth_token_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -621,7 +621,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py index bfeb2f139a3d..fc014cbffbfc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py index af7028cef78f..39b9d129a2fa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py index 1b0d6bcfcdc6..a253dc497cab 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py @@ -81,7 +81,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py index 2507cadc3b24..015102bfc675 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py @@ -69,7 +69,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py index c7befa09b341..71802da95a1a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py index 58c388ca36e4..fb0855e1ac1d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py @@ -73,7 +73,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py index 62954af56d4a..dfda72c8fb6c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py @@ -65,7 +65,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -325,7 +325,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py index 816102320c23..b0234e9358cc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py @@ -63,7 +63,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +140,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py index fde3489c5f50..4d5837a758fe 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py @@ -62,7 +62,7 @@ def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -203,7 +203,7 @@ async def get_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py index 6a33eadd6b05..fbde445be87b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py index 7ae4d775bcd2..5ad38cfbb2fa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py index 7d252b39ff8a..d9196855b756 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py index 6a7094a952ef..c676cfc68a2d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py @@ -74,7 +74,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py index d38d7ac721c6..ea9954e37e2b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py index 437c5c96c68d..cc7e6e7665eb 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 aa7430cf409e..2c260024a713 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 @@ -65,7 +65,7 @@ def list_sql_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_sql_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_sql_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_sql_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_sql_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_sql_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_sql_containers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_sql_container( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_container_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_sql_container_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_sql_container_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_sql_container_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_sql_container_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1771,7 +1771,7 @@ def list_sql_stored_procedures( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1856,7 +1856,7 @@ async def get_sql_stored_procedure( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1910,7 +1910,7 @@ async def _create_update_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2057,7 +2057,7 @@ async def _delete_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_stored_procedure_initial.metadata['url'] # type: ignore @@ -2198,7 +2198,7 @@ def list_sql_user_defined_functions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2283,7 +2283,7 @@ async def get_sql_user_defined_function( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2337,7 +2337,7 @@ async def _create_update_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2484,7 +2484,7 @@ async def _delete_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_user_defined_function_initial.metadata['url'] # type: ignore @@ -2625,7 +2625,7 @@ def list_sql_triggers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2710,7 +2710,7 @@ async def get_sql_trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2764,7 +2764,7 @@ async def _create_update_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2911,7 +2911,7 @@ async def _delete_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_trigger_initial.metadata['url'] # type: ignore @@ -3049,7 +3049,7 @@ async def get_sql_role_definition( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3099,7 +3099,7 @@ async def _create_update_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3232,7 +3232,7 @@ async def _delete_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3357,7 +3357,7 @@ def list_sql_role_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3434,7 +3434,7 @@ async def get_sql_role_assignment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3484,7 +3484,7 @@ async def _create_update_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3617,7 +3617,7 @@ async def _delete_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3742,7 +3742,7 @@ def list_sql_role_assignments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3808,7 +3808,7 @@ async def _retrieve_continuous_backup_information_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py index 2e1b0d56c979..eac4de5eaba1 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py @@ -65,7 +65,7 @@ def list_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def _create_update_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -324,7 +324,7 @@ async def _delete_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_table_initial.metadata['url'] # type: ignore @@ -451,7 +451,7 @@ async def get_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -501,7 +501,7 @@ async def _update_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -634,7 +634,7 @@ async def _migrate_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -757,7 +757,7 @@ async def _migrate_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 d64473d6369b..f3bce9604251 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 @@ -17,9 +17,10 @@ from ._models_py3 import BackupInformation from ._models_py3 import BackupPolicy from ._models_py3 import BackupPolicyMigrationState - from ._models_py3 import BackupResource - from ._models_py3 import BackupResourceProperties from ._models_py3 import Capability + from ._models_py3 import Capacity + from ._models_py3 import CassandraClusterPublicStatus + from ._models_py3 import CassandraClusterPublicStatusDataCentersItem from ._models_py3 import CassandraKeyspaceCreateUpdateParameters from ._models_py3 import CassandraKeyspaceGetPropertiesOptions from ._models_py3 import CassandraKeyspaceGetPropertiesResource @@ -34,22 +35,18 @@ from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableListResult from ._models_py3 import CassandraTableResource - from ._models_py3 import CassandraViewCreateUpdateParameters - from ._models_py3 import CassandraViewGetPropertiesOptions - from ._models_py3 import CassandraViewGetPropertiesResource - from ._models_py3 import CassandraViewGetResults - from ._models_py3 import CassandraViewListResult - from ._models_py3 import CassandraViewResource from ._models_py3 import Certificate from ._models_py3 import ClusterKey - from ._models_py3 import ClusterNodeStatus - from ._models_py3 import ClusterNodeStatusNodesItem from ._models_py3 import ClusterResource from ._models_py3 import ClusterResourceProperties from ._models_py3 import Column + from ._models_py3 import CommandOutput + from ._models_py3 import CommandPostBody from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems from ._models_py3 import CompositePath from ._models_py3 import ConflictResolutionPolicy + from ._models_py3 import ConnectionError from ._models_py3 import ConsistencyPolicy from ._models_py3 import ContainerPartitionKey from ._models_py3 import ContinuousBackupInformation @@ -59,12 +56,8 @@ from ._models_py3 import CreateUpdateOptions from ._models_py3 import DataCenterResource from ._models_py3 import DataCenterResourceProperties - from ._models_py3 import DataTransferRegionalServiceResource - from ._models_py3 import DataTransferServiceResource - from ._models_py3 import DataTransferServiceResourceProperties from ._models_py3 import DatabaseAccountConnectionString from ._models_py3 import DatabaseAccountCreateUpdateParameters - from ._models_py3 import DatabaseAccountCreateUpdateProperties from ._models_py3 import DatabaseAccountGetResults from ._models_py3 import DatabaseAccountListConnectionStringsResult from ._models_py3 import DatabaseAccountListKeysResult @@ -73,22 +66,11 @@ from ._models_py3 import DatabaseAccountUpdateParameters from ._models_py3 import DatabaseAccountsListResult from ._models_py3 import DatabaseRestoreResource - from ._models_py3 import DefaultRequestDatabaseAccountCreateUpdateProperties - from ._models_py3 import DiagnosticLogSettings from ._models_py3 import ErrorResponse from ._models_py3 import ExcludedPath from ._models_py3 import ExtendedResourceProperties from ._models_py3 import FailoverPolicies from ._models_py3 import FailoverPolicy - from ._models_py3 import GraphAPIComputeRegionalServiceResource - from ._models_py3 import GraphAPIComputeServiceResource - from ._models_py3 import GraphAPIComputeServiceResourceProperties - from ._models_py3 import GraphResource - from ._models_py3 import GraphResourceCreateUpdateParameters - from ._models_py3 import GraphResourceGetPropertiesOptions - from ._models_py3 import GraphResourceGetPropertiesResource - from ._models_py3 import GraphResourceGetResults - from ._models_py3 import GraphResourcesListResult from ._models_py3 import GremlinDatabaseCreateUpdateParameters from ._models_py3 import GremlinDatabaseGetPropertiesOptions from ._models_py3 import GremlinDatabaseGetPropertiesResource @@ -105,13 +87,15 @@ from ._models_py3 import Indexes from ._models_py3 import IndexingPolicy from ._models_py3 import IpAddressOrRange - from ._models_py3 import ListBackups from ._models_py3 import ListClusters from ._models_py3 import ListDataCenters from ._models_py3 import Location from ._models_py3 import LocationGetResult from ._models_py3 import LocationListResult from ._models_py3 import LocationProperties + from ._models_py3 import ManagedCassandraARMResourceProperties + from ._models_py3 import ManagedCassandraManagedServiceIdentity + from ._models_py3 import ManagedCassandraReaperStatus from ._models_py3 import ManagedServiceIdentity from ._models_py3 import Metric from ._models_py3 import MetricAvailability @@ -161,8 +145,6 @@ from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource from ._models_py3 import RegionForOnlineOffline - from ._models_py3 import RegionalServiceResource - from ._models_py3 import RepairPostBody from ._models_py3 import Resource from ._models_py3 import RestorableDatabaseAccountGetResult from ._models_py3 import RestorableDatabaseAccountsListResult @@ -185,10 +167,6 @@ from ._models_py3 import RestorableSqlResourcesListResult from ._models_py3 import RestoreParameters from ._models_py3 import SeedNode - from ._models_py3 import ServiceResource - from ._models_py3 import ServiceResourceCreateUpdateParameters - from ._models_py3 import ServiceResourceListResult - from ._models_py3 import ServiceResourceProperties from ._models_py3 import SpatialSpec from ._models_py3 import SqlContainerCreateUpdateParameters from ._models_py3 import SqlContainerGetPropertiesOptions @@ -202,9 +180,6 @@ from ._models_py3 import SqlDatabaseGetResults from ._models_py3 import SqlDatabaseListResult from ._models_py3 import SqlDatabaseResource - from ._models_py3 import SqlDedicatedGatewayRegionalServiceResource - from ._models_py3 import SqlDedicatedGatewayServiceResource - from ._models_py3 import SqlDedicatedGatewayServiceResourceProperties from ._models_py3 import SqlRoleAssignmentCreateUpdateParameters from ._models_py3 import SqlRoleAssignmentGetResults from ._models_py3 import SqlRoleAssignmentListResult @@ -254,9 +229,10 @@ from ._models import BackupInformation # type: ignore from ._models import BackupPolicy # type: ignore from ._models import BackupPolicyMigrationState # type: ignore - from ._models import BackupResource # type: ignore - from ._models import BackupResourceProperties # type: ignore from ._models import Capability # type: ignore + from ._models import Capacity # type: ignore + from ._models import CassandraClusterPublicStatus # type: ignore + from ._models import CassandraClusterPublicStatusDataCentersItem # type: ignore from ._models import CassandraKeyspaceCreateUpdateParameters # type: ignore from ._models import CassandraKeyspaceGetPropertiesOptions # type: ignore from ._models import CassandraKeyspaceGetPropertiesResource # type: ignore @@ -271,22 +247,18 @@ from ._models import CassandraTableGetResults # type: ignore from ._models import CassandraTableListResult # type: ignore from ._models import CassandraTableResource # type: ignore - from ._models import CassandraViewCreateUpdateParameters # type: ignore - from ._models import CassandraViewGetPropertiesOptions # type: ignore - from ._models import CassandraViewGetPropertiesResource # type: ignore - from ._models import CassandraViewGetResults # type: ignore - from ._models import CassandraViewListResult # type: ignore - from ._models import CassandraViewResource # type: ignore from ._models import Certificate # type: ignore from ._models import ClusterKey # type: ignore - from ._models import ClusterNodeStatus # type: ignore - from ._models import ClusterNodeStatusNodesItem # type: ignore from ._models import ClusterResource # type: ignore from ._models import ClusterResourceProperties # type: ignore from ._models import Column # type: ignore + from ._models import CommandOutput # type: ignore + from ._models import CommandPostBody # type: ignore from ._models import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems # type: ignore from ._models import CompositePath # type: ignore from ._models import ConflictResolutionPolicy # type: ignore + from ._models import ConnectionError # type: ignore from ._models import ConsistencyPolicy # type: ignore from ._models import ContainerPartitionKey # type: ignore from ._models import ContinuousBackupInformation # type: ignore @@ -296,12 +268,8 @@ from ._models import CreateUpdateOptions # type: ignore from ._models import DataCenterResource # type: ignore from ._models import DataCenterResourceProperties # type: ignore - from ._models import DataTransferRegionalServiceResource # type: ignore - from ._models import DataTransferServiceResource # type: ignore - from ._models import DataTransferServiceResourceProperties # type: ignore from ._models import DatabaseAccountConnectionString # type: ignore from ._models import DatabaseAccountCreateUpdateParameters # type: ignore - from ._models import DatabaseAccountCreateUpdateProperties # type: ignore from ._models import DatabaseAccountGetResults # type: ignore from ._models import DatabaseAccountListConnectionStringsResult # type: ignore from ._models import DatabaseAccountListKeysResult # type: ignore @@ -310,22 +278,11 @@ from ._models import DatabaseAccountUpdateParameters # type: ignore from ._models import DatabaseAccountsListResult # type: ignore from ._models import DatabaseRestoreResource # type: ignore - from ._models import DefaultRequestDatabaseAccountCreateUpdateProperties # type: ignore - from ._models import DiagnosticLogSettings # type: ignore from ._models import ErrorResponse # type: ignore from ._models import ExcludedPath # type: ignore from ._models import ExtendedResourceProperties # type: ignore from ._models import FailoverPolicies # type: ignore from ._models import FailoverPolicy # type: ignore - from ._models import GraphAPIComputeRegionalServiceResource # type: ignore - from ._models import GraphAPIComputeServiceResource # type: ignore - from ._models import GraphAPIComputeServiceResourceProperties # type: ignore - from ._models import GraphResource # type: ignore - from ._models import GraphResourceCreateUpdateParameters # type: ignore - from ._models import GraphResourceGetPropertiesOptions # type: ignore - from ._models import GraphResourceGetPropertiesResource # type: ignore - from ._models import GraphResourceGetResults # type: ignore - from ._models import GraphResourcesListResult # type: ignore from ._models import GremlinDatabaseCreateUpdateParameters # type: ignore from ._models import GremlinDatabaseGetPropertiesOptions # type: ignore from ._models import GremlinDatabaseGetPropertiesResource # type: ignore @@ -342,13 +299,15 @@ from ._models import Indexes # type: ignore from ._models import IndexingPolicy # type: ignore from ._models import IpAddressOrRange # type: ignore - from ._models import ListBackups # type: ignore from ._models import ListClusters # type: ignore from ._models import ListDataCenters # type: ignore from ._models import Location # type: ignore from ._models import LocationGetResult # type: ignore from ._models import LocationListResult # type: ignore from ._models import LocationProperties # type: ignore + from ._models import ManagedCassandraARMResourceProperties # type: ignore + from ._models import ManagedCassandraManagedServiceIdentity # type: ignore + from ._models import ManagedCassandraReaperStatus # type: ignore from ._models import ManagedServiceIdentity # type: ignore from ._models import Metric # type: ignore from ._models import MetricAvailability # type: ignore @@ -398,8 +357,6 @@ from ._models import PrivateLinkServiceConnectionStateProperty # type: ignore from ._models import ProxyResource # type: ignore from ._models import RegionForOnlineOffline # type: ignore - from ._models import RegionalServiceResource # type: ignore - from ._models import RepairPostBody # type: ignore from ._models import Resource # type: ignore from ._models import RestorableDatabaseAccountGetResult # type: ignore from ._models import RestorableDatabaseAccountsListResult # type: ignore @@ -422,10 +379,6 @@ from ._models import RestorableSqlResourcesListResult # type: ignore from ._models import RestoreParameters # type: ignore from ._models import SeedNode # type: ignore - from ._models import ServiceResource # type: ignore - from ._models import ServiceResourceCreateUpdateParameters # type: ignore - from ._models import ServiceResourceListResult # type: ignore - from ._models import ServiceResourceProperties # type: ignore from ._models import SpatialSpec # type: ignore from ._models import SqlContainerCreateUpdateParameters # type: ignore from ._models import SqlContainerGetPropertiesOptions # type: ignore @@ -439,9 +392,6 @@ from ._models import SqlDatabaseGetResults # type: ignore from ._models import SqlDatabaseListResult # type: ignore from ._models import SqlDatabaseResource # type: ignore - from ._models import SqlDedicatedGatewayRegionalServiceResource # type: ignore - from ._models import SqlDedicatedGatewayServiceResource # type: ignore - from ._models import SqlDedicatedGatewayServiceResourceProperties # type: ignore from ._models import SqlRoleAssignmentCreateUpdateParameters # type: ignore from ._models import SqlRoleAssignmentGetResults # type: ignore from ._models import SqlRoleAssignmentListResult # type: ignore @@ -490,17 +440,18 @@ BackupStorageRedundancy, CompositePathSortOrder, ConflictResolutionMode, + ConnectionState, ConnectorOffer, CreateMode, CreatedByType, DataType, DatabaseAccountKind, DefaultConsistencyLevel, - EnableFullTextQuery, IndexKind, IndexingMode, KeyKind, ManagedCassandraProvisioningState, + ManagedCassandraResourceIdentityType, NetworkAclBypass, NodeState, NodeStatus, @@ -513,9 +464,6 @@ RestoreMode, RoleDefinitionType, ServerVersion, - ServiceSize, - ServiceStatus, - ServiceType, SpatialType, TriggerOperation, TriggerType, @@ -533,9 +481,10 @@ 'BackupInformation', 'BackupPolicy', 'BackupPolicyMigrationState', - 'BackupResource', - 'BackupResourceProperties', 'Capability', + 'Capacity', + 'CassandraClusterPublicStatus', + 'CassandraClusterPublicStatusDataCentersItem', 'CassandraKeyspaceCreateUpdateParameters', 'CassandraKeyspaceGetPropertiesOptions', 'CassandraKeyspaceGetPropertiesResource', @@ -550,22 +499,18 @@ 'CassandraTableGetResults', 'CassandraTableListResult', 'CassandraTableResource', - 'CassandraViewCreateUpdateParameters', - 'CassandraViewGetPropertiesOptions', - 'CassandraViewGetPropertiesResource', - 'CassandraViewGetResults', - 'CassandraViewListResult', - 'CassandraViewResource', 'Certificate', 'ClusterKey', - 'ClusterNodeStatus', - 'ClusterNodeStatusNodesItem', 'ClusterResource', 'ClusterResourceProperties', 'Column', + 'CommandOutput', + 'CommandPostBody', 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems', 'CompositePath', 'ConflictResolutionPolicy', + 'ConnectionError', 'ConsistencyPolicy', 'ContainerPartitionKey', 'ContinuousBackupInformation', @@ -575,12 +520,8 @@ 'CreateUpdateOptions', 'DataCenterResource', 'DataCenterResourceProperties', - 'DataTransferRegionalServiceResource', - 'DataTransferServiceResource', - 'DataTransferServiceResourceProperties', 'DatabaseAccountConnectionString', 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountCreateUpdateProperties', 'DatabaseAccountGetResults', 'DatabaseAccountListConnectionStringsResult', 'DatabaseAccountListKeysResult', @@ -589,22 +530,11 @@ 'DatabaseAccountUpdateParameters', 'DatabaseAccountsListResult', 'DatabaseRestoreResource', - 'DefaultRequestDatabaseAccountCreateUpdateProperties', - 'DiagnosticLogSettings', 'ErrorResponse', 'ExcludedPath', 'ExtendedResourceProperties', 'FailoverPolicies', 'FailoverPolicy', - 'GraphAPIComputeRegionalServiceResource', - 'GraphAPIComputeServiceResource', - 'GraphAPIComputeServiceResourceProperties', - 'GraphResource', - 'GraphResourceCreateUpdateParameters', - 'GraphResourceGetPropertiesOptions', - 'GraphResourceGetPropertiesResource', - 'GraphResourceGetResults', - 'GraphResourcesListResult', 'GremlinDatabaseCreateUpdateParameters', 'GremlinDatabaseGetPropertiesOptions', 'GremlinDatabaseGetPropertiesResource', @@ -621,13 +551,15 @@ 'Indexes', 'IndexingPolicy', 'IpAddressOrRange', - 'ListBackups', 'ListClusters', 'ListDataCenters', 'Location', 'LocationGetResult', 'LocationListResult', 'LocationProperties', + 'ManagedCassandraARMResourceProperties', + 'ManagedCassandraManagedServiceIdentity', + 'ManagedCassandraReaperStatus', 'ManagedServiceIdentity', 'Metric', 'MetricAvailability', @@ -677,8 +609,6 @@ 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'RegionForOnlineOffline', - 'RegionalServiceResource', - 'RepairPostBody', 'Resource', 'RestorableDatabaseAccountGetResult', 'RestorableDatabaseAccountsListResult', @@ -701,10 +631,6 @@ 'RestorableSqlResourcesListResult', 'RestoreParameters', 'SeedNode', - 'ServiceResource', - 'ServiceResourceCreateUpdateParameters', - 'ServiceResourceListResult', - 'ServiceResourceProperties', 'SpatialSpec', 'SqlContainerCreateUpdateParameters', 'SqlContainerGetPropertiesOptions', @@ -718,9 +644,6 @@ 'SqlDatabaseGetResults', 'SqlDatabaseListResult', 'SqlDatabaseResource', - 'SqlDedicatedGatewayRegionalServiceResource', - 'SqlDedicatedGatewayServiceResource', - 'SqlDedicatedGatewayServiceResourceProperties', 'SqlRoleAssignmentCreateUpdateParameters', 'SqlRoleAssignmentGetResults', 'SqlRoleAssignmentListResult', @@ -767,17 +690,18 @@ 'BackupStorageRedundancy', 'CompositePathSortOrder', 'ConflictResolutionMode', + 'ConnectionState', 'ConnectorOffer', 'CreateMode', 'CreatedByType', 'DataType', 'DatabaseAccountKind', 'DefaultConsistencyLevel', - 'EnableFullTextQuery', 'IndexKind', 'IndexingMode', 'KeyKind', 'ManagedCassandraProvisioningState', + 'ManagedCassandraResourceIdentityType', 'NetworkAclBypass', 'NodeState', 'NodeStatus', @@ -790,9 +714,6 @@ 'RestoreMode', 'RoleDefinitionType', 'ServerVersion', - 'ServiceSize', - 'ServiceStatus', - 'ServiceType', 'SpatialType', 'TriggerOperation', 'TriggerType', 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 ec0159dc473f..f76cd8dabee4 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 @@ -91,6 +91,17 @@ class ConflictResolutionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) LAST_WRITER_WINS = "LastWriterWins" CUSTOM = "Custom" +class ConnectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of connection error that occurred. + """ + + UNKNOWN = "Unknown" + OK = "OK" + OPERATOR_TO_DATA_CENTER_NETWORK_ERROR = "OperatorToDataCenterNetworkError" + DATACENTER_TO_DATACENTER_NETWORK_ERROR = "DatacenterToDatacenterNetworkError" + INTERNAL_OPERATOR_TO_DATA_CENTER_CERTIFICATE_ERROR = "InternalOperatorToDataCenterCertificateError" + INTERNAL_ERROR = "InternalError" + class ConnectorOffer(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The cassandra connector offer type for the Cosmos DB C* database account. """ @@ -142,14 +153,6 @@ class DefaultConsistencyLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum STRONG = "Strong" CONSISTENT_PREFIX = "ConsistentPrefix" -class EnableFullTextQuery(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Describe the level of detail with which queries are to be logged. - """ - - NONE = "None" - TRUE = "True" - FALSE = "False" - class IndexingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the indexing mode. """ @@ -186,6 +189,13 @@ class ManagedCassandraProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, FAILED = "Failed" CANCELED = "Canceled" +class ManagedCassandraResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the resource. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" + class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates what services are allowed to bypass firewall checks. """ @@ -194,7 +204,7 @@ class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AZURE_SERVICES = "AzureServices" class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the node in relation to the cluster. + """The state of the node in Cassandra ring. """ NORMAL = "Normal" @@ -282,33 +292,6 @@ class ServerVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): THREE6 = "3.6" FOUR0 = "4.0" -class ServiceSize(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Instance type for the service. - """ - - COSMOS_D4_S = "Cosmos.D4s" - COSMOS_D8_S = "Cosmos.D8s" - COSMOS_D16_S = "Cosmos.D16s" - -class ServiceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Describes the status of a service. - """ - - CREATING = "Creating" - RUNNING = "Running" - UPDATING = "Updating" - DELETING = "Deleting" - ERROR = "Error" - STOPPED = "Stopped" - -class ServiceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """ServiceType for the service. - """ - - SQL_DEDICATED_GATEWAY = "SqlDedicatedGateway" - DATA_TRANSFER = "DataTransfer" - GRAPH_API_COMPUTE = "GraphAPICompute" - class SpatialType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the spatial type of index. """ diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py index 375a62305b6c..c3732ba50eef 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -105,8 +105,6 @@ class ARMResourceProperties(msrest.serialization.Model): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _validation = { @@ -121,7 +119,6 @@ class ARMResourceProperties(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } def __init__( @@ -134,7 +131,6 @@ def __init__( self.type = None self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) class AutoscaleSettings(msrest.serialization.Model): @@ -305,79 +301,111 @@ def __init__( self.start_time = kwargs.get('start_time', None) -class BackupResource(ARMProxyResource): - """A restorable backup of a Cassandra cluster. +class Capability(msrest.serialization.Model): + """Cosmos DB capability object. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current + values also include "EnableTable" and "EnableGremlin". + :type name: str + """ - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: - :type properties: ~azure.mgmt.cosmosdb.models.BackupResourceProperties + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class Capacity(msrest.serialization.Model): + """The object that represents all properties related to capacity enforcement on an account. + + :param total_throughput_limit: The total throughput limit imposed on the account. A + totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned + on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of + throughput. + :type total_throughput_limit: int """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'total_throughput_limit': {'minimum': -1}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceProperties'}, + 'total_throughput_limit': {'key': 'totalThroughputLimit', 'type': 'int'}, } def __init__( self, **kwargs ): - super(BackupResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + super(Capacity, self).__init__(**kwargs) + self.total_throughput_limit = kwargs.get('total_throughput_limit', None) -class BackupResourceProperties(msrest.serialization.Model): - """BackupResourceProperties. +class CassandraClusterPublicStatus(msrest.serialization.Model): + """Properties of a managed Cassandra cluster public status. - :param timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. - :type timestamp: ~datetime.datetime + :param e_tag: + :type e_tag: str + :param reaper_status: + :type reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus + :param connection_errors: List relevant information about any connection errors to the + Datacenters. + :type connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError] + :param data_centers: List of the status of each datacenter in this cluster. + :type data_centers: + list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem] """ _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'reaper_status': {'key': 'reaperStatus', 'type': 'ManagedCassandraReaperStatus'}, + 'connection_errors': {'key': 'connectionErrors', 'type': '[ConnectionError]'}, + 'data_centers': {'key': 'dataCenters', 'type': '[CassandraClusterPublicStatusDataCentersItem]'}, } def __init__( self, **kwargs ): - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) + super(CassandraClusterPublicStatus, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.reaper_status = kwargs.get('reaper_status', None) + self.connection_errors = kwargs.get('connection_errors', None) + self.data_centers = kwargs.get('data_centers', None) -class Capability(msrest.serialization.Model): - """Cosmos DB capability object. +class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): + """CassandraClusterPublicStatusDataCentersItem. - :param name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current - values also include "EnableTable" and "EnableGremlin". + :param name: The name of this Datacenter. :type name: str + :param seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. + :type seed_nodes: list[str] + :param nodes: + :type nodes: + list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[str]'}, + 'nodes': {'key': 'nodes', 'type': '[ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems]'}, } def __init__( self, **kwargs ): - super(Capability, self).__init__(**kwargs) + super(CassandraClusterPublicStatusDataCentersItem, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.seed_nodes = kwargs.get('seed_nodes', None) + self.nodes = kwargs.get('nodes', None) class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): @@ -402,8 +430,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra keyspace. :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -424,7 +450,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -608,8 +633,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource :param options: @@ -628,7 +651,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } @@ -735,8 +757,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra table. :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -757,7 +777,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -905,8 +924,6 @@ class CassandraTableGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource :param options: @@ -925,7 +942,6 @@ class CassandraTableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } @@ -964,166 +980,103 @@ def __init__( self.value = None -class CassandraViewCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Cassandra view. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Cassandra view. - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs['resource'] - self.options = kwargs.get('options', None) - - -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. +class Certificate(msrest.serialization.Model): + """Certificate. - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + :param pem: PEM formatted public key. + :type pem: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'pem': {'key': 'pem', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewGetPropertiesOptions, self).__init__(**kwargs) - + super(Certificate, self).__init__(**kwargs) + self.pem = kwargs.get('pem', None) -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. - All required parameters must be populated in order to send to Azure. +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str + :param name: Name of the Cosmos DB Cassandra table cluster key. + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and + "Desc". + :type order_by: str """ - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.view_definition = kwargs['view_definition'] + super(ClusterKey, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order_by = kwargs.get('order_by', None) -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. +class ManagedCassandraARMResourceProperties(msrest.serialization.Model): + """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, } def __init__( self, **kwargs ): - super(CassandraViewGetPropertiesResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.view_definition = kwargs['view_definition'] - self.rid = None - self.ts = None - self.etag = None + super(ManagedCassandraARMResourceProperties, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. +class ClusterResource(ManagedCassandraARMResourceProperties): + """Representation of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1143,11 +1096,9 @@ class CassandraViewGetResults(ARMResourceProperties): also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ _validation = { @@ -1162,218 +1113,20 @@ class CassandraViewGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, } def __init__( self, **kwargs ): - super(CassandraViewGetResults, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(ClusterResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None - - -class Certificate(msrest.serialization.Model): - """Certificate. - - :param pem: PEM formatted public key. - :type pem: str - """ - - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Certificate, self).__init__(**kwargs) - self.pem = kwargs.get('pem', None) - - -class ClusterKey(msrest.serialization.Model): - """Cosmos DB Cassandra table cluster key. - - :param name: Name of the Cosmos DB Cassandra table cluster key. - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and - "Desc". - :type order_by: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterKey, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order_by = kwargs.get('order_by', None) - - -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). - - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] - """ - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = kwargs.get('nodes', None) - - -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. - - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible values include: "Up", - "Down". - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible values include: - "Normal", "Leaving", "Joining", "Moving", "Stopped". - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. - :type address: str - :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding - all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. - :type load: str - :param tokens: List of tokens. - :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter times the replication - factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of - the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float - :param host_id: The network ID of the node. - :type host_id: str - :param rack: The rack this node is part of. - :type rack: str - """ - - _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = kwargs.get('datacenter', None) - self.status = kwargs.get('status', None) - self.state = kwargs.get('state', None) - self.address = kwargs.get('address', None) - self.load = kwargs.get('load', None) - self.tokens = kwargs.get('tokens', None) - self.owns = kwargs.get('owns', None) - self.host_id = kwargs.get('host_id', None) - self.rack = kwargs.get('rack', None) - - -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ClusterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ClusterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra cluster. +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1405,9 +1158,6 @@ class ClusterResourceProperties(msrest.serialization.Model): the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. - To disable backups, set this property to 0. - :type hours_between_backups: int :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode @@ -1435,6 +1185,13 @@ class ClusterResourceProperties(msrest.serialization.Model): :ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes. :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param deallocated: Whether the cluster and associated data centers has been deallocated. + :type deallocated: bool + :param cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled. + :type cassandra_audit_logging_enabled: bool """ _validation = { @@ -1450,7 +1207,6 @@ class ClusterResourceProperties(msrest.serialization.Model): 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, @@ -1458,6 +1214,9 @@ class ClusterResourceProperties(msrest.serialization.Model): 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, + 'deallocated': {'key': 'deallocated', 'type': 'bool'}, + 'cassandra_audit_logging_enabled': {'key': 'cassandraAuditLoggingEnabled', 'type': 'bool'}, } def __init__( @@ -1472,7 +1231,6 @@ def __init__( self.cluster_name_override = kwargs.get('cluster_name_override', None) self.authentication_method = kwargs.get('authentication_method', None) self.initial_cassandra_admin_password = kwargs.get('initial_cassandra_admin_password', None) - self.hours_between_backups = kwargs.get('hours_between_backups', None) self.prometheus_endpoint = kwargs.get('prometheus_endpoint', None) self.repair_enabled = kwargs.get('repair_enabled', None) self.client_certificates = kwargs.get('client_certificates', None) @@ -1480,6 +1238,9 @@ def __init__( self.gossip_certificates = None self.external_seed_nodes = kwargs.get('external_seed_nodes', None) self.seed_nodes = None + self.hours_between_backups = kwargs.get('hours_between_backups', None) + self.deallocated = kwargs.get('deallocated', None) + self.cassandra_audit_logging_enabled = kwargs.get('cassandra_audit_logging_enabled', None) class Column(msrest.serialization.Model): @@ -1505,6 +1266,69 @@ def __init__( self.type = kwargs.get('type', None) +class CommandOutput(msrest.serialization.Model): + """Response of /command api. + + :param command_output: Output of the command. + :type command_output: str + """ + + _attribute_map = { + 'command_output': {'key': 'commandOutput', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommandOutput, self).__init__(**kwargs) + self.command_output = kwargs.get('command_output', None) + + +class CommandPostBody(msrest.serialization.Model): + """Specification of which command to run where. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command which should be run. + :type command: str + :param arguments: The arguments for the command to be run. + :type arguments: dict[str, str] + :param host: Required. IP address of the cassandra host to run the command on. + :type host: str + :param cassandra_stop_start: If true, stops cassandra before executing the command and then + start it again. + :type cassandra_stop_start: bool + :param readwrite: If true, allows the command to *write* to the cassandra directory, otherwise + read-only. + :type readwrite: bool + """ + + _validation = { + 'command': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '{str}'}, + 'host': {'key': 'host', 'type': 'str'}, + 'cassandra_stop_start': {'key': 'cassandra-stop-start', 'type': 'bool'}, + 'readwrite': {'key': 'readwrite', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CommandPostBody, self).__init__(**kwargs) + self.command = kwargs['command'] + self.arguments = kwargs.get('arguments', None) + self.host = kwargs['host'] + self.cassandra_stop_start = kwargs.get('cassandra_stop_start', None) + self.readwrite = kwargs.get('readwrite', None) + + class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. @@ -1535,6 +1359,90 @@ def __init__( self.client_id = None +class ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems(msrest.serialization.Model): + """ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. + + :param address: The node's IP address. + :type address: str + :param state: The state of the node in Cassandra ring. Possible values include: "Normal", + "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param status: + :type status: str + :param load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. + :type load: str + :param tokens: List of tokens this node covers. + :type tokens: list[str] + :param size: + :type size: int + :param host_id: The network ID of the node. + :type host_id: str + :param rack: The rack this node is part of. + :type rack: str + :param timestamp: The timestamp when these statistics were captured. + :type timestamp: str + :param disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :type disk_used_kb: long + :param disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :type disk_free_kb: long + :param memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :type memory_used_kb: long + :param memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :type memory_buffers_and_cached_kb: long + :param memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :type memory_free_kb: long + :param memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in + kB. + :type memory_total_kb: long + :param cpu_usage: A float representing the current system-wide CPU utilization as a percentage. + :type cpu_usage: float + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'load': {'key': 'load', 'type': 'str'}, + 'tokens': {'key': 'tokens', 'type': '[str]'}, + 'size': {'key': 'size', 'type': 'int'}, + 'host_id': {'key': 'hostID', 'type': 'str'}, + 'rack': {'key': 'rack', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'disk_used_kb': {'key': 'diskUsedKB', 'type': 'long'}, + 'disk_free_kb': {'key': 'diskFreeKB', 'type': 'long'}, + 'memory_used_kb': {'key': 'memoryUsedKB', 'type': 'long'}, + 'memory_buffers_and_cached_kb': {'key': 'memoryBuffersAndCachedKB', 'type': 'long'}, + 'memory_free_kb': {'key': 'memoryFreeKB', 'type': 'long'}, + 'memory_total_kb': {'key': 'memoryTotalKB', 'type': 'long'}, + 'cpu_usage': {'key': 'cpuUsage', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.state = kwargs.get('state', None) + self.status = kwargs.get('status', None) + self.load = kwargs.get('load', None) + self.tokens = kwargs.get('tokens', None) + self.size = kwargs.get('size', None) + self.host_id = kwargs.get('host_id', None) + self.rack = kwargs.get('rack', None) + self.timestamp = kwargs.get('timestamp', None) + self.disk_used_kb = kwargs.get('disk_used_kb', None) + self.disk_free_kb = kwargs.get('disk_free_kb', None) + self.memory_used_kb = kwargs.get('memory_used_kb', None) + self.memory_buffers_and_cached_kb = kwargs.get('memory_buffers_and_cached_kb', None) + self.memory_free_kb = kwargs.get('memory_free_kb', None) + self.memory_total_kb = kwargs.get('memory_total_kb', None) + self.cpu_usage = kwargs.get('cpu_usage', None) + + class CompositePath(msrest.serialization.Model): """CompositePath. @@ -1590,6 +1498,43 @@ def __init__( self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', None) +class ConnectionError(msrest.serialization.Model): + """ConnectionError. + + :param connection_state: The kind of connection error that occurred. Possible values include: + "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", + "InternalOperatorToDataCenterCertificateError", "InternalError". + :type connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState + :param i_p_from: The IP of host that originated the failed connection. + :type i_p_from: str + :param i_p_to: The IP that the connection attempted to reach. + :type i_p_to: str + :param port: The TCP port the connection was attempted on. + :type port: int + :param exception: Detailed error message about the failed connection. + :type exception: str + """ + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'i_p_from': {'key': 'iPFrom', 'type': 'str'}, + 'i_p_to': {'key': 'iPTo', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'exception': {'key': 'exception', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionError, self).__init__(**kwargs) + self.connection_state = kwargs.get('connection_state', None) + self.i_p_from = kwargs.get('i_p_from', None) + self.i_p_to = kwargs.get('i_p_to', None) + self.port = kwargs.get('port', None) + self.exception = kwargs.get('exception', None) + + class ConsistencyPolicy(msrest.serialization.Model): """The consistency policy for the Cosmos DB database account. @@ -1861,11 +1806,11 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param locations: Required. An array that contains the georeplication locations enabled for the @@ -1917,8 +1862,8 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". + :param create_mode: Enum to indicate the mode of account creation. Possible values include: + "Default", "Restore". Default value: "Default". :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy @@ -1930,14 +1875,14 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool :param restore_parameters: Parameters to indicate the information about the restore. :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { @@ -1946,7 +1891,6 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'type': {'readonly': True}, 'locations': {'required': True}, 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, } _attribute_map = { @@ -1955,8 +1899,8 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'locations': {'key': 'properties.locations', 'type': '[Location]'}, 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, @@ -1981,9 +1925,9 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } database_account_offer_type = "Standard" @@ -1994,6 +1938,7 @@ def __init__( ): super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) self.kind = kwargs.get('kind', None) + self.identity = kwargs.get('identity', None) self.consistency_policy = kwargs.get('consistency_policy', None) self.locations = kwargs['locations'] self.ip_rules = kwargs.get('ip_rules', None) @@ -2012,177 +1957,18 @@ def __init__( self.api_properties = kwargs.get('api_properties', None) self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.create_mode = None # type: Optional[str] + self.create_mode = kwargs.get('create_mode', "Default") self.backup_policy = kwargs.get('backup_policy', None) self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) self.disable_local_auth = kwargs.get('disable_local_auth', None) self.restore_parameters = kwargs.get('restore_parameters', None) + self.capacity = kwargs.get('capacity', None) -class DatabaseAccountCreateUpdateProperties(msrest.serialization.Model): - """Properties to create and update Azure Cosmos DB database accounts. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties'} - } - - database_account_offer_type = "Standard" - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs['locations'] - self.ip_rules = kwargs.get('ip_rules', None) - self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) - self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.capabilities = kwargs.get('capabilities', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) - self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) - self.connector_offer = kwargs.get('connector_offer', None) - self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) - self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) - self.default_identity = kwargs.get('default_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.enable_free_tier = kwargs.get('enable_free_tier', None) - self.api_properties = kwargs.get('api_properties', None) - self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.create_mode = None # type: Optional[str] - self.backup_policy = kwargs.get('backup_policy', None) - self.cors = kwargs.get('cors', None) - self.network_acl_bypass = kwargs.get('network_acl_bypass', None) - self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - self.restore_parameters = kwargs.get('restore_parameters', None) - - -class DatabaseAccountGetResults(ARMResourceProperties): - """An Azure Cosmos DB database account. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. @@ -2201,11 +1987,11 @@ class DatabaseAccountGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was @@ -2298,12 +2084,12 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { @@ -2328,8 +2114,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, @@ -2363,8 +2149,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( @@ -2373,6 +2159,7 @@ def __init__( ): super(DatabaseAccountGetResults, self).__init__(**kwargs) self.kind = kwargs.get('kind', None) + self.identity = kwargs.get('identity', None) self.system_data = None self.provisioning_state = None self.document_endpoint = None @@ -2406,8 +2193,8 @@ def __init__( self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.capacity = kwargs.get('capacity', None) class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): @@ -2621,12 +2408,12 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _attribute_map = { @@ -2655,8 +2442,8 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( @@ -2689,8 +2476,8 @@ def __init__( self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.capacity = kwargs.get('capacity', None) class DatabaseRestoreResource(msrest.serialization.Model): @@ -2763,849 +2550,185 @@ class DataCenterResourceProperties(msrest.serialization.Model): :param data_center_location: The region this data center should be created in. :type data_center_location: str :param delegated_subnet_id: Resource id of a subnet the nodes in this data center should have - their network interfaces connected to. The subnet must be in the same region specified in - 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's - 'delegatedManagementSubnetId' property. This resource id will be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_subnet_id: str - :param node_count: The number of nodes the data center should have. This is the desired number. - After it is set, it may take some time for the data center to be scaled to match. To monitor - the number of nodes and their status, use the fetchNodeStatus method on the cluster. - :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. - Generally you will want to use the seedNodes property on the cluster, which aggregates the seed - nodes from all data centers in the cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration - file to be included in the cassandra.yaml for all nodes in this data center. The fragment - should be Base64 encoded, and only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str - """ - - _validation = { - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.data_center_location = kwargs.get('data_center_location', None) - self.delegated_subnet_id = kwargs.get('delegated_subnet_id', None) - self.node_count = kwargs.get('node_count', None) - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = kwargs.get('base64_encoded_cassandra_yaml_fragment', None) - - -class RegionalServiceResource(msrest.serialization.Model): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RegionalServiceResource, self).__init__(**kwargs) - self.name = None - self.location = None - self.status = None - - -class DataTransferRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferRegionalServiceResource, self).__init__(**kwargs) - - -class DataTransferServiceResource(msrest.serialization.Model): - """Describes the service response property. - - :param properties: Properties for DataTransferServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataTransferServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ServiceResourceProperties(msrest.serialization.Model): - """Services response resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - _subtype_map = { - 'service_type': {'DataTransfer': 'DataTransferServiceResourceProperties', 'GraphAPICompute': 'GraphAPIComputeServiceResourceProperties', 'SqlDedicatedGateway': 'SqlDedicatedGatewayServiceResourceProperties'} - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.creation_time = None - self.instance_size = kwargs.get('instance_size', None) - self.instance_count = kwargs.get('instance_count', None) - self.service_type = 'ServiceResourceProperties' # type: str - self.status = None - - -class DataTransferServiceResourceProperties(ServiceResourceProperties): - """Properties for DataTransferServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[DataTransferRegionalServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferServiceResourceProperties, self).__init__(**kwargs) - self.service_type = 'DataTransfer' # type: str - self.locations = None - - -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - database_account_offer_type = "Standard" - - def __init__( - self, - **kwargs - ): - super(DefaultRequestDatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.create_mode = 'Default' # type: str - - -class DiagnosticLogSettings(msrest.serialization.Model): - """Indicates what diagnostic log settings are to be enabled. - - :param enable_full_text_query: Describe the level of detail with which queries are to be - logged. Possible values include: "None", "True", "False". - :type enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery - """ - - _attribute_map = { - 'enable_full_text_query': {'key': 'enableFullTextQuery', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DiagnosticLogSettings, self).__init__(**kwargs) - self.enable_full_text_query = kwargs.get('enable_full_text_query', None) - - -class ErrorResponse(msrest.serialization.Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ExcludedPath(msrest.serialization.Model): - """ExcludedPath. - - :param path: The path for which the indexing behavior applies to. Index paths typically start - with root and end with wildcard (/path/*). - :type path: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExcludedPath, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - - -class FailoverPolicies(msrest.serialization.Model): - """The list of new failover policies for the failover priority change. - - All required parameters must be populated in order to send to Azure. - - :param failover_policies: Required. List of failover policies. - :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - """ - - _validation = { - 'failover_policies': {'required': True}, - } - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__( - self, - **kwargs - ): - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = kwargs['failover_policies'] - - -class FailoverPolicy(msrest.serialization.Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique identifier of the region in which the database account replicates to. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover priority of 0 - indicates a write region. The maximum value for a failover priority = (total number of regions - - 1). Failover priority values must be unique for each of the regions in which the database - account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(FailoverPolicy, self).__init__(**kwargs) - self.id = None - self.location_name = kwargs.get('location_name', None) - self.failover_priority = kwargs.get('failover_priority', None) - - -class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute. - :vartype graph_api_compute_endpoint: str - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'graph_api_compute_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) - self.graph_api_compute_endpoint = None - - -class GraphAPIComputeServiceResource(msrest.serialization.Model): - """Describes the service response property for GraphAPICompute. - - :param properties: Properties for GraphAPIComputeServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): - """Properties for GraphAPIComputeServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :param graph_api_compute_endpoint: GraphAPICompute endpoint for the service. - :type graph_api_compute_endpoint: str - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[GraphAPIComputeRegionalServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(GraphAPIComputeServiceResourceProperties, self).__init__(**kwargs) - self.service_type = 'GraphAPICompute' # type: str - self.graph_api_compute_endpoint = kwargs.get('graph_api_compute_endpoint', None) - self.locations = None - - -class GraphResource(msrest.serialization.Model): - """Cosmos DB Graph resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Graph. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GraphResource, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class GraphResourceCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Graph resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Graph resource. - :type resource: ~azure.mgmt.cosmosdb.models.GraphResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions + their network interfaces connected to. The subnet must be in the same region specified in + 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's + 'delegatedManagementSubnetId' property. This resource id will be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_subnet_id: str + :param node_count: The number of nodes the data center should have. This is the desired number. + After it is set, it may take some time for the data center to be scaled to match. To monitor + the number of nodes and their status, use the fetchNodeStatus method on the cluster. + :type node_count: int + :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. + Generally you will want to use the seedNodes property on the cluster, which aggregates the seed + nodes from all data centers in the cluster. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration + file to be included in the cassandra.yaml for all nodes in this data center. The fragment + should be Base64 encoded, and only a subset of keys are allowed. + :type base64_encoded_cassandra_yaml_fragment: str + :param managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure + the system assigned identity of the cluster has been assigned appropriate permissions(key + get/wrap/unwrap permissions) on the key. + :type managed_disk_customer_key_uri: str + :param backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for + encryption of the backup storage account. + :type backup_storage_customer_key_uri: str + :param sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. + :type sku: str + :param disk_sku: Disk SKU used for data centers. Default value is P30. + :type disk_sku: str + :param disk_capacity: Number of disk used for data centers. Default value is 4. + :type disk_capacity: int + :param availability_zone: If the azure data center has Availability Zone support, apply it to + the Virtual Machine ScaleSet that host the cassandra data center virtual machines. + :type availability_zone: bool """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + 'seed_nodes': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, + 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'managed_disk_customer_key_uri': {'key': 'managedDiskCustomerKeyUri', 'type': 'str'}, + 'backup_storage_customer_key_uri': {'key': 'backupStorageCustomerKeyUri', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'disk_sku': {'key': 'diskSku', 'type': 'str'}, + 'disk_capacity': {'key': 'diskCapacity', 'type': 'int'}, + 'availability_zone': {'key': 'availabilityZone', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(GraphResourceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs['resource'] - self.options = kwargs.get('options', None) + super(DataCenterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.data_center_location = kwargs.get('data_center_location', None) + self.delegated_subnet_id = kwargs.get('delegated_subnet_id', None) + self.node_count = kwargs.get('node_count', None) + self.seed_nodes = None + self.base64_encoded_cassandra_yaml_fragment = kwargs.get('base64_encoded_cassandra_yaml_fragment', None) + self.managed_disk_customer_key_uri = kwargs.get('managed_disk_customer_key_uri', None) + self.backup_storage_customer_key_uri = kwargs.get('backup_storage_customer_key_uri', None) + self.sku = kwargs.get('sku', None) + self.disk_sku = kwargs.get('disk_sku', None) + self.disk_capacity = kwargs.get('disk_capacity', None) + self.availability_zone = kwargs.get('availability_zone', None) -class GraphResourceGetPropertiesOptions(OptionsResource): - """GraphResourceGetPropertiesOptions. +class ErrorResponse(msrest.serialization.Model): + """Error Response. - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__( self, **kwargs ): - super(GraphResourceGetPropertiesOptions, self).__init__(**kwargs) - - -class GraphResourceGetPropertiesResource(GraphResource, ExtendedResourceProperties): - """GraphResourceGetPropertiesResource. + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. +class ExcludedPath(msrest.serialization.Model): + """ExcludedPath. - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str - :param id: Required. Name of the Cosmos DB Graph. - :type id: str + :param path: The path for which the indexing behavior applies to. Index paths typically start + with root and end with wildcard (/path/*). + :type path: str """ - _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'required': True}, - } - _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, } def __init__( self, **kwargs ): - super(GraphResourceGetPropertiesResource, self).__init__(**kwargs) - self.rid = None - self.ts = None - self.etag = None - self.id = kwargs['id'] + super(ExcludedPath, self).__init__(**kwargs) + self.path = kwargs.get('path', None) -class GraphResourceGetResults(ARMResourceProperties): - """An Azure Cosmos DB Graph resource. +class FailoverPolicies(msrest.serialization.Model): + """The list of new failover policies for the failover priority change. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions + :param failover_policies: Required. List of failover policies. + :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'failover_policies': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResourceGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'GraphResourceGetPropertiesOptions'}, + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, } def __init__( self, **kwargs ): - super(GraphResourceGetResults, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(FailoverPolicies, self).__init__(**kwargs) + self.failover_policies = kwargs['failover_policies'] -class GraphResourcesListResult(msrest.serialization.Model): - """The List operation response, that contains the Graph resource and their properties. +class FailoverPolicy(msrest.serialization.Model): + """The failover policy for a given region of a database account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of Graph resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :ivar id: The unique identifier of the region in which the database account replicates to. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover priority of 0 + indicates a write region. The maximum value for a failover priority = (total number of regions + - 1). Failover priority values must be unique for each of the regions in which the database + account exists. + :type failover_priority: int """ _validation = { - 'value': {'readonly': True}, + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GraphResourceGetResults]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, } def __init__( self, **kwargs ): - super(GraphResourcesListResult, self).__init__(**kwargs) - self.value = None + super(FailoverPolicy, self).__init__(**kwargs) + self.id = None + self.location_name = kwargs.get('location_name', None) + self.failover_priority = kwargs.get('failover_priority', None) class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): @@ -3630,8 +2753,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin database. :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -3652,7 +2773,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -3776,8 +2896,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource :param options: @@ -3796,7 +2914,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } @@ -3857,8 +2974,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin graph. :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -3879,7 +2994,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -4049,8 +3163,6 @@ class GremlinGraphGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource :param options: @@ -4069,7 +3181,6 @@ class GremlinGraphGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } @@ -4225,31 +3336,6 @@ def __init__( self.ip_address_or_range = kwargs.get('ip_address_or_range', None) -class ListBackups(msrest.serialization.Model): - """List of restorable backups for a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of backups. - :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListBackups, self).__init__(**kwargs) - self.value = None - - class ListClusters(msrest.serialization.Model): """List of managed Cassandra clusters. @@ -4415,46 +3501,102 @@ def __init__( self.value = None -class LocationProperties(msrest.serialization.Model): - """Cosmos DB location metadata. +class LocationProperties(msrest.serialization.Model): + """Cosmos DB location metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar supports_availability_zone: Flag indicating whether the location supports availability + zones or not. + :vartype supports_availability_zone: bool + :ivar is_residency_restricted: Flag indicating whether the location is residency sensitive. + :vartype is_residency_restricted: bool + :ivar backup_storage_redundancies: The properties of available backup storage redundancies. + :vartype backup_storage_redundancies: list[str or + ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy] + """ + + _validation = { + 'supports_availability_zone': {'readonly': True}, + 'is_residency_restricted': {'readonly': True}, + 'backup_storage_redundancies': {'readonly': True}, + } + + _attribute_map = { + 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, + 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, + 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationProperties, self).__init__(**kwargs) + self.supports_availability_zone = None + self.is_residency_restricted = None + self.backup_storage_redundancies = None + + +class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object id of the identity resource. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource. + :vartype tenant_id: str + :param type: The type of the resource. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCassandraManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + - Variables are only populated by the server, and will be ignored when sending a request. +class ManagedCassandraReaperStatus(msrest.serialization.Model): + """ManagedCassandraReaperStatus. - :ivar status: The current status of location in Azure. - :vartype status: str - :ivar supports_availability_zone: Flag indicating whether the location supports availability - zones or not. - :vartype supports_availability_zone: bool - :ivar is_residency_restricted: Flag indicating whether the location is residency sensitive. - :vartype is_residency_restricted: bool - :ivar backup_storage_redundancies: The properties of available backup storage redundancies. - :vartype backup_storage_redundancies: list[str or - ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy] + :param healthy: + :type healthy: bool + :param repair_run_ids: Dictionary of :code:``. + :type repair_run_ids: dict[str, str] + :param repair_schedules: Dictionary of :code:``. + :type repair_schedules: dict[str, str] """ - _validation = { - 'status': {'readonly': True}, - 'supports_availability_zone': {'readonly': True}, - 'is_residency_restricted': {'readonly': True}, - 'backup_storage_redundancies': {'readonly': True}, - } - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, - 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, - 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'repair_run_ids': {'key': 'repairRunIds', 'type': '{str}'}, + 'repair_schedules': {'key': 'repairSchedules', 'type': '{str}'}, } def __init__( self, **kwargs ): - super(LocationProperties, self).__init__(**kwargs) - self.status = None - self.supports_availability_zone = None - self.is_residency_restricted = None - self.backup_storage_redundancies = None + super(ManagedCassandraReaperStatus, self).__init__(**kwargs) + self.healthy = kwargs.get('healthy', None) + self.repair_run_ids = kwargs.get('repair_run_ids', None) + self.repair_schedules = kwargs.get('repair_schedules', None) class ManagedServiceIdentity(msrest.serialization.Model): @@ -4783,8 +3925,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB collection. :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -4805,7 +3945,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -4953,8 +4092,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :param options: @@ -4973,7 +4110,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } @@ -5034,8 +4170,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB database. :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -5056,7 +4190,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5180,8 +4313,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :param options: @@ -5200,7 +4331,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } @@ -6243,36 +5373,6 @@ def __init__( self.region = kwargs['region'] -class RepairPostBody(msrest.serialization.Model): - """Specification of the keyspaces and tables to run repair on. - - All required parameters must be populated in order to send to Azure. - - :param keyspace: Required. The name of the keyspace that repair should be run on. - :type keyspace: str - :param tables: List of tables in the keyspace to repair. If omitted, repair all tables in the - keyspace. - :type tables: list[str] - """ - - _validation = { - 'keyspace': {'required': True}, - } - - _attribute_map = { - 'keyspace': {'key': 'keyspace', 'type': 'str'}, - 'tables': {'key': 'tables', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(RepairPostBody, self).__init__(**kwargs) - self.keyspace = kwargs['keyspace'] - self.tables = kwargs.get('tables', None) - - class RestorableDatabaseAccountGetResult(msrest.serialization.Model): """A Azure Cosmos DB restorable database account. @@ -7007,15 +6107,13 @@ def __init__( self.id = kwargs['id'] -class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties, SqlDatabaseResource): +class RestorableSqlDatabasePropertiesResourceDatabase(SqlDatabaseResource, ExtendedResourceProperties): """Cosmos DB SQL database resource object. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database. - :type id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -7023,6 +6121,8 @@ class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :param id: Required. Name of the Cosmos DB SQL database. + :type id: str :ivar colls: A system generated property that specified the addressable path of the collections resource. :vartype colls: str @@ -7035,20 +6135,20 @@ class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties """ _validation = { - 'id': {'required': True}, 'rid': {'readonly': True}, 'ts': {'readonly': True}, 'etag': {'readonly': True}, + 'id': {'required': True}, 'colls': {'readonly': True}, 'users': {'readonly': True}, 'self_property': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, 'etag': {'key': '_etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'colls': {'key': '_colls', 'type': 'str'}, 'users': {'key': '_users', 'type': 'str'}, 'self_property': {'key': '_self', 'type': 'str'}, @@ -7059,16 +6159,16 @@ def __init__( **kwargs ): super(RestorableSqlDatabasePropertiesResourceDatabase, self).__init__(**kwargs) - self.id = kwargs['id'] - self.colls = None - self.users = None - self.self_property = None self.rid = None self.ts = None self.etag = None self.colls = None self.users = None self.self_property = None + self.id = kwargs['id'] + self.colls = None + self.users = None + self.self_property = None class RestorableSqlDatabasesListResult(msrest.serialization.Model): @@ -7174,100 +6274,6 @@ def __init__( self.ip_address = kwargs.get('ip_address', None) -class ServiceResource(ARMProxyResource): - """Properties for the database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Services response resource. - :type properties: ~azure.mgmt.cosmosdb.models.ServiceResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ServiceResourceCreateUpdateParameters(msrest.serialization.Model): - """Parameters for Create or Update Request for ServiceResource. - - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - """ - - _validation = { - 'instance_count': {'minimum': 0}, - } - - _attribute_map = { - 'instance_size': {'key': 'properties.instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'properties.instanceCount', 'type': 'int'}, - 'service_type': {'key': 'properties.serviceType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceCreateUpdateParameters, self).__init__(**kwargs) - self.instance_size = kwargs.get('instance_size', None) - self.instance_count = kwargs.get('instance_count', None) - self.service_type = kwargs.get('service_type', None) - - -class ServiceResourceListResult(msrest.serialization.Model): - """The List operation response, that contains the Service Resource and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Service Resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.ServiceResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceListResult, self).__init__(**kwargs) - self.value = None - - class SpatialSpec(msrest.serialization.Model): """SpatialSpec. @@ -7314,8 +6320,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a container. :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -7336,7 +6340,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -7462,8 +6465,6 @@ class SqlContainerGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource :param options: @@ -7482,7 +6483,6 @@ class SqlContainerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } @@ -7543,8 +6543,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a SQL database. :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -7565,7 +6563,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -7601,15 +6598,13 @@ def __init__( super(SqlDatabaseGetPropertiesOptions, self).__init__(**kwargs) -class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseResource): +class SqlDatabaseGetPropertiesResource(SqlDatabaseResource, ExtendedResourceProperties): """SqlDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database. - :type id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -7617,6 +6612,8 @@ class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseRe :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :param id: Required. Name of the Cosmos DB SQL database. + :type id: str :param colls: A system generated property that specified the addressable path of the collections resource. :type colls: str @@ -7626,17 +6623,17 @@ class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseRe """ _validation = { - 'id': {'required': True}, 'rid': {'readonly': True}, 'ts': {'readonly': True}, 'etag': {'readonly': True}, + 'id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, 'etag': {'key': '_etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'colls': {'key': '_colls', 'type': 'str'}, 'users': {'key': '_users', 'type': 'str'}, } @@ -7646,14 +6643,14 @@ def __init__( **kwargs ): super(SqlDatabaseGetPropertiesResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.colls = kwargs.get('colls', None) - self.users = kwargs.get('users', None) self.rid = None self.ts = None self.etag = None self.colls = kwargs.get('colls', None) self.users = kwargs.get('users', None) + self.id = kwargs['id'] + self.colls = kwargs.get('colls', None) + self.users = kwargs.get('users', None) class SqlDatabaseGetResults(ARMResourceProperties): @@ -7676,8 +6673,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource :param options: @@ -7696,7 +6691,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } @@ -7735,122 +6729,6 @@ def __init__( self.value = None -class SqlDedicatedGatewayRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar sql_dedicated_gateway_endpoint: The regional endpoint for SqlDedicatedGateway. - :vartype sql_dedicated_gateway_endpoint: str - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'sql_dedicated_gateway_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SqlDedicatedGatewayRegionalServiceResource, self).__init__(**kwargs) - self.sql_dedicated_gateway_endpoint = None - - -class SqlDedicatedGatewayServiceResource(msrest.serialization.Model): - """Describes the service response property for SqlDedicatedGateway. - - :param properties: Properties for SqlDedicatedGatewayServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.SqlDedicatedGatewayServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SqlDedicatedGatewayServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(SqlDedicatedGatewayServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class SqlDedicatedGatewayServiceResourceProperties(ServiceResourceProperties): - """Properties for SqlDedicatedGatewayServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :param sql_dedicated_gateway_endpoint: SqlDedicatedGateway endpoint for the service. - :type sql_dedicated_gateway_endpoint: str - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: - list[~azure.mgmt.cosmosdb.models.SqlDedicatedGatewayRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[SqlDedicatedGatewayRegionalServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(SqlDedicatedGatewayServiceResourceProperties, self).__init__(**kwargs) - self.service_type = 'SqlDedicatedGateway' # type: str - self.sql_dedicated_gateway_endpoint = kwargs.get('sql_dedicated_gateway_endpoint', None) - self.locations = None - - class SqlRoleAssignmentCreateUpdateParameters(msrest.serialization.Model): """Parameters to create and update an Azure Cosmos DB SQL Role Assignment. @@ -8091,8 +6969,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a storedProcedure. :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8113,7 +6989,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8223,8 +7098,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource """ @@ -8241,7 +7114,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } @@ -8300,8 +7172,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a trigger. :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8322,7 +7192,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8450,8 +7319,6 @@ class SqlTriggerGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource """ @@ -8468,7 +7335,6 @@ class SqlTriggerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, } @@ -8527,8 +7393,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a userDefinedFunction. :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8549,7 +7413,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8659,8 +7522,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource """ @@ -8677,7 +7538,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } @@ -8777,8 +7637,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Table. :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8799,7 +7657,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8923,8 +7780,6 @@ class TableGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource :param options: @@ -8943,7 +7798,6 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } @@ -9122,8 +7976,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource """ @@ -9140,7 +7992,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } @@ -9174,8 +8025,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a resource throughput. :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ @@ -9193,7 +8042,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } 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 393472f2bc03..05f6ce9d66e4 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 @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Any, Dict, List, Optional, Union +from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -114,8 +114,6 @@ class ARMResourceProperties(msrest.serialization.Model): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _validation = { @@ -130,7 +128,6 @@ class ARMResourceProperties(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } def __init__( @@ -138,7 +135,6 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, **kwargs ): super(ARMResourceProperties, self).__init__(**kwargs) @@ -147,7 +143,6 @@ def __init__( self.type = None self.location = location self.tags = tags - self.identity = identity class AutoscaleSettings(msrest.serialization.Model): @@ -331,85 +326,124 @@ def __init__( self.start_time = start_time -class BackupResource(ARMProxyResource): - """A restorable backup of a Cassandra cluster. +class Capability(msrest.serialization.Model): + """Cosmos DB capability object. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current + values also include "EnableTable" and "EnableGremlin". + :type name: str + """ - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: - :type properties: ~azure.mgmt.cosmosdb.models.BackupResourceProperties + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.name = name + + +class Capacity(msrest.serialization.Model): + """The object that represents all properties related to capacity enforcement on an account. + + :param total_throughput_limit: The total throughput limit imposed on the account. A + totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned + on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of + throughput. + :type total_throughput_limit: int """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'total_throughput_limit': {'minimum': -1}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceProperties'}, + 'total_throughput_limit': {'key': 'totalThroughputLimit', 'type': 'int'}, } def __init__( self, *, - properties: Optional["BackupResourceProperties"] = None, + total_throughput_limit: Optional[int] = None, **kwargs ): - super(BackupResource, self).__init__(**kwargs) - self.properties = properties + super(Capacity, self).__init__(**kwargs) + self.total_throughput_limit = total_throughput_limit -class BackupResourceProperties(msrest.serialization.Model): - """BackupResourceProperties. +class CassandraClusterPublicStatus(msrest.serialization.Model): + """Properties of a managed Cassandra cluster public status. - :param timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. - :type timestamp: ~datetime.datetime + :param e_tag: + :type e_tag: str + :param reaper_status: + :type reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus + :param connection_errors: List relevant information about any connection errors to the + Datacenters. + :type connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError] + :param data_centers: List of the status of each datacenter in this cluster. + :type data_centers: + list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem] """ _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'reaper_status': {'key': 'reaperStatus', 'type': 'ManagedCassandraReaperStatus'}, + 'connection_errors': {'key': 'connectionErrors', 'type': '[ConnectionError]'}, + 'data_centers': {'key': 'dataCenters', 'type': '[CassandraClusterPublicStatusDataCentersItem]'}, } def __init__( self, *, - timestamp: Optional[datetime.datetime] = None, + e_tag: Optional[str] = None, + reaper_status: Optional["ManagedCassandraReaperStatus"] = None, + connection_errors: Optional[List["ConnectionError"]] = None, + data_centers: Optional[List["CassandraClusterPublicStatusDataCentersItem"]] = None, **kwargs ): - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = timestamp + super(CassandraClusterPublicStatus, self).__init__(**kwargs) + self.e_tag = e_tag + self.reaper_status = reaper_status + self.connection_errors = connection_errors + self.data_centers = data_centers -class Capability(msrest.serialization.Model): - """Cosmos DB capability object. +class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): + """CassandraClusterPublicStatusDataCentersItem. - :param name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current - values also include "EnableTable" and "EnableGremlin". + :param name: The name of this Datacenter. :type name: str + :param seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. + :type seed_nodes: list[str] + :param nodes: + :type nodes: + list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[str]'}, + 'nodes': {'key': 'nodes', 'type': '[ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems]'}, } def __init__( self, *, name: Optional[str] = None, + seed_nodes: Optional[List[str]] = None, + nodes: Optional[List["ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems"]] = None, **kwargs ): - super(Capability, self).__init__(**kwargs) + super(CassandraClusterPublicStatusDataCentersItem, self).__init__(**kwargs) self.name = name + self.seed_nodes = seed_nodes + self.nodes = nodes class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): @@ -434,8 +468,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra keyspace. :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -456,7 +488,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -467,11 +498,10 @@ def __init__( resource: "CassandraKeyspaceResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -656,8 +686,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource :param options: @@ -676,7 +704,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } @@ -686,12 +713,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["CassandraKeyspaceGetPropertiesResource"] = None, options: Optional["CassandraKeyspaceGetPropertiesOptions"] = None, **kwargs ): - super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -795,8 +821,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra table. :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -817,7 +841,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -828,11 +851,10 @@ def __init__( resource: "CassandraTableResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -984,8 +1006,6 @@ class CassandraTableGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource :param options: @@ -1004,7 +1024,6 @@ class CassandraTableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } @@ -1014,12 +1033,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["CassandraTableGetPropertiesResource"] = None, options: Optional["CassandraTableGetPropertiesOptions"] = None, **kwargs ): - super(CassandraTableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -1049,181 +1067,112 @@ def __init__( self.value = None -class CassandraViewCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Cassandra view. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Cassandra view. - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, - } - - def __init__( - self, - *, - resource: "CassandraViewResource", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, - **kwargs - ): - super(CassandraViewCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options - - -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. +class Certificate(msrest.serialization.Model): + """Certificate. - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + :param pem: PEM formatted public key. + :type pem: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'pem': {'key': 'pem', 'type': 'str'}, } def __init__( self, *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + pem: Optional[str] = None, **kwargs ): - super(CassandraViewGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) - + super(Certificate, self).__init__(**kwargs) + self.pem = pem -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. - All required parameters must be populated in order to send to Azure. +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str + :param name: Name of the Cosmos DB Cassandra table cluster key. + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and + "Desc". + :type order_by: str """ - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, } def __init__( self, *, - id: str, - view_definition: str, + name: Optional[str] = None, + order_by: Optional[str] = None, **kwargs ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = id - self.view_definition = view_definition + super(ClusterKey, self).__init__(**kwargs) + self.name = name + self.order_by = order_by -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. +class ManagedCassandraARMResourceProperties(msrest.serialization.Model): + """The core properties of ARM resources. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, } def __init__( self, *, - id: str, - view_definition: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, **kwargs ): - super(CassandraViewGetPropertiesResource, self).__init__(id=id, view_definition=view_definition, **kwargs) - self.id = id - self.view_definition = view_definition - self.rid = None - self.ts = None - self.etag = None + super(ManagedCassandraARMResourceProperties, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.identity = identity -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. +class ClusterResource(ManagedCassandraARMResourceProperties): + """Representation of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1243,11 +1192,9 @@ class CassandraViewGetResults(ARMResourceProperties): also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ _validation = { @@ -1262,9 +1209,8 @@ class CassandraViewGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, } def __init__( @@ -1272,236 +1218,16 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraViewGetPropertiesResource"] = None, - options: Optional["CassandraViewGetPropertiesOptions"] = None, + identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, + properties: Optional["ClusterResourceProperties"] = None, **kwargs ): - super(CassandraViewGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + self.properties = properties -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None - - -class Certificate(msrest.serialization.Model): - """Certificate. - - :param pem: PEM formatted public key. - :type pem: str - """ - - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, - } - - def __init__( - self, - *, - pem: Optional[str] = None, - **kwargs - ): - super(Certificate, self).__init__(**kwargs) - self.pem = pem - - -class ClusterKey(msrest.serialization.Model): - """Cosmos DB Cassandra table cluster key. - - :param name: Name of the Cosmos DB Cassandra table cluster key. - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and - "Desc". - :type order_by: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - order_by: Optional[str] = None, - **kwargs - ): - super(ClusterKey, self).__init__(**kwargs) - self.name = name - self.order_by = order_by - - -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). - - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] - """ - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, - } - - def __init__( - self, - *, - nodes: Optional[List["ClusterNodeStatusNodesItem"]] = None, - **kwargs - ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = nodes - - -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. - - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible values include: "Up", - "Down". - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible values include: - "Normal", "Leaving", "Joining", "Moving", "Stopped". - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. - :type address: str - :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding - all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. - :type load: str - :param tokens: List of tokens. - :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter times the replication - factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of - the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float - :param host_id: The network ID of the node. - :type host_id: str - :param rack: The rack this node is part of. - :type rack: str - """ - - _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - } - - def __init__( - self, - *, - datacenter: Optional[str] = None, - status: Optional[Union[str, "NodeStatus"]] = None, - state: Optional[Union[str, "NodeState"]] = None, - address: Optional[str] = None, - load: Optional[str] = None, - tokens: Optional[List[str]] = None, - owns: Optional[float] = None, - host_id: Optional[str] = None, - rack: Optional[str] = None, - **kwargs - ): - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = datacenter - self.status = status - self.state = state - self.address = address - self.load = load - self.tokens = tokens - self.owns = owns - self.host_id = host_id - self.rack = rack - - -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - properties: Optional["ClusterResourceProperties"] = None, - **kwargs - ): - super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.properties = properties - - -class ClusterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra cluster. +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1533,9 +1259,6 @@ class ClusterResourceProperties(msrest.serialization.Model): the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. - To disable backups, set this property to 0. - :type hours_between_backups: int :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode @@ -1563,6 +1286,13 @@ class ClusterResourceProperties(msrest.serialization.Model): :ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes. :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param deallocated: Whether the cluster and associated data centers has been deallocated. + :type deallocated: bool + :param cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled. + :type cassandra_audit_logging_enabled: bool """ _validation = { @@ -1578,7 +1308,6 @@ class ClusterResourceProperties(msrest.serialization.Model): 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, @@ -1586,6 +1315,9 @@ class ClusterResourceProperties(msrest.serialization.Model): 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, + 'deallocated': {'key': 'deallocated', 'type': 'bool'}, + 'cassandra_audit_logging_enabled': {'key': 'cassandraAuditLoggingEnabled', 'type': 'bool'}, } def __init__( @@ -1598,12 +1330,14 @@ def __init__( cluster_name_override: Optional[str] = None, authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, initial_cassandra_admin_password: Optional[str] = None, - hours_between_backups: Optional[int] = None, prometheus_endpoint: Optional["SeedNode"] = None, repair_enabled: Optional[bool] = None, client_certificates: Optional[List["Certificate"]] = None, external_gossip_certificates: Optional[List["Certificate"]] = None, external_seed_nodes: Optional[List["SeedNode"]] = None, + hours_between_backups: Optional[int] = None, + deallocated: Optional[bool] = None, + cassandra_audit_logging_enabled: Optional[bool] = None, **kwargs ): super(ClusterResourceProperties, self).__init__(**kwargs) @@ -1614,7 +1348,6 @@ def __init__( self.cluster_name_override = cluster_name_override self.authentication_method = authentication_method self.initial_cassandra_admin_password = initial_cassandra_admin_password - self.hours_between_backups = hours_between_backups self.prometheus_endpoint = prometheus_endpoint self.repair_enabled = repair_enabled self.client_certificates = client_certificates @@ -1622,6 +1355,9 @@ def __init__( self.gossip_certificates = None self.external_seed_nodes = external_seed_nodes self.seed_nodes = None + self.hours_between_backups = hours_between_backups + self.deallocated = deallocated + self.cassandra_audit_logging_enabled = cassandra_audit_logging_enabled class Column(msrest.serialization.Model): @@ -1650,6 +1386,77 @@ def __init__( self.type = type +class CommandOutput(msrest.serialization.Model): + """Response of /command api. + + :param command_output: Output of the command. + :type command_output: str + """ + + _attribute_map = { + 'command_output': {'key': 'commandOutput', 'type': 'str'}, + } + + def __init__( + self, + *, + command_output: Optional[str] = None, + **kwargs + ): + super(CommandOutput, self).__init__(**kwargs) + self.command_output = command_output + + +class CommandPostBody(msrest.serialization.Model): + """Specification of which command to run where. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command which should be run. + :type command: str + :param arguments: The arguments for the command to be run. + :type arguments: dict[str, str] + :param host: Required. IP address of the cassandra host to run the command on. + :type host: str + :param cassandra_stop_start: If true, stops cassandra before executing the command and then + start it again. + :type cassandra_stop_start: bool + :param readwrite: If true, allows the command to *write* to the cassandra directory, otherwise + read-only. + :type readwrite: bool + """ + + _validation = { + 'command': {'required': True}, + 'host': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '{str}'}, + 'host': {'key': 'host', 'type': 'str'}, + 'cassandra_stop_start': {'key': 'cassandra-stop-start', 'type': 'bool'}, + 'readwrite': {'key': 'readwrite', 'type': 'bool'}, + } + + def __init__( + self, + *, + command: str, + host: str, + arguments: Optional[Dict[str, str]] = None, + cassandra_stop_start: Optional[bool] = None, + readwrite: Optional[bool] = None, + **kwargs + ): + super(CommandPostBody, self).__init__(**kwargs) + self.command = command + self.arguments = arguments + self.host = host + self.cassandra_stop_start = cassandra_stop_start + self.readwrite = readwrite + + class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. @@ -1680,6 +1487,107 @@ def __init__( self.client_id = None +class ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems(msrest.serialization.Model): + """ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. + + :param address: The node's IP address. + :type address: str + :param state: The state of the node in Cassandra ring. Possible values include: "Normal", + "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param status: + :type status: str + :param load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. + :type load: str + :param tokens: List of tokens this node covers. + :type tokens: list[str] + :param size: + :type size: int + :param host_id: The network ID of the node. + :type host_id: str + :param rack: The rack this node is part of. + :type rack: str + :param timestamp: The timestamp when these statistics were captured. + :type timestamp: str + :param disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :type disk_used_kb: long + :param disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :type disk_free_kb: long + :param memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :type memory_used_kb: long + :param memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :type memory_buffers_and_cached_kb: long + :param memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :type memory_free_kb: long + :param memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in + kB. + :type memory_total_kb: long + :param cpu_usage: A float representing the current system-wide CPU utilization as a percentage. + :type cpu_usage: float + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'load': {'key': 'load', 'type': 'str'}, + 'tokens': {'key': 'tokens', 'type': '[str]'}, + 'size': {'key': 'size', 'type': 'int'}, + 'host_id': {'key': 'hostID', 'type': 'str'}, + 'rack': {'key': 'rack', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'disk_used_kb': {'key': 'diskUsedKB', 'type': 'long'}, + 'disk_free_kb': {'key': 'diskFreeKB', 'type': 'long'}, + 'memory_used_kb': {'key': 'memoryUsedKB', 'type': 'long'}, + 'memory_buffers_and_cached_kb': {'key': 'memoryBuffersAndCachedKB', 'type': 'long'}, + 'memory_free_kb': {'key': 'memoryFreeKB', 'type': 'long'}, + 'memory_total_kb': {'key': 'memoryTotalKB', 'type': 'long'}, + 'cpu_usage': {'key': 'cpuUsage', 'type': 'float'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + state: Optional[Union[str, "NodeState"]] = None, + status: Optional[str] = None, + load: Optional[str] = None, + tokens: Optional[List[str]] = None, + size: Optional[int] = None, + host_id: Optional[str] = None, + rack: Optional[str] = None, + timestamp: Optional[str] = None, + disk_used_kb: Optional[int] = None, + disk_free_kb: Optional[int] = None, + memory_used_kb: Optional[int] = None, + memory_buffers_and_cached_kb: Optional[int] = None, + memory_free_kb: Optional[int] = None, + memory_total_kb: Optional[int] = None, + cpu_usage: Optional[float] = None, + **kwargs + ): + super(ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems, self).__init__(**kwargs) + self.address = address + self.state = state + self.status = status + self.load = load + self.tokens = tokens + self.size = size + self.host_id = host_id + self.rack = rack + self.timestamp = timestamp + self.disk_used_kb = disk_used_kb + self.disk_free_kb = disk_free_kb + self.memory_used_kb = memory_used_kb + self.memory_buffers_and_cached_kb = memory_buffers_and_cached_kb + self.memory_free_kb = memory_free_kb + self.memory_total_kb = memory_total_kb + self.cpu_usage = cpu_usage + + class CompositePath(msrest.serialization.Model): """CompositePath. @@ -1742,6 +1650,49 @@ def __init__( self.conflict_resolution_procedure = conflict_resolution_procedure +class ConnectionError(msrest.serialization.Model): + """ConnectionError. + + :param connection_state: The kind of connection error that occurred. Possible values include: + "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", + "InternalOperatorToDataCenterCertificateError", "InternalError". + :type connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState + :param i_p_from: The IP of host that originated the failed connection. + :type i_p_from: str + :param i_p_to: The IP that the connection attempted to reach. + :type i_p_to: str + :param port: The TCP port the connection was attempted on. + :type port: int + :param exception: Detailed error message about the failed connection. + :type exception: str + """ + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'i_p_from': {'key': 'iPFrom', 'type': 'str'}, + 'i_p_to': {'key': 'iPTo', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'exception': {'key': 'exception', 'type': 'str'}, + } + + def __init__( + self, + *, + connection_state: Optional[Union[str, "ConnectionState"]] = None, + i_p_from: Optional[str] = None, + i_p_to: Optional[str] = None, + port: Optional[int] = None, + exception: Optional[str] = None, + **kwargs + ): + super(ConnectionError, self).__init__(**kwargs) + self.connection_state = connection_state + self.i_p_from = i_p_from + self.i_p_to = i_p_to + self.port = port + self.exception = exception + + class ConsistencyPolicy(msrest.serialization.Model): """The consistency policy for the Cosmos DB database account. @@ -2036,11 +1987,11 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param locations: Required. An array that contains the georeplication locations enabled for the @@ -2092,8 +2043,8 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". + :param create_mode: Enum to indicate the mode of account creation. Possible values include: + "Default", "Restore". Default value: "Default". :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy @@ -2105,14 +2056,14 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool :param restore_parameters: Parameters to indicate the information about the restore. :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { @@ -2121,7 +2072,6 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'type': {'readonly': True}, 'locations': {'required': True}, 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, } _attribute_map = { @@ -2130,8 +2080,8 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'locations': {'key': 'properties.locations', 'type': '[Location]'}, 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, @@ -2156,9 +2106,9 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } database_account_offer_type = "Standard" @@ -2169,8 +2119,8 @@ def __init__( locations: List["Location"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, kind: Optional[Union[str, "DatabaseAccountKind"]] = None, + identity: Optional["ManagedServiceIdentity"] = None, consistency_policy: Optional["ConsistencyPolicy"] = None, ip_rules: Optional[List["IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, @@ -2188,17 +2138,19 @@ def __init__( api_properties: Optional["ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + create_mode: Optional[Union[str, "CreateMode"]] = "Default", backup_policy: Optional["BackupPolicy"] = None, cors: Optional[List["CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, restore_parameters: Optional["RestoreParameters"] = None, + capacity: Optional["Capacity"] = None, **kwargs ): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind + self.identity = identity self.consistency_policy = consistency_policy self.locations = locations self.ip_rules = ip_rules @@ -2217,199 +2169,14 @@ def __init__( self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration - self.create_mode = None # type: Optional[str] - self.backup_policy = backup_policy - self.cors = cors - self.network_acl_bypass = network_acl_bypass - self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings - self.disable_local_auth = disable_local_auth - self.restore_parameters = restore_parameters - - -class DatabaseAccountCreateUpdateProperties(msrest.serialization.Model): - """Properties to create and update Azure Cosmos DB database accounts. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties'} - } - - database_account_offer_type = "Standard" - - def __init__( - self, - *, - locations: List["Location"], - consistency_policy: Optional["ConsistencyPolicy"] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, - is_virtual_network_filter_enabled: Optional[bool] = None, - enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, - enable_multiple_write_locations: Optional[bool] = None, - enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, - disable_key_based_metadata_write_access: Optional[bool] = None, - key_vault_key_uri: Optional[str] = None, - default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, - enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, - enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, - network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, - disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, - **kwargs - ): - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_rules = ip_rules - self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled - self.enable_automatic_failover = enable_automatic_failover - self.capabilities = capabilities - self.virtual_network_rules = virtual_network_rules - self.enable_multiple_write_locations = enable_multiple_write_locations - self.enable_cassandra_connector = enable_cassandra_connector - self.connector_offer = connector_offer - self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access - self.key_vault_key_uri = key_vault_key_uri - self.default_identity = default_identity - self.public_network_access = public_network_access - self.enable_free_tier = enable_free_tier - self.api_properties = api_properties - self.enable_analytical_storage = enable_analytical_storage - self.analytical_storage_configuration = analytical_storage_configuration - self.create_mode = None # type: Optional[str] + self.create_mode = create_mode self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth self.restore_parameters = restore_parameters + self.capacity = capacity class DatabaseAccountGetResults(ARMResourceProperties): @@ -2432,11 +2199,11 @@ class DatabaseAccountGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was @@ -2529,12 +2296,12 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { @@ -2559,8 +2326,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, @@ -2594,8 +2361,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( @@ -2603,8 +2370,8 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, kind: Optional[Union[str, "DatabaseAccountKind"]] = None, + identity: Optional["ManagedServiceIdentity"] = None, ip_rules: Optional[List["IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, @@ -2628,12 +2395,13 @@ def __init__( cors: Optional[List["CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, + capacity: Optional["Capacity"] = None, **kwargs ): - super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind + self.identity = identity self.system_data = None self.provisioning_state = None self.document_endpoint = None @@ -2667,8 +2435,8 @@ def __init__( self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth + self.capacity = capacity class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): @@ -2886,12 +2654,12 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _attribute_map = { @@ -2920,8 +2688,8 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( @@ -2952,8 +2720,8 @@ def __init__( cors: Optional[List["CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, + capacity: Optional["Capacity"] = None, **kwargs ): super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) @@ -2982,8 +2750,8 @@ def __init__( self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth + self.capacity = capacity class DatabaseRestoreResource(msrest.serialization.Model): @@ -3072,918 +2840,196 @@ class DataCenterResourceProperties(msrest.serialization.Model): After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. - Generally you will want to use the seedNodes property on the cluster, which aggregates the seed - nodes from all data centers in the cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration - file to be included in the cassandra.yaml for all nodes in this data center. The fragment - should be Base64 encoded, and only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str - """ - - _validation = { - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, - } - - def __init__( - self, - *, - provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, - data_center_location: Optional[str] = None, - delegated_subnet_id: Optional[str] = None, - node_count: Optional[int] = None, - base64_encoded_cassandra_yaml_fragment: Optional[str] = None, - **kwargs - ): - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.data_center_location = data_center_location - self.delegated_subnet_id = delegated_subnet_id - self.node_count = node_count - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment - - -class RegionalServiceResource(msrest.serialization.Model): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RegionalServiceResource, self).__init__(**kwargs) - self.name = None - self.location = None - self.status = None - - -class DataTransferRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferRegionalServiceResource, self).__init__(**kwargs) - - -class DataTransferServiceResource(msrest.serialization.Model): - """Describes the service response property. - - :param properties: Properties for DataTransferServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataTransferServiceResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["DataTransferServiceResourceProperties"] = None, - **kwargs - ): - super(DataTransferServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class ServiceResourceProperties(msrest.serialization.Model): - """Services response resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - _subtype_map = { - 'service_type': {'DataTransfer': 'DataTransferServiceResourceProperties', 'GraphAPICompute': 'GraphAPIComputeServiceResourceProperties', 'SqlDedicatedGateway': 'SqlDedicatedGatewayServiceResourceProperties'} - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - **kwargs - ): - super(ServiceResourceProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.creation_time = None - self.instance_size = instance_size - self.instance_count = instance_count - self.service_type = 'ServiceResourceProperties' # type: str - self.status = None - - -class DataTransferServiceResourceProperties(ServiceResourceProperties): - """Properties for DataTransferServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[DataTransferRegionalServiceResource]'}, - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - **kwargs - ): - super(DataTransferServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'DataTransfer' # type: str - self.locations = None - - -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - database_account_offer_type = "Standard" - - def __init__( - self, - *, - locations: List["Location"], - consistency_policy: Optional["ConsistencyPolicy"] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, - is_virtual_network_filter_enabled: Optional[bool] = None, - enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, - enable_multiple_write_locations: Optional[bool] = None, - enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, - disable_key_based_metadata_write_access: Optional[bool] = None, - key_vault_key_uri: Optional[str] = None, - default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, - enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, - enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, - network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, - disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, - **kwargs - ): - super(DefaultRequestDatabaseAccountCreateUpdateProperties, self).__init__(consistency_policy=consistency_policy, locations=locations, ip_rules=ip_rules, is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, enable_automatic_failover=enable_automatic_failover, capabilities=capabilities, virtual_network_rules=virtual_network_rules, enable_multiple_write_locations=enable_multiple_write_locations, enable_cassandra_connector=enable_cassandra_connector, connector_offer=connector_offer, disable_key_based_metadata_write_access=disable_key_based_metadata_write_access, key_vault_key_uri=key_vault_key_uri, default_identity=default_identity, public_network_access=public_network_access, enable_free_tier=enable_free_tier, api_properties=api_properties, enable_analytical_storage=enable_analytical_storage, analytical_storage_configuration=analytical_storage_configuration, backup_policy=backup_policy, cors=cors, network_acl_bypass=network_acl_bypass, network_acl_bypass_resource_ids=network_acl_bypass_resource_ids, diagnostic_log_settings=diagnostic_log_settings, disable_local_auth=disable_local_auth, restore_parameters=restore_parameters, **kwargs) - self.create_mode = 'Default' # type: str - - -class DiagnosticLogSettings(msrest.serialization.Model): - """Indicates what diagnostic log settings are to be enabled. - - :param enable_full_text_query: Describe the level of detail with which queries are to be - logged. Possible values include: "None", "True", "False". - :type enable_full_text_query: str or ~azure.mgmt.cosmosdb.models.EnableFullTextQuery - """ - - _attribute_map = { - 'enable_full_text_query': {'key': 'enableFullTextQuery', 'type': 'str'}, - } - - def __init__( - self, - *, - enable_full_text_query: Optional[Union[str, "EnableFullTextQuery"]] = None, - **kwargs - ): - super(DiagnosticLogSettings, self).__init__(**kwargs) - self.enable_full_text_query = enable_full_text_query - - -class ErrorResponse(msrest.serialization.Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ExcludedPath(msrest.serialization.Model): - """ExcludedPath. - - :param path: The path for which the indexing behavior applies to. Index paths typically start - with root and end with wildcard (/path/*). - :type path: str - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - path: Optional[str] = None, - **kwargs - ): - super(ExcludedPath, self).__init__(**kwargs) - self.path = path - - -class FailoverPolicies(msrest.serialization.Model): - """The list of new failover policies for the failover priority change. - - All required parameters must be populated in order to send to Azure. - - :param failover_policies: Required. List of failover policies. - :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - """ - - _validation = { - 'failover_policies': {'required': True}, - } - - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, - } - - def __init__( - self, - *, - failover_policies: List["FailoverPolicy"], - **kwargs - ): - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = failover_policies - - -class FailoverPolicy(msrest.serialization.Model): - """The failover policy for a given region of a database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique identifier of the region in which the database account replicates to. - Example: <accountName>-<locationName>. - :vartype id: str - :param location_name: The name of the region in which the database account exists. - :type location_name: str - :param failover_priority: The failover priority of the region. A failover priority of 0 - indicates a write region. The maximum value for a failover priority = (total number of regions - - 1). Failover priority values must be unique for each of the regions in which the database - account exists. - :type failover_priority: int - """ - - _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__( - self, - *, - location_name: Optional[str] = None, - failover_priority: Optional[int] = None, - **kwargs - ): - super(FailoverPolicy, self).__init__(**kwargs) - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority - - -class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute. - :vartype graph_api_compute_endpoint: str - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'graph_api_compute_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) - self.graph_api_compute_endpoint = None - - -class GraphAPIComputeServiceResource(msrest.serialization.Model): - """Describes the service response property for GraphAPICompute. - - :param properties: Properties for GraphAPIComputeServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["GraphAPIComputeServiceResourceProperties"] = None, - **kwargs - ): - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): - """Properties for GraphAPIComputeServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :param graph_api_compute_endpoint: GraphAPICompute endpoint for the service. - :type graph_api_compute_endpoint: str - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[GraphAPIComputeRegionalServiceResource]'}, - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - graph_api_compute_endpoint: Optional[str] = None, - **kwargs - ): - super(GraphAPIComputeServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'GraphAPICompute' # type: str - self.graph_api_compute_endpoint = graph_api_compute_endpoint - self.locations = None - - -class GraphResource(msrest.serialization.Model): - """Cosmos DB Graph resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Graph. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(GraphResource, self).__init__(**kwargs) - self.id = id - - -class GraphResourceCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Graph resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Graph resource. - :type resource: ~azure.mgmt.cosmosdb.models.GraphResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions + :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. + Generally you will want to use the seedNodes property on the cluster, which aggregates the seed + nodes from all data centers in the cluster. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration + file to be included in the cassandra.yaml for all nodes in this data center. The fragment + should be Base64 encoded, and only a subset of keys are allowed. + :type base64_encoded_cassandra_yaml_fragment: str + :param managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure + the system assigned identity of the cluster has been assigned appropriate permissions(key + get/wrap/unwrap permissions) on the key. + :type managed_disk_customer_key_uri: str + :param backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for + encryption of the backup storage account. + :type backup_storage_customer_key_uri: str + :param sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. + :type sku: str + :param disk_sku: Disk SKU used for data centers. Default value is P30. + :type disk_sku: str + :param disk_capacity: Number of disk used for data centers. Default value is 4. + :type disk_capacity: int + :param availability_zone: If the azure data center has Availability Zone support, apply it to + the Virtual Machine ScaleSet that host the cassandra data center virtual machines. + :type availability_zone: bool """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, + 'seed_nodes': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, + 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'managed_disk_customer_key_uri': {'key': 'managedDiskCustomerKeyUri', 'type': 'str'}, + 'backup_storage_customer_key_uri': {'key': 'backupStorageCustomerKeyUri', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'disk_sku': {'key': 'diskSku', 'type': 'str'}, + 'disk_capacity': {'key': 'diskCapacity', 'type': 'int'}, + 'availability_zone': {'key': 'availabilityZone', 'type': 'bool'}, } def __init__( self, *, - resource: "GraphResource", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, + data_center_location: Optional[str] = None, + delegated_subnet_id: Optional[str] = None, + node_count: Optional[int] = None, + base64_encoded_cassandra_yaml_fragment: Optional[str] = None, + managed_disk_customer_key_uri: Optional[str] = None, + backup_storage_customer_key_uri: Optional[str] = None, + sku: Optional[str] = None, + disk_sku: Optional[str] = None, + disk_capacity: Optional[int] = None, + availability_zone: Optional[bool] = None, **kwargs ): - super(GraphResourceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(DataCenterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + self.data_center_location = data_center_location + self.delegated_subnet_id = delegated_subnet_id + self.node_count = node_count + self.seed_nodes = None + self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment + self.managed_disk_customer_key_uri = managed_disk_customer_key_uri + self.backup_storage_customer_key_uri = backup_storage_customer_key_uri + self.sku = sku + self.disk_sku = disk_sku + self.disk_capacity = disk_capacity + self.availability_zone = availability_zone -class GraphResourceGetPropertiesOptions(OptionsResource): - """GraphResourceGetPropertiesOptions. +class ErrorResponse(msrest.serialization.Model): + """Error Response. - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__( self, *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + code: Optional[str] = None, + message: Optional[str] = None, **kwargs ): - super(GraphResourceGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) - - -class GraphResourceGetPropertiesResource(GraphResource, ExtendedResourceProperties): - """GraphResourceGetPropertiesResource. + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. +class ExcludedPath(msrest.serialization.Model): + """ExcludedPath. - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str - :param id: Required. Name of the Cosmos DB Graph. - :type id: str + :param path: The path for which the indexing behavior applies to. Index paths typically start + with root and end with wildcard (/path/*). + :type path: str """ - _validation = { - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'required': True}, - } - _attribute_map = { - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, } def __init__( self, *, - id: str, + path: Optional[str] = None, **kwargs ): - super(GraphResourceGetPropertiesResource, self).__init__(id=id, **kwargs) - self.rid = None - self.ts = None - self.etag = None - self.id = id + super(ExcludedPath, self).__init__(**kwargs) + self.path = path -class GraphResourceGetResults(ARMResourceProperties): - """An Azure Cosmos DB Graph resource. +class FailoverPolicies(msrest.serialization.Model): + """The list of new failover policies for the failover priority change. - Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.GraphResourceGetPropertiesOptions + :param failover_policies: Required. List of failover policies. + :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'failover_policies': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResourceGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'GraphResourceGetPropertiesOptions'}, + 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, } def __init__( self, *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["GraphResourceGetPropertiesResource"] = None, - options: Optional["GraphResourceGetPropertiesOptions"] = None, + failover_policies: List["FailoverPolicy"], **kwargs ): - super(GraphResourceGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(FailoverPolicies, self).__init__(**kwargs) + self.failover_policies = failover_policies -class GraphResourcesListResult(msrest.serialization.Model): - """The List operation response, that contains the Graph resource and their properties. +class FailoverPolicy(msrest.serialization.Model): + """The failover policy for a given region of a database account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of Graph resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.GraphResourceGetResults] + :ivar id: The unique identifier of the region in which the database account replicates to. + Example: <accountName>-<locationName>. + :vartype id: str + :param location_name: The name of the region in which the database account exists. + :type location_name: str + :param failover_priority: The failover priority of the region. A failover priority of 0 + indicates a write region. The maximum value for a failover priority = (total number of regions + - 1). Failover priority values must be unique for each of the regions in which the database + account exists. + :type failover_priority: int """ _validation = { - 'value': {'readonly': True}, + 'id': {'readonly': True}, + 'failover_priority': {'minimum': 0}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[GraphResourceGetResults]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, } def __init__( self, + *, + location_name: Optional[str] = None, + failover_priority: Optional[int] = None, **kwargs ): - super(GraphResourcesListResult, self).__init__(**kwargs) - self.value = None + super(FailoverPolicy, self).__init__(**kwargs) + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): @@ -4008,8 +3054,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin database. :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -4030,7 +3074,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -4041,11 +3084,10 @@ def __init__( resource: "GremlinDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -4167,8 +3209,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource :param options: @@ -4187,7 +3227,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } @@ -4197,12 +3236,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["GremlinDatabaseGetPropertiesResource"] = None, options: Optional["GremlinDatabaseGetPropertiesOptions"] = None, **kwargs ): - super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -4254,8 +3292,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin graph. :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -4276,7 +3312,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -4287,11 +3322,10 @@ def __init__( resource: "GremlinGraphResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -4469,8 +3503,6 @@ class GremlinGraphGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource :param options: @@ -4489,7 +3521,6 @@ class GremlinGraphGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } @@ -4499,12 +3530,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["GremlinGraphGetPropertiesResource"] = None, options: Optional["GremlinGraphGetPropertiesOptions"] = None, **kwargs ): - super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -4667,31 +3697,6 @@ def __init__( self.ip_address_or_range = ip_address_or_range -class ListBackups(msrest.serialization.Model): - """List of restorable backups for a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of backups. - :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListBackups, self).__init__(**kwargs) - self.value = None - - class ListClusters(msrest.serialization.Model): """List of managed Cassandra clusters. @@ -4870,8 +3875,6 @@ class LocationProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: The current status of location in Azure. - :vartype status: str :ivar supports_availability_zone: Flag indicating whether the location supports availability zones or not. :vartype supports_availability_zone: bool @@ -4883,14 +3886,12 @@ class LocationProperties(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, 'supports_availability_zone': {'readonly': True}, 'is_residency_restricted': {'readonly': True}, 'backup_storage_redundancies': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, @@ -4900,11 +3901,77 @@ def __init__( self, **kwargs ): - super(LocationProperties, self).__init__(**kwargs) - self.status = None - self.supports_availability_zone = None - self.is_residency_restricted = None - self.backup_storage_redundancies = None + super(LocationProperties, self).__init__(**kwargs) + self.supports_availability_zone = None + self.is_residency_restricted = None + self.backup_storage_redundancies = None + + +class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object id of the identity resource. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource. + :vartype tenant_id: str + :param type: The type of the resource. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedCassandraResourceIdentityType"]] = None, + **kwargs + ): + super(ManagedCassandraManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class ManagedCassandraReaperStatus(msrest.serialization.Model): + """ManagedCassandraReaperStatus. + + :param healthy: + :type healthy: bool + :param repair_run_ids: Dictionary of :code:``. + :type repair_run_ids: dict[str, str] + :param repair_schedules: Dictionary of :code:``. + :type repair_schedules: dict[str, str] + """ + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'repair_run_ids': {'key': 'repairRunIds', 'type': '{str}'}, + 'repair_schedules': {'key': 'repairSchedules', 'type': '{str}'}, + } + + def __init__( + self, + *, + healthy: Optional[bool] = None, + repair_run_ids: Optional[Dict[str, str]] = None, + repair_schedules: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedCassandraReaperStatus, self).__init__(**kwargs) + self.healthy = healthy + self.repair_run_ids = repair_run_ids + self.repair_schedules = repair_schedules class ManagedServiceIdentity(msrest.serialization.Model): @@ -5236,8 +4303,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB collection. :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -5258,7 +4323,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5269,11 +4333,10 @@ def __init__( resource: "MongoDBCollectionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5425,8 +4488,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :param options: @@ -5445,7 +4506,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } @@ -5455,12 +4515,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["MongoDBCollectionGetPropertiesResource"] = None, options: Optional["MongoDBCollectionGetPropertiesOptions"] = None, **kwargs ): - super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5512,8 +4571,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB database. :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -5534,7 +4591,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5545,11 +4601,10 @@ def __init__( resource: "MongoDBDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5671,8 +4726,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource :param options: @@ -5691,7 +4744,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } @@ -5701,12 +4753,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["MongoDBDatabaseGetPropertiesResource"] = None, options: Optional["MongoDBDatabaseGetPropertiesOptions"] = None, **kwargs ): - super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -6787,39 +5838,6 @@ def __init__( self.region = region -class RepairPostBody(msrest.serialization.Model): - """Specification of the keyspaces and tables to run repair on. - - All required parameters must be populated in order to send to Azure. - - :param keyspace: Required. The name of the keyspace that repair should be run on. - :type keyspace: str - :param tables: List of tables in the keyspace to repair. If omitted, repair all tables in the - keyspace. - :type tables: list[str] - """ - - _validation = { - 'keyspace': {'required': True}, - } - - _attribute_map = { - 'keyspace': {'key': 'keyspace', 'type': 'str'}, - 'tables': {'key': 'tables', 'type': '[str]'}, - } - - def __init__( - self, - *, - keyspace: str, - tables: Optional[List[str]] = None, - **kwargs - ): - super(RepairPostBody, self).__init__(**kwargs) - self.keyspace = keyspace - self.tables = tables - - class RestorableDatabaseAccountGetResult(msrest.serialization.Model): """A Azure Cosmos DB restorable database account. @@ -7589,15 +6607,13 @@ def __init__( self.id = id -class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties, SqlDatabaseResource): +class RestorableSqlDatabasePropertiesResourceDatabase(SqlDatabaseResource, ExtendedResourceProperties): """Cosmos DB SQL database resource object. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database. - :type id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -7605,6 +6621,8 @@ class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :param id: Required. Name of the Cosmos DB SQL database. + :type id: str :ivar colls: A system generated property that specified the addressable path of the collections resource. :vartype colls: str @@ -7617,20 +6635,20 @@ class RestorableSqlDatabasePropertiesResourceDatabase(ExtendedResourceProperties """ _validation = { - 'id': {'required': True}, 'rid': {'readonly': True}, 'ts': {'readonly': True}, 'etag': {'readonly': True}, + 'id': {'required': True}, 'colls': {'readonly': True}, 'users': {'readonly': True}, 'self_property': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, 'etag': {'key': '_etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'colls': {'key': '_colls', 'type': 'str'}, 'users': {'key': '_users', 'type': 'str'}, 'self_property': {'key': '_self', 'type': 'str'}, @@ -7643,16 +6661,16 @@ def __init__( **kwargs ): super(RestorableSqlDatabasePropertiesResourceDatabase, self).__init__(id=id, **kwargs) - self.id = id - self.colls = None - self.users = None - self.self_property = None self.rid = None self.ts = None self.etag = None self.colls = None self.users = None self.self_property = None + self.id = id + self.colls = None + self.users = None + self.self_property = None class RestorableSqlDatabasesListResult(msrest.serialization.Model): @@ -7765,106 +6783,6 @@ def __init__( self.ip_address = ip_address -class ServiceResource(ARMProxyResource): - """Properties for the database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Services response resource. - :type properties: ~azure.mgmt.cosmosdb.models.ServiceResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServiceResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["ServiceResourceProperties"] = None, - **kwargs - ): - super(ServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class ServiceResourceCreateUpdateParameters(msrest.serialization.Model): - """Parameters for Create or Update Request for ServiceResource. - - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - """ - - _validation = { - 'instance_count': {'minimum': 0}, - } - - _attribute_map = { - 'instance_size': {'key': 'properties.instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'properties.instanceCount', 'type': 'int'}, - 'service_type': {'key': 'properties.serviceType', 'type': 'str'}, - } - - def __init__( - self, - *, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - service_type: Optional[Union[str, "ServiceType"]] = None, - **kwargs - ): - super(ServiceResourceCreateUpdateParameters, self).__init__(**kwargs) - self.instance_size = instance_size - self.instance_count = instance_count - self.service_type = service_type - - -class ServiceResourceListResult(msrest.serialization.Model): - """The List operation response, that contains the Service Resource and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Service Resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.ServiceResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceListResult, self).__init__(**kwargs) - self.value = None - - class SpatialSpec(msrest.serialization.Model): """SpatialSpec. @@ -7914,8 +6832,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a container. :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -7936,7 +6852,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -7947,11 +6862,10 @@ def __init__( resource: "SqlContainerResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -8079,8 +6993,6 @@ class SqlContainerGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource :param options: @@ -8099,7 +7011,6 @@ class SqlContainerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } @@ -8109,12 +7020,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["SqlContainerGetPropertiesResource"] = None, options: Optional["SqlContainerGetPropertiesOptions"] = None, **kwargs ): - super(SqlContainerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -8166,8 +7076,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a SQL database. :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8188,7 +7096,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8199,11 +7106,10 @@ def __init__( resource: "SqlDatabaseResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -8233,15 +7139,13 @@ def __init__( super(SqlDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseResource): +class SqlDatabaseGetPropertiesResource(SqlDatabaseResource, ExtendedResourceProperties): """SqlDatabaseGetPropertiesResource. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB SQL database. - :type id: str :ivar rid: A system generated property. A unique identifier. :vartype rid: str :ivar ts: A system generated property that denotes the last updated timestamp of the resource. @@ -8249,6 +7153,8 @@ class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseRe :ivar etag: A system generated property representing the resource etag required for optimistic concurrency control. :vartype etag: str + :param id: Required. Name of the Cosmos DB SQL database. + :type id: str :param colls: A system generated property that specified the addressable path of the collections resource. :type colls: str @@ -8258,17 +7164,17 @@ class SqlDatabaseGetPropertiesResource(ExtendedResourceProperties, SqlDatabaseRe """ _validation = { - 'id': {'required': True}, 'rid': {'readonly': True}, 'ts': {'readonly': True}, 'etag': {'readonly': True}, + 'id': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, 'rid': {'key': '_rid', 'type': 'str'}, 'ts': {'key': '_ts', 'type': 'float'}, 'etag': {'key': '_etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, 'colls': {'key': '_colls', 'type': 'str'}, 'users': {'key': '_users', 'type': 'str'}, } @@ -8282,14 +7188,14 @@ def __init__( **kwargs ): super(SqlDatabaseGetPropertiesResource, self).__init__(id=id, **kwargs) - self.id = id - self.colls = colls - self.users = users self.rid = None self.ts = None self.etag = None self.colls = colls self.users = users + self.id = id + self.colls = colls + self.users = users class SqlDatabaseGetResults(ARMResourceProperties): @@ -8312,8 +7218,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource :param options: @@ -8332,7 +7236,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } @@ -8342,12 +7245,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["SqlDatabaseGetPropertiesResource"] = None, options: Optional["SqlDatabaseGetPropertiesOptions"] = None, **kwargs ): - super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -8377,129 +7279,6 @@ def __init__( self.value = None -class SqlDedicatedGatewayRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar sql_dedicated_gateway_endpoint: The regional endpoint for SqlDedicatedGateway. - :vartype sql_dedicated_gateway_endpoint: str - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'sql_dedicated_gateway_endpoint': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SqlDedicatedGatewayRegionalServiceResource, self).__init__(**kwargs) - self.sql_dedicated_gateway_endpoint = None - - -class SqlDedicatedGatewayServiceResource(msrest.serialization.Model): - """Describes the service response property for SqlDedicatedGateway. - - :param properties: Properties for SqlDedicatedGatewayServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.SqlDedicatedGatewayServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'SqlDedicatedGatewayServiceResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["SqlDedicatedGatewayServiceResourceProperties"] = None, - **kwargs - ): - super(SqlDedicatedGatewayServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class SqlDedicatedGatewayServiceResourceProperties(ServiceResourceProperties): - """Properties for SqlDedicatedGatewayServiceResource. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :param sql_dedicated_gateway_endpoint: SqlDedicatedGateway endpoint for the service. - :type sql_dedicated_gateway_endpoint: str - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: - list[~azure.mgmt.cosmosdb.models.SqlDedicatedGatewayRegionalServiceResource] - """ - - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'sql_dedicated_gateway_endpoint': {'key': 'sqlDedicatedGatewayEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[SqlDedicatedGatewayRegionalServiceResource]'}, - } - - def __init__( - self, - *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - sql_dedicated_gateway_endpoint: Optional[str] = None, - **kwargs - ): - super(SqlDedicatedGatewayServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'SqlDedicatedGateway' # type: str - self.sql_dedicated_gateway_endpoint = sql_dedicated_gateway_endpoint - self.locations = None - - class SqlRoleAssignmentCreateUpdateParameters(msrest.serialization.Model): """Parameters to create and update an Azure Cosmos DB SQL Role Assignment. @@ -8758,8 +7537,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a storedProcedure. :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -8780,7 +7557,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -8791,11 +7567,10 @@ def __init__( resource: "SqlStoredProcedureResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -8902,8 +7677,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource """ @@ -8920,7 +7693,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } @@ -8929,11 +7701,10 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["SqlStoredProcedureGetPropertiesResource"] = None, **kwargs ): - super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -8984,8 +7755,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a trigger. :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -9006,7 +7775,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -9017,11 +7785,10 @@ def __init__( resource: "SqlTriggerResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -9150,8 +7917,6 @@ class SqlTriggerGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource """ @@ -9168,7 +7933,6 @@ class SqlTriggerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, } @@ -9177,11 +7941,10 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["SqlTriggerGetPropertiesResource"] = None, **kwargs ): - super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -9232,8 +7995,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a userDefinedFunction. :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -9254,7 +8015,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -9265,11 +8025,10 @@ def __init__( resource: "SqlUserDefinedFunctionResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -9376,8 +8135,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource """ @@ -9394,7 +8151,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } @@ -9403,11 +8159,10 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["SqlUserDefinedFunctionGetPropertiesResource"] = None, **kwargs ): - super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -9506,8 +8261,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Table. :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: A key-value pair of options to be applied for the request. This corresponds to @@ -9528,7 +8281,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -9539,11 +8291,10 @@ def __init__( resource: "TableResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, options: Optional["CreateUpdateOptions"] = None, **kwargs ): - super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -9665,8 +8416,6 @@ class TableGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource :param options: @@ -9685,7 +8434,6 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } @@ -9695,12 +8443,11 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["TableGetPropertiesResource"] = None, options: Optional["TableGetPropertiesOptions"] = None, **kwargs ): - super(TableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(TableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -9879,8 +8626,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource """ @@ -9897,7 +8642,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } @@ -9906,11 +8650,10 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, resource: Optional["ThroughputSettingsGetPropertiesResource"] = None, **kwargs ): - super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -9936,8 +8679,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a resource throughput. :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource """ @@ -9955,7 +8696,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } @@ -9965,10 +8705,9 @@ def __init__( resource: "ThroughputSettingsResource", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, **kwargs ): - super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index a7c7808a801a..ebbc5bb38263 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -19,13 +19,12 @@ from ._collection_partition_operations import CollectionPartitionOperations from ._partition_key_range_id_operations import PartitionKeyRangeIdOperations from ._partition_key_range_id_region_operations import PartitionKeyRangeIdRegionOperations -from ._graph_resources_operations import GraphResourcesOperations from ._sql_resources_operations import SqlResourcesOperations from ._mongo_db_resources_operations import MongoDBResourcesOperations from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations -from ._cosmos_db_management_client_operations import CosmosDBManagementClientOperationsMixin +from ._locations_operations import LocationsOperations from ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -38,7 +37,6 @@ from ._restorable_mongodb_resources_operations import RestorableMongodbResourcesOperations from ._cassandra_clusters_operations import CassandraClustersOperations from ._cassandra_data_centers_operations import CassandraDataCentersOperations -from ._service_operations import ServiceOperations __all__ = [ 'DatabaseAccountsOperations', @@ -54,13 +52,12 @@ 'CollectionPartitionOperations', 'PartitionKeyRangeIdOperations', 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', 'SqlResourcesOperations', 'MongoDBResourcesOperations', 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', + 'LocationsOperations', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -73,5 +70,4 @@ 'RestorableMongodbResourcesOperations', 'CassandraClustersOperations', 'CassandraDataCentersOperations', - 'ServiceOperations', ] 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 a0e0f51b58da..00c77a7874ff 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 @@ -64,7 +64,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -208,7 +208,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -367,7 +367,7 @@ def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -498,7 +498,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -615,25 +615,25 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} # type: ignore - def _request_repair_initial( + def _invoke_command_initial( self, resource_group_name, # type: str cluster_name, # type: str - body, # type: "_models.RepairPostBody" + body, # type: "_models.CommandPostBody" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.CommandOutput" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._request_repair_initial.metadata['url'] # type: ignore + url = self._invoke_command_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -651,56 +651,59 @@ def _request_repair_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'RepairPostBody') + body_content = self._serialize.body(body, 'CommandPostBody') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _request_repair_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + return deserialized + _invoke_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - def begin_request_repair( + def begin_invoke_command( self, resource_group_name, # type: str cluster_name, # type: str - body, # type: "_models.RepairPostBody" + body, # type: "_models.CommandPostBody" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Request that repair begin on this cluster as soon as possible. + # type: (...) -> LROPoller["_models.CommandOutput"] + """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param body: Specification of what keyspaces and tables to run repair on. - :type body: ~azure.mgmt.cosmosdb.models.RepairPostBody + :param body: Specification which command to run where. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody :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 None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either CommandOutput or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] 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._request_repair_initial( + raw_result = self._invoke_command_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, @@ -712,8 +715,11 @@ def begin_request_repair( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -733,25 +739,25 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_request_repair.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + begin_invoke_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - def _fetch_node_status_initial( + def _deallocate_initial( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.ClusterNodeStatus"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterNodeStatus"]] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self._fetch_node_status_initial.metadata['url'] # type: ignore + url = self._deallocate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -771,28 +777,25 @@ def _fetch_node_status_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [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('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _fetch_node_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + _deallocate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def begin_fetch_node_status( + def begin_deallocate( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ClusterNodeStatus"] - """Request the status of all nodes in the cluster (as returned by 'nodetool status'). + # type: (...) -> LROPoller[None] + """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -804,19 +807,19 @@ def begin_fetch_node_status( 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 ClusterNodeStatus or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterNodeStatus] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterNodeStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[None] 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._fetch_node_status_initial( + raw_result = self._deallocate_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, cls=lambda x,y,z: x, @@ -827,11 +830,8 @@ def begin_fetch_node_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -851,119 +851,152 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_fetch_node_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def list_backups( + def _start_initial( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ListBackups"] - """List the backups of this cluster that are available to restore. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('ListBackups', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - return pipeline_response + def begin_start( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + virtual machine of this cluster with reserved data disk. This won't do anything on an already + running cluster. Use Deallocate to deallocate the cluster. - return ItemPaged( - get_next, extract_data + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. + :type cluster_name: str + :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 None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - def get_backup( + def status( self, resource_group_name, # type: str cluster_name, # type: str - backup_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackupResource" - """Get the properties of an individual backup of this cluster that is available to restore. + # type: (...) -> "_models.CassandraClusterPublicStatus" + """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. - :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.BackupResource + :return: CassandraClusterPublicStatus, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self.get_backup.metadata['url'] # type: ignore + url = self.status.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - 'backupId': self._serialize.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$'), } url = self._client.format_url(url, **path_format_arguments) @@ -983,10 +1016,10 @@ def get_backup( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}'} # type: ignore + status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status'} # type: ignore 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 2de44375e68a..d0a037bb5c71 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 @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -198,7 +198,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -316,7 +316,7 @@ def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -454,7 +454,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 55ec864e163a..4d0907488137 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 @@ -70,7 +70,7 @@ def list_cassandra_keyspaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_cassandra_keyspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_keyspace_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_cassandra_keyspace_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_cassandra_keyspace_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_cassandra_keyspace_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_cassandra_keyspace_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_cassandra_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_cassandra_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_table_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_cassandra_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_cassandra_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_cassandra_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_cassandra_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1772,889 +1772,3 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_cassandra_table_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/tables/{tableName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore - - def list_cassandra_views( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.CassandraViewListResult"] - """Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either CassandraViewListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.CassandraViewListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_cassandra_views.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('CassandraViewListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_cassandra_views.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views'} # type: ignore - - def get_cassandra_view( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.CassandraViewGetResults" - """Gets the Cassandra view under an existing Azure Cosmos DB database account. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CassandraViewGetResults, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.CassandraViewGetResults - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_cassandra_view.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - def _create_update_cassandra_view_initial( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - create_update_cassandra_view_parameters, # type: "_models.CassandraViewCreateUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.CassandraViewGetResults"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CassandraViewGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_update_cassandra_view_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(create_update_cassandra_view_parameters, 'CassandraViewCreateUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - 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('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_update_cassandra_view_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - def begin_create_update_cassandra_view( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - create_update_cassandra_view_parameters, # type: "_models.CassandraViewCreateUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.CassandraViewGetResults"] - """Create or update an Azure Cosmos DB Cassandra View. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :param create_update_cassandra_view_parameters: The parameters to provide for the current - Cassandra View. - :type create_update_cassandra_view_parameters: ~azure.mgmt.cosmosdb.models.CassandraViewCreateUpdateParameters - :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 CassandraViewGetResults or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraViewGetResults"] - 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._create_update_cassandra_view_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - create_update_cassandra_view_parameters=create_update_cassandra_view_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('CassandraViewGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_create_update_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - def _delete_cassandra_view_initial( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - - # Construct URL - url = self._delete_cassandra_view_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_cassandra_view_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - def begin_delete_cassandra_view( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes an existing Azure Cosmos DB Cassandra view. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - 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._delete_cassandra_view_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_delete_cassandra_view.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}'} # type: ignore - - def get_cassandra_view_throughput( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ThroughputSettingsGetResults" - """Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database - account with the provided name. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ThroughputSettingsGetResults, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_cassandra_view_throughput.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_cassandra_view_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - def _update_cassandra_view_throughput_initial( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - update_throughput_parameters, # type: "_models.ThroughputSettingsUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ThroughputSettingsGetResults"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_cassandra_view_throughput_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(update_throughput_parameters, 'ThroughputSettingsUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_cassandra_view_throughput_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - def begin_update_cassandra_view_throughput( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - update_throughput_parameters, # type: "_models.ThroughputSettingsUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ThroughputSettingsGetResults"] - """Update RUs per second of an Azure Cosmos DB Cassandra view. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :param update_throughput_parameters: The RUs per second of the parameters to provide for the - current Cassandra view. - :type update_throughput_parameters: ~azure.mgmt.cosmosdb.models.ThroughputSettingsUpdateParameters - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._update_cassandra_view_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - update_throughput_parameters=update_throughput_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_update_cassandra_view_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default'} # type: ignore - - def _migrate_cassandra_view_to_autoscale_initial( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ThroughputSettingsGetResults"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self._migrate_cassandra_view_to_autoscale_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _migrate_cassandra_view_to_autoscale_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale'} # type: ignore - - def begin_migrate_cassandra_view_to_autoscale( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ThroughputSettingsGetResults"] - """Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._migrate_cassandra_view_to_autoscale_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_migrate_cassandra_view_to_autoscale.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale'} # type: ignore - - def _migrate_cassandra_view_to_manual_throughput_initial( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.ThroughputSettingsGetResults"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ThroughputSettingsGetResults"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" - accept = "application/json" - - # Construct URL - url = self._migrate_cassandra_view_to_manual_throughput_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - 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('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _migrate_cassandra_view_to_manual_throughput_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore - - def begin_migrate_cassandra_view_to_manual_throughput( - self, - resource_group_name, # type: str - account_name, # type: str - keyspace_name, # type: str - view_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ThroughputSettingsGetResults"] - """Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput. - - :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 keyspace_name: Cosmos DB keyspace name. - :type keyspace_name: str - :param view_name: Cosmos DB view name. - :type view_name: str - :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 ThroughputSettingsGetResults or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ThroughputSettingsGetResults"] - 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._migrate_cassandra_view_to_manual_throughput_initial( - resource_group_name=resource_group_name, - account_name=account_name, - keyspace_name=keyspace_name, - view_name=view_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ThroughputSettingsGetResults', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), - 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), - 'viewName': self._serialize.url("view_name", view_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **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_migrate_cassandra_view_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore 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 5ae1c3224216..c9075d618b17 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 @@ -80,7 +80,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -168,7 +168,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -253,7 +253,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 c63a2588d1dd..282d8bd6afd0 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 @@ -80,7 +80,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -168,7 +168,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 33d2f61a1c3d..a58acf2f517a 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 @@ -83,7 +83,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 a9adf327fecd..0c6fb24445b8 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 @@ -83,7 +83,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 5a70940cff00..15ca6424a2ff 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 @@ -76,7 +76,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 1d5e50ab25e6..6b928c81a0a4 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 @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -119,7 +119,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -245,7 +245,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -371,7 +371,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -480,7 +480,7 @@ def _failover_priority_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -605,7 +605,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -675,7 +675,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -749,7 +749,7 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -808,7 +808,7 @@ def list_connection_strings( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -857,7 +857,7 @@ def _offline_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -978,7 +978,7 @@ def _online_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1109,7 +1109,7 @@ def get_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1168,7 +1168,7 @@ def list_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1217,7 +1217,7 @@ def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1344,7 +1344,7 @@ def check_name_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self.check_name_exists.metadata['url'] # type: ignore @@ -1402,7 +1402,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1482,7 +1482,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1559,7 +1559,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 6551e716d1c1..82421f7d6ffa 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 @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -161,7 +161,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -242,7 +242,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 b125f94738bd..79a90859cc76 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 @@ -70,7 +70,7 @@ def list_gremlin_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_gremlin_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_gremlin_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_gremlin_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_gremlin_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_gremlin_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_gremlin_graphs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_gremlin_graph( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_graph_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_gremlin_graph_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_gremlin_graph_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_gremlin_graph_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_gremlin_graph_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 new file mode 100644 index 000000000000..84b98dd18aa0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class LocationsOperations(object): + """LocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cosmosdb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.LocationListResult"] + """List Cosmos DB locations and their properties. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('LocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations'} # type: ignore + + def get( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.LocationGetResult" + """Get the properties of an existing Cosmos DB location. + + :param location: Cosmos DB region, with spaces between words and each word capitalized. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationGetResult, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocationGetResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}'} # type: ignore 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 a465650c737b..f5b1d7b592ce 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 @@ -70,7 +70,7 @@ def list_mongo_db_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_mongo_db_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_mongo_db_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_mongo_db_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_mongo_db_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_mongo_db_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_mongo_db_collections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_mongo_db_collection( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_collection_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_mongo_db_collection_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_mongo_db_collection_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_mongo_db_collection_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_mongo_db_collection_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1772,3 +1772,145 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore + + def _retrieve_continuous_backup_information_initial( + self, + resource_group_name, # type: str + account_name, # type: str + database_name, # type: str + collection_name, # type: str + location, # type: "_models.ContinuousBackupRestoreLocation" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BackupInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._retrieve_continuous_backup_information_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + 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('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _retrieve_continuous_backup_information_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore + + def begin_retrieve_continuous_backup_information( + self, + resource_group_name, # type: str + account_name, # type: str + database_name, # type: str + collection_name, # type: str + location, # type: "_models.ContinuousBackupRestoreLocation" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackupInformation"] + """Retrieves continuous backup information for 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 location: The name of the continuous backup restore location. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :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 BackupInformation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] + 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._retrieve_continuous_backup_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **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_retrieve_continuous_backup_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore 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 bfb8a73234ec..00d9e6fc86d8 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 @@ -70,7 +70,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -466,7 +466,7 @@ def list_connection_info( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -517,7 +517,7 @@ def _regenerate_auth_token_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -635,7 +635,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 78de171309d0..4bf061fe7826 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 @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 549d6e3e572b..bc4ae138ce9e 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 @@ -82,7 +82,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 8e68bea8329d..c1f20d6e41c2 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 @@ -86,7 +86,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 263110f8bf1a..6215b57d4ff6 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 @@ -74,7 +74,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 8ab15c2a94dd..2405f0b9dcc7 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 @@ -82,7 +82,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 c45180203875..d76ec885a2db 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 @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 c63412113ba5..7731f58e7ac9 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 @@ -70,7 +70,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 1fae2104d1dd..33fd3080fce7 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 @@ -68,7 +68,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 b6183ae2e725..af1db7fc59a3 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 @@ -67,7 +67,7 @@ def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -210,7 +210,7 @@ def get_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL 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 cd45b4c6d995..5fb6d81270a8 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 @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 d3d5ff7c8318..a9504b5b5186 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 @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 5ffec558d4b4..13660359931b 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 @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 3ea7156988ec..1a8fa9ac2af6 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 @@ -79,7 +79,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 3985c7192cdd..37a2dd18d2e5 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 @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 c2ba469ba3e9..ed78d7481cee 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 @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): 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 b8bd592dbeba..fda077e0ccdf 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 @@ -70,7 +70,7 @@ def list_sql_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_sql_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_sql_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_sql_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_sql_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_sql_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_sql_containers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_sql_container( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_container_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_sql_container_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_sql_container_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_sql_container_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_sql_container_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1802,7 +1802,7 @@ def list_sql_stored_procedures( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1888,7 +1888,7 @@ def get_sql_stored_procedure( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1943,7 +1943,7 @@ def _create_update_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2092,7 +2092,7 @@ def _delete_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_stored_procedure_initial.metadata['url'] # type: ignore @@ -2235,7 +2235,7 @@ def list_sql_user_defined_functions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2321,7 +2321,7 @@ def get_sql_user_defined_function( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2376,7 +2376,7 @@ def _create_update_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2525,7 +2525,7 @@ def _delete_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_user_defined_function_initial.metadata['url'] # type: ignore @@ -2668,7 +2668,7 @@ def list_sql_triggers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2754,7 +2754,7 @@ def get_sql_trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2809,7 +2809,7 @@ def _create_update_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2958,7 +2958,7 @@ def _delete_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_trigger_initial.metadata['url'] # type: ignore @@ -3098,7 +3098,7 @@ def get_sql_role_definition( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3149,7 +3149,7 @@ def _create_update_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3284,7 +3284,7 @@ def _delete_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3411,7 +3411,7 @@ def list_sql_role_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3489,7 +3489,7 @@ def get_sql_role_assignment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3540,7 +3540,7 @@ def _create_update_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3675,7 +3675,7 @@ def _delete_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3802,7 +3802,7 @@ def list_sql_role_assignments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3869,7 +3869,7 @@ def _retrieve_continuous_backup_information_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 062611e12a0e..22cf3ea1b70e 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 @@ -70,7 +70,7 @@ def list_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def _create_update_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ def _delete_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_table_initial.metadata['url'] # type: ignore @@ -462,7 +462,7 @@ def get_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -513,7 +513,7 @@ def _update_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -648,7 +648,7 @@ def _migrate_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -773,7 +773,7 @@ def _migrate_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL