From d7a99ccea3e9e8658135a63751bb3056eed4740f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 26 Apr 2019 13:14:57 -0700 Subject: [PATCH] [AutoPR cosmos-db/resource-manager] Rename Gremlin container by graph (#4941) * Generated from cdf503be9781e3833dabc4607cc59c5d59c21370 Rename Gremlin container by graph * Generated from 8133c0ddc061fa40abb3a9fa9324242b7c6ad6ce Replace mongo with mongodb * Generated from 5f17be643cbf4c0f823a0d9b0b90bea17a84f0ab Update file name by git mv as windows doesn't work --- .../azure/mgmt/cosmosdb/models/__init__.py | 77 +- .../mgmt/cosmosdb/models/gremlin_graph.py | 96 +++ .../gremlin_graph_create_update_parameters.py | 40 + ...mlin_graph_create_update_parameters_py3.py | 40 + ...tainer_paged.py => gremlin_graph_paged.py} | 8 +- .../mgmt/cosmosdb/models/gremlin_graph_py3.py | 96 +++ .../cosmosdb/models/gremlin_graph_resource.py | 60 ++ .../models/gremlin_graph_resource_py3.py | 60 ++ ...o_collection.py => mongo_db_collection.py} | 16 +- ...db_collection_create_update_parameters.py} | 13 +- ...ollection_create_update_parameters_py3.py} | 13 +- ..._paged.py => mongo_db_collection_paged.py} | 8 +- ...tion_py3.py => mongo_db_collection_py3.py} | 18 +- ...rce.py => mongo_db_collection_resource.py} | 8 +- ...py => mongo_db_collection_resource_py3.py} | 8 +- ...mongo_database.py => mongo_db_database.py} | 17 +- ...o_db_database_create_update_parameters.py} | 12 +- ..._database_create_update_parameters_py3.py} | 12 +- ...on_paged.py => mongo_db_database_paged.py} | 8 +- ...tabase_py3.py => mongo_db_database_py3.py} | 19 +- ...ource.py => mongo_db_database_resource.py} | 8 +- ...3.py => mongo_db_database_resource_py3.py} | 8 +- .../azure/mgmt/cosmosdb/models/mongo_index.py | 6 +- .../mgmt/cosmosdb/models/mongo_index_keys.py | 6 +- .../cosmosdb/models/mongo_index_keys_py3.py | 6 +- .../cosmosdb/models/mongo_index_options.py | 2 +- .../models/mongo_index_options_py3.py | 2 +- .../mgmt/cosmosdb/models/mongo_index_py3.py | 6 +- .../models/{container.py => sql_container.py} | 14 +- ...sql_container_create_update_parameters.py} | 8 +- ...container_create_update_parameters_py3.py} | 8 +- .../cosmosdb/models/sql_container_paged.py | 27 + ...{container_py3.py => sql_container_py3.py} | 16 +- ..._resource.py => sql_container_resource.py} | 8 +- ...e_py3.py => sql_container_resource_py3.py} | 8 +- .../database_accounts_operations.py | 712 +++++++++--------- 36 files changed, 954 insertions(+), 520 deletions(-) create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_paged.py => gremlin_graph_paged.py} (69%) create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection.py => mongo_db_collection.py} (81%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_create_update_parameters.py => mongo_db_collection_create_update_parameters.py} (79%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_create_update_parameters_py3.py => mongo_db_collection_create_update_parameters_py3.py} (79%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_paged.py => mongo_db_collection_paged.py} (74%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_py3.py => mongo_db_collection_py3.py} (76%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_resource.py => mongo_db_collection_resource.py} (85%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_resource_py3.py => mongo_db_collection_resource_py3.py} (84%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database.py => mongo_db_database.py} (76%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_create_update_parameters.py => mongo_db_database_create_update_parameters.py} (81%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_create_update_parameters_py3.py => mongo_db_database_create_update_parameters_py3.py} (81%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_collection_paged.py => mongo_db_database_paged.py} (75%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_py3.py => mongo_db_database_py3.py} (72%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_resource.py => mongo_db_database_resource.py} (79%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{mongo_database_resource_py3.py => mongo_db_database_resource_py3.py} (79%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container.py => sql_container.py} (91%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_create_update_parameters.py => sql_container_create_update_parameters.py} (81%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_create_update_parameters_py3.py => sql_container_create_update_parameters_py3.py} (81%) create mode 100644 azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_py3.py => sql_container_py3.py} (85%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_resource.py => sql_container_resource.py} (92%) rename azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/{container_resource_py3.py => sql_container_resource_py3.py} (92%) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index bdd753aa6762..fdad0dbc2e3d 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -25,13 +25,14 @@ from .unique_key_py3 import UniqueKey from .unique_key_policy_py3 import UniqueKeyPolicy from .conflict_resolution_policy_py3 import ConflictResolutionPolicy - from .container_py3 import Container - from .mongo_database_py3 import MongoDatabase - from .mongo_collection_py3 import MongoCollection + from .sql_container_py3 import SqlContainer + from .mongo_db_database_py3 import MongoDBDatabase + from .mongo_db_collection_py3 import MongoDBCollection from .table_py3 import Table from .cassandra_keyspace_py3 import CassandraKeyspace from .cassandra_table_py3 import CassandraTable from .gremlin_database_py3 import GremlinDatabase + from .gremlin_graph_py3 import GremlinGraph from .error_response_py3 import ErrorResponse, ErrorResponseException from .failover_policies_py3 import FailoverPolicies from .region_for_online_offline_py3 import RegionForOnlineOffline @@ -46,15 +47,15 @@ from .database_account_regenerate_key_parameters_py3 import DatabaseAccountRegenerateKeyParameters from .sql_database_resource_py3 import SqlDatabaseResource from .sql_database_create_update_parameters_py3 import SqlDatabaseCreateUpdateParameters - from .container_resource_py3 import ContainerResource - from .container_create_update_parameters_py3 import ContainerCreateUpdateParameters - from .mongo_database_resource_py3 import MongoDatabaseResource - from .mongo_database_create_update_parameters_py3 import MongoDatabaseCreateUpdateParameters + from .sql_container_resource_py3 import SqlContainerResource + from .sql_container_create_update_parameters_py3 import SqlContainerCreateUpdateParameters + from .mongo_db_database_resource_py3 import MongoDBDatabaseResource + from .mongo_db_database_create_update_parameters_py3 import MongoDBDatabaseCreateUpdateParameters from .mongo_index_keys_py3 import MongoIndexKeys from .mongo_index_options_py3 import MongoIndexOptions from .mongo_index_py3 import MongoIndex - from .mongo_collection_resource_py3 import MongoCollectionResource - from .mongo_collection_create_update_parameters_py3 import MongoCollectionCreateUpdateParameters + from .mongo_db_collection_resource_py3 import MongoDBCollectionResource + from .mongo_db_collection_create_update_parameters_py3 import MongoDBCollectionCreateUpdateParameters from .table_resource_py3 import TableResource from .table_create_update_parameters_py3 import TableCreateUpdateParameters from .cassandra_keyspace_resource_py3 import CassandraKeyspaceResource @@ -67,6 +68,8 @@ from .cassandra_table_create_update_parameters_py3 import CassandraTableCreateUpdateParameters from .gremlin_database_resource_py3 import GremlinDatabaseResource from .gremlin_database_create_update_parameters_py3 import GremlinDatabaseCreateUpdateParameters + from .gremlin_graph_resource_py3 import GremlinGraphResource + from .gremlin_graph_create_update_parameters_py3 import GremlinGraphCreateUpdateParameters from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation from .metric_name_py3 import MetricName @@ -95,13 +98,14 @@ from .unique_key import UniqueKey from .unique_key_policy import UniqueKeyPolicy from .conflict_resolution_policy import ConflictResolutionPolicy - from .container import Container - from .mongo_database import MongoDatabase - from .mongo_collection import MongoCollection + from .sql_container import SqlContainer + from .mongo_db_database import MongoDBDatabase + from .mongo_db_collection import MongoDBCollection from .table import Table from .cassandra_keyspace import CassandraKeyspace from .cassandra_table import CassandraTable from .gremlin_database import GremlinDatabase + from .gremlin_graph import GremlinGraph from .error_response import ErrorResponse, ErrorResponseException from .failover_policies import FailoverPolicies from .region_for_online_offline import RegionForOnlineOffline @@ -116,15 +120,15 @@ from .database_account_regenerate_key_parameters import DatabaseAccountRegenerateKeyParameters from .sql_database_resource import SqlDatabaseResource from .sql_database_create_update_parameters import SqlDatabaseCreateUpdateParameters - from .container_resource import ContainerResource - from .container_create_update_parameters import ContainerCreateUpdateParameters - from .mongo_database_resource import MongoDatabaseResource - from .mongo_database_create_update_parameters import MongoDatabaseCreateUpdateParameters + from .sql_container_resource import SqlContainerResource + from .sql_container_create_update_parameters import SqlContainerCreateUpdateParameters + from .mongo_db_database_resource import MongoDBDatabaseResource + from .mongo_db_database_create_update_parameters import MongoDBDatabaseCreateUpdateParameters from .mongo_index_keys import MongoIndexKeys from .mongo_index_options import MongoIndexOptions from .mongo_index import MongoIndex - from .mongo_collection_resource import MongoCollectionResource - from .mongo_collection_create_update_parameters import MongoCollectionCreateUpdateParameters + from .mongo_db_collection_resource import MongoDBCollectionResource + from .mongo_db_collection_create_update_parameters import MongoDBCollectionCreateUpdateParameters from .table_resource import TableResource from .table_create_update_parameters import TableCreateUpdateParameters from .cassandra_keyspace_resource import CassandraKeyspaceResource @@ -137,6 +141,8 @@ from .cassandra_table_create_update_parameters import CassandraTableCreateUpdateParameters from .gremlin_database_resource import GremlinDatabaseResource from .gremlin_database_create_update_parameters import GremlinDatabaseCreateUpdateParameters + from .gremlin_graph_resource import GremlinGraphResource + from .gremlin_graph_create_update_parameters import GremlinGraphCreateUpdateParameters from .operation_display import OperationDisplay from .operation import Operation from .metric_name import MetricName @@ -154,13 +160,14 @@ from .usage_paged import UsagePaged from .metric_definition_paged import MetricDefinitionPaged from .sql_database_paged import SqlDatabasePaged -from .container_paged import ContainerPaged -from .mongo_database_paged import MongoDatabasePaged -from .mongo_collection_paged import MongoCollectionPaged +from .sql_container_paged import SqlContainerPaged +from .mongo_db_database_paged import MongoDBDatabasePaged +from .mongo_db_collection_paged import MongoDBCollectionPaged from .table_paged import TablePaged from .cassandra_keyspace_paged import CassandraKeyspacePaged from .cassandra_table_paged import CassandraTablePaged from .gremlin_database_paged import GremlinDatabasePaged +from .gremlin_graph_paged import GremlinGraphPaged from .operation_paged import OperationPaged from .percentile_metric_paged import PercentileMetricPaged from .partition_metric_paged import PartitionMetricPaged @@ -195,13 +202,14 @@ 'UniqueKey', 'UniqueKeyPolicy', 'ConflictResolutionPolicy', - 'Container', - 'MongoDatabase', - 'MongoCollection', + 'SqlContainer', + 'MongoDBDatabase', + 'MongoDBCollection', 'Table', 'CassandraKeyspace', 'CassandraTable', 'GremlinDatabase', + 'GremlinGraph', 'ErrorResponse', 'ErrorResponseException', 'FailoverPolicies', 'RegionForOnlineOffline', @@ -216,15 +224,15 @@ 'DatabaseAccountRegenerateKeyParameters', 'SqlDatabaseResource', 'SqlDatabaseCreateUpdateParameters', - 'ContainerResource', - 'ContainerCreateUpdateParameters', - 'MongoDatabaseResource', - 'MongoDatabaseCreateUpdateParameters', + 'SqlContainerResource', + 'SqlContainerCreateUpdateParameters', + 'MongoDBDatabaseResource', + 'MongoDBDatabaseCreateUpdateParameters', 'MongoIndexKeys', 'MongoIndexOptions', 'MongoIndex', - 'MongoCollectionResource', - 'MongoCollectionCreateUpdateParameters', + 'MongoDBCollectionResource', + 'MongoDBCollectionCreateUpdateParameters', 'TableResource', 'TableCreateUpdateParameters', 'CassandraKeyspaceResource', @@ -237,6 +245,8 @@ 'CassandraTableCreateUpdateParameters', 'GremlinDatabaseResource', 'GremlinDatabaseCreateUpdateParameters', + 'GremlinGraphResource', + 'GremlinGraphCreateUpdateParameters', 'OperationDisplay', 'Operation', 'MetricName', @@ -254,13 +264,14 @@ 'UsagePaged', 'MetricDefinitionPaged', 'SqlDatabasePaged', - 'ContainerPaged', - 'MongoDatabasePaged', - 'MongoCollectionPaged', + 'SqlContainerPaged', + 'MongoDBDatabasePaged', + 'MongoDBCollectionPaged', 'TablePaged', 'CassandraKeyspacePaged', 'CassandraTablePaged', 'GremlinDatabasePaged', + 'GremlinGraphPaged', 'OperationPaged', 'PercentileMetricPaged', 'PartitionMetricPaged', diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py new file mode 100644 index 000000000000..21b7ed31c514 --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class GremlinGraph(Resource): + """An Azure Cosmos DB Gremlin graph. + + 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 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 location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph + :type gremlin_graph_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_graph_id': {'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}'}, + 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GremlinGraph, self).__init__(**kwargs) + self.gremlin_graph_id = kwargs.get('gremlin_graph_id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) + self._rid = kwargs.get('_rid', None) + self._ts = kwargs.get('_ts', None) + self._etag = kwargs.get('_etag', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py new file mode 100644 index 000000000000..795dc009706a --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GremlinGraphCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin graph. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py new file mode 100644 index 000000000000..55da54081b08 --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_create_update_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GremlinGraphCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB Gremlin graph. + + All required parameters must be populated in order to send to Azure. + + :param resource: Required. The standard JSON format of a Gremlin graph + :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource + :param options: Required. A key-value pair of options to be applied for + the request. This corresponds to the headers sent with the request. + :type options: dict[str, str] + """ + + _validation = { + 'resource': {'required': True}, + 'options': {'required': True}, + } + + _attribute_map = { + 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, + 'options': {'key': 'properties.options', 'type': '{str}'}, + } + + def __init__(self, *, resource, options, **kwargs) -> None: + super(GremlinGraphCreateUpdateParameters, self).__init__(**kwargs) + self.resource = resource + self.options = options diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_paged.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py similarity index 69% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_paged.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py index fcca0f969704..b879fbb6648b 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_paged.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class ContainerPaged(Paged): +class GremlinGraphPaged(Paged): """ - A paging container for iterating over a list of :class:`Container ` object + A paging container for iterating over a list of :class:`GremlinGraph ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Container]'} + 'current_page': {'key': 'value', 'type': '[GremlinGraph]'} } def __init__(self, *args, **kwargs): - super(ContainerPaged, self).__init__(*args, **kwargs) + super(GremlinGraphPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py new file mode 100644 index 000000000000..5de6eb12296a --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_py3.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class GremlinGraph(Resource): + """An Azure Cosmos DB Gremlin graph. + + 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 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 location: The location of the resource group to which the resource + belongs. + :type location: str + :param tags: + :type tags: dict[str, str] + :param gremlin_graph_id: Required. Name of the Cosmos DB Gremlin graph + :type gremlin_graph_id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + :param _rid: A system generated property. A unique identifier. + :type _rid: str + :param _ts: A system generated property that denotes the last updated + timestamp of the resource. + :type _ts: object + :param _etag: A system generated property representing the resource etag + required for optimistic concurrency control. + :type _etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'gremlin_graph_id': {'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}'}, + 'gremlin_graph_id': {'key': 'properties.id', 'type': 'str'}, + 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'properties.uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + '_rid': {'key': 'properties._rid', 'type': 'str'}, + '_ts': {'key': 'properties._ts', 'type': 'object'}, + '_etag': {'key': 'properties._etag', 'type': 'str'}, + } + + def __init__(self, *, gremlin_graph_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(GremlinGraph, self).__init__(location=location, tags=tags, **kwargs) + self.gremlin_graph_id = gremlin_graph_id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy + self._rid = _rid + self._ts = _ts + self._etag = _etag diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py new file mode 100644 index 000000000000..2a050a738730 --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GremlinGraphResource(Model): + """Cosmos DB Gremlin graph resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin graph + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.indexing_policy = kwargs.get('indexing_policy', None) + self.partition_key = kwargs.get('partition_key', None) + self.default_ttl = kwargs.get('default_ttl', None) + self.unique_key_policy = kwargs.get('unique_key_policy', None) + self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py new file mode 100644 index 000000000000..abe0e7a3051f --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/gremlin_graph_resource_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GremlinGraphResource(Model): + """Cosmos DB Gremlin graph resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Gremlin graph + :type id: str + :param indexing_policy: The configuration of the indexing policy. By + default, the indexing is automatic for all document paths within the graph + :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy + :param partition_key: The configuration of the partition key to be used + for partitioning data into multiple partitions + :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey + :param default_ttl: Default time to live + :type default_ttl: int + :param unique_key_policy: The unique key policy configuration for + specifying uniqueness constraints on documents in the collection in the + Azure Cosmos DB service. + :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy + :param conflict_resolution_policy: The conflict resolution policy for the + graph. + :type conflict_resolution_policy: + ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, + 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, + 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, + 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, + 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, + } + + def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: + super(GremlinGraphResource, self).__init__(**kwargs) + self.id = id + self.indexing_policy = indexing_policy + self.partition_key = partition_key + self.default_ttl = default_ttl + self.unique_key_policy = unique_key_policy + self.conflict_resolution_policy = conflict_resolution_policy diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py similarity index 81% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py index 31902ac79e4d..81960b95a5a8 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection.py @@ -12,8 +12,8 @@ from .resource import Resource -class MongoCollection(Resource): - """An Azure Cosmos DB Mongo collection. +class MongoDBCollection(Resource): + """An Azure Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. @@ -31,9 +31,9 @@ class MongoCollection(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_collection_id: Required. Name of the Cosmos DB Mongo + :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB collection - :type mongo_collection_id: str + :type mongo_db_collection_id: str :param shard_key: A key-value pair of shard keys to be applied for the request. :type shard_key: dict[str, str] @@ -45,7 +45,7 @@ class MongoCollection(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_collection_id': {'required': True}, + 'mongo_db_collection_id': {'required': True}, } _attribute_map = { @@ -54,13 +54,13 @@ class MongoCollection(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_collection_id': {'key': 'properties.id', 'type': 'str'}, + 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, } def __init__(self, **kwargs): - super(MongoCollection, self).__init__(**kwargs) - self.mongo_collection_id = kwargs.get('mongo_collection_id', None) + super(MongoDBCollection, self).__init__(**kwargs) + self.mongo_db_collection_id = kwargs.get('mongo_db_collection_id', None) self.shard_key = kwargs.get('shard_key', None) self.indexes = kwargs.get('indexes', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py similarity index 79% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py index 2b59ccf463c6..7a2c13306802 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters.py @@ -12,13 +12,14 @@ from msrest.serialization import Model -class MongoDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Mongo database. +class MongoDBCollectionCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB collection. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Mongo database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDatabaseResource + :param resource: Required. The standard JSON format of a MongoDB + collection + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +31,11 @@ class MongoDatabaseCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDatabaseResource'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(MongoDatabaseCreateUpdateParameters, self).__init__(**kwargs) + super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) self.options = kwargs.get('options', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py similarity index 79% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py index 2d5e4c102d09..75bb425636f9 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_create_update_parameters_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_create_update_parameters_py3.py @@ -12,13 +12,14 @@ from msrest.serialization import Model -class MongoDatabaseCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Mongo database. +class MongoDBCollectionCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB collection. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Mongo database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDatabaseResource + :param resource: Required. The standard JSON format of a MongoDB + collection + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +31,11 @@ class MongoDatabaseCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoDatabaseResource'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoDatabaseCreateUpdateParameters, self).__init__(**kwargs) + super(MongoDBCollectionCreateUpdateParameters, self).__init__(**kwargs) self.resource = resource self.options = options diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_paged.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py similarity index 74% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_paged.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py index 55908b551f69..23a141813c1d 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_paged.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class MongoDatabasePaged(Paged): +class MongoDBCollectionPaged(Paged): """ - A paging container for iterating over a list of :class:`MongoDatabase ` object + A paging container for iterating over a list of :class:`MongoDBCollection ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoDatabase]'} + 'current_page': {'key': 'value', 'type': '[MongoDBCollection]'} } def __init__(self, *args, **kwargs): - super(MongoDatabasePaged, self).__init__(*args, **kwargs) + super(MongoDBCollectionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py similarity index 76% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py index 693413775e4a..dd5ee81d8f75 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_py3.py @@ -12,8 +12,8 @@ from .resource_py3 import Resource -class MongoCollection(Resource): - """An Azure Cosmos DB Mongo collection. +class MongoDBCollection(Resource): + """An Azure Cosmos DB MongoDB collection. Variables are only populated by the server, and will be ignored when sending a request. @@ -31,9 +31,9 @@ class MongoCollection(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_collection_id: Required. Name of the Cosmos DB Mongo + :param mongo_db_collection_id: Required. Name of the Cosmos DB MongoDB collection - :type mongo_collection_id: str + :type mongo_db_collection_id: str :param shard_key: A key-value pair of shard keys to be applied for the request. :type shard_key: dict[str, str] @@ -45,7 +45,7 @@ class MongoCollection(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_collection_id': {'required': True}, + 'mongo_db_collection_id': {'required': True}, } _attribute_map = { @@ -54,13 +54,13 @@ class MongoCollection(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_collection_id': {'key': 'properties.id', 'type': 'str'}, + 'mongo_db_collection_id': {'key': 'properties.id', 'type': 'str'}, 'shard_key': {'key': 'properties.shardKey', 'type': '{str}'}, 'indexes': {'key': 'properties.indexes', 'type': '[MongoIndex]'}, } - def __init__(self, *, mongo_collection_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoCollection, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_collection_id = mongo_collection_id + def __init__(self, *, mongo_db_collection_id: str, location: str=None, tags=None, shard_key=None, indexes=None, **kwargs) -> None: + super(MongoDBCollection, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_collection_id = mongo_db_collection_id self.shard_key = shard_key self.indexes = indexes diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py similarity index 85% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py index d509d63f185f..c185d20728e3 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class MongoCollectionResource(Model): - """Cosmos DB Mongo collection resource object. +class MongoDBCollectionResource(Model): + """Cosmos DB MongoDB collection resource object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB Mongo collection + :param id: Required. Name of the Cosmos DB MongoDB collection :type id: str :param shard_key: A key-value pair of shard keys to be applied for the request. @@ -37,7 +37,7 @@ class MongoCollectionResource(Model): } def __init__(self, **kwargs): - super(MongoCollectionResource, self).__init__(**kwargs) + super(MongoDBCollectionResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.shard_key = kwargs.get('shard_key', None) self.indexes = kwargs.get('indexes', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py similarity index 84% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py index 75e3d9a4c9a3..e8ec98955296 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_resource_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_collection_resource_py3.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class MongoCollectionResource(Model): - """Cosmos DB Mongo collection resource object. +class MongoDBCollectionResource(Model): + """Cosmos DB MongoDB collection resource object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB Mongo collection + :param id: Required. Name of the Cosmos DB MongoDB collection :type id: str :param shard_key: A key-value pair of shard keys to be applied for the request. @@ -37,7 +37,7 @@ class MongoCollectionResource(Model): } def __init__(self, *, id: str, shard_key=None, indexes=None, **kwargs) -> None: - super(MongoCollectionResource, self).__init__(**kwargs) + super(MongoDBCollectionResource, self).__init__(**kwargs) self.id = id self.shard_key = shard_key self.indexes = indexes diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py similarity index 76% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py index ab4f963fe49a..490235867302 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database.py @@ -12,8 +12,8 @@ from .resource import Resource -class MongoDatabase(Resource): - """An Azure Cosmos DB Mongo database. +class MongoDBDatabase(Resource): + """An Azure Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. @@ -31,15 +31,16 @@ class MongoDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_database_id: Required. Name of the Cosmos DB Mongo database - :type mongo_database_id: str + :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB + database + :type mongo_db_database_id: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_database_id': {'required': True}, + 'mongo_db_database_id': {'required': True}, } _attribute_map = { @@ -48,9 +49,9 @@ class MongoDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_database_id': {'key': 'properties.id', 'type': 'str'}, + 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, } def __init__(self, **kwargs): - super(MongoDatabase, self).__init__(**kwargs) - self.mongo_database_id = kwargs.get('mongo_database_id', None) + super(MongoDBDatabase, self).__init__(**kwargs) + self.mongo_db_database_id = kwargs.get('mongo_db_database_id', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py similarity index 81% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py index ad0b2e7ce698..b0fce2563681 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class MongoCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Mongo collection. +class MongoDBDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB database. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Mongo collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoCollectionResource + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +30,11 @@ class MongoCollectionCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoCollectionResource'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(MongoCollectionCreateUpdateParameters, self).__init__(**kwargs) + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) self.options = kwargs.get('options', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py similarity index 81% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py index d23e99376077..b5af74515b54 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_create_update_parameters_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_create_update_parameters_py3.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class MongoCollectionCreateUpdateParameters(Model): - """Parameters to create and update Cosmos DB Mongo collection. +class MongoDBDatabaseCreateUpdateParameters(Model): + """Parameters to create and update Cosmos DB MongoDB database. All required parameters must be populated in order to send to Azure. - :param resource: Required. The standard JSON format of a Mongo collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoCollectionResource + :param resource: Required. The standard JSON format of a MongoDB database + :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +30,11 @@ class MongoCollectionCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'MongoCollectionResource'}, + 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, *, resource, options, **kwargs) -> None: - super(MongoCollectionCreateUpdateParameters, self).__init__(**kwargs) + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(**kwargs) self.resource = resource self.options = options diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_paged.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py similarity index 75% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_paged.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py index fe8cd02fbc21..2c21682a11d2 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_collection_paged.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class MongoCollectionPaged(Paged): +class MongoDBDatabasePaged(Paged): """ - A paging container for iterating over a list of :class:`MongoCollection ` object + A paging container for iterating over a list of :class:`MongoDBDatabase ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[MongoCollection]'} + 'current_page': {'key': 'value', 'type': '[MongoDBDatabase]'} } def __init__(self, *args, **kwargs): - super(MongoCollectionPaged, self).__init__(*args, **kwargs) + super(MongoDBDatabasePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py similarity index 72% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py index 28b01e633c1f..53fab5970c5c 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_py3.py @@ -12,8 +12,8 @@ from .resource_py3 import Resource -class MongoDatabase(Resource): - """An Azure Cosmos DB Mongo database. +class MongoDBDatabase(Resource): + """An Azure Cosmos DB MongoDB database. Variables are only populated by the server, and will be ignored when sending a request. @@ -31,15 +31,16 @@ class MongoDatabase(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param mongo_database_id: Required. Name of the Cosmos DB Mongo database - :type mongo_database_id: str + :param mongo_db_database_id: Required. Name of the Cosmos DB MongoDB + database + :type mongo_db_database_id: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'mongo_database_id': {'required': True}, + 'mongo_db_database_id': {'required': True}, } _attribute_map = { @@ -48,9 +49,9 @@ class MongoDatabase(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'mongo_database_id': {'key': 'properties.id', 'type': 'str'}, + 'mongo_db_database_id': {'key': 'properties.id', 'type': 'str'}, } - def __init__(self, *, mongo_database_id: str, location: str=None, tags=None, **kwargs) -> None: - super(MongoDatabase, self).__init__(location=location, tags=tags, **kwargs) - self.mongo_database_id = mongo_database_id + def __init__(self, *, mongo_db_database_id: str, location: str=None, tags=None, **kwargs) -> None: + super(MongoDBDatabase, self).__init__(location=location, tags=tags, **kwargs) + self.mongo_db_database_id = mongo_db_database_id diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py similarity index 79% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py index dd1e6c330a45..0364b5c87311 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class MongoDatabaseResource(Model): - """Cosmos DB Mongo database id object. +class MongoDBDatabaseResource(Model): + """Cosmos DB MongoDB database id object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB Mongo database + :param id: Required. Name of the Cosmos DB MongoDB database :type id: str """ @@ -30,5 +30,5 @@ class MongoDatabaseResource(Model): } def __init__(self, **kwargs): - super(MongoDatabaseResource, self).__init__(**kwargs) + super(MongoDBDatabaseResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py similarity index 79% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py index a36d3febd64b..afaf2e50ce68 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_database_resource_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_db_database_resource_py3.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class MongoDatabaseResource(Model): - """Cosmos DB Mongo database id object. +class MongoDBDatabaseResource(Model): + """Cosmos DB MongoDB database id object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB Mongo database + :param id: Required. Name of the Cosmos DB MongoDB database :type id: str """ @@ -30,5 +30,5 @@ class MongoDatabaseResource(Model): } def __init__(self, *, id: str, **kwargs) -> None: - super(MongoDatabaseResource, self).__init__(**kwargs) + super(MongoDBDatabaseResource, self).__init__(**kwargs) self.id = id diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py index b37af9ccd1d9..0b2c90cd6b0b 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index.py @@ -13,11 +13,11 @@ class MongoIndex(Model): - """Cosmos DB Mongo collection index key. + """Cosmos DB MongoDB collection index key. - :param key: Cosmos DB Mongo collection index keys + :param key: Cosmos DB MongoDB collection index keys :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys - :param options: Cosmos DB Mongo collection index key options + :param options: Cosmos DB MongoDB collection index key options :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions """ diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py index 5c81abb5b8a2..71503206d483 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys.py @@ -13,10 +13,10 @@ class MongoIndexKeys(Model): - """Cosmos DB Mongo collection resource object. + """Cosmos DB MongoDB collection resource object. - :param keys: List of keys for each Mongo collection in the Azure Cosmos DB - service + :param keys: List of keys for each MongoDB collection in the Azure Cosmos + DB service :type keys: list[str] """ diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py index 7696248e3ab2..adda5726c0a1 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_keys_py3.py @@ -13,10 +13,10 @@ class MongoIndexKeys(Model): - """Cosmos DB Mongo collection resource object. + """Cosmos DB MongoDB collection resource object. - :param keys: List of keys for each Mongo collection in the Azure Cosmos DB - service + :param keys: List of keys for each MongoDB collection in the Azure Cosmos + DB service :type keys: list[str] """ diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py index f32fbd8a7577..6918f577ff80 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options.py @@ -13,7 +13,7 @@ class MongoIndexOptions(Model): - """Cosmos DB Mongo collection index options. + """Cosmos DB MongoDB collection index options. :param expire_after_seconds: Expire after seconds :type expire_after_seconds: int diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py index e45318fbde73..b76263dd17f7 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_options_py3.py @@ -13,7 +13,7 @@ class MongoIndexOptions(Model): - """Cosmos DB Mongo collection index options. + """Cosmos DB MongoDB collection index options. :param expire_after_seconds: Expire after seconds :type expire_after_seconds: int diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py index 357ec3b3d5d3..380dd454e06f 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/mongo_index_py3.py @@ -13,11 +13,11 @@ class MongoIndex(Model): - """Cosmos DB Mongo collection index key. + """Cosmos DB MongoDB collection index key. - :param key: Cosmos DB Mongo collection index keys + :param key: Cosmos DB MongoDB collection index keys :type key: ~azure.mgmt.cosmosdb.models.MongoIndexKeys - :param options: Cosmos DB Mongo collection index key options + :param options: Cosmos DB MongoDB collection index key options :type options: ~azure.mgmt.cosmosdb.models.MongoIndexOptions """ diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py similarity index 91% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py index d6bded1c8439..493de87a639d 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container.py @@ -12,7 +12,7 @@ from .resource import Resource -class Container(Resource): +class SqlContainer(Resource): """An Azure Cosmos DB container. Variables are only populated by the server, and will be ignored when @@ -31,8 +31,8 @@ class Container(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param container_id: Required. Name of the Cosmos DB container - :type container_id: str + :param sql_container_id: Required. Name of the Cosmos DB SQL container + :type sql_container_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -64,7 +64,7 @@ class Container(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'container_id': {'required': True}, + 'sql_container_id': {'required': True}, } _attribute_map = { @@ -73,7 +73,7 @@ class Container(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'container_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -85,8 +85,8 @@ class Container(Resource): } def __init__(self, **kwargs): - super(Container, self).__init__(**kwargs) - self.container_id = kwargs.get('container_id', None) + super(SqlContainer, self).__init__(**kwargs) + self.sql_container_id = kwargs.get('sql_container_id', None) self.indexing_policy = kwargs.get('indexing_policy', None) self.partition_key = kwargs.get('partition_key', None) self.default_ttl = kwargs.get('default_ttl', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py similarity index 81% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py index 400afaea7b9b..a8811e3921b9 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class ContainerCreateUpdateParameters(Model): +class SqlContainerCreateUpdateParameters(Model): """Parameters to create and update Cosmos DB container. All required parameters must be populated in order to send to Azure. :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.ContainerResource + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +30,11 @@ class ContainerCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ContainerResource'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, **kwargs): - super(ContainerCreateUpdateParameters, self).__init__(**kwargs) + super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) self.options = kwargs.get('options', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py similarity index 81% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py index 4963d3660a36..1c8aa8931ae2 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_create_update_parameters_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_create_update_parameters_py3.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class ContainerCreateUpdateParameters(Model): +class SqlContainerCreateUpdateParameters(Model): """Parameters to create and update Cosmos DB container. All required parameters must be populated in order to send to Azure. :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.ContainerResource + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :param options: Required. A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. :type options: dict[str, str] @@ -30,11 +30,11 @@ class ContainerCreateUpdateParameters(Model): } _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'ContainerResource'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, 'options': {'key': 'properties.options', 'type': '{str}'}, } def __init__(self, *, resource, options, **kwargs) -> None: - super(ContainerCreateUpdateParameters, self).__init__(**kwargs) + super(SqlContainerCreateUpdateParameters, self).__init__(**kwargs) self.resource = resource self.options = options diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py new file mode 100644 index 000000000000..2c0e864195c2 --- /dev/null +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class SqlContainerPaged(Paged): + """ + A paging container for iterating over a list of :class:`SqlContainer ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SqlContainer]'} + } + + def __init__(self, *args, **kwargs): + + super(SqlContainerPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py similarity index 85% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py index c9541d82f61d..6b6b7872fdf6 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_py3.py @@ -12,7 +12,7 @@ from .resource_py3 import Resource -class Container(Resource): +class SqlContainer(Resource): """An Azure Cosmos DB container. Variables are only populated by the server, and will be ignored when @@ -31,8 +31,8 @@ class Container(Resource): :type location: str :param tags: :type tags: dict[str, str] - :param container_id: Required. Name of the Cosmos DB container - :type container_id: str + :param sql_container_id: Required. Name of the Cosmos DB SQL container + :type sql_container_id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container @@ -64,7 +64,7 @@ class Container(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'container_id': {'required': True}, + 'sql_container_id': {'required': True}, } _attribute_map = { @@ -73,7 +73,7 @@ class Container(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'container_id': {'key': 'properties.id', 'type': 'str'}, + 'sql_container_id': {'key': 'properties.id', 'type': 'str'}, 'indexing_policy': {'key': 'properties.indexingPolicy', 'type': 'IndexingPolicy'}, 'partition_key': {'key': 'properties.partitionKey', 'type': 'ContainerPartitionKey'}, 'default_ttl': {'key': 'properties.defaultTtl', 'type': 'int'}, @@ -84,9 +84,9 @@ class Container(Resource): '_etag': {'key': 'properties._etag', 'type': 'str'}, } - def __init__(self, *, container_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: - super(Container, self).__init__(location=location, tags=tags, **kwargs) - self.container_id = container_id + def __init__(self, *, sql_container_id: str, location: str=None, tags=None, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, _rid: str=None, _ts=None, _etag: str=None, **kwargs) -> None: + super(SqlContainer, self).__init__(location=location, tags=tags, **kwargs) + self.sql_container_id = sql_container_id self.indexing_policy = indexing_policy self.partition_key = partition_key self.default_ttl = default_ttl diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py similarity index 92% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py index 88904f98d1b3..c2122e923895 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class ContainerResource(Model): - """Cosmos DB container resource object. +class SqlContainerResource(Model): + """Cosmos DB SQL container resource object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB container + :param id: Required. Name of the Cosmos DB SQL container :type id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the @@ -52,7 +52,7 @@ class ContainerResource(Model): } def __init__(self, **kwargs): - super(ContainerResource, self).__init__(**kwargs) + super(SqlContainerResource, self).__init__(**kwargs) self.id = kwargs.get('id', None) self.indexing_policy = kwargs.get('indexing_policy', None) self.partition_key = kwargs.get('partition_key', None) diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource_py3.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py similarity index 92% rename from azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource_py3.py rename to azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py index 7ed8915b6d97..9c112bad6507 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/container_resource_py3.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/sql_container_resource_py3.py @@ -12,12 +12,12 @@ from msrest.serialization import Model -class ContainerResource(Model): - """Cosmos DB container resource object. +class SqlContainerResource(Model): + """Cosmos DB SQL container resource object. All required parameters must be populated in order to send to Azure. - :param id: Required. Name of the Cosmos DB container + :param id: Required. Name of the Cosmos DB SQL container :type id: str :param indexing_policy: The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the @@ -52,7 +52,7 @@ class ContainerResource(Model): } def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, **kwargs) -> None: - super(ContainerResource, self).__init__(**kwargs) + super(SqlContainerResource, self).__init__(**kwargs) self.id = id self.indexing_policy = indexing_policy self.partition_key = partition_key diff --git a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py index 0e9d33bf14a5..b00dfdb99a2d 100644 --- a/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py +++ b/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/database_accounts_operations.py @@ -1490,16 +1490,16 @@ def internal_paging(next_link=None, raw=False): list_sql_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases'} def get_sql_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): """Gets the SQL databases under an existing Azure Cosmos DB database - account with the provided id. + account with the provided name. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1516,7 +1516,7 @@ def get_sql_database( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1553,11 +1553,11 @@ def get_sql_database( return client_raw_response return deserialized - get_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}'} + get_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} def _create_update_sql_database_initial( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): create_update_sql_database_parameters = models.SqlDatabaseCreateUpdateParameters(resource=resource, options=options) # Construct URL @@ -1566,7 +1566,7 @@ def _create_update_sql_database_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1609,15 +1609,15 @@ def _create_update_sql_database_initial( return deserialized def create_update_sql_database( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB SQL database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param resource: 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 @@ -1639,7 +1639,7 @@ def create_update_sql_database( raw_result = self._create_update_sql_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, resource=resource, options=options, custom_headers=custom_headers, @@ -1663,18 +1663,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}'} + create_update_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} def _delete_sql_database_initial( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_sql_database.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1705,15 +1705,15 @@ def _delete_sql_database_initial( return client_raw_response def delete_sql_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB SQL database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -1728,7 +1728,7 @@ def delete_sql_database( raw_result = self._delete_sql_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, custom_headers=custom_headers, raw=True, **operation_config @@ -1746,10 +1746,10 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}'} + delete_sql_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}'} def list_sql_containers( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): """Lists the SQL container under an existing Azure Cosmos DB database account. @@ -1757,16 +1757,16 @@ def list_sql_containers( :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of Container + :return: An iterator like instance of SqlContainer :rtype: - ~azure.mgmt.cosmosdb.models.ContainerPaged[~azure.mgmt.cosmosdb.models.Container] + ~azure.mgmt.cosmosdb.models.SqlContainerPaged[~azure.mgmt.cosmosdb.models.SqlContainer] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1778,7 +1778,7 @@ def internal_paging(next_link=None, raw=False): 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1812,18 +1812,18 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ContainerPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.SqlContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_sql_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers'} + list_sql_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers'} def get_sql_container( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): """Gets the SQL container under an existing Azure Cosmos DB database account. @@ -1831,17 +1831,17 @@ def get_sql_container( :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: Container or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Container or + :return: SqlContainer or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.SqlContainer or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ @@ -1851,8 +1851,8 @@ def get_sql_container( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1882,19 +1882,19 @@ def get_sql_container( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('SqlContainer', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers/{containerRid}'} + get_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} def _create_update_sql_container_initial( - self, resource_group_name, account_name, database_rid, container_rid, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_sql_container_parameters = models.ContainerCreateUpdateParameters(resource=resource, options=options) + self, resource_group_name, account_name, database_name, container_name, resource, options, custom_headers=None, raw=False, **operation_config): + create_update_sql_container_parameters = models.SqlContainerCreateUpdateParameters(resource=resource, options=options) # Construct URL url = self.create_update_sql_container.metadata['url'] @@ -1902,8 +1902,8 @@ def _create_update_sql_container_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1923,7 +1923,7 @@ def _create_update_sql_container_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_update_sql_container_parameters, 'ContainerCreateUpdateParameters') + body_content = self._serialize.body(create_update_sql_container_parameters, 'SqlContainerCreateUpdateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -1937,7 +1937,7 @@ def _create_update_sql_container_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('SqlContainer', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1946,19 +1946,19 @@ def _create_update_sql_container_initial( return deserialized def create_update_sql_container( - self, resource_group_name, account_name, database_rid, container_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, container_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB SQL container. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str :param resource: The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.ContainerResource + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :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: dict[str, str] @@ -1967,19 +1967,19 @@ def create_update_sql_container( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Container or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns SqlContainer or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Container] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlContainer] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Container]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlContainer]] :raises: :class:`CloudError` """ raw_result = self._create_update_sql_container_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - container_rid=container_rid, + database_name=database_name, + container_name=container_name, resource=resource, options=options, custom_headers=custom_headers, @@ -1988,7 +1988,7 @@ def create_update_sql_container( ) def get_long_running_output(response): - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('SqlContainer', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2003,19 +2003,19 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers/{containerRid}'} + create_update_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} def _delete_sql_container_initial( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_sql_container.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'containerName': self._serialize.url("container_name", container_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2046,17 +2046,17 @@ def _delete_sql_container_initial( return client_raw_response def delete_sql_container( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, container_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB SQL container. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param container_name: Cosmos DB container name. + :type container_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -2071,8 +2071,8 @@ def delete_sql_container( raw_result = self._delete_sql_container_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - container_rid=container_rid, + database_name=database_name, + container_name=container_name, custom_headers=custom_headers, raw=True, **operation_config @@ -2090,11 +2090,11 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseRid}/containers/{containerRid}'} + delete_sql_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/sql/databases/{databaseName}/containers/{containerName}'} - def list_mongo_databases( + def list_mongo_db_databases( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Lists the Mongo databases under an existing Azure Cosmos DB database + """Lists the MongoDB databases under an existing Azure Cosmos DB database account. :param resource_group_name: Name of an Azure resource group. @@ -2106,16 +2106,16 @@ def list_mongo_databases( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of MongoDatabase + :return: An iterator like instance of MongoDBDatabase :rtype: - ~azure.mgmt.cosmosdb.models.MongoDatabasePaged[~azure.mgmt.cosmosdb.models.MongoDatabase] + ~azure.mgmt.cosmosdb.models.MongoDBDatabasePaged[~azure.mgmt.cosmosdb.models.MongoDBDatabase] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_mongo_databases.metadata['url'] + url = self.list_mongo_db_databases.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -2153,44 +2153,44 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MongoDatabasePaged(internal_paging, self._deserialize.dependencies) + deserialized = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.MongoDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.MongoDBDatabasePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_mongo_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases'} + list_mongo_db_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases'} - def get_mongo_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): - """Gets the Mongo databases under an existing Azure Cosmos DB database - account with the provided id. + def get_mongo_db_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets the MongoDB databases under an existing Azure Cosmos DB database + account with the provided name. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: MongoDatabase or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.MongoDatabase or + :return: MongoDBDatabase or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.MongoDBDatabase or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_mongo_database.metadata['url'] + url = self.get_mongo_db_database.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2220,27 +2220,27 @@ def get_mongo_database( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDatabase', response) + deserialized = self._deserialize('MongoDBDatabase', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_mongo_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}'} + get_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - def _create_update_mongo_database_initial( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_mongo_database_parameters = models.MongoDatabaseCreateUpdateParameters(resource=resource, options=options) + def _create_update_mongo_db_database_initial( + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): + create_update_mongo_db_database_parameters = models.MongoDBDatabaseCreateUpdateParameters(resource=resource, options=options) # Construct URL - url = self.create_update_mongo_database.metadata['url'] + url = self.create_update_mongo_db_database.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2260,7 +2260,7 @@ def _create_update_mongo_database_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_update_mongo_database_parameters, 'MongoDatabaseCreateUpdateParameters') + body_content = self._serialize.body(create_update_mongo_db_database_parameters, 'MongoDBDatabaseCreateUpdateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -2274,7 +2274,7 @@ def _create_update_mongo_database_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoDatabase', response) + deserialized = self._deserialize('MongoDBDatabase', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2282,18 +2282,18 @@ def _create_update_mongo_database_initial( return deserialized - def create_update_mongo_database( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or updates Azure Cosmos DB Mongo database. + def create_update_mongo_db_database( + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or updates Azure Cosmos DB MongoDB database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param resource: The standard JSON format of a Mongo database - :type resource: ~azure.mgmt.cosmosdb.models.MongoDatabaseResource + :param database_name: Cosmos DB database name. + :type database_name: str + :param resource: 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 the headers sent with the request. :type options: dict[str, str] @@ -2302,18 +2302,18 @@ def create_update_mongo_database( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns MongoDatabase or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns MongoDBDatabase or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDatabase] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBDatabase] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDatabase]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBDatabase]] :raises: :class:`CloudError` """ - raw_result = self._create_update_mongo_database_initial( + raw_result = self._create_update_mongo_db_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, resource=resource, options=options, custom_headers=custom_headers, @@ -2322,7 +2322,7 @@ def create_update_mongo_database( ) def get_long_running_output(response): - deserialized = self._deserialize('MongoDatabase', response) + deserialized = self._deserialize('MongoDBDatabase', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2337,18 +2337,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_mongo_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}'} + create_update_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - def _delete_mongo_database_initial( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + def _delete_mongo_db_database_initial( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete_mongo_database.metadata['url'] + url = self.delete_mongo_db_database.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2378,16 +2378,16 @@ def _delete_mongo_database_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def delete_mongo_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Mongo database. + def delete_mongo_db_database( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB MongoDB database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -2399,10 +2399,10 @@ def delete_mongo_database( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._delete_mongo_database_initial( + raw_result = self._delete_mongo_db_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, custom_headers=custom_headers, raw=True, **operation_config @@ -2420,39 +2420,39 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_mongo_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}'} + delete_mongo_db_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}'} - def list_mongo_collections( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): - """Lists the Mongo collection under an existing Azure Cosmos DB database + def list_mongo_db_collections( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of MongoCollection + :return: An iterator like instance of MongoDBCollection :rtype: - ~azure.mgmt.cosmosdb.models.MongoCollectionPaged[~azure.mgmt.cosmosdb.models.MongoCollection] + ~azure.mgmt.cosmosdb.models.MongoDBCollectionPaged[~azure.mgmt.cosmosdb.models.MongoDBCollection] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_mongo_collections.metadata['url'] + url = self.list_mongo_db_collections.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2486,47 +2486,47 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.MongoCollectionPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.MongoCollectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.MongoDBCollectionPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_mongo_collections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections'} + list_mongo_db_collections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections'} - def get_mongo_collection( - self, resource_group_name, account_name, database_rid, collection_rid, custom_headers=None, raw=False, **operation_config): - """Gets the Mongo collection under an existing Azure Cosmos DB database + def get_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): + """Gets the MongoDB collection under an existing Azure Cosmos DB database account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param collection_rid: Cosmos DB collection rid. - :type collection_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: MongoCollection or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.MongoCollection or + :return: MongoDBCollection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.MongoDBCollection or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_mongo_collection.metadata['url'] + url = self.get_mongo_db_collection.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2556,28 +2556,28 @@ def get_mongo_collection( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoCollection', response) + deserialized = self._deserialize('MongoDBCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_mongo_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections/{collectionRid}'} + get_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} - def _create_update_mongo_collection_initial( - self, resource_group_name, account_name, database_rid, collection_rid, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_mongo_collection_parameters = models.MongoCollectionCreateUpdateParameters(resource=resource, options=options) + def _create_update_mongo_db_collection_initial( + self, resource_group_name, account_name, database_name, collection_name, resource, options, custom_headers=None, raw=False, **operation_config): + create_update_mongo_db_collection_parameters = models.MongoDBCollectionCreateUpdateParameters(resource=resource, options=options) # Construct URL - url = self.create_update_mongo_collection.metadata['url'] + url = self.create_update_mongo_db_collection.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2597,7 +2597,7 @@ def _create_update_mongo_collection_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_update_mongo_collection_parameters, 'MongoCollectionCreateUpdateParameters') + body_content = self._serialize.body(create_update_mongo_db_collection_parameters, 'MongoDBCollectionCreateUpdateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -2611,7 +2611,7 @@ def _create_update_mongo_collection_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MongoCollection', response) + deserialized = self._deserialize('MongoDBCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2619,20 +2619,20 @@ def _create_update_mongo_collection_initial( return deserialized - def create_update_mongo_collection( - self, resource_group_name, account_name, database_rid, collection_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Mongo Collection. + def create_update_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB MongoDB Collection. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param collection_rid: Cosmos DB collection rid. - :type collection_rid: str - :param resource: The standard JSON format of a Mongo collection - :type resource: ~azure.mgmt.cosmosdb.models.MongoCollectionResource + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param resource: 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 the headers sent with the request. :type options: dict[str, str] @@ -2641,19 +2641,19 @@ def create_update_mongo_collection( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns MongoCollection or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns MongoDBCollection or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoCollection] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.MongoDBCollection] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoCollection]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.MongoDBCollection]] :raises: :class:`CloudError` """ - raw_result = self._create_update_mongo_collection_initial( + raw_result = self._create_update_mongo_db_collection_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, + database_name=database_name, + collection_name=collection_name, resource=resource, options=options, custom_headers=custom_headers, @@ -2662,7 +2662,7 @@ def create_update_mongo_collection( ) def get_long_running_output(response): - deserialized = self._deserialize('MongoCollection', response) + deserialized = self._deserialize('MongoDBCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2677,19 +2677,19 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_mongo_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections/{collectionRid}'} + create_update_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} - def _delete_mongo_collection_initial( - self, resource_group_name, account_name, database_rid, collection_rid, custom_headers=None, raw=False, **operation_config): + def _delete_mongo_db_collection_initial( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete_mongo_collection.metadata['url'] + url = self.delete_mongo_db_collection.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'collectionRid': self._serialize.url("collection_rid", collection_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2719,18 +2719,18 @@ def _delete_mongo_collection_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def delete_mongo_collection( - self, resource_group_name, account_name, database_rid, collection_rid, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Mongo Collection. + def delete_mongo_db_collection( + self, resource_group_name, account_name, database_name, collection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB MongoDB Collection. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param collection_rid: Cosmos DB collection rid. - :type collection_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -2742,11 +2742,11 @@ def delete_mongo_collection( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._delete_mongo_collection_initial( + raw_result = self._delete_mongo_db_collection_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - collection_rid=collection_rid, + database_name=database_name, + collection_name=collection_name, custom_headers=custom_headers, raw=True, **operation_config @@ -2764,7 +2764,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_mongo_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongo/databases/{databaseRid}/collections/{collectionRid}'} + delete_mongo_db_collection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/mongodb/databases/{databaseName}/collections/{collectionName}'} def list_tables( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -2837,16 +2837,16 @@ def internal_paging(next_link=None, raw=False): list_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables'} def get_table( - self, resource_group_name, account_name, table_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): """Gets the Tables under an existing Azure Cosmos DB database account with - the provided id. + the provided name. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param table_name: Cosmos DB table name. + :type table_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -2863,7 +2863,7 @@ def get_table( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2900,11 +2900,11 @@ def get_table( return client_raw_response return deserialized - get_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableRid}'} + get_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} def _create_update_table_initial( - self, resource_group_name, account_name, table_rid, resource, options, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, table_name, resource, options, custom_headers=None, raw=False, **operation_config): create_update_table_parameters = models.TableCreateUpdateParameters(resource=resource, options=options) # Construct URL @@ -2913,7 +2913,7 @@ def _create_update_table_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2956,15 +2956,15 @@ def _create_update_table_initial( return deserialized def create_update_table( - self, resource_group_name, account_name, table_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, table_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB Table. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param table_name: Cosmos DB table name. + :type table_name: str :param resource: 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 @@ -2986,7 +2986,7 @@ def create_update_table( raw_result = self._create_update_table_initial( resource_group_name=resource_group_name, account_name=account_name, - table_rid=table_rid, + table_name=table_name, resource=resource, options=options, custom_headers=custom_headers, @@ -3010,18 +3010,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableRid}'} + create_update_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} def _delete_table_initial( - self, resource_group_name, account_name, table_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_table.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3052,15 +3052,15 @@ def _delete_table_initial( return client_raw_response def delete_table( - self, resource_group_name, account_name, table_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB Table. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param table_name: Cosmos DB table name. + :type table_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -3075,7 +3075,7 @@ def delete_table( raw_result = self._delete_table_initial( resource_group_name=resource_group_name, account_name=account_name, - table_rid=table_rid, + table_name=table_name, custom_headers=custom_headers, raw=True, **operation_config @@ -3093,7 +3093,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableRid}'} + delete_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/table/tables/{tableName}'} def list_cassandra_keyspaces( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -3167,16 +3167,16 @@ def internal_paging(next_link=None, raw=False): list_cassandra_keyspaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces'} def get_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): """Gets the Cassandra keyspaces under an existing Azure Cosmos DB database - account with the provided id. + account with the provided name. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -3193,7 +3193,7 @@ def get_cassandra_keyspace( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3230,11 +3230,11 @@ def get_cassandra_keyspace( return client_raw_response return deserialized - get_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}'} + get_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} def _create_update_cassandra_keyspace_initial( - self, resource_group_name, account_name, keyspace_rid, resource, options, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, resource, options, custom_headers=None, raw=False, **operation_config): create_update_cassandra_keyspace_parameters = models.CassandraKeyspaceCreateUpdateParameters(resource=resource, options=options) # Construct URL @@ -3243,7 +3243,7 @@ def _create_update_cassandra_keyspace_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3286,15 +3286,15 @@ def _create_update_cassandra_keyspace_initial( return deserialized def create_update_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, keyspace_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB Cassandra keyspace. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str :param resource: 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 @@ -3316,7 +3316,7 @@ def create_update_cassandra_keyspace( raw_result = self._create_update_cassandra_keyspace_initial( resource_group_name=resource_group_name, account_name=account_name, - keyspace_rid=keyspace_rid, + keyspace_name=keyspace_name, resource=resource, options=options, custom_headers=custom_headers, @@ -3340,18 +3340,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}'} + create_update_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} def _delete_cassandra_keyspace_initial( - self, resource_group_name, account_name, keyspace_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_cassandra_keyspace.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3382,15 +3382,15 @@ def _delete_cassandra_keyspace_initial( return client_raw_response def delete_cassandra_keyspace( - self, resource_group_name, account_name, keyspace_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB Cassandra keyspace. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -3405,7 +3405,7 @@ def delete_cassandra_keyspace( raw_result = self._delete_cassandra_keyspace_initial( resource_group_name=resource_group_name, account_name=account_name, - keyspace_rid=keyspace_rid, + keyspace_name=keyspace_name, custom_headers=custom_headers, raw=True, **operation_config @@ -3423,10 +3423,10 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}'} + delete_cassandra_keyspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}'} def list_cassandra_tables( - self, resource_group_name, account_name, keyspace_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, custom_headers=None, raw=False, **operation_config): """Lists the Cassandra table under an existing Azure Cosmos DB database account. @@ -3434,8 +3434,8 @@ def list_cassandra_tables( :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -3455,7 +3455,7 @@ def internal_paging(next_link=None, raw=False): 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3497,10 +3497,10 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_cassandra_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables'} + list_cassandra_tables.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables'} def get_cassandra_table( - self, resource_group_name, account_name, keyspace_rid, table_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): """Gets the Cassandra table under an existing Azure Cosmos DB database account. @@ -3508,10 +3508,10 @@ def get_cassandra_table( :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -3528,8 +3528,8 @@ def get_cassandra_table( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str'), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3566,11 +3566,11 @@ def get_cassandra_table( return client_raw_response return deserialized - get_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables/{tableRid}'} + get_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} def _create_update_cassandra_table_initial( - self, resource_group_name, account_name, keyspace_rid, table_rid, resource, options, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, table_name, resource, options, custom_headers=None, raw=False, **operation_config): create_update_cassandra_table_parameters = models.CassandraTableCreateUpdateParameters(resource=resource, options=options) # Construct URL @@ -3579,8 +3579,8 @@ def _create_update_cassandra_table_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str'), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3623,17 +3623,17 @@ def _create_update_cassandra_table_initial( return deserialized def create_update_cassandra_table( - self, resource_group_name, account_name, keyspace_rid, table_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, keyspace_name, table_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB Cassandra Table. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str :param resource: 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 @@ -3655,8 +3655,8 @@ def create_update_cassandra_table( raw_result = self._create_update_cassandra_table_initial( resource_group_name=resource_group_name, account_name=account_name, - keyspace_rid=keyspace_rid, - table_rid=table_rid, + keyspace_name=keyspace_name, + table_name=table_name, resource=resource, options=options, custom_headers=custom_headers, @@ -3680,19 +3680,19 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables/{tableRid}'} + create_update_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} def _delete_cassandra_table_initial( - self, resource_group_name, account_name, keyspace_rid, table_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_cassandra_table.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'keyspaceRid': self._serialize.url("keyspace_rid", keyspace_rid, 'str'), - 'tableRid': self._serialize.url("table_rid", table_rid, 'str') + 'keyspaceName': self._serialize.url("keyspace_name", keyspace_name, 'str'), + 'tableName': self._serialize.url("table_name", table_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3723,17 +3723,17 @@ def _delete_cassandra_table_initial( return client_raw_response def delete_cassandra_table( - self, resource_group_name, account_name, keyspace_rid, table_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, keyspace_name, table_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB Cassandra table. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param keyspace_rid: Cosmos DB keyspace rid. - :type keyspace_rid: str - :param table_rid: Cosmos DB table rid. - :type table_rid: str + :param keyspace_name: Cosmos DB keyspace name. + :type keyspace_name: str + :param table_name: Cosmos DB table name. + :type table_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -3748,8 +3748,8 @@ def delete_cassandra_table( raw_result = self._delete_cassandra_table_initial( resource_group_name=resource_group_name, account_name=account_name, - keyspace_rid=keyspace_rid, - table_rid=table_rid, + keyspace_name=keyspace_name, + table_name=table_name, custom_headers=custom_headers, raw=True, **operation_config @@ -3767,7 +3767,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceRid}/tables/{tableRid}'} + delete_cassandra_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/cassandra/keyspaces/{keyspaceName}/tables/{tableName}'} def list_gremlin_databases( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): @@ -3841,16 +3841,16 @@ def internal_paging(next_link=None, raw=False): list_gremlin_databases.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases'} def get_gremlin_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): """Gets the Gremlin databases under an existing Azure Cosmos DB database - account with the provided id. + account with the provided name. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -3867,7 +3867,7 @@ def get_gremlin_database( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3904,11 +3904,11 @@ def get_gremlin_database( return client_raw_response return deserialized - get_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}'} + get_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} def _create_update_gremlin_database_initial( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, **operation_config): create_update_gremlin_database_parameters = models.GremlinDatabaseCreateUpdateParameters(resource=resource, options=options) # Construct URL @@ -3917,7 +3917,7 @@ def _create_update_gremlin_database_initial( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3960,15 +3960,15 @@ def _create_update_gremlin_database_initial( return deserialized def create_update_gremlin_database( - self, resource_group_name, account_name, database_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update an Azure Cosmos DB Gremlin database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param resource: 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 @@ -3990,7 +3990,7 @@ def create_update_gremlin_database( raw_result = self._create_update_gremlin_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, resource=resource, options=options, custom_headers=custom_headers, @@ -4014,18 +4014,18 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}'} + create_update_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} def _delete_gremlin_database_initial( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete_gremlin_database.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4056,15 +4056,15 @@ def _delete_gremlin_database_initial( return client_raw_response def delete_gremlin_database( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes an existing Azure Cosmos DB Gremlin database. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -4079,7 +4079,7 @@ def delete_gremlin_database( raw_result = self._delete_gremlin_database_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, + database_name=database_name, custom_headers=custom_headers, raw=True, **operation_config @@ -4097,39 +4097,39 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}'} + delete_gremlin_database.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}'} - def list_gremlin_containers( - self, resource_group_name, account_name, database_rid, custom_headers=None, raw=False, **operation_config): - """Lists the Gremlin container under an existing Azure Cosmos DB database + def list_gremlin_graphs( + self, resource_group_name, account_name, database_name, custom_headers=None, raw=False, **operation_config): + """Lists the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of Container + :return: An iterator like instance of GremlinGraph :rtype: - ~azure.mgmt.cosmosdb.models.ContainerPaged[~azure.mgmt.cosmosdb.models.Container] + ~azure.mgmt.cosmosdb.models.GremlinGraphPaged[~azure.mgmt.cosmosdb.models.GremlinGraph] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_gremlin_containers.metadata['url'] + url = self.list_gremlin_graphs.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4163,47 +4163,47 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ContainerPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ContainerPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.GremlinGraphPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_gremlin_containers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers'} + list_gremlin_graphs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs'} - def get_gremlin_container( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, **operation_config): - """Gets the Gremlin container under an existing Azure Cosmos DB database + def get_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): + """Gets the Gremlin graph under an existing Azure Cosmos DB database account. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: Container or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.Container or + :return: GremlinGraph or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.GremlinGraph or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_gremlin_container.metadata['url'] + url = self.get_gremlin_graph.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4233,28 +4233,28 @@ def get_gremlin_container( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('GremlinGraph', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_gremlin_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers/{containerRid}'} + get_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'} - def _create_update_gremlin_container_initial( - self, resource_group_name, account_name, database_rid, container_rid, resource, options, custom_headers=None, raw=False, **operation_config): - create_update_gremlin_container_parameters = models.ContainerCreateUpdateParameters(resource=resource, options=options) + def _create_update_gremlin_graph_initial( + self, resource_group_name, account_name, database_name, graph_name, resource, options, custom_headers=None, raw=False, **operation_config): + create_update_gremlin_graph_parameters = models.GremlinGraphCreateUpdateParameters(resource=resource, options=options) # Construct URL - url = self.create_update_gremlin_container.metadata['url'] + url = self.create_update_gremlin_graph.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4274,7 +4274,7 @@ def _create_update_gremlin_container_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(create_update_gremlin_container_parameters, 'ContainerCreateUpdateParameters') + body_content = self._serialize.body(create_update_gremlin_graph_parameters, 'GremlinGraphCreateUpdateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -4288,7 +4288,7 @@ def _create_update_gremlin_container_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('GremlinGraph', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4296,20 +4296,20 @@ def _create_update_gremlin_container_initial( return deserialized - def create_update_gremlin_container( - self, resource_group_name, account_name, database_rid, container_rid, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update an Azure Cosmos DB Gremlin container. + def create_update_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, resource, options, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an Azure Cosmos DB Gremlin graph. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str - :param resource: The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.ContainerResource + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str + :param resource: 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 the headers sent with the request. :type options: dict[str, str] @@ -4318,19 +4318,19 @@ def create_update_gremlin_container( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns Container or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns GremlinGraph or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.Container] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.GremlinGraph] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.Container]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.GremlinGraph]] :raises: :class:`CloudError` """ - raw_result = self._create_update_gremlin_container_initial( + raw_result = self._create_update_gremlin_graph_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - container_rid=container_rid, + database_name=database_name, + graph_name=graph_name, resource=resource, options=options, custom_headers=custom_headers, @@ -4339,7 +4339,7 @@ def create_update_gremlin_container( ) def get_long_running_output(response): - deserialized = self._deserialize('Container', response) + deserialized = self._deserialize('GremlinGraph', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4354,19 +4354,19 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_gremlin_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers/{containerRid}'} + create_update_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'} - def _delete_gremlin_container_initial( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, **operation_config): + def _delete_gremlin_graph_initial( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.delete_gremlin_container.metadata['url'] + url = self.delete_gremlin_graph.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3), - 'databaseRid': self._serialize.url("database_rid", database_rid, 'str'), - 'containerRid': self._serialize.url("container_rid", container_rid, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'graphName': self._serialize.url("graph_name", graph_name, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4396,18 +4396,18 @@ def _delete_gremlin_container_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def delete_gremlin_container( - self, resource_group_name, account_name, database_rid, container_rid, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB Gremlin container. + def delete_gremlin_graph( + self, resource_group_name, account_name, database_name, graph_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing Azure Cosmos DB Gremlin graph. :param resource_group_name: Name of an Azure resource group. :type resource_group_name: str :param account_name: Cosmos DB database account name. :type account_name: str - :param database_rid: Cosmos DB database rid. - :type database_rid: str - :param container_rid: Cosmos DB container rid. - :type container_rid: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param graph_name: Cosmos DB graph name. + :type graph_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -4419,11 +4419,11 @@ def delete_gremlin_container( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._delete_gremlin_container_initial( + raw_result = self._delete_gremlin_graph_initial( resource_group_name=resource_group_name, account_name=account_name, - database_rid=database_rid, - container_rid=container_rid, + database_name=database_name, + graph_name=graph_name, custom_headers=custom_headers, raw=True, **operation_config @@ -4441,4 +4441,4 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_gremlin_container.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseRid}/containers/{containerRid}'} + delete_gremlin_graph.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/apis/gremlin/databases/{databaseName}/graphs/{graphName}'}