Skip to content

Commit fa4f298

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-dataprotection-2022-10-03-74033(Do not merge) (#26590)
* code and test * Update CHANGELOG.md Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
1 parent ab3d31d commit fa4f298

File tree

65 files changed

+21202
-12568
lines changed

Some content is hidden

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

65 files changed

+21202
-12568
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Release History
22

3+
## 1.0.0b2 (2022-10-11)
4+
5+
### Features Added
6+
7+
- Added operation BackupInstancesOperations.begin_resume_backups
8+
- Added operation BackupInstancesOperations.begin_resume_protection
9+
- Added operation BackupInstancesOperations.begin_stop_protection
10+
- Added operation BackupInstancesOperations.begin_suspend_backups
11+
- Added operation BackupInstancesOperations.begin_sync_backup_instance
12+
- Added operation BackupInstancesOperations.get_backup_instance_operation_result
13+
- Added operation group BackupInstancesExtensionRoutingOperations
14+
- Added operation group DeletedBackupInstancesOperations
15+
- Added operation group DppResourceGuardProxyOperations
16+
- Added operation group OperationStatusBackupVaultContextOperations
17+
- Added operation group OperationStatusResourceGroupContextOperations
18+
- Model AzureBackupRecoveryPointBasedRestoreRequest has a new parameter source_resource_id
19+
- Model AzureBackupRecoveryTimeBasedRestoreRequest has a new parameter source_resource_id
20+
- Model AzureBackupRestoreRequest has a new parameter source_resource_id
21+
- Model AzureBackupRestoreWithRehydrationRequest has a new parameter source_resource_id
22+
- Model BackupInstance has a new parameter validation_type
23+
- Model BackupInstanceResource has a new parameter tags
24+
- Model BackupVault has a new parameter is_vault_protected_by_resource_guard
25+
- Model BackupVault has a new parameter monitoring_settings
26+
- Model BackupVault has a new parameter security_settings
27+
- Model PatchResourceRequestInput has a new parameter properties
28+
- Model SecretStoreResource has a new parameter value
29+
330
## 1.0.0b1 (2021-10-19)
431

532
* Initial Release
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
include _meta.json
2-
recursive-include tests *.py *.yaml
2+
recursive-include tests *.py *.json
3+
recursive-include samples *.py *.md
34
include *.md
45
include azure/__init__.py
56
include azure/mgmt/__init__.py
67
include LICENSE
8+
include azure/mgmt/dataprotection/py.typed

sdk/dataprotection/azure-mgmt-dataprotection/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Data Protection Management Client Library.
4-
This package has been tested with Python 3.6+.
4+
This package has been tested with Python 3.7+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,8 +12,6 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313

1414
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
1715

1816
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
1917
Code samples for this package can be found at [Data Protection Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.5",
2+
"autorest": "3.9.2",
33
"use": [
4-
"@autorest/python@5.8.4",
5-
"@autorest/modelerfour@4.19.2"
4+
"@autorest/python@6.1.9",
5+
"@autorest/modelerfour@4.24.3"
66
],
7-
"commit": "8d0a1bce1741e7b181746bcce6ad25dad31a3b11",
7+
"commit": "33d5054122e52490eef9925d6cbe801f28b88e18",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/dataprotection/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
9+
"autorest_command": "autorest specification/dataprotection/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.9 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/dataprotection/resource-manager/readme.md"
1111
}

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/__init__.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['DataProtectionClient']
1413

1514
try:
16-
from ._patch import patch_sdk # type: ignore
17-
patch_sdk()
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
1817
except ImportError:
19-
pass
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
21+
__all__ = ["DataProtectionClient"]
22+
__all__.extend([p for p in _patch_all if p not in __all__])
23+
24+
_patch_sdk()

sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_configuration.py

+28-30
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,64 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import TYPE_CHECKING
9+
from typing import Any, TYPE_CHECKING
1010

1111
from azure.core.configuration import Configuration
1212
from azure.core.pipeline import policies
13-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1414

1515
from ._version import VERSION
1616

1717
if TYPE_CHECKING:
1818
# pylint: disable=unused-import,ungrouped-imports
19-
from typing import Any
20-
2119
from azure.core.credentials import TokenCredential
2220

2321

24-
class DataProtectionClientConfiguration(Configuration):
22+
class DataProtectionClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2523
"""Configuration for DataProtectionClient.
2624
2725
Note that all parameters used to create this instance are saved as instance
2826
attributes.
2927
30-
:param credential: Credential needed for the client to connect to Azure.
28+
:param credential: Credential needed for the client to connect to Azure. Required.
3129
:type credential: ~azure.core.credentials.TokenCredential
32-
:param subscription_id: The subscription Id.
30+
:param subscription_id: The subscription Id. Required.
3331
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2022-09-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3435
"""
3536

36-
def __init__(
37-
self,
38-
credential, # type: "TokenCredential"
39-
subscription_id, # type: str
40-
**kwargs # type: Any
41-
):
42-
# type: (...) -> None
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38+
super(DataProtectionClientConfiguration, self).__init__(**kwargs)
39+
api_version = kwargs.pop("api_version", "2022-09-01-preview") # type: str
40+
4341
if credential is None:
4442
raise ValueError("Parameter 'credential' must not be None.")
4543
if subscription_id is None:
4644
raise ValueError("Parameter 'subscription_id' must not be None.")
47-
super(DataProtectionClientConfiguration, self).__init__(**kwargs)
4845

4946
self.credential = credential
5047
self.subscription_id = subscription_id
51-
self.api_version = "2021-07-01"
52-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
53-
kwargs.setdefault('sdk_moniker', 'mgmt-dataprotection/{}'.format(VERSION))
48+
self.api_version = api_version
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-dataprotection/{}".format(VERSION))
5451
self._configure(**kwargs)
5552

5653
def _configure(
57-
self,
58-
**kwargs # type: Any
54+
self, **kwargs # type: Any
5955
):
6056
# type: (...) -> None
61-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
62-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
63-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
64-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
65-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
66-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
67-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
68-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
69-
self.authentication_policy = kwargs.get('authentication_policy')
57+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get("authentication_policy")
7066
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

0 commit comments

Comments
 (0)