Skip to content

Commit 99fa1c9

Browse files
[AutoRelease] t2-recoveryservicesbackup-2022-04-29-79596 (#24243)
* code and test * Update CHANGELOG.md Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com>
1 parent fcf4afb commit 99fa1c9

139 files changed

Lines changed: 3437 additions & 2000 deletions

File tree

Some content is hidden

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

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 4.2.0 (2022-05-07)
4+
5+
**Features**
6+
7+
- Model AzureIaaSVMProtectionPolicy has a new parameter tiering_policy
8+
- Model SubProtectionPolicy has a new parameter tiering_policy
9+
310
## 4.1.1 (2022-02-18)
411

512
**Bug Fixes**
Lines changed: 3 additions & 3 deletions
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/modelerfour@4.19.3"
66
],
7-
"commit": "644beb7e189d0c5e16377df6a88aef589707b7f0",
7+
"commit": "78665b44d4b9295e56664193fc3baa9e0526d15d",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/recoveryservicesbackup/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/modelerfour@4.19.3 --version=3.7.2",
1010
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md"
1111
}

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_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 = "4.1.1"
9+
VERSION = "4.2.0"

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class RecoveryServicesBackupClientConfiguration(Configuration):
22+
class RecoveryServicesBackupClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for RecoveryServicesBackupClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class RecoveryServicesBackupClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: The subscription Id.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2021-12-01". Note that overriding this
33+
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(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2021-12-01") # 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 = "2021-12-01"
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-recoveryservicesbackup/{}'.format(VERSION))
5156
self._configure(**kwargs)

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_metadata.json

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_recovery_services_backup_client.py

Lines changed: 9 additions & 5 deletions
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 RecoveryServicesBackupClientConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials import TokenCredential
2324

24-
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
25+
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): # pylint: disable=too-many-instance-attributes
2526
"""Open API 2.0 Specs for Azure RecoveryServices Backup service.
2627
2728
:ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations
@@ -175,8 +176,11 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
175176
:type credential: ~azure.core.credentials.TokenCredential
176177
:param subscription_id: The subscription Id.
177178
:type subscription_id: str
178-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
179+
:param base_url: Service URL. Default value is "https://management.azure.com".
179180
:type base_url: str
181+
:keyword api_version: Api Version. Default value is "2021-12-01". Note that overriding this
182+
default value may result in unsupported behavior.
183+
:paramtype api_version: str
180184
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
181185
Retry-After header is present.
182186
"""
@@ -247,7 +251,7 @@ def __init__(
247251

248252
def _send_request(
249253
self,
250-
request, # type: HttpRequest
254+
request: HttpRequest,
251255
**kwargs: Any
252256
) -> HttpResponse:
253257
"""Runs the network request through the client's chained policies.

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/_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 = "4.1.1"
9+
VERSION = "4.2.0"

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class RecoveryServicesBackupClientConfiguration(Configuration):
22+
class RecoveryServicesBackupClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for RecoveryServicesBackupClient.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class RecoveryServicesBackupClientConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: The subscription Id.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2021-12-01". Note that overriding this
33+
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(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2021-12-01") # 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 = "2021-12-01"
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-recoveryservicesbackup/{}'.format(VERSION))
5156
self._configure(**kwargs)

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/_recovery_services_backup_client.py

Lines changed: 8 additions & 4 deletions
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 RecoveryServicesBackupClientConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials_async import AsyncTokenCredential
2324

24-
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
25+
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): # pylint: disable=too-many-instance-attributes
2526
"""Open API 2.0 Specs for Azure RecoveryServices Backup service.
2627
2728
:ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations
@@ -177,8 +178,11 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
177178
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
178179
:param subscription_id: The subscription Id.
179180
:type subscription_id: str
180-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
181+
:param base_url: Service URL. Default value is "https://management.azure.com".
181182
:type base_url: str
183+
:keyword api_version: Api Version. Default value is "2021-12-01". Note that overriding this
184+
default value may result in unsupported behavior.
185+
:paramtype api_version: str
182186
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
183187
Retry-After header is present.
184188
"""

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/aio/operations/_backup_engines_operations.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
# pylint: disable=too-many-lines
12
# coding=utf-8
23
# --------------------------------------------------------------------------
34
# Copyright (c) Microsoft Corporation. All rights reserved.
45
# Licensed under the MIT License. See License.txt in the project root for license information.
56
# Code generated by Microsoft (R) AutoRest Code Generator.
67
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
8-
import functools
9-
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
10-
import warnings
9+
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
1110

1211
from azure.core.async_paging import AsyncItemPaged, AsyncList
1312
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
@@ -63,9 +62,9 @@ def list(
6362
:param resource_group_name: The name of the resource group where the recovery services vault is
6463
present.
6564
:type resource_group_name: str
66-
:param filter: OData filter options.
65+
:param filter: OData filter options. Default value is None.
6766
:type filter: str
68-
:param skip_token: skipToken Filter.
67+
:param skip_token: skipToken Filter. Default value is None.
6968
:type skip_token: str
7069
:keyword callable cls: A custom type or function that will be passed the direct response
7170
:return: An iterator like instance of either BackupEngineBaseResourceList or the result of
@@ -74,6 +73,8 @@ def list(
7473
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.activestamp.models.BackupEngineBaseResourceList]
7574
:raises: ~azure.core.exceptions.HttpResponseError
7675
"""
76+
api_version = kwargs.pop('api_version', "2021-12-01") # type: str
77+
7778
cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupEngineBaseResourceList"]
7879
error_map = {
7980
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
@@ -86,6 +87,7 @@ def prepare_request(next_link=None):
8687
vault_name=vault_name,
8788
resource_group_name=resource_group_name,
8889
subscription_id=self._config.subscription_id,
90+
api_version=api_version,
8991
filter=filter,
9092
skip_token=skip_token,
9193
template_url=self.list.metadata['url'],
@@ -99,6 +101,7 @@ def prepare_request(next_link=None):
99101
vault_name=vault_name,
100102
resource_group_name=resource_group_name,
101103
subscription_id=self._config.subscription_id,
104+
api_version=api_version,
102105
filter=filter,
103106
skip_token=skip_token,
104107
template_url=next_link,
@@ -118,7 +121,11 @@ async def extract_data(pipeline_response):
118121
async def get_next(next_link=None):
119122
request = prepare_request(next_link)
120123

121-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
124+
pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access
125+
request,
126+
stream=False,
127+
**kwargs
128+
)
122129
response = pipeline_response.http_response
123130

124131
if response.status_code not in [200]:
@@ -131,7 +138,7 @@ async def get_next(next_link=None):
131138
return AsyncItemPaged(
132139
get_next, extract_data
133140
)
134-
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines'} # type: ignore
141+
list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines"} # type: ignore
135142

136143
@distributed_trace_async
137144
async def get(
@@ -152,9 +159,9 @@ async def get(
152159
:type resource_group_name: str
153160
:param backup_engine_name: Name of the backup management server.
154161
:type backup_engine_name: str
155-
:param filter: OData filter options.
162+
:param filter: OData filter options. Default value is None.
156163
:type filter: str
157-
:param skip_token: skipToken Filter.
164+
:param skip_token: skipToken Filter. Default value is None.
158165
:type skip_token: str
159166
:keyword callable cls: A custom type or function that will be passed the direct response
160167
:return: BackupEngineBaseResource, or the result of cls(response)
@@ -167,20 +174,27 @@ async def get(
167174
}
168175
error_map.update(kwargs.pop('error_map', {}))
169176

177+
api_version = kwargs.pop('api_version', "2021-12-01") # type: str
178+
170179

171180
request = build_get_request(
172181
vault_name=vault_name,
173182
resource_group_name=resource_group_name,
174183
subscription_id=self._config.subscription_id,
175184
backup_engine_name=backup_engine_name,
185+
api_version=api_version,
176186
filter=filter,
177187
skip_token=skip_token,
178188
template_url=self.get.metadata['url'],
179189
)
180190
request = _convert_request(request)
181191
request.url = self._client.format_url(request.url)
182192

183-
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
193+
pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access
194+
request,
195+
stream=False,
196+
**kwargs
197+
)
184198
response = pipeline_response.http_response
185199

186200
if response.status_code not in [200]:
@@ -194,5 +208,5 @@ async def get(
194208

195209
return deserialized
196210

197-
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}'} # type: ignore
211+
get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupEngines/{backupEngineName}"} # type: ignore
198212

0 commit comments

Comments
 (0)