diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json index 85684c2620c97..bcec9ed71d443 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": "cde7f150e8d3bf3af2418cc347cae0fb2baed6a7", "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 6ff3e742876e2..6139eba8b2441 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-06-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 c5abb79574e1a..b3d7828522b46 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,11 @@ 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 NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -49,13 +47,10 @@ from .operations import RestorableMongodbDatabasesOperations from .operations import RestorableMongodbCollectionsOperations 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 +79,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 @@ -116,12 +109,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.operations.RestorableMongodbCollectionsOperations :ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations :vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.operations.RestorableMongodbResourcesOperations - :ivar cassandra_clusters: CassandraClustersOperations operations - :vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations - :ivar cassandra_data_centers: CassandraDataCentersOperations operations - :vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations - :ivar 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 +161,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( @@ -206,12 +191,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.restorable_mongodb_resources = RestorableMongodbResourcesOperations( self._client, self._config, self._serialize, self._deserialize) - self.cassandra_clusters = CassandraClustersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.cassandra_data_centers = CassandraDataCentersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.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 8024166e0557d..5768fa11a66cb 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-06-15", + "total_api_version_list": ["2021-06-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,7 +111,6 @@ "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", @@ -126,39 +125,6 @@ "restorable_sql_resources": "RestorableSqlResourcesOperations", "restorable_mongodb_databases": "RestorableMongodbDatabasesOperations", "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" - } - } + "restorable_mongodb_resources": "RestorableMongodbResourcesOperations" } } \ 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 efe7276fe05f2..a712687790e50 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 = "0.7.0" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py index 60bb9254b97f0..89ca29f296f96 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-06-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 4de01d4be8a75..c38011978b584 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,11 @@ 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 NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -47,13 +45,10 @@ from .operations import RestorableMongodbDatabasesOperations from .operations import RestorableMongodbCollectionsOperations 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 +77,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 @@ -114,12 +107,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.aio.operations.RestorableMongodbCollectionsOperations :ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations :vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.aio.operations.RestorableMongodbResourcesOperations - :ivar cassandra_clusters: CassandraClustersOperations operations - :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 +158,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( @@ -203,12 +188,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.restorable_mongodb_resources = RestorableMongodbResourcesOperations( self._client, self._config, self._serialize, self._deserialize) - self.cassandra_clusters = CassandraClustersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.cassandra_data_centers = CassandraDataCentersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.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 a7c7808a801a0..a265f7a8b3976 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,11 @@ 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 ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -36,9 +34,6 @@ from ._restorable_mongodb_databases_operations import RestorableMongodbDatabasesOperations from ._restorable_mongodb_collections_operations import RestorableMongodbCollectionsOperations 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 +49,11 @@ 'CollectionPartitionOperations', 'PartitionKeyRangeIdOperations', 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', 'SqlResourcesOperations', 'MongoDBResourcesOperations', 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -71,7 +64,4 @@ 'RestorableMongodbDatabasesOperations', 'RestorableMongodbCollectionsOperations', 'RestorableMongodbResourcesOperations', - 'CassandraClustersOperations', - 'CassandraDataCentersOperations', - 'ServiceOperations', ] 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 058af5373e55b..c1351f65cd00a 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 d6e7d2667ae0f..11fe1e8d61e31 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-06-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-06-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-06-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 c8346c18f1a4c..2c22d7db0441c 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-06-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-06-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 8e255eec67d19..e5153e7a51d13 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-06-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 3f5b718e1a36d..13a8495c8e0b6 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-06-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 16cef787b1dec..41b34c27dd1b1 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-06-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 be33c45d93679..958c07c4e169d 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 d9ae67a827597..921bc9c48d405 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-06-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-06-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-06-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 0b2dbd8450061..ae81a5d0de38e 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-15" accept = "application/json" # Construct URL 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 8e75deeb31174..47db3e19bf094 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-15" accept = "application/json" # Construct URL 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 5488f88866d40..6a0b3006502b0 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 bfeb2f139a3dc..e4aadaace2c53 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-06-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 af7028cef78ff..5def2e0ec3265 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-06-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 1b0d6bcfcdc60..e4b774017a315 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-06-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 2507cadc3b248..e9dba82c91b2d 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-06-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 c7befa09b3416..001d2a56448c7 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-06-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 58c388ca36e49..df320847d40c8 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-06-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 62954af56d4a2..2b98290e7cff8 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-06-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-06-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-06-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-06-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 816102320c232..0b31dc67112ed 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-06-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-06-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 fde3489c5f507..e5e5ad7878af6 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-06-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-06-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-06-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 6a33eadd6b057..23541cb530a74 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-06-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 7ae4d775bcd20..ab508651d938b 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-06-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 7d252b39ff8a6..ebde30f4a35c4 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-06-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 6a7094a952eff..a27192ecd511f 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-06-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 d38d7ac721c6d..9b7fcd6d8d481 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-06-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 437c5c96c68dd..c22c9b508f1c1 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-06-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 aa7430cf409e6..619b655cc42b8 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 2e1b0d56c979d..efc8e556fb622 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 d64473d6369b9..a80dd0ef7bb12 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,8 +17,6 @@ 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 CassandraKeyspaceCreateUpdateParameters from ._models_py3 import CassandraKeyspaceGetPropertiesOptions @@ -34,18 +32,7 @@ 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 Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties from ._models_py3 import CompositePath @@ -57,14 +44,8 @@ from ._models_py3 import ContinuousModeBackupPolicy from ._models_py3 import CorsPolicy 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 +54,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 +75,7 @@ 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 ManagedServiceIdentity from ._models_py3 import Metric from ._models_py3 import MetricAvailability @@ -161,8 +125,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 @@ -184,11 +146,6 @@ from ._models_py3 import RestorableSqlDatabasesListResult 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 +159,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,8 +208,6 @@ 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 CassandraKeyspaceCreateUpdateParameters # type: ignore from ._models import CassandraKeyspaceGetPropertiesOptions # type: ignore @@ -271,18 +223,7 @@ 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 Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore from ._models import CompositePath # type: ignore @@ -294,14 +235,8 @@ from ._models import ContinuousModeBackupPolicy # type: ignore from ._models import CorsPolicy # type: ignore 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 +245,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 +266,7 @@ 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 ManagedServiceIdentity # type: ignore from ._models import Metric # type: ignore from ._models import MetricAvailability # type: ignore @@ -398,8 +316,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 @@ -421,11 +337,6 @@ from ._models import RestorableSqlDatabasesListResult # type: ignore 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 +350,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 @@ -484,10 +392,8 @@ from ._cosmos_db_management_client_enums import ( AnalyticalStorageSchemaType, ApiType, - AuthenticationMethod, BackupPolicyMigrationStatus, BackupPolicyType, - BackupStorageRedundancy, CompositePathSortOrder, ConflictResolutionMode, ConnectorOffer, @@ -496,14 +402,10 @@ DataType, DatabaseAccountKind, DefaultConsistencyLevel, - EnableFullTextQuery, IndexKind, IndexingMode, KeyKind, - ManagedCassandraProvisioningState, NetworkAclBypass, - NodeState, - NodeStatus, NotebookWorkspaceName, OperationType, PartitionKind, @@ -513,9 +415,6 @@ RestoreMode, RoleDefinitionType, ServerVersion, - ServiceSize, - ServiceStatus, - ServiceType, SpatialType, TriggerOperation, TriggerType, @@ -533,8 +432,6 @@ 'BackupInformation', 'BackupPolicy', 'BackupPolicyMigrationState', - 'BackupResource', - 'BackupResourceProperties', 'Capability', 'CassandraKeyspaceCreateUpdateParameters', 'CassandraKeyspaceGetPropertiesOptions', @@ -550,18 +447,7 @@ 'CassandraTableGetResults', 'CassandraTableListResult', 'CassandraTableResource', - 'CassandraViewCreateUpdateParameters', - 'CassandraViewGetPropertiesOptions', - 'CassandraViewGetPropertiesResource', - 'CassandraViewGetResults', - 'CassandraViewListResult', - 'CassandraViewResource', - 'Certificate', 'ClusterKey', - 'ClusterNodeStatus', - 'ClusterNodeStatusNodesItem', - 'ClusterResource', - 'ClusterResourceProperties', 'Column', 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', 'CompositePath', @@ -573,14 +459,8 @@ 'ContinuousModeBackupPolicy', 'CorsPolicy', 'CreateUpdateOptions', - 'DataCenterResource', - 'DataCenterResourceProperties', - 'DataTransferRegionalServiceResource', - 'DataTransferServiceResource', - 'DataTransferServiceResourceProperties', 'DatabaseAccountConnectionString', 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountCreateUpdateProperties', 'DatabaseAccountGetResults', 'DatabaseAccountListConnectionStringsResult', 'DatabaseAccountListKeysResult', @@ -589,22 +469,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 +490,7 @@ 'Indexes', 'IndexingPolicy', 'IpAddressOrRange', - 'ListBackups', - 'ListClusters', - 'ListDataCenters', 'Location', - 'LocationGetResult', - 'LocationListResult', - 'LocationProperties', 'ManagedServiceIdentity', 'Metric', 'MetricAvailability', @@ -677,8 +540,6 @@ 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'RegionForOnlineOffline', - 'RegionalServiceResource', - 'RepairPostBody', 'Resource', 'RestorableDatabaseAccountGetResult', 'RestorableDatabaseAccountsListResult', @@ -700,11 +561,6 @@ 'RestorableSqlDatabasesListResult', 'RestorableSqlResourcesListResult', 'RestoreParameters', - 'SeedNode', - 'ServiceResource', - 'ServiceResourceCreateUpdateParameters', - 'ServiceResourceListResult', - 'ServiceResourceProperties', 'SpatialSpec', 'SqlContainerCreateUpdateParameters', 'SqlContainerGetPropertiesOptions', @@ -718,9 +574,6 @@ 'SqlDatabaseGetResults', 'SqlDatabaseListResult', 'SqlDatabaseResource', - 'SqlDedicatedGatewayRegionalServiceResource', - 'SqlDedicatedGatewayServiceResource', - 'SqlDedicatedGatewayServiceResourceProperties', 'SqlRoleAssignmentCreateUpdateParameters', 'SqlRoleAssignmentGetResults', 'SqlRoleAssignmentListResult', @@ -761,10 +614,8 @@ 'VirtualNetworkRule', 'AnalyticalStorageSchemaType', 'ApiType', - 'AuthenticationMethod', 'BackupPolicyMigrationStatus', 'BackupPolicyType', - 'BackupStorageRedundancy', 'CompositePathSortOrder', 'ConflictResolutionMode', 'ConnectorOffer', @@ -773,14 +624,10 @@ 'DataType', 'DatabaseAccountKind', 'DefaultConsistencyLevel', - 'EnableFullTextQuery', 'IndexKind', 'IndexingMode', 'KeyKind', - 'ManagedCassandraProvisioningState', 'NetworkAclBypass', - 'NodeState', - 'NodeStatus', 'NotebookWorkspaceName', 'OperationType', 'PartitionKind', @@ -790,9 +637,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 ec0159dc473f1..2762ab2e169a0 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 @@ -44,15 +44,6 @@ class ApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SQL = "Sql" GREMLIN_V2 = "GremlinV2" -class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Which authentication method Cassandra should use to authenticate clients. 'None' turns off - authentication, so should not be used except in emergencies. 'Cassandra' is the default - password based authentication. The default is 'Cassandra'. - """ - - NONE = "None" - CASSANDRA = "Cassandra" - class BackupPolicyMigrationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Describes the status of migration between backup policy types. """ @@ -69,14 +60,6 @@ class BackupPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PERIODIC = "Periodic" CONTINUOUS = "Continuous" -class BackupStorageRedundancy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Enum to indicate type of backup storage redundancy. - """ - - GEO = "Geo" - LOCAL = "Local" - ZONE = "Zone" - class CompositePathSortOrder(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Sort order for composite paths. """ @@ -142,14 +125,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. """ @@ -175,17 +150,6 @@ class KeyKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PRIMARY_READONLY = "primaryReadonly" SECONDARY_READONLY = "secondaryReadonly" -class ManagedCassandraProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the resource at the time the operation was called. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - CANCELED = "Canceled" - class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates what services are allowed to bypass firewall checks. """ @@ -193,23 +157,6 @@ class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NONE = "None" AZURE_SERVICES = "AzureServices" -class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the node in relation to the cluster. - """ - - NORMAL = "Normal" - LEAVING = "Leaving" - JOINING = "Joining" - MOVING = "Moving" - STOPPED = "Stopped" - -class NodeStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the node is functioning or not. - """ - - UP = "Up" - DOWN = "Down" - class NotebookWorkspaceName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DEFAULT = "default" @@ -282,33 +229,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 375a62305b6cf..0b4d16539e72b 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,61 +301,6 @@ def __init__( self.start_time = kwargs.get('start_time', None) -class BackupResource(ARMProxyResource): - """A restorable backup of a 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 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 - """ - - _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': 'BackupResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceProperties(msrest.serialization.Model): - """BackupResourceProperties. - - :param timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. - :type timestamp: ~datetime.datetime - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - - class Capability(msrest.serialization.Model): """Cosmos DB capability object. @@ -402,8 +343,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 +363,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 +546,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 +564,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 +670,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 +690,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 +837,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 +855,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,1594 +893,402 @@ 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. +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. - :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 + :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': {'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'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs['resource'] - self.options = kwargs.get('options', None) + super(ClusterKey, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order_by = kwargs.get('order_by', None) -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. +class Column(msrest.serialization.Model): + """Cosmos DB Cassandra table column. - :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 name: Name of the Cosmos DB Cassandra table column. + :type name: str + :param type: Type of the Cosmos DB Cassandra table column. + :type type: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewGetPropertiesOptions, self).__init__(**kwargs) + super(Column, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :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 principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.view_definition = kwargs['view_definition'] - - -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = 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 CompositePath(msrest.serialization.Model): + """CompositePath. - :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 + :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 + :param order: Sort order for composite paths. Possible values include: "ascending", + "descending". + :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder """ - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'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'}, + 'path': {'key': 'path', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, } 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(CompositePath, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.order = kwargs.get('order', None) -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. - Variables are only populated by the server, and will be ignored when sending a request. +class ConflictResolutionPolicy(msrest.serialization.Model): + """The conflict resolution policy for the container. - :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.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", + "Custom". Default value: "LastWriterWins". + :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode + :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins + mode. + :type conflict_resolution_path: str + :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom + mode. + :type conflict_resolution_procedure: str """ - _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'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, + 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CassandraViewGetResults, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(ConflictResolutionPolicy, self).__init__(**kwargs) + self.mode = kwargs.get('mode', "LastWriterWins") + self.conflict_resolution_path = kwargs.get('conflict_resolution_path', None) + self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', None) -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. +class ConsistencyPolicy(msrest.serialization.Model): + """The consistency policy for the Cosmos DB database account. - 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 value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :param default_consistency_level: Required. The default consistency level and configuration + settings of the Cosmos DB account. Possible values include: "Eventual", "Session", + "BoundedStaleness", "Strong", "ConsistentPrefix". + :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel + :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value + represents the number of stale requests tolerated. Accepted range for this value is 1 – + 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this + value represents the time amount of staleness (in seconds) tolerated. Accepted range for this + value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int """ _validation = { - 'value': {'readonly': True}, - } + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, + } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, } def __init__( self, **kwargs ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None + super(ConsistencyPolicy, self).__init__(**kwargs) + self.default_consistency_level = kwargs['default_consistency_level'] + self.max_staleness_prefix = kwargs.get('max_staleness_prefix', None) + self.max_interval_in_seconds = kwargs.get('max_interval_in_seconds', None) -class Certificate(msrest.serialization.Model): - """Certificate. +class ContainerPartitionKey(msrest.serialization.Model): + """The configuration of the partition key to be used for partitioning data into multiple partitions. + + Variables are only populated by the server, and will be ignored when sending a request. - :param pem: PEM formatted public key. - :type pem: str + :param paths: List of paths using which data within the container can be partitioned. + :type paths: list[str] + :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple + partition keys (upto three maximum) are supported for container create. Possible values + include: "Hash", "Range", "MultiHash". Default value: "Hash". + :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind + :param version: Indicates the version of the partition key definition. + :type version: int + :ivar system_key: Indicates if the container is using a system generated partition key. + :vartype system_key: bool """ - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, + _validation = { + 'version': {'maximum': 2, 'minimum': 1}, + 'system_key': {'readonly': True}, } - 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'}, + 'paths': {'key': 'paths', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'system_key': {'key': 'systemKey', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ClusterKey, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order_by = kwargs.get('order_by', None) + super(ContainerPartitionKey, self).__init__(**kwargs) + self.paths = kwargs.get('paths', None) + self.kind = kwargs.get('kind', "Hash") + self.version = kwargs.get('version', None) + self.system_key = None -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). +class ContinuousBackupInformation(msrest.serialization.Model): + """Information about the status of continuous backups. - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] + :param latest_restorable_timestamp: The latest restorable timestamp for a resource. + :type latest_restorable_timestamp: str """ _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, + 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = kwargs.get('nodes', None) + super(ContinuousBackupInformation, self).__init__(**kwargs) + self.latest_restorable_timestamp = kwargs.get('latest_restorable_timestamp', None) -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. +class ContinuousBackupRestoreLocation(msrest.serialization.Model): + """Properties of the regional restorable account. - :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 + :param location: The name of the continuous backup restore location. + :type location: 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'}, + 'location': {'key': 'location', '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) + super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) + self.location = kwargs.get('location', None) -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. +class ContinuousModeBackupPolicy(BackupPolicy): + """The object representing continuous mode backup policy. - 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 properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties + :param type: Required. Describes the mode of backups.Constant filled by server. Possible + values include: "Periodic", "Continuous". + :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType + :param migration_state: The object representing the state of the migration between the backup + policies. + :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'type': {'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'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, } def __init__( self, **kwargs ): - super(ClusterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + super(ContinuousModeBackupPolicy, self).__init__(**kwargs) + self.type = 'Continuous' # type: str + +class CorsPolicy(msrest.serialization.Model): + """The CORS policy for the Cosmos DB database account. -class ClusterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra cluster. + All required parameters must be populated in order to send to Azure. - Variables are only populated by the server, and will be ignored when sending a request. + :param allowed_origins: Required. The origin domains that are permitted to make a request + against the service via CORS. + :type allowed_origins: str + :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a + CORS request. + :type allowed_methods: str + :param allowed_headers: The request headers that the origin domain may specify on the CORS + request. + :type allowed_headers: str + :param exposed_headers: The response headers that may be sent in the response to the CORS + request and exposed by the browser to the request issuer. + :type exposed_headers: str + :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight + OPTIONS request. + :type max_age_in_seconds: long + """ - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. - To restore a backup into a new cluster, set this field to the resource id of the backup. - :type restore_from_backup_id: str - :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management - service should have its network interface attached to. The subnet must be routable to all - subnets that will be delegated to data centers. The resource id must be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_management_subnet_id: str - :param cassandra_version: Which version of Cassandra should this cluster converge to running - (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. - :type cassandra_version: str - :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to - something besides the resource name of the cluster, set the value to use on this property. - :type cluster_name_override: str - :param authentication_method: Which authentication method Cassandra should use to authenticate - clients. 'None' turns off authentication, so should not be used except in emergencies. - 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible - values include: "None", "Cassandra". - :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod - :param initial_cassandra_admin_password: Initial password for clients connecting as admin to - 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 - :param repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true, - and should stay true unless you are running a hybrid cluster where you are already doing your - own repairs. - :type repair_enabled: bool - :param client_certificates: List of TLS certificates used to authorize clients connecting to - the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if - clientCertificates is set, the managed Cassandra cluster will reject all connections not - bearing a TLS client certificate that can be validated from one or more of the public - certificates in this property. - :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_gossip_certificates: List of TLS certificates used to authorize gossip from - unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be - verifiable using one of the certificates provided in this property. - :type external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip - with managed nodes. All managed nodes will present TLS client certificates that are verifiable - using one of the certificates provided in this property. - :vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These - will be added to the seed node lists of all managed nodes. - :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :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] - """ - - _validation = { - 'gossip_certificates': {'readonly': True}, - 'seed_nodes': {'readonly': True}, + _validation = { + 'allowed_origins': {'required': True}, + 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, } _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, - 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, - 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, - '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]'}, - 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, - 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, - 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, } def __init__( self, **kwargs ): - super(ClusterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.restore_from_backup_id = kwargs.get('restore_from_backup_id', None) - self.delegated_management_subnet_id = kwargs.get('delegated_management_subnet_id', None) - self.cassandra_version = kwargs.get('cassandra_version', None) - 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) - self.external_gossip_certificates = kwargs.get('external_gossip_certificates', None) - self.gossip_certificates = None - self.external_seed_nodes = kwargs.get('external_seed_nodes', None) - self.seed_nodes = None + super(CorsPolicy, self).__init__(**kwargs) + self.allowed_origins = kwargs['allowed_origins'] + self.allowed_methods = kwargs.get('allowed_methods', None) + self.allowed_headers = kwargs.get('allowed_headers', None) + self.exposed_headers = kwargs.get('exposed_headers', None) + self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) -class Column(msrest.serialization.Model): - """Cosmos DB Cassandra table column. +class CreateUpdateOptions(msrest.serialization.Model): + """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". - :param name: Name of the Cosmos DB Cassandra table column. - :type name: str - :param type: Type of the Cosmos DB Cassandra table column. - :type type: str + :param throughput: Request Units per second. For example, "throughput": 10000. + :type throughput: int + :param autoscale_settings: Specifies the Autoscale settings. + :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__( self, **kwargs ): - super(Column, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) + super(CreateUpdateOptions, self).__init__(**kwargs) + self.throughput = kwargs.get('throughput', None) + self.autoscale_settings = kwargs.get('autoscale_settings', None) -class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): - """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +class DatabaseAccountConnectionString(msrest.serialization.Model): + """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :ivar connection_string: Value of the connection string. + :vartype connection_string: str + :ivar description: Description of the connection string. + :vartype description: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, } - def __init__( - self, - **kwargs - ): - super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class CompositePath(msrest.serialization.Model): - """CompositePath. - - :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 - :param order: Sort order for composite paths. Possible values include: "ascending", - "descending". - :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder - """ - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__( self, **kwargs ): - super(CompositePath, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.order = kwargs.get('order', None) - - -class ConflictResolutionPolicy(msrest.serialization.Model): - """The conflict resolution policy for the container. + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None - :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", - "Custom". Default value: "LastWriterWins". - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins - mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom - mode. - :type conflict_resolution_procedure: str - """ - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, - } +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB database accounts. - def __init__( - self, - **kwargs - ): - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', "LastWriterWins") - self.conflict_resolution_path = kwargs.get('conflict_resolution_path', None) - self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', 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 ConsistencyPolicy(msrest.serialization.Model): - """The consistency policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". - :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value - represents the number of stale requests tolerated. Accepted range for this value is 1 – - 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this - value represents the time amount of staleness (in seconds) tolerated. Accepted range for this - value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = kwargs['default_consistency_level'] - self.max_staleness_prefix = kwargs.get('max_staleness_prefix', None) - self.max_interval_in_seconds = kwargs.get('max_interval_in_seconds', None) - - -class ContainerPartitionKey(msrest.serialization.Model): - """The configuration of the partition key to be used for partitioning data into multiple partitions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param paths: List of paths using which data within the container can be partitioned. - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - :param version: Indicates the version of the partition key definition. - :type version: int - :ivar system_key: Indicates if the container is using a system generated partition key. - :vartype system_key: bool - """ - - _validation = { - 'version': {'maximum': 2, 'minimum': 1}, - 'system_key': {'readonly': True}, - } - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - 'system_key': {'key': 'systemKey', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = kwargs.get('paths', None) - self.kind = kwargs.get('kind', "Hash") - self.version = kwargs.get('version', None) - self.system_key = None - - -class ContinuousBackupInformation(msrest.serialization.Model): - """Information about the status of continuous backups. - - :param latest_restorable_timestamp: The latest restorable timestamp for a resource. - :type latest_restorable_timestamp: str - """ - - _attribute_map = { - 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousBackupInformation, self).__init__(**kwargs) - self.latest_restorable_timestamp = kwargs.get('latest_restorable_timestamp', None) - - -class ContinuousBackupRestoreLocation(msrest.serialization.Model): - """Properties of the regional restorable account. - - :param location: The name of the continuous backup restore location. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - - -class ContinuousModeBackupPolicy(BackupPolicy): - """The object representing continuous mode backup policy. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Describes the mode of backups.Constant filled by server. Possible - values include: "Periodic", "Continuous". - :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType - :param migration_state: The object representing the state of the migration between the backup - policies. - :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousModeBackupPolicy, self).__init__(**kwargs) - self.type = 'Continuous' # type: str - - -class CorsPolicy(msrest.serialization.Model): - """The CORS policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. - :type allowed_origins: str - :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a - CORS request. - :type allowed_methods: str - :param allowed_headers: The request headers that the origin domain may specify on the CORS - request. - :type allowed_headers: str - :param exposed_headers: The response headers that may be sent in the response to the CORS - request and exposed by the browser to the request issuer. - :type exposed_headers: str - :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight - OPTIONS request. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, - } - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, - 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, - 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, - 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(CorsPolicy, self).__init__(**kwargs) - self.allowed_origins = kwargs['allowed_origins'] - self.allowed_methods = kwargs.get('allowed_methods', None) - self.allowed_headers = kwargs.get('allowed_headers', None) - self.exposed_headers = kwargs.get('exposed_headers', None) - self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) - - -class CreateUpdateOptions(msrest.serialization.Model): - """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". - - :param throughput: Request Units per second. For example, "throughput": 10000. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings - """ - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(CreateUpdateOptions, self).__init__(**kwargs) - self.throughput = kwargs.get('throughput', None) - self.autoscale_settings = kwargs.get('autoscale_settings', None) - - -class DatabaseAccountConnectionString(msrest.serialization.Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar connection_string: Value of the connection string. - :vartype connection_string: str - :ivar description: Description of the connection string. - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None - - -class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB database accounts. - - 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 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 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 = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'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'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - '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'}, - } - - database_account_offer_type = "Standard" - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - 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 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. - - 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 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 - :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 - called. The status can be one of following. 'Creating' – the Cosmos DB account is being - created. When an account is in Creating state, only properties that are specified as input for - the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is - active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB - account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – - the Cosmos DB account deletion failed. - :vartype provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default - value: Standard. The only acceptable values to pass in are None and "Standard". The default - value is None. - :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 consistency_policy: The consistency policy for the Cosmos DB database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB - account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. - :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by their failover - priorities. - :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - :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] - :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the - Cosmos DB account. - :vartype private_endpoint_connections: - list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] - :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. - :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 - :ivar instance_id: A unique identifier assigned to the database account. - :vartype instance_id: str - :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 restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'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'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - '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'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountGetResults, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.system_data = None - self.provisioning_state = None - self.document_endpoint = None - self.database_account_offer_type = None - 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.consistency_policy = kwargs.get('consistency_policy', None) - self.capabilities = kwargs.get('capabilities', None) - self.write_locations = None - self.read_locations = None - self.locations = None - self.failover_policies = None - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.private_endpoint_connections = 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.instance_id = None - self.create_mode = kwargs.get('create_mode', "Default") - self.restore_parameters = kwargs.get('restore_parameters', None) - 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) - - -class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings for the Cosmos DB - account. - :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = kwargs.get('connection_strings', None) - - -class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None - - -class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - :ivar primary_master_key: Base 64 encoded value of the primary read-write key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. - :vartype secondary_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - - -class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): - """Parameters to regenerate the keys within the database account. - - All required parameters must be populated in order to send to Azure. - - :param key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = kwargs['key_kind'] - - -class DatabaseAccountsListResult(msrest.serialization.Model): - """The List operation response, that contains the database accounts and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of database account and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountsListResult, self).__init__(**kwargs) - self.value = None - - -class DatabaseAccountUpdateParameters(msrest.serialization.Model): - """Parameters for patching Azure Cosmos DB database account properties. - + :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 @@ -2559,15 +1296,19 @@ class DatabaseAccountUpdateParameters(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 location: The location of the resource group to which the resource belongs. - :type location: str + :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: An array that contains the georeplication locations enabled for the Cosmos DB - account. + :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 @@ -2611,6 +1352,9 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :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 :param cors: The CORS policy for the Cosmos DB database account. @@ -2621,20 +1365,32 @@ 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 restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + } + _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + '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}'}, + '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'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, @@ -2651,24 +1407,26 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, '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'}, } + database_account_offer_type = "Standard" + def __init__( self, **kwargs ): - super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) + 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.get('locations', 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) @@ -2685,348 +1443,55 @@ 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 = 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) -class DatabaseRestoreResource(msrest.serialization.Model): - """Specific Databases to restore. - - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for restore. - :type collection_names: list[str] - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.collection_names = kwargs.get('collection_names', None) - - -class DataCenterResource(ARMProxyResource): - """A managed Cassandra data center. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB 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. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str - :ivar name: The name of the database account. + :ivar name: The name of the ARM resource. :vartype name: str :ivar type: The type of Azure resource. :vartype type: str - :param properties: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - """ - - _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': 'DataCenterResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(DataCenterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class DataCenterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :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". + :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 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 + called. The status can be one of following. 'Creating' – the Cosmos DB account is being + created. When an account is in Creating state, only properties that are specified as input for + the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is + active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB + account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – + the Cosmos DB account deletion failed. + :vartype provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default + value: Standard. The only acceptable values to pass in are None and "Standard". The default + value is None. :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3038,11 +1503,27 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the Cosmos DB database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account. :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB + account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. + :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by their failover + priorities. + :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :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] + :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the + Cosmos DB account. + :vartype private_endpoint_connections: + list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :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. @@ -3064,16 +1545,20 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :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. + :param api_properties: API specific properties. :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". + :ivar instance_id: A unique identifier assigned to the database account. + :vartype instance_id: str + :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 restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :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. @@ -3084,343 +1569,256 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :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}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'instance_id': {'readonly': True}, } _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + '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}'}, + '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'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = kwargs['failover_policies'] - + 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 + self.database_account_offer_type = None + 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.consistency_policy = kwargs.get('consistency_policy', None) + self.capabilities = kwargs.get('capabilities', None) + self.write_locations = None + self.read_locations = None + self.locations = None + self.failover_policies = None + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.private_endpoint_connections = 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.instance_id = None + self.create_mode = kwargs.get('create_mode', "Default") + self.restore_parameters = kwargs.get('restore_parameters', None) + 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.disable_local_auth = kwargs.get('disable_local_auth', None) -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. +class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): + """The connection strings for the given database account. - :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 + :param connection_strings: An array that contains the connection strings for the Cosmos DB + account. + :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ - _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'}, + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, } 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) + **kwargs + ): + super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + self.connection_strings = kwargs.get('connection_strings', None) -class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. +class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): + """The read-only access keys for the given database account. 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 + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'graph_api_compute_endpoint': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'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'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, } def __init__( self, **kwargs ): - super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) - self.graph_api_compute_endpoint = None + super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None + +class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): + """The access keys for the given database account. -class GraphAPIComputeServiceResource(msrest.serialization.Model): - """Describes the service response property for GraphAPICompute. + Variables are only populated by the server, and will be ignored when sending a request. - :param properties: Properties for GraphAPIComputeServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str + :ivar primary_master_key: Base 64 encoded value of the primary read-write key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. + :vartype secondary_master_key: str """ + _validation = { + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, + } + _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, } def __init__( self, **kwargs ): - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - + super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None -class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): - """Properties for GraphAPIComputeServiceResource. - Variables are only populated by the server, and will be ignored when sending a request. +class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): + """Parameters to regenerate the keys within the database account. 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] + :param key_kind: Required. The access key to regenerate. Possible values include: "primary", + "secondary", "primaryReadonly", "secondaryReadonly". + :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + 'key_kind': {'required': 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]'}, + 'key_kind': {'key': 'keyKind', 'type': 'str'}, } 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 + super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_kind = kwargs['key_kind'] -class GraphResource(msrest.serialization.Model): - """Cosmos DB Graph resource object. +class DatabaseAccountsListResult(msrest.serialization.Model): + """The List operation response, that contains the database accounts and their properties. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param id: Required. Name of the Cosmos DB Graph. - :type id: str + :ivar value: List of database account and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] """ _validation = { - 'id': {'required': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, } 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. + super(DatabaseAccountsListResult, self).__init__(**kwargs) + self.value = 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 DatabaseAccountUpdateParameters(msrest.serialization.Model): + """Parameters for patching Azure Cosmos DB database account properties. - :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 @@ -3428,184 +1826,262 @@ class GraphResourceCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] + :param location: The location of the resource group to which the resource belongs. + :type location: 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 + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :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 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 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 """ - _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}'}, + 'location': {'key': 'location', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(GraphResourceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs['resource'] - self.options = kwargs.get('options', None) + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.consistency_policy = kwargs.get('consistency_policy', None) + self.locations = kwargs.get('locations', None) + 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.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.disable_local_auth = kwargs.get('disable_local_auth', None) -class GraphResourceGetPropertiesOptions(OptionsResource): - """GraphResourceGetPropertiesOptions. +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. - :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 database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] + """ + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseRestoreResource, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.collection_names = kwargs.get('collection_names', 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 = { - '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 +2106,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 +2126,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 +2249,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 +2267,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 +2327,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 +2347,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 +2516,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 +2534,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,75 +2689,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. - - :param value: Container for the array of clusters. - :type value: list[~azure.mgmt.cosmosdb.models.ClusterResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ClusterResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListClusters, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ListDataCenters(msrest.serialization.Model): - """List of managed Cassandra data centers and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of data centers. - :vartype value: list[~azure.mgmt.cosmosdb.models.DataCenterResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DataCenterResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListDataCenters, self).__init__(**kwargs) - self.value = None - - class Location(msrest.serialization.Model): """A region in which the Azure Cosmos DB database account is deployed. @@ -4326,135 +2721,32 @@ class Location(msrest.serialization.Model): """ _validation = { - 'id': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(Location, self).__init__(**kwargs) - self.id = None - self.location_name = kwargs.get('location_name', None) - self.document_endpoint = None - self.provisioning_state = None - self.failover_priority = kwargs.get('failover_priority', None) - self.is_zone_redundant = kwargs.get('is_zone_redundant', None) - - -class LocationGetResult(ARMProxyResource): - """Cosmos DB location get result. - - 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: Cosmos DB location metadata. - :type properties: ~azure.mgmt.cosmosdb.models.LocationProperties - """ - - _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': 'LocationProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(LocationGetResult, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class LocationListResult(msrest.serialization.Model): - """The List operation response, that contains Cosmos DB locations and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Cosmos DB locations and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.LocationGetResult] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocationGetResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(LocationListResult, self).__init__(**kwargs) - self.value = None - - -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 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] - """ - - _validation = { - 'status': {'readonly': True}, - 'supports_availability_zone': {'readonly': True}, - 'is_residency_restricted': {'readonly': True}, - 'backup_storage_redundancies': {'readonly': True}, + 'id': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'failover_priority': {'minimum': 0}, } _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]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'document_endpoint': {'key': 'documentEndpoint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + 'is_zone_redundant': {'key': 'isZoneRedundant', 'type': 'bool'}, } 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(Location, self).__init__(**kwargs) + self.id = None + self.location_name = kwargs.get('location_name', None) + self.document_endpoint = None + self.provisioning_state = None + self.failover_priority = kwargs.get('failover_priority', None) + self.is_zone_redundant = kwargs.get('is_zone_redundant', None) class ManagedServiceIdentity(msrest.serialization.Model): @@ -4783,8 +3075,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 +3095,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 +3242,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 +3260,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 +3320,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 +3340,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 +3463,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 +3481,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'}, } @@ -5908,9 +4188,6 @@ class PeriodicModeProperties(msrest.serialization.Model): :param backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained. :type backup_retention_interval_in_hours: int - :param backup_storage_redundancy: Enum to indicate type of backup residency. Possible values - include: "Geo", "Local", "Zone". - :type backup_storage_redundancy: str or ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ _validation = { @@ -5921,7 +4198,6 @@ class PeriodicModeProperties(msrest.serialization.Model): _attribute_map = { 'backup_interval_in_minutes': {'key': 'backupIntervalInMinutes', 'type': 'int'}, 'backup_retention_interval_in_hours': {'key': 'backupRetentionIntervalInHours', 'type': 'int'}, - 'backup_storage_redundancy': {'key': 'backupStorageRedundancy', 'type': 'str'}, } def __init__( @@ -5931,7 +4207,6 @@ def __init__( super(PeriodicModeProperties, self).__init__(**kwargs) self.backup_interval_in_minutes = kwargs.get('backup_interval_in_minutes', None) self.backup_retention_interval_in_hours = kwargs.get('backup_retention_interval_in_hours', None) - self.backup_storage_redundancy = kwargs.get('backup_storage_redundancy', None) class Permission(msrest.serialization.Model): @@ -6243,36 +4518,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 +5252,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 +5266,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 +5280,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 +5304,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): @@ -7155,119 +5400,6 @@ def __init__( self.databases_to_restore = kwargs.get('databases_to_restore', None) -class SeedNode(msrest.serialization.Model): - """SeedNode. - - :param ip_address: IP address of this seed node. - :type ip_address: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SeedNode, self).__init__(**kwargs) - 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 +5446,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 +5466,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 +5591,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 +5609,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 +5669,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 +5689,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 +5724,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 +5738,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 +5749,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 +5769,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 +5799,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 +5817,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 +5855,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 +6095,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 +6115,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 +6224,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 +6240,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 +6298,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 +6318,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 +6445,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 +6461,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 +6519,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 +6539,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 +6648,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 +6664,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 +6763,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 +6783,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 +6906,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 +6924,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 +7102,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 +7118,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 +7151,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 +7168,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 393472f2bc030..89aa850cadd69 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,65 +326,6 @@ def __init__( self.start_time = start_time -class BackupResource(ARMProxyResource): - """A restorable backup of a 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 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 - """ - - _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': 'BackupResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["BackupResourceProperties"] = None, - **kwargs - ): - super(BackupResource, self).__init__(**kwargs) - self.properties = properties - - -class BackupResourceProperties(msrest.serialization.Model): - """BackupResourceProperties. - - :param timestamp: The time this backup was taken, formatted like 2021-01-21T17:35:21. - :type timestamp: ~datetime.datetime - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - timestamp: Optional[datetime.datetime] = None, - **kwargs - ): - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = timestamp - - class Capability(msrest.serialization.Model): """Cosmos DB capability object. @@ -434,8 +370,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 +390,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 +400,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 +588,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 +606,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 +615,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 +723,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 +743,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 +753,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 +908,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 +926,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 +935,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,1774 +969,438 @@ 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. +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. - :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 + :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': {'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'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, } def __init__( self, *, - resource: "CassandraViewResource", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + name: Optional[str] = None, + order_by: Optional[str] = None, **kwargs ): - super(CassandraViewCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(ClusterKey, self).__init__(**kwargs) + self.name = name + self.order_by = order_by -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. +class Column(msrest.serialization.Model): + """Cosmos DB Cassandra table column. - :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 name: Name of the Cosmos DB Cassandra table column. + :type name: str + :param type: Type of the Cosmos DB Cassandra table column. + :type type: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + name: Optional[str] = None, + type: Optional[str] = None, **kwargs ): - super(CassandraViewGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) + super(Column, self).__init__(**kwargs) + self.name = name + self.type = type -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :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 principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, - *, - id: str, - view_definition: str, **kwargs ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = id - self.view_definition = view_definition - - -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = 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 CompositePath(msrest.serialization.Model): + """CompositePath. - :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 + :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 + :param order: Sort order for composite paths. Possible values include: "ascending", + "descending". + :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder """ - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'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'}, + 'path': {'key': 'path', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, } def __init__( self, *, - id: str, - view_definition: str, + path: Optional[str] = None, + order: Optional[Union[str, "CompositePathSortOrder"]] = 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(CompositePath, self).__init__(**kwargs) + self.path = path + self.order = order -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. - Variables are only populated by the server, and will be ignored when sending a request. +class ConflictResolutionPolicy(msrest.serialization.Model): + """The conflict resolution policy for the container. - :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.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", + "Custom". Default value: "LastWriterWins". + :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode + :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins + mode. + :type conflict_resolution_path: str + :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom + mode. + :type conflict_resolution_procedure: str """ - _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'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, + 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, } def __init__( self, *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraViewGetPropertiesResource"] = None, - options: Optional["CassandraViewGetPropertiesOptions"] = None, + mode: Optional[Union[str, "ConflictResolutionMode"]] = "LastWriterWins", + conflict_resolution_path: Optional[str] = None, + conflict_resolution_procedure: Optional[str] = None, **kwargs ): - super(CassandraViewGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(ConflictResolutionPolicy, self).__init__(**kwargs) + self.mode = mode + self.conflict_resolution_path = conflict_resolution_path + self.conflict_resolution_procedure = conflict_resolution_procedure -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. +class ConsistencyPolicy(msrest.serialization.Model): + """The consistency policy for the Cosmos DB database account. - 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 value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :param default_consistency_level: Required. The default consistency level and configuration + settings of the Cosmos DB account. Possible values include: "Eventual", "Session", + "BoundedStaleness", "Strong", "ConsistentPrefix". + :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel + :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value + represents the number of stale requests tolerated. Accepted range for this value is 1 – + 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this + value represents the time amount of staleness (in seconds) tolerated. Accepted range for this + value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int """ _validation = { - 'value': {'readonly': True}, + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, } def __init__( self, + *, + default_consistency_level: Union[str, "DefaultConsistencyLevel"], + max_staleness_prefix: Optional[int] = None, + max_interval_in_seconds: Optional[int] = None, **kwargs ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None + super(ConsistencyPolicy, self).__init__(**kwargs) + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds -class Certificate(msrest.serialization.Model): - """Certificate. +class ContainerPartitionKey(msrest.serialization.Model): + """The configuration of the partition key to be used for partitioning data into multiple partitions. + + Variables are only populated by the server, and will be ignored when sending a request. - :param pem: PEM formatted public key. - :type pem: str + :param paths: List of paths using which data within the container can be partitioned. + :type paths: list[str] + :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple + partition keys (upto three maximum) are supported for container create. Possible values + include: "Hash", "Range", "MultiHash". Default value: "Hash". + :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind + :param version: Indicates the version of the partition key definition. + :type version: int + :ivar system_key: Indicates if the container is using a system generated partition key. + :vartype system_key: bool """ + _validation = { + 'version': {'maximum': 2, 'minimum': 1}, + 'system_key': {'readonly': True}, + } + _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, + 'paths': {'key': 'paths', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'system_key': {'key': 'systemKey', 'type': 'bool'}, } def __init__( self, *, - pem: Optional[str] = None, + paths: Optional[List[str]] = None, + kind: Optional[Union[str, "PartitionKind"]] = "Hash", + version: Optional[int] = None, **kwargs ): - super(Certificate, self).__init__(**kwargs) - self.pem = pem + super(ContainerPartitionKey, self).__init__(**kwargs) + self.paths = paths + self.kind = kind + self.version = version + self.system_key = None -class ClusterKey(msrest.serialization.Model): - """Cosmos DB Cassandra table cluster key. +class ContinuousBackupInformation(msrest.serialization.Model): + """Information about the status of continuous backups. - :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 + :param latest_restorable_timestamp: The latest restorable timestamp for a resource. + :type latest_restorable_timestamp: str """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, } def __init__( self, *, - name: Optional[str] = None, - order_by: Optional[str] = None, + latest_restorable_timestamp: Optional[str] = None, **kwargs ): - super(ClusterKey, self).__init__(**kwargs) - self.name = name - self.order_by = order_by + super(ContinuousBackupInformation, self).__init__(**kwargs) + self.latest_restorable_timestamp = latest_restorable_timestamp -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). +class ContinuousBackupRestoreLocation(msrest.serialization.Model): + """Properties of the regional restorable account. - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] + :param location: The name of the continuous backup restore location. + :type location: str """ _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, - nodes: Optional[List["ClusterNodeStatusNodesItem"]] = None, + location: Optional[str] = None, **kwargs ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = nodes + super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) + self.location = location + +class ContinuousModeBackupPolicy(BackupPolicy): + """The object representing continuous mode backup policy. -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. + All required parameters must be populated in order to send to Azure. - :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 + :param type: Required. Describes the mode of backups.Constant filled by server. Possible + values include: "Periodic", "Continuous". + :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType + :param migration_state: The object representing the state of the migration between the backup + policies. + :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState """ + _validation = { + 'type': {'required': True}, + } + _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'}, + 'type': {'key': 'type', 'type': 'str'}, + 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, } 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, + migration_state: Optional["BackupPolicyMigrationState"] = 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 + super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) + self.type = 'Continuous' # type: str -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. +class CorsPolicy(msrest.serialization.Model): + """The CORS policy for the Cosmos DB database account. - 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 properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties + :param allowed_origins: Required. The origin domains that are permitted to make a request + against the service via CORS. + :type allowed_origins: str + :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a + CORS request. + :type allowed_methods: str + :param allowed_headers: The request headers that the origin domain may specify on the CORS + request. + :type allowed_headers: str + :param exposed_headers: The response headers that may be sent in the response to the CORS + request and exposed by the browser to the request issuer. + :type exposed_headers: str + :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight + OPTIONS request. + :type max_age_in_seconds: long """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'allowed_origins': {'required': True}, + 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, } _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'}, + 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, } def __init__( self, *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - properties: Optional["ClusterResourceProperties"] = None, + allowed_origins: str, + allowed_methods: Optional[str] = None, + allowed_headers: Optional[str] = None, + exposed_headers: Optional[str] = None, + max_age_in_seconds: Optional[int] = 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. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. - To restore a backup into a new cluster, set this field to the resource id of the backup. - :type restore_from_backup_id: str - :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management - service should have its network interface attached to. The subnet must be routable to all - subnets that will be delegated to data centers. The resource id must be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_management_subnet_id: str - :param cassandra_version: Which version of Cassandra should this cluster converge to running - (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. - :type cassandra_version: str - :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to - something besides the resource name of the cluster, set the value to use on this property. - :type cluster_name_override: str - :param authentication_method: Which authentication method Cassandra should use to authenticate - clients. 'None' turns off authentication, so should not be used except in emergencies. - 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible - values include: "None", "Cassandra". - :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod - :param initial_cassandra_admin_password: Initial password for clients connecting as admin to - 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 - :param repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true, - and should stay true unless you are running a hybrid cluster where you are already doing your - own repairs. - :type repair_enabled: bool - :param client_certificates: List of TLS certificates used to authorize clients connecting to - the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if - clientCertificates is set, the managed Cassandra cluster will reject all connections not - bearing a TLS client certificate that can be validated from one or more of the public - certificates in this property. - :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_gossip_certificates: List of TLS certificates used to authorize gossip from - unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be - verifiable using one of the certificates provided in this property. - :type external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip - with managed nodes. All managed nodes will present TLS client certificates that are verifiable - using one of the certificates provided in this property. - :vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These - will be added to the seed node lists of all managed nodes. - :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :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] - """ - - _validation = { - 'gossip_certificates': {'readonly': True}, - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, - 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, - 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, - '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]'}, - 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, - 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, - 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - } - - def __init__( - self, - *, - provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, - restore_from_backup_id: Optional[str] = None, - delegated_management_subnet_id: Optional[str] = None, - cassandra_version: Optional[str] = None, - 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, - **kwargs - ): - super(ClusterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.restore_from_backup_id = restore_from_backup_id - self.delegated_management_subnet_id = delegated_management_subnet_id - self.cassandra_version = cassandra_version - 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 - self.external_gossip_certificates = external_gossip_certificates - self.gossip_certificates = None - self.external_seed_nodes = external_seed_nodes - self.seed_nodes = None + super(CorsPolicy, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.allowed_methods = allowed_methods + self.allowed_headers = allowed_headers + self.exposed_headers = exposed_headers + self.max_age_in_seconds = max_age_in_seconds -class Column(msrest.serialization.Model): - """Cosmos DB Cassandra table column. +class CreateUpdateOptions(msrest.serialization.Model): + """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". - :param name: Name of the Cosmos DB Cassandra table column. - :type name: str - :param type: Type of the Cosmos DB Cassandra table column. - :type type: str + :param throughput: Request Units per second. For example, "throughput": 10000. + :type throughput: int + :param autoscale_settings: Specifies the Autoscale settings. + :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__( self, *, - name: Optional[str] = None, - type: Optional[str] = None, + throughput: Optional[int] = None, + autoscale_settings: Optional["AutoscaleSettings"] = None, **kwargs ): - super(Column, self).__init__(**kwargs) - self.name = name - self.type = type + super(CreateUpdateOptions, self).__init__(**kwargs) + self.throughput = throughput + self.autoscale_settings = autoscale_settings -class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): - """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. +class DatabaseAccountConnectionString(msrest.serialization.Model): + """Connection string for the Cosmos DB account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :ivar connection_string: Value of the connection string. + :vartype connection_string: str + :ivar description: Description of the connection string. + :vartype description: str """ _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__( self, **kwargs ): - super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None -class CompositePath(msrest.serialization.Model): - """CompositePath. - - :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 - :param order: Sort order for composite paths. Possible values include: "ascending", - "descending". - :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, - } - - def __init__( - self, - *, - path: Optional[str] = None, - order: Optional[Union[str, "CompositePathSortOrder"]] = None, - **kwargs - ): - super(CompositePath, self).__init__(**kwargs) - self.path = path - self.order = order - - -class ConflictResolutionPolicy(msrest.serialization.Model): - """The conflict resolution policy for the container. - - :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", - "Custom". Default value: "LastWriterWins". - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins - mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom - mode. - :type conflict_resolution_procedure: str - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, - } - - def __init__( - self, - *, - mode: Optional[Union[str, "ConflictResolutionMode"]] = "LastWriterWins", - conflict_resolution_path: Optional[str] = None, - conflict_resolution_procedure: Optional[str] = None, - **kwargs - ): - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = mode - self.conflict_resolution_path = conflict_resolution_path - self.conflict_resolution_procedure = conflict_resolution_procedure - - -class ConsistencyPolicy(msrest.serialization.Model): - """The consistency policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". - :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value - represents the number of stale requests tolerated. Accepted range for this value is 1 – - 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this - value represents the time amount of staleness (in seconds) tolerated. Accepted range for this - value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - *, - default_consistency_level: Union[str, "DefaultConsistencyLevel"], - max_staleness_prefix: Optional[int] = None, - max_interval_in_seconds: Optional[int] = None, - **kwargs - ): - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds - - -class ContainerPartitionKey(msrest.serialization.Model): - """The configuration of the partition key to be used for partitioning data into multiple partitions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param paths: List of paths using which data within the container can be partitioned. - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - :param version: Indicates the version of the partition key definition. - :type version: int - :ivar system_key: Indicates if the container is using a system generated partition key. - :vartype system_key: bool - """ - - _validation = { - 'version': {'maximum': 2, 'minimum': 1}, - 'system_key': {'readonly': True}, - } - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - 'system_key': {'key': 'systemKey', 'type': 'bool'}, - } - - def __init__( - self, - *, - paths: Optional[List[str]] = None, - kind: Optional[Union[str, "PartitionKind"]] = "Hash", - version: Optional[int] = None, - **kwargs - ): - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = paths - self.kind = kind - self.version = version - self.system_key = None - - -class ContinuousBackupInformation(msrest.serialization.Model): - """Information about the status of continuous backups. - - :param latest_restorable_timestamp: The latest restorable timestamp for a resource. - :type latest_restorable_timestamp: str - """ - - _attribute_map = { - 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, - } - - def __init__( - self, - *, - latest_restorable_timestamp: Optional[str] = None, - **kwargs - ): - super(ContinuousBackupInformation, self).__init__(**kwargs) - self.latest_restorable_timestamp = latest_restorable_timestamp - - -class ContinuousBackupRestoreLocation(msrest.serialization.Model): - """Properties of the regional restorable account. - - :param location: The name of the continuous backup restore location. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - **kwargs - ): - super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) - self.location = location - - -class ContinuousModeBackupPolicy(BackupPolicy): - """The object representing continuous mode backup policy. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Describes the mode of backups.Constant filled by server. Possible - values include: "Periodic", "Continuous". - :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType - :param migration_state: The object representing the state of the migration between the backup - policies. - :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, - } - - def __init__( - self, - *, - migration_state: Optional["BackupPolicyMigrationState"] = None, - **kwargs - ): - super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) - self.type = 'Continuous' # type: str - - -class CorsPolicy(msrest.serialization.Model): - """The CORS policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. - :type allowed_origins: str - :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a - CORS request. - :type allowed_methods: str - :param allowed_headers: The request headers that the origin domain may specify on the CORS - request. - :type allowed_headers: str - :param exposed_headers: The response headers that may be sent in the response to the CORS - request and exposed by the browser to the request issuer. - :type exposed_headers: str - :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight - OPTIONS request. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, - } - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, - 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, - 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, - 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, - } - - def __init__( - self, - *, - allowed_origins: str, - allowed_methods: Optional[str] = None, - allowed_headers: Optional[str] = None, - exposed_headers: Optional[str] = None, - max_age_in_seconds: Optional[int] = None, - **kwargs - ): - super(CorsPolicy, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.allowed_methods = allowed_methods - self.allowed_headers = allowed_headers - self.exposed_headers = exposed_headers - self.max_age_in_seconds = max_age_in_seconds - - -class CreateUpdateOptions(msrest.serialization.Model): - """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". - - :param throughput: Request Units per second. For example, "throughput": 10000. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings - """ - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, - } - - def __init__( - self, - *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, - **kwargs - ): - super(CreateUpdateOptions, self).__init__(**kwargs) - self.throughput = throughput - self.autoscale_settings = autoscale_settings - - -class DatabaseAccountConnectionString(msrest.serialization.Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar connection_string: Value of the connection string. - :vartype connection_string: str - :ivar description: Description of the connection string. - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None - - -class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB database accounts. - - 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 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 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 = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'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'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - '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'}, - } - - database_account_offer_type = "Standard" - - def __init__( - self, - *, - locations: List["Location"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - kind: Optional[Union[str, "DatabaseAccountKind"]] = None, - 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(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.kind = kind - 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.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.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 DatabaseAccountGetResults(ARMResourceProperties): - """An Azure Cosmos DB 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 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 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 - :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 - called. The status can be one of following. 'Creating' – the Cosmos DB account is being - created. When an account is in Creating state, only properties that are specified as input for - the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is - active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB - account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – - the Cosmos DB account deletion failed. - :vartype provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default - value: Standard. The only acceptable values to pass in are None and "Standard". The default - value is None. - :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 consistency_policy: The consistency policy for the Cosmos DB database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB - account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. - :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by their failover - priorities. - :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - :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] - :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the - Cosmos DB account. - :vartype private_endpoint_connections: - list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] - :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. - :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 - :ivar instance_id: A unique identifier assigned to the database account. - :vartype instance_id: str - :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 restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - :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 - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'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'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - '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'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - kind: Optional[Union[str, "DatabaseAccountKind"]] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, - is_virtual_network_filter_enabled: Optional[bool] = None, - enable_automatic_failover: Optional[bool] = None, - consistency_policy: Optional["ConsistencyPolicy"] = 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, - create_mode: Optional[Union[str, "CreateMode"]] = "Default", - restore_parameters: Optional["RestoreParameters"] = 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, - **kwargs - ): - super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.kind = kind - self.system_data = None - self.provisioning_state = None - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_rules = ip_rules - self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled - self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy - self.capabilities = capabilities - self.write_locations = None - self.read_locations = None - self.locations = None - self.failover_policies = None - self.virtual_network_rules = virtual_network_rules - self.private_endpoint_connections = None - 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.instance_id = None - self.create_mode = create_mode - self.restore_parameters = restore_parameters - 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 - - -class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings for the Cosmos DB - account. - :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__( - self, - *, - connection_strings: Optional[List["DatabaseAccountConnectionString"]] = None, - **kwargs - ): - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = connection_strings - - -class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None - - -class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - :ivar primary_master_key: Base 64 encoded value of the primary read-write key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. - :vartype secondary_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - - -class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): - """Parameters to regenerate the keys within the database account. - - All required parameters must be populated in order to send to Azure. - - :param key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__( - self, - *, - key_kind: Union[str, "KeyKind"], - **kwargs - ): - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = key_kind - - -class DatabaseAccountsListResult(msrest.serialization.Model): - """The List operation response, that contains the database accounts and their properties. +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB database accounts. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of database account and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountsListResult, self).__init__(**kwargs) - self.value = None - - -class DatabaseAccountUpdateParameters(msrest.serialization.Model): - """Parameters for patching Azure Cosmos DB database account properties. + 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 @@ -2824,15 +1408,19 @@ class DatabaseAccountUpdateParameters(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 location: The location of the resource group to which the resource belongs. - :type location: str + :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: An array that contains the georeplication locations enabled for the Cosmos DB - account. + :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 @@ -2876,471 +1464,176 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :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 - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - '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'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - location: Optional[str] = None, - identity: Optional["ManagedServiceIdentity"] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - locations: Optional[List["Location"]] = 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, - **kwargs - ): - super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.location = location - self.identity = identity - 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.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 - - -class DatabaseRestoreResource(msrest.serialization.Model): - """Specific Databases to restore. - - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for restore. - :type collection_names: list[str] - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, - } - - def __init__( - self, - *, - database_name: Optional[str] = None, - collection_names: Optional[List[str]] = None, - **kwargs - ): - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = database_name - self.collection_names = collection_names - - -class DataCenterResource(ARMProxyResource): - """A managed Cassandra data center. - - 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: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - """ - - _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': 'DataCenterResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["DataCenterResourceProperties"] = None, - **kwargs - ): - super(DataCenterResource, self).__init__(**kwargs) - self.properties = properties - - -class DataCenterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :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, - *, - 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 + :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 + :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 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 = { + 'id': {'readonly': True}, 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + 'type': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', '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}, + 'tags': {'key': 'tags', 'type': '{str}'}, + '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'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, } - _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]'}, - } + database_account_offer_type = "Standard" def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, + locations: List["Location"], + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = 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, + 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, + 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, + disable_local_auth: Optional[bool] = None, + restore_parameters: Optional["RestoreParameters"] = 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 + 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 + 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 = 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.disable_local_auth = disable_local_auth + self.restore_parameters = restore_parameters -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB database account. 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". + :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 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 + called. The status can be one of following. 'Creating' – the Cosmos DB account is being + created. When an account is in Creating state, only properties that are specified as input for + the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is + active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB + account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – + the Cosmos DB account deletion failed. + :vartype provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default + value: Standard. The only acceptable values to pass in are None and "Standard". The default + value is None. :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3352,11 +1645,27 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the Cosmos DB database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account. :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB + account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. + :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by their failover + priorities. + :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :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] + :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the + Cosmos DB account. + :vartype private_endpoint_connections: + list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :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. @@ -3378,16 +1687,20 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :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. + :param api_properties: API specific properties. :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". + :ivar instance_id: A unique identifier assigned to the database account. + :vartype instance_id: str + :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 restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :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. @@ -3398,62 +1711,82 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :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'}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'instance_id': {'readonly': True}, } - database_account_offer_type = "Standard" + _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}'}, + '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'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + } def __init__( self, *, - locations: List["Location"], - consistency_policy: Optional["ConsistencyPolicy"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = 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, + consistency_policy: Optional["ConsistencyPolicy"] = None, capabilities: Optional[List["Capability"]] = None, virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, @@ -3467,321 +1800,200 @@ 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", + restore_parameters: Optional["RestoreParameters"] = 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 - + 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 + self.database_account_offer_type = None + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.capabilities = capabilities + self.write_locations = None + self.read_locations = None + self.locations = None + self.failover_policies = None + self.virtual_network_rules = virtual_network_rules + self.private_endpoint_connections = None + 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.instance_id = None + self.create_mode = create_mode + self.restore_parameters = restore_parameters + 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.disable_local_auth = disable_local_auth -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. +class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): + """The connection strings for the given database account. - :param failover_policies: Required. List of failover policies. - :type failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] + :param connection_strings: An array that contains the connection strings for the Cosmos DB + account. + :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ - _validation = { - 'failover_policies': {'required': True}, - } - _attribute_map = { - 'failover_policies': {'key': 'failoverPolicies', 'type': '[FailoverPolicy]'}, + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, } def __init__( self, *, - failover_policies: List["FailoverPolicy"], + connection_strings: Optional[List["DatabaseAccountConnectionString"]] = None, **kwargs ): - super(FailoverPolicies, self).__init__(**kwargs) - self.failover_policies = failover_policies + super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + self.connection_strings = connection_strings -class FailoverPolicy(msrest.serialization.Model): - """The failover policy for a given region of a database account. +class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): + """The read-only access keys for the given 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 + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str """ _validation = { - 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, } 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 + super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None -class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. +class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): + """The access keys for the given database account. 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 + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str + :ivar primary_master_key: Base 64 encoded value of the primary read-write key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. + :vartype secondary_master_key: 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'}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, } - 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'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, } def __init__( self, - *, - properties: Optional["GraphAPIComputeServiceResourceProperties"] = None, **kwargs ): - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) - self.properties = properties - + super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None -class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): - """Properties for GraphAPIComputeServiceResource. - Variables are only populated by the server, and will be ignored when sending a request. +class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): + """Parameters to regenerate the keys within the database account. 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] + :param key_kind: Required. The access key to regenerate. Possible values include: "primary", + "secondary", "primaryReadonly", "secondaryReadonly". + :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + 'key_kind': {'required': 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]'}, + 'key_kind': {'key': 'keyKind', 'type': 'str'}, } 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, + key_kind: Union[str, "KeyKind"], **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 + super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_kind = key_kind -class GraphResource(msrest.serialization.Model): - """Cosmos DB Graph resource object. +class DatabaseAccountsListResult(msrest.serialization.Model): + """The List operation response, that contains the database accounts and their properties. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param id: Required. Name of the Cosmos DB Graph. - :type id: str + :ivar value: List of database account and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] """ _validation = { - 'id': {'required': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, } 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. + super(DatabaseAccountsListResult, self).__init__(**kwargs) + self.value = 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 DatabaseAccountUpdateParameters(msrest.serialization.Model): + """Parameters for patching Azure Cosmos DB database account properties. - :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 @@ -3789,201 +2001,302 @@ class GraphResourceCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] + :param location: The location of the resource group to which the resource belongs. + :type location: 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 + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :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 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 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 """ - _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}'}, + 'location': {'key': 'location', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, } def __init__( self, *, - resource: "GraphResource", - location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + location: Optional[str] = None, identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, + locations: Optional[List["Location"]] = 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, + disable_local_auth: Optional[bool] = None, **kwargs ): - super(GraphResourceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.location = location + self.identity = identity + 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.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.disable_local_auth = disable_local_auth -class GraphResourceGetPropertiesOptions(OptionsResource): - """GraphResourceGetPropertiesOptions. +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. - :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 database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, } def __init__( self, *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + database_name: Optional[str] = None, + collection_names: Optional[List[str]] = None, + **kwargs + ): + super(DatabaseRestoreResource, self).__init__(**kwargs) + self.database_name = database_name + self.collection_names = collection_names + + +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(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 +2321,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 +2341,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 +2351,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 +2476,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 +2494,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 +2503,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 +2559,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 +2579,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 +2589,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 +2770,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 +2788,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 +2797,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,77 +2964,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. - - :param value: Container for the array of clusters. - :type value: list[~azure.mgmt.cosmosdb.models.ClusterResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ClusterResource]'}, - } - - def __init__( - self, - *, - value: Optional[List["ClusterResource"]] = None, - **kwargs - ): - super(ListClusters, self).__init__(**kwargs) - self.value = value - - -class ListDataCenters(msrest.serialization.Model): - """List of managed Cassandra data centers and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of data centers. - :vartype value: list[~azure.mgmt.cosmosdb.models.DataCenterResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DataCenterResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListDataCenters, self).__init__(**kwargs) - self.value = None - - class Location(msrest.serialization.Model): """A region in which the Azure Cosmos DB database account is deployed. @@ -4802,111 +3028,6 @@ def __init__( self.is_zone_redundant = is_zone_redundant -class LocationGetResult(ARMProxyResource): - """Cosmos DB location get result. - - 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: Cosmos DB location metadata. - :type properties: ~azure.mgmt.cosmosdb.models.LocationProperties - """ - - _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': 'LocationProperties'}, - } - - def __init__( - self, - *, - properties: Optional["LocationProperties"] = None, - **kwargs - ): - super(LocationGetResult, self).__init__(**kwargs) - self.properties = properties - - -class LocationListResult(msrest.serialization.Model): - """The List operation response, that contains Cosmos DB locations and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Cosmos DB locations and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.LocationGetResult] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocationGetResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(LocationListResult, self).__init__(**kwargs) - self.value = None - - -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 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] - """ - - _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]'}, - } - - 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 - - class ManagedServiceIdentity(msrest.serialization.Model): """Identity for the resource. @@ -5236,8 +3357,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 +3377,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 +3387,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 @@ -5424,9 +3541,7 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 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 + :type tags: dict[str, str] :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource :param options: @@ -5445,7 +3560,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 +3569,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 +3625,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 +3645,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 +3655,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 +3780,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 +3798,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 +3807,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 @@ -6429,9 +4534,6 @@ class PeriodicModeProperties(msrest.serialization.Model): :param backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained. :type backup_retention_interval_in_hours: int - :param backup_storage_redundancy: Enum to indicate type of backup residency. Possible values - include: "Geo", "Local", "Zone". - :type backup_storage_redundancy: str or ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ _validation = { @@ -6442,7 +4544,6 @@ class PeriodicModeProperties(msrest.serialization.Model): _attribute_map = { 'backup_interval_in_minutes': {'key': 'backupIntervalInMinutes', 'type': 'int'}, 'backup_retention_interval_in_hours': {'key': 'backupRetentionIntervalInHours', 'type': 'int'}, - 'backup_storage_redundancy': {'key': 'backupStorageRedundancy', 'type': 'str'}, } def __init__( @@ -6450,13 +4551,11 @@ def __init__( *, backup_interval_in_minutes: Optional[int] = None, backup_retention_interval_in_hours: Optional[int] = None, - backup_storage_redundancy: Optional[Union[str, "BackupStorageRedundancy"]] = None, **kwargs ): super(PeriodicModeProperties, self).__init__(**kwargs) self.backup_interval_in_minutes = backup_interval_in_minutes self.backup_retention_interval_in_hours = backup_retention_interval_in_hours - self.backup_storage_redundancy = backup_storage_redundancy class Permission(msrest.serialization.Model): @@ -6787,39 +4886,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 +5655,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 +5669,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 +5683,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 +5709,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): @@ -7744,127 +5810,6 @@ def __init__( self.databases_to_restore = databases_to_restore -class SeedNode(msrest.serialization.Model): - """SeedNode. - - :param ip_address: IP address of this seed node. - :type ip_address: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - ip_address: Optional[str] = None, - **kwargs - ): - super(SeedNode, self).__init__(**kwargs) - 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 +5859,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 +5879,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 +5889,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 +6020,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 +6038,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 +6047,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 +6103,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 +6123,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 +6133,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 +6166,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 +6180,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 +6191,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 +6215,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 +6245,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 +6263,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 +6272,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 +6306,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 +6564,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 +6584,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 +6594,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 +6704,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 +6720,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 +6728,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 +6782,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 +6802,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 +6812,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 +6944,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 +6960,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 +6968,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 +7022,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 +7042,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 +7052,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 +7162,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 +7178,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 +7186,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 +7288,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 +7308,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 +7318,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 +7443,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 +7461,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 +7470,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 +7653,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 +7669,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 +7677,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 +7706,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 +7723,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 +7732,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 a7c7808a801a0..a265f7a8b3976 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,11 @@ 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 ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -36,9 +34,6 @@ from ._restorable_mongodb_databases_operations import RestorableMongodbDatabasesOperations from ._restorable_mongodb_collections_operations import RestorableMongodbCollectionsOperations 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 +49,11 @@ 'CollectionPartitionOperations', 'PartitionKeyRangeIdOperations', 'PartitionKeyRangeIdRegionOperations', - 'GraphResourcesOperations', 'SqlResourcesOperations', 'MongoDBResourcesOperations', 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -71,7 +64,4 @@ 'RestorableMongodbDatabasesOperations', 'RestorableMongodbCollectionsOperations', 'RestorableMongodbResourcesOperations', - 'CassandraClustersOperations', - 'CassandraDataCentersOperations', - 'ServiceOperations', ] 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 55ec864e163a9..49a461b5be8f2 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 5ae1c32242165..5a01bcf883c43 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-06-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-06-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-06-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 c63a2588d1dd2..400a1ecc55b88 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-06-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-06-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 33d2f61a1c3d9..6e5c6d657227c 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-06-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 a9adf327fecdd..cf7289d245107 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-06-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 5a70940cff004..d42a97e399a9e 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-06-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 1d5e50ab25e65..eff67f3dd1874 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 6551e716d1c1b..4b4b3c74a1523 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-06-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-06-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-06-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 b125f94738bd5..f16c7e147257f 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-15" accept = "application/json" # Construct URL 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 a465650c737b9..aecf843cc6297 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-15" accept = "application/json" # Construct URL 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 bfb8a73234ec2..77c309c44ca57 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 78de171309d06..5f7d69c8c492f 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-06-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 549d6e3e572ba..8b5c1bdcccf93 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-06-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 8e68bea8329de..b218afcbbf73b 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-06-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 263110f8bf1a8..4aeaf0a009fc9 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-06-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 8ab15c2a94dd7..7e984a4c19f55 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-06-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 c45180203875f..2c450517b58d2 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-06-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 c63412113ba55..80318ba30195a 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-06-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-06-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-06-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-06-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 1fae2104d1ddc..96c65ede0cbdc 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-06-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-06-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 b6183ae2e7251..372dca34ed20a 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-06-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-06-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-06-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 cd45b4c6d9958..5feddbcd2eef9 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-06-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 d3d5ff7c8318e..d7c44f03d998a 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-06-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 5ffec558d4b45..e5508726fd5b3 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-06-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 3ea7156988ece..d9ae58d98a492 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-06-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 3985c7192cdd7..aba38b6a839cb 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-06-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 c2ba469ba3e98..637345e55a82a 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-06-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 b8bd592dbeba6..81914374caa66 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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 062611e12a0ef..435b25096ff4e 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-15" accept = "application/json" # Construct URL