Skip to content

Commit 9cfaceb

Browse files
authored
code and test (Azure#24224)
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 83ff40e commit 9cfaceb

File tree

89 files changed

+9595
-4248
lines changed

Some content is hidden

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

89 files changed

+9595
-4248
lines changed

sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Release History
22

3+
## 7.0.0b5 (2022-04-28)
4+
5+
**Features**
6+
7+
- Added operation DataTransferJobsOperations.cancel
8+
- Added operation DataTransferJobsOperations.pause
9+
- Added operation DataTransferJobsOperations.resume
10+
- Added operation MongoDBResourcesOperations.begin_mongo_db_container_redistribute_throughput
11+
- Added operation MongoDBResourcesOperations.begin_sql_container_retrieve_throughput_distribution
12+
- Added operation SqlResourcesOperations.begin_sql_container_redistribute_throughput
13+
- Added operation SqlResourcesOperations.begin_sql_container_retrieve_throughput_distribution
14+
- Model DataTransferJobGetResults has a new parameter processed_count
15+
- Model DataTransferJobGetResults has a new parameter total_count
16+
- Model DataTransferJobProperties has a new parameter processed_count
17+
- Model DataTransferJobProperties has a new parameter total_count
18+
19+
**Breaking changes**
20+
21+
- Model DataTransferJobGetResults no longer has parameter percentage_complete
22+
- Model DataTransferJobProperties no longer has parameter percentage_complete
23+
324
## 7.0.0b4 (2022-04-14)
425

526
**Features**
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.12.0",
4+
"@autorest/python@5.13.0",
55
"@autorest/[email protected]"
66
],
7-
"commit": "49135492d5ea1c15f1ba53813c4be8cb2109c416",
7+
"commit": "0baca05c851c1749e92beb0d2134cd958827dd54",
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-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected] --version=3.7.2",
1010
"readme": "specification/cosmos-db/resource-manager/readme.md"
1111
}

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class CosmosDBManagementClientConfiguration(Configuration):
22+
class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for CosmosDBManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class CosmosDBManagementClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: The ID of the target subscription.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2022-02-15-preview"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
5156
self._configure(**kwargs)

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

+9-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from . import models
1718
from ._configuration import CosmosDBManagementClientConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials import TokenCredential
2324

24-
class CosmosDBManagementClient:
25+
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
2526
"""Azure Cosmos DB Database Service Resource Provider REST API.
2627
2728
:ivar database_accounts: DatabaseAccountsOperations operations
@@ -122,8 +123,11 @@ class CosmosDBManagementClient:
122123
:type credential: ~azure.core.credentials.TokenCredential
123124
:param subscription_id: The ID of the target subscription.
124125
:type subscription_id: str
125-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
126+
:param base_url: Service URL. Default value is "https://management.azure.com".
126127
:type base_url: str
128+
:keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding
129+
this default value may result in unsupported behavior.
130+
:paramtype api_version: str
127131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
128132
Retry-After header is present.
129133
"""
@@ -185,7 +189,7 @@ def __init__(
185189

186190
def _send_request(
187191
self,
188-
request, # type: HttpRequest
192+
request: HttpRequest,
189193
**kwargs: Any
190194
) -> HttpResponse:
191195
"""Runs the network request through the client's chained policies.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -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\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"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\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CosmosDBManagementClientConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

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

+1-1
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 = "7.0.0b4"
9+
VERSION = "7.0.0b5"

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class CosmosDBManagementClientConfiguration(Configuration):
22+
class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for CosmosDBManagementClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class CosmosDBManagementClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: The ID of the target subscription.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2022-02-15-preview") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2022-02-15-preview"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION))
5156
self._configure(**kwargs)

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

+8-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Awaitable, Optional, TYPE_CHECKING
10+
from typing import Any, Awaitable, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import AsyncHttpResponse, HttpRequest
1315
from azure.mgmt.core import AsyncARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from .. import models
1718
from ._configuration import CosmosDBManagementClientConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials_async import AsyncTokenCredential
2324

24-
class CosmosDBManagementClient:
25+
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
2526
"""Azure Cosmos DB Database Service Resource Provider REST API.
2627
2728
:ivar database_accounts: DatabaseAccountsOperations operations
@@ -125,8 +126,11 @@ class CosmosDBManagementClient:
125126
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
126127
:param subscription_id: The ID of the target subscription.
127128
:type subscription_id: str
128-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
129+
:param base_url: Service URL. Default value is "https://management.azure.com".
129130
:type base_url: str
131+
:keyword api_version: Api Version. Default value is "2022-02-15-preview". Note that overriding
132+
this default value may result in unsupported behavior.
133+
:paramtype api_version: str
130134
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
131135
Retry-After header is present.
132136
"""

0 commit comments

Comments
 (0)