Skip to content

Commit 787c227

Browse files
author
SDKAuto
committed
CodeGen from PR 14817 in Azure/azure-rest-api-specs
Merge bb0d2407beeb771594226794b89f6e9df5e7aec4 into 8834471
1 parent c458c42 commit 787c227

File tree

79 files changed

+9164
-2028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+9164
-2028
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].0",
4+
"@autorest/[email protected].4",
55
"@autorest/[email protected]"
66
],
7-
"commit": "f780b571abddf2fc99233212a00510d3bef6878d",
7+
"commit": "b16bcd7c5cc1a7895e8355cc6e04879e5cfae202",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].0 --use=@autorest/[email protected] --version=3.4.2",
9+
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].4 --use=@autorest/[email protected] --version=3.4.5",
1010
"readme": "specification/cosmos-db/resource-manager/readme.md"
1111
}

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2021-06-15"
51+
self.api_version = "2021-07-01-preview"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
from .operations import CollectionPartitionOperations
3333
from .operations import PartitionKeyRangeIdOperations
3434
from .operations import PartitionKeyRangeIdRegionOperations
35+
from .operations import GraphResourcesOperations
3536
from .operations import SqlResourcesOperations
3637
from .operations import MongoDBResourcesOperations
3738
from .operations import TableResourcesOperations
3839
from .operations import CassandraResourcesOperations
3940
from .operations import GremlinResourcesOperations
41+
from .operations import CosmosDBManagementClientOperationsMixin
4042
from .operations import NotebookWorkspacesOperations
4143
from .operations import PrivateEndpointConnectionsOperations
4244
from .operations import PrivateLinkResourcesOperations
@@ -47,10 +49,13 @@
4749
from .operations import RestorableMongodbDatabasesOperations
4850
from .operations import RestorableMongodbCollectionsOperations
4951
from .operations import RestorableMongodbResourcesOperations
52+
from .operations import CassandraClustersOperations
53+
from .operations import CassandraDataCentersOperations
54+
from .operations import ServiceOperations
5055
from . import models
5156

5257

53-
class CosmosDBManagementClient(object):
58+
class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin):
5459
"""Azure Cosmos DB Database Service Resource Provider REST API.
5560
5661
:ivar database_accounts: DatabaseAccountsOperations operations
@@ -79,6 +84,8 @@ class CosmosDBManagementClient(object):
7984
:vartype partition_key_range_id: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdOperations
8085
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
8186
:vartype partition_key_range_id_region: azure.mgmt.cosmosdb.operations.PartitionKeyRangeIdRegionOperations
87+
:ivar graph_resources: GraphResourcesOperations operations
88+
:vartype graph_resources: azure.mgmt.cosmosdb.operations.GraphResourcesOperations
8289
:ivar sql_resources: SqlResourcesOperations operations
8390
:vartype sql_resources: azure.mgmt.cosmosdb.operations.SqlResourcesOperations
8491
:ivar mongo_db_resources: MongoDBResourcesOperations operations
@@ -109,6 +116,12 @@ class CosmosDBManagementClient(object):
109116
:vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.operations.RestorableMongodbCollectionsOperations
110117
:ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations
111118
:vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.operations.RestorableMongodbResourcesOperations
119+
:ivar cassandra_clusters: CassandraClustersOperations operations
120+
:vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations
121+
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
122+
:vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations
123+
:ivar service: ServiceOperations operations
124+
:vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations
112125
:param credential: Credential needed for the client to connect to Azure.
113126
:type credential: ~azure.core.credentials.TokenCredential
114127
:param subscription_id: The ID of the target subscription.
@@ -161,6 +174,8 @@ def __init__(
161174
self._client, self._config, self._serialize, self._deserialize)
162175
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
163176
self._client, self._config, self._serialize, self._deserialize)
177+
self.graph_resources = GraphResourcesOperations(
178+
self._client, self._config, self._serialize, self._deserialize)
164179
self.sql_resources = SqlResourcesOperations(
165180
self._client, self._config, self._serialize, self._deserialize)
166181
self.mongo_db_resources = MongoDBResourcesOperations(
@@ -191,6 +206,12 @@ def __init__(
191206
self._client, self._config, self._serialize, self._deserialize)
192207
self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(
193208
self._client, self._config, self._serialize, self._deserialize)
209+
self.cassandra_clusters = CassandraClustersOperations(
210+
self._client, self._config, self._serialize, self._deserialize)
211+
self.cassandra_data_centers = CassandraDataCentersOperations(
212+
self._client, self._config, self._serialize, self._deserialize)
213+
self.service = ServiceOperations(
214+
self._client, self._config, self._serialize, self._deserialize)
194215

195216
def _send_request(self, http_request, **kwargs):
196217
# type: (HttpRequest, Any) -> HttpResponse

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2021-06-15",
3-
"total_api_version_list": ["2021-06-15"],
2+
"chosen_version": "2021-07-01-preview",
3+
"total_api_version_list": ["2021-07-01-preview"],
44
"client": {
55
"name": "CosmosDBManagementClient",
66
"filename": "_cosmos_db_management_client",
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"], \"._operations_mixin\": [\"CosmosDBManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"], \"._operations_mixin\": [\"CosmosDBManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -111,6 +111,7 @@
111111
"collection_partition": "CollectionPartitionOperations",
112112
"partition_key_range_id": "PartitionKeyRangeIdOperations",
113113
"partition_key_range_id_region": "PartitionKeyRangeIdRegionOperations",
114+
"graph_resources": "GraphResourcesOperations",
114115
"sql_resources": "SqlResourcesOperations",
115116
"mongo_db_resources": "MongoDBResourcesOperations",
116117
"table_resources": "TableResourcesOperations",
@@ -125,6 +126,39 @@
125126
"restorable_sql_resources": "RestorableSqlResourcesOperations",
126127
"restorable_mongodb_databases": "RestorableMongodbDatabasesOperations",
127128
"restorable_mongodb_collections": "RestorableMongodbCollectionsOperations",
128-
"restorable_mongodb_resources": "RestorableMongodbResourcesOperations"
129+
"restorable_mongodb_resources": "RestorableMongodbResourcesOperations",
130+
"cassandra_clusters": "CassandraClustersOperations",
131+
"cassandra_data_centers": "CassandraDataCentersOperations",
132+
"service": "ServiceOperations"
133+
},
134+
"operation_mixins": {
135+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\"]}}}",
136+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
137+
"operations": {
138+
"location_list" : {
139+
"sync": {
140+
"signature": "def location_list(\n self,\n **kwargs # type: Any\n):\n",
141+
"doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
142+
},
143+
"async": {
144+
"coroutine": false,
145+
"signature": "def location_list(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.LocationListResult\"]:\n",
146+
"doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
147+
},
148+
"call": ""
149+
},
150+
"location_get" : {
151+
"sync": {
152+
"signature": "def location_get(\n self,\n location, # type: str\n **kwargs # type: Any\n):\n",
153+
"doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
154+
},
155+
"async": {
156+
"coroutine": true,
157+
"signature": "async def location_get(\n self,\n location: str,\n **kwargs: Any\n) -\u003e \"_models.LocationGetResult\":\n",
158+
"doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\""
159+
},
160+
"call": "location"
161+
}
162+
}
129163
}
130164
}

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "6.4.0"
9+
VERSION = "0.7.0"

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2021-06-15"
48+
self.api_version = "2021-07-01-preview"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@
3030
from .operations import CollectionPartitionOperations
3131
from .operations import PartitionKeyRangeIdOperations
3232
from .operations import PartitionKeyRangeIdRegionOperations
33+
from .operations import GraphResourcesOperations
3334
from .operations import SqlResourcesOperations
3435
from .operations import MongoDBResourcesOperations
3536
from .operations import TableResourcesOperations
3637
from .operations import CassandraResourcesOperations
3738
from .operations import GremlinResourcesOperations
39+
from .operations import CosmosDBManagementClientOperationsMixin
3840
from .operations import NotebookWorkspacesOperations
3941
from .operations import PrivateEndpointConnectionsOperations
4042
from .operations import PrivateLinkResourcesOperations
@@ -45,10 +47,13 @@
4547
from .operations import RestorableMongodbDatabasesOperations
4648
from .operations import RestorableMongodbCollectionsOperations
4749
from .operations import RestorableMongodbResourcesOperations
50+
from .operations import CassandraClustersOperations
51+
from .operations import CassandraDataCentersOperations
52+
from .operations import ServiceOperations
4853
from .. import models
4954

5055

51-
class CosmosDBManagementClient(object):
56+
class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin):
5257
"""Azure Cosmos DB Database Service Resource Provider REST API.
5358
5459
:ivar database_accounts: DatabaseAccountsOperations operations
@@ -77,6 +82,8 @@ class CosmosDBManagementClient(object):
7782
:vartype partition_key_range_id: azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdOperations
7883
:ivar partition_key_range_id_region: PartitionKeyRangeIdRegionOperations operations
7984
:vartype partition_key_range_id_region: azure.mgmt.cosmosdb.aio.operations.PartitionKeyRangeIdRegionOperations
85+
:ivar graph_resources: GraphResourcesOperations operations
86+
:vartype graph_resources: azure.mgmt.cosmosdb.aio.operations.GraphResourcesOperations
8087
:ivar sql_resources: SqlResourcesOperations operations
8188
:vartype sql_resources: azure.mgmt.cosmosdb.aio.operations.SqlResourcesOperations
8289
:ivar mongo_db_resources: MongoDBResourcesOperations operations
@@ -107,6 +114,12 @@ class CosmosDBManagementClient(object):
107114
:vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.aio.operations.RestorableMongodbCollectionsOperations
108115
:ivar restorable_mongodb_resources: RestorableMongodbResourcesOperations operations
109116
:vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.aio.operations.RestorableMongodbResourcesOperations
117+
:ivar cassandra_clusters: CassandraClustersOperations operations
118+
:vartype cassandra_clusters: azure.mgmt.cosmosdb.aio.operations.CassandraClustersOperations
119+
:ivar cassandra_data_centers: CassandraDataCentersOperations operations
120+
:vartype cassandra_data_centers: azure.mgmt.cosmosdb.aio.operations.CassandraDataCentersOperations
121+
:ivar service: ServiceOperations operations
122+
:vartype service: azure.mgmt.cosmosdb.aio.operations.ServiceOperations
110123
:param credential: Credential needed for the client to connect to Azure.
111124
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
112125
:param subscription_id: The ID of the target subscription.
@@ -158,6 +171,8 @@ def __init__(
158171
self._client, self._config, self._serialize, self._deserialize)
159172
self.partition_key_range_id_region = PartitionKeyRangeIdRegionOperations(
160173
self._client, self._config, self._serialize, self._deserialize)
174+
self.graph_resources = GraphResourcesOperations(
175+
self._client, self._config, self._serialize, self._deserialize)
161176
self.sql_resources = SqlResourcesOperations(
162177
self._client, self._config, self._serialize, self._deserialize)
163178
self.mongo_db_resources = MongoDBResourcesOperations(
@@ -188,6 +203,12 @@ def __init__(
188203
self._client, self._config, self._serialize, self._deserialize)
189204
self.restorable_mongodb_resources = RestorableMongodbResourcesOperations(
190205
self._client, self._config, self._serialize, self._deserialize)
206+
self.cassandra_clusters = CassandraClustersOperations(
207+
self._client, self._config, self._serialize, self._deserialize)
208+
self.cassandra_data_centers = CassandraDataCentersOperations(
209+
self._client, self._config, self._serialize, self._deserialize)
210+
self.service = ServiceOperations(
211+
self._client, self._config, self._serialize, self._deserialize)
191212

192213
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
193214
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)