зеркало из
1
0
Форкнуть 0

[AutoRelease] t2-recoveryservicesbackup-2021-07-26-35043 (#19934)

* CodeGen from PR 15305 in Azure/azure-rest-api-specs
Changing version back to 2021-06 (#15305)

* Updating version in readme

* Updating swagger version

* version,CHANGELOG

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
This commit is contained in:
Azure CLI Bot 2021-07-26 15:19:54 +08:00 коммит произвёл GitHub
Родитель 663d3e927c
Коммит 46bda75578
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
99 изменённых файлов: 166 добавлений и 894 удалений

Просмотреть файл

@ -1,5 +1,16 @@
# Release History
## 2.0.0 (2021-07-26)
**Features**
- Model IaasVMRestoreRequest has a new parameter identity_info
- Model IaasVMRestoreWithRehydrationRequest has a new parameter identity_info
**Breaking changes**
- Removed operation group BackupResourceStorageConfigsNonCRROperations
## 1.1.0 (2021-07-22)
**Features**

Просмотреть файл

@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "8eb10b6052b7073e9c56f7707772e3e01c9d9a8d",
"commit": "69c20e89a4f94f99cdbc627f5c33812732b2fa32",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/recoveryservicesbackup/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",
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md"

Просмотреть файл

@ -1,6 +1,6 @@
{
"chosen_version": "",
"total_api_version_list": ["2018-12-20", "2021-04-01"],
"total_api_version_list": ["2018-12-20", "2021-06-01"],
"client": {
"name": "RecoveryServicesBackupClient",
"filename": "_recovery_services_backup_client",
@ -98,7 +98,6 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"backup_resource_storage_configs_non_crr": "BackupResourceStorageConfigsNonCRROperations",
"protection_intent": "ProtectionIntentOperations",
"backup_status": "BackupStatusOperations",
"feature_support": "FeatureSupportOperations",

Просмотреть файл

@ -19,7 +19,6 @@ if TYPE_CHECKING:
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from ._configuration import RecoveryServicesBackupClientConfiguration
from .operations import BackupResourceStorageConfigsNonCRROperations
from .operations import ProtectionIntentOperations
from .operations import BackupStatusOperations
from .operations import FeatureSupportOperations
@ -79,8 +78,6 @@ from . import models
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
"""Open API 2.0 Specs for Azure RecoveryServices Backup service.
:ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations
:vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsNonCRROperations
:ivar protection_intent: ProtectionIntentOperations operations
:vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations
:ivar backup_status: BackupStatusOperations operations
@ -211,8 +208,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)
self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations(
self._client, self._config, self._serialize, self._deserialize)
self.protection_intent = ProtectionIntentOperations(
self._client, self._config, self._serialize, self._deserialize)
self.backup_status = BackupStatusOperations(

Просмотреть файл

@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
VERSION = "1.1.0"
VERSION = "2.0.0"

Просмотреть файл

@ -17,7 +17,6 @@ if TYPE_CHECKING:
from azure.core.credentials_async import AsyncTokenCredential
from ._configuration import RecoveryServicesBackupClientConfiguration
from .operations import BackupResourceStorageConfigsNonCRROperations
from .operations import ProtectionIntentOperations
from .operations import BackupStatusOperations
from .operations import FeatureSupportOperations
@ -77,8 +76,6 @@ from .. import models
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
"""Open API 2.0 Specs for Azure RecoveryServices Backup service.
:ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations
:vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsNonCRROperations
:ivar protection_intent: ProtectionIntentOperations operations
:vartype protection_intent: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionIntentOperations
:ivar backup_status: BackupStatusOperations operations
@ -208,8 +205,6 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin):
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)
self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations(
self._client, self._config, self._serialize, self._deserialize)
self.protection_intent = ProtectionIntentOperations(
self._client, self._config, self._serialize, self._deserialize)
self.backup_status = BackupStatusOperations(

Просмотреть файл

@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations
from ._protection_intent_operations import ProtectionIntentOperations
from ._backup_status_operations import BackupStatusOperations
from ._feature_support_operations import FeatureSupportOperations
@ -62,7 +61,6 @@ from ._recovery_points_crr_operations import RecoveryPointsCrrOperations
from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations
__all__ = [
'BackupResourceStorageConfigsNonCRROperations',
'ProtectionIntentOperations',
'BackupStatusOperations',
'FeatureSupportOperations',

Просмотреть файл

@ -71,7 +71,7 @@ class BackupEnginesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):
@ -159,7 +159,7 @@ class BackupEnginesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -70,7 +70,7 @@ class BackupJobsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -72,7 +72,7 @@ class BackupOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -70,7 +70,7 @@ class BackupOperationStatusesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -69,7 +69,7 @@ class BackupPoliciesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -72,7 +72,7 @@ class BackupProtectableItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -70,7 +70,7 @@ class BackupProtectedItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -67,7 +67,7 @@ class BackupProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -70,7 +70,7 @@ class BackupProtectionIntentOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -63,7 +63,7 @@ class BackupResourceEncryptionConfigsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -126,7 +126,7 @@ class BackupResourceEncryptionConfigsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -1,234 +0,0 @@
# 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 typing import Any, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models as _models
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
class BackupResourceStorageConfigsNonCRROperations:
"""BackupResourceStorageConfigsNonCRROperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.recoveryservicesbackup.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = _models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
async def get(
self,
vault_name: str,
resource_group_name: str,
**kwargs: Any
) -> "_models.BackupResourceConfigResource":
"""Fetches resource storage config.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: BackupResourceConfigResource, or the result of cls(response)
:rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore
async def update(
self,
vault_name: str,
resource_group_name: str,
parameters: "_models.BackupResourceConfigResource",
**kwargs: Any
) -> "_models.BackupResourceConfigResource":
"""Updates vault storage model type.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:param parameters: Vault storage config request.
:type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:keyword callable cls: A custom type or function that will be passed the direct response
:return: BackupResourceConfigResource, or the result of cls(response)
:rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'BackupResourceConfigResource')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore
async def patch(
self,
vault_name: str,
resource_group_name: str,
parameters: "_models.BackupResourceConfigResource",
**kwargs: Any
) -> None:
"""Updates vault storage model type.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:param parameters: Vault storage config request.
:type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:keyword callable cls: A custom type or function that will be passed the direct response
:return: None, or the result of cls(response)
:rtype: None
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self.patch.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'BackupResourceConfigResource')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
patch.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore

Просмотреть файл

@ -63,7 +63,7 @@ class BackupResourceVaultConfigsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -126,7 +126,7 @@ class BackupResourceVaultConfigsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -194,7 +194,7 @@ class BackupResourceVaultConfigsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -64,7 +64,7 @@ class BackupStatusOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -70,7 +70,7 @@ class BackupUsageSummariesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -78,7 +78,7 @@ class BackupWorkloadItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -77,7 +77,7 @@ class BackupsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -66,7 +66,7 @@ class BMSPrepareDataMoveOperationResultOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -69,7 +69,7 @@ class ExportJobsOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -64,7 +64,7 @@ class FeatureSupportOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -84,7 +84,7 @@ class ItemLevelRecoveryConnectionsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -165,7 +165,7 @@ class ItemLevelRecoveryConnectionsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -67,7 +67,7 @@ class JobCancellationsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -66,7 +66,7 @@ class JobDetailsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -69,7 +69,7 @@ class JobOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -66,7 +66,7 @@ class JobsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -66,7 +66,7 @@ class OperationOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -57,7 +57,7 @@ class Operations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -68,7 +68,7 @@ class PrivateEndpointConnectionOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -119,7 +119,7 @@ class PrivateEndpointConnectionOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -254,7 +254,7 @@ class PrivateEndpointConnectionOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -71,7 +71,7 @@ class PrivateEndpointOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -70,7 +70,7 @@ class ProtectableContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -76,7 +76,7 @@ class ProtectedItemOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -79,7 +79,7 @@ class ProtectedItemOperationStatusesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -77,7 +77,7 @@ class ProtectedItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -156,7 +156,7 @@ class ProtectedItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -236,7 +236,7 @@ class ProtectedItemsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -73,7 +73,7 @@ class ProtectionContainerOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -70,7 +70,7 @@ class ProtectionContainerRefreshOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -69,7 +69,7 @@ class ProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -142,7 +142,7 @@ class ProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -220,7 +220,7 @@ class ProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -290,7 +290,7 @@ class ProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -359,7 +359,7 @@ class ProtectionContainersOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class ProtectionIntentOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -145,7 +145,7 @@ class ProtectionIntentOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -215,7 +215,7 @@ class ProtectionIntentOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -287,7 +287,7 @@ class ProtectionIntentOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
# Construct URL
url = self.delete.metadata['url'] # type: ignore

Просмотреть файл

@ -70,7 +70,7 @@ class ProtectionPoliciesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -138,7 +138,7 @@ class ProtectionPoliciesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -194,7 +194,7 @@ class ProtectionPoliciesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -70,7 +70,7 @@ class ProtectionPolicyOperationResultsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class ProtectionPolicyOperationStatusesOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -76,7 +76,7 @@ class RecoveryPointsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):
@ -170,7 +170,7 @@ class RecoveryPointsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -76,7 +76,7 @@ class RecoveryPointsRecommendedForMoveOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = "application/json"
accept = "application/json"

Просмотреть файл

@ -48,7 +48,7 @@ class RecoveryServicesBackupClientOperationsMixin:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -98,7 +98,7 @@ class RecoveryServicesBackupClientOperationsMixin:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -218,7 +218,7 @@ class RecoveryServicesBackupClientOperationsMixin:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -342,7 +342,7 @@ class RecoveryServicesBackupClientOperationsMixin:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -58,7 +58,7 @@ class RestoresOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -63,7 +63,7 @@ class SecurityPINsOperations:
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -186,7 +186,6 @@ try:
from ._models_py3 import IaasVMRecoveryPoint
from ._models_py3 import IaasVMRecoveryPointAutoGenerated
from ._models_py3 import IaasVMRestoreRequest
from ._models_py3 import IaasVMRestoreRequestAutoGenerated
from ._models_py3 import IaasVMRestoreWithRehydrationRequest
from ._models_py3 import IdentityInfo
from ._models_py3 import InquiryInfo
@ -486,7 +485,6 @@ except (SyntaxError, ImportError):
from ._models import IaasVMRecoveryPoint # type: ignore
from ._models import IaasVMRecoveryPointAutoGenerated # type: ignore
from ._models import IaasVMRestoreRequest # type: ignore
from ._models import IaasVMRestoreRequestAutoGenerated # type: ignore
from ._models import IaasVMRestoreWithRehydrationRequest # type: ignore
from ._models import IdentityInfo # type: ignore
from ._models import InquiryInfo # type: ignore
@ -850,7 +848,6 @@ __all__ = [
'IaasVMRecoveryPoint',
'IaasVMRecoveryPointAutoGenerated',
'IaasVMRestoreRequest',
'IaasVMRestoreRequestAutoGenerated',
'IaasVMRestoreWithRehydrationRequest',
'IdentityInfo',
'InquiryInfo',

Просмотреть файл

@ -1381,7 +1381,7 @@ class RestoreRequest(msrest.serialization.Model):
"""Base class for restore request. Workload-specific restore requests are derived from this class.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated.
sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest.
All required parameters must be populated in order to send to Azure.
@ -1399,7 +1399,7 @@ class RestoreRequest(msrest.serialization.Model):
}
_subtype_map = {
'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'}
'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'}
}
def __init__(
@ -9625,127 +9625,6 @@ class IaasVMRestoreRequest(RestoreRequest):
All required parameters must be populated in order to send to Azure.
:param object_type: Required. This property will be used as the discriminator for deciding the
specific types in the polymorphic chain of types.Constant filled by server.
:type object_type: str
:param recovery_point_id: ID of the backup copy to be recovered.
:type recovery_point_id: str
:param recovery_type: Type of this recovery. Possible values include: "Invalid",
"OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline".
:type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType
:param source_resource_id: Fully qualified ARM ID of the VM which is being recovered.
:type source_resource_id: str
:param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created.
For e.g.
/subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}.
:type target_virtual_machine_id: str
:param target_resource_group_id: This is the ARM Id of the resource group that you want to
create for this Virtual machine and other artifacts.
For e.g. /subscriptions/{subId}/resourcegroups/{rg}.
:type target_resource_group_id: str
:param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to
be restored.
:type storage_account_id: str
:param virtual_network_id: This is the virtual network Id of the vnet that will be attached to
the virtual machine.
User will be validated for join action permissions in the linked access.
:type virtual_network_id: str
:param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For
Classic VMs it would be
{VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource
ID used to represent
the subnet.
:type subnet_id: str
:param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the
VM being restored. This applies only to Classic
Virtual Machines.
:type target_domain_name_id: str
:param region: Region in which the virtual machine is restored.
:type region: str
:param affinity_group: Affinity group associated to VM to be restored. Used only for Classic
Compute Virtual Machines.
:type affinity_group: str
:param create_new_cloud_service: Should a new cloud service be created while restoring the VM.
If this is false, VM will be restored to the same
cloud service as it was at the time of backup.
:type create_new_cloud_service: bool
:param original_storage_account_option: Original Storage Account Option.
:type original_storage_account_option: bool
:param encryption_details: Details needed if the VM was encrypted at the time of backup.
:type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails
:param restore_disk_lun_list: List of Disk LUNs for partial restore.
:type restore_disk_lun_list: list[int]
:param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored
with Managed disks.
:type restore_with_managed_disks: bool
:param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted
at rest during restore with customer managed key.
:type disk_encryption_set_id: str
:param zones: Target zone where the VM and its disks should be restored.
:type zones: list[str]
"""
_validation = {
'object_type': {'required': True},
}
_attribute_map = {
'object_type': {'key': 'objectType', 'type': 'str'},
'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'},
'recovery_type': {'key': 'recoveryType', 'type': 'str'},
'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'},
'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'},
'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'},
'subnet_id': {'key': 'subnetId', 'type': 'str'},
'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'},
'region': {'key': 'region', 'type': 'str'},
'affinity_group': {'key': 'affinityGroup', 'type': 'str'},
'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'},
'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'},
'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'},
'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'},
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
}
_subtype_map = {
'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'}
}
def __init__(
self,
**kwargs
):
super(IaasVMRestoreRequest, self).__init__(**kwargs)
self.object_type = 'IaasVMRestoreRequest' # type: str
self.recovery_point_id = kwargs.get('recovery_point_id', None)
self.recovery_type = kwargs.get('recovery_type', None)
self.source_resource_id = kwargs.get('source_resource_id', None)
self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None)
self.target_resource_group_id = kwargs.get('target_resource_group_id', None)
self.storage_account_id = kwargs.get('storage_account_id', None)
self.virtual_network_id = kwargs.get('virtual_network_id', None)
self.subnet_id = kwargs.get('subnet_id', None)
self.target_domain_name_id = kwargs.get('target_domain_name_id', None)
self.region = kwargs.get('region', None)
self.affinity_group = kwargs.get('affinity_group', None)
self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None)
self.original_storage_account_option = kwargs.get('original_storage_account_option', None)
self.encryption_details = kwargs.get('encryption_details', None)
self.restore_disk_lun_list = kwargs.get('restore_disk_lun_list', None)
self.restore_with_managed_disks = kwargs.get('restore_with_managed_disks', None)
self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None)
self.zones = kwargs.get('zones', None)
class IaasVMRestoreRequestAutoGenerated(RestoreRequest):
"""IaaS VM workload-specific restore.
All required parameters must be populated in order to send to Azure.
:param object_type: Required. This property will be used as the discriminator for deciding the
specific types in the polymorphic chain of types.Constant filled by server.
:type object_type: str
@ -9835,11 +9714,15 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest):
'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'},
}
_subtype_map = {
'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'}
}
def __init__(
self,
**kwargs
):
super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs)
super(IaasVMRestoreRequest, self).__init__(**kwargs)
self.object_type = 'IaasVMRestoreRequest' # type: str
self.recovery_point_id = kwargs.get('recovery_point_id', None)
self.recovery_type = kwargs.get('recovery_type', None)
@ -9925,6 +9808,8 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest):
:type disk_encryption_set_id: str
:param zones: Target zone where the VM and its disks should be restored.
:type zones: list[str]
:param identity_info: Managed Identity information required to access customer storage account.
:type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo
:param recovery_point_rehydration_info: RP Rehydration Info.
:type recovery_point_rehydration_info:
~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo
@ -9954,6 +9839,7 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest):
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'},
'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'},
}

Просмотреть файл

@ -1550,7 +1550,7 @@ class RestoreRequest(msrest.serialization.Model):
"""Base class for restore request. Workload-specific restore requests are derived from this class.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated.
sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest.
All required parameters must be populated in order to send to Azure.
@ -1568,7 +1568,7 @@ class RestoreRequest(msrest.serialization.Model):
}
_subtype_map = {
'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'}
'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'}
}
def __init__(
@ -10984,146 +10984,6 @@ class IaasVMRestoreRequest(RestoreRequest):
All required parameters must be populated in order to send to Azure.
:param object_type: Required. This property will be used as the discriminator for deciding the
specific types in the polymorphic chain of types.Constant filled by server.
:type object_type: str
:param recovery_point_id: ID of the backup copy to be recovered.
:type recovery_point_id: str
:param recovery_type: Type of this recovery. Possible values include: "Invalid",
"OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline".
:type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType
:param source_resource_id: Fully qualified ARM ID of the VM which is being recovered.
:type source_resource_id: str
:param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created.
For e.g.
/subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}.
:type target_virtual_machine_id: str
:param target_resource_group_id: This is the ARM Id of the resource group that you want to
create for this Virtual machine and other artifacts.
For e.g. /subscriptions/{subId}/resourcegroups/{rg}.
:type target_resource_group_id: str
:param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to
be restored.
:type storage_account_id: str
:param virtual_network_id: This is the virtual network Id of the vnet that will be attached to
the virtual machine.
User will be validated for join action permissions in the linked access.
:type virtual_network_id: str
:param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For
Classic VMs it would be
{VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource
ID used to represent
the subnet.
:type subnet_id: str
:param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the
VM being restored. This applies only to Classic
Virtual Machines.
:type target_domain_name_id: str
:param region: Region in which the virtual machine is restored.
:type region: str
:param affinity_group: Affinity group associated to VM to be restored. Used only for Classic
Compute Virtual Machines.
:type affinity_group: str
:param create_new_cloud_service: Should a new cloud service be created while restoring the VM.
If this is false, VM will be restored to the same
cloud service as it was at the time of backup.
:type create_new_cloud_service: bool
:param original_storage_account_option: Original Storage Account Option.
:type original_storage_account_option: bool
:param encryption_details: Details needed if the VM was encrypted at the time of backup.
:type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails
:param restore_disk_lun_list: List of Disk LUNs for partial restore.
:type restore_disk_lun_list: list[int]
:param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored
with Managed disks.
:type restore_with_managed_disks: bool
:param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted
at rest during restore with customer managed key.
:type disk_encryption_set_id: str
:param zones: Target zone where the VM and its disks should be restored.
:type zones: list[str]
"""
_validation = {
'object_type': {'required': True},
}
_attribute_map = {
'object_type': {'key': 'objectType', 'type': 'str'},
'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'},
'recovery_type': {'key': 'recoveryType', 'type': 'str'},
'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'},
'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'},
'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'},
'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'},
'subnet_id': {'key': 'subnetId', 'type': 'str'},
'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'},
'region': {'key': 'region', 'type': 'str'},
'affinity_group': {'key': 'affinityGroup', 'type': 'str'},
'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'},
'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'},
'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'},
'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'},
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
}
_subtype_map = {
'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'}
}
def __init__(
self,
*,
recovery_point_id: Optional[str] = None,
recovery_type: Optional[Union[str, "RecoveryType"]] = None,
source_resource_id: Optional[str] = None,
target_virtual_machine_id: Optional[str] = None,
target_resource_group_id: Optional[str] = None,
storage_account_id: Optional[str] = None,
virtual_network_id: Optional[str] = None,
subnet_id: Optional[str] = None,
target_domain_name_id: Optional[str] = None,
region: Optional[str] = None,
affinity_group: Optional[str] = None,
create_new_cloud_service: Optional[bool] = None,
original_storage_account_option: Optional[bool] = None,
encryption_details: Optional["EncryptionDetails"] = None,
restore_disk_lun_list: Optional[List[int]] = None,
restore_with_managed_disks: Optional[bool] = None,
disk_encryption_set_id: Optional[str] = None,
zones: Optional[List[str]] = None,
**kwargs
):
super(IaasVMRestoreRequest, self).__init__(**kwargs)
self.object_type = 'IaasVMRestoreRequest' # type: str
self.recovery_point_id = recovery_point_id
self.recovery_type = recovery_type
self.source_resource_id = source_resource_id
self.target_virtual_machine_id = target_virtual_machine_id
self.target_resource_group_id = target_resource_group_id
self.storage_account_id = storage_account_id
self.virtual_network_id = virtual_network_id
self.subnet_id = subnet_id
self.target_domain_name_id = target_domain_name_id
self.region = region
self.affinity_group = affinity_group
self.create_new_cloud_service = create_new_cloud_service
self.original_storage_account_option = original_storage_account_option
self.encryption_details = encryption_details
self.restore_disk_lun_list = restore_disk_lun_list
self.restore_with_managed_disks = restore_with_managed_disks
self.disk_encryption_set_id = disk_encryption_set_id
self.zones = zones
class IaasVMRestoreRequestAutoGenerated(RestoreRequest):
"""IaaS VM workload-specific restore.
All required parameters must be populated in order to send to Azure.
:param object_type: Required. This property will be used as the discriminator for deciding the
specific types in the polymorphic chain of types.Constant filled by server.
:type object_type: str
@ -11213,6 +11073,10 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest):
'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'},
}
_subtype_map = {
'object_type': {'IaasVMRestoreWithRehydrationRequest': 'IaasVMRestoreWithRehydrationRequest'}
}
def __init__(
self,
*,
@ -11237,7 +11101,7 @@ class IaasVMRestoreRequestAutoGenerated(RestoreRequest):
identity_info: Optional["IdentityInfo"] = None,
**kwargs
):
super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs)
super(IaasVMRestoreRequest, self).__init__(**kwargs)
self.object_type = 'IaasVMRestoreRequest' # type: str
self.recovery_point_id = recovery_point_id
self.recovery_type = recovery_type
@ -11323,6 +11187,8 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest):
:type disk_encryption_set_id: str
:param zones: Target zone where the VM and its disks should be restored.
:type zones: list[str]
:param identity_info: Managed Identity information required to access customer storage account.
:type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo
:param recovery_point_rehydration_info: RP Rehydration Info.
:type recovery_point_rehydration_info:
~azure.mgmt.recoveryservicesbackup.models.RecoveryPointRehydrationInfo
@ -11352,6 +11218,7 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest):
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'},
'recovery_point_rehydration_info': {'key': 'recoveryPointRehydrationInfo', 'type': 'RecoveryPointRehydrationInfo'},
}
@ -11376,10 +11243,11 @@ class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest):
restore_with_managed_disks: Optional[bool] = None,
disk_encryption_set_id: Optional[str] = None,
zones: Optional[List[str]] = None,
identity_info: Optional["IdentityInfo"] = None,
recovery_point_rehydration_info: Optional["RecoveryPointRehydrationInfo"] = None,
**kwargs
):
super(IaasVMRestoreWithRehydrationRequest, self).__init__(recovery_point_id=recovery_point_id, recovery_type=recovery_type, source_resource_id=source_resource_id, target_virtual_machine_id=target_virtual_machine_id, target_resource_group_id=target_resource_group_id, storage_account_id=storage_account_id, virtual_network_id=virtual_network_id, subnet_id=subnet_id, target_domain_name_id=target_domain_name_id, region=region, affinity_group=affinity_group, create_new_cloud_service=create_new_cloud_service, original_storage_account_option=original_storage_account_option, encryption_details=encryption_details, restore_disk_lun_list=restore_disk_lun_list, restore_with_managed_disks=restore_with_managed_disks, disk_encryption_set_id=disk_encryption_set_id, zones=zones, **kwargs)
super(IaasVMRestoreWithRehydrationRequest, self).__init__(recovery_point_id=recovery_point_id, recovery_type=recovery_type, source_resource_id=source_resource_id, target_virtual_machine_id=target_virtual_machine_id, target_resource_group_id=target_resource_group_id, storage_account_id=storage_account_id, virtual_network_id=virtual_network_id, subnet_id=subnet_id, target_domain_name_id=target_domain_name_id, region=region, affinity_group=affinity_group, create_new_cloud_service=create_new_cloud_service, original_storage_account_option=original_storage_account_option, encryption_details=encryption_details, restore_disk_lun_list=restore_disk_lun_list, restore_with_managed_disks=restore_with_managed_disks, disk_encryption_set_id=disk_encryption_set_id, zones=zones, identity_info=identity_info, **kwargs)
self.object_type = 'IaasVMRestoreWithRehydrationRequest' # type: str
self.recovery_point_rehydration_info = recovery_point_rehydration_info

Просмотреть файл

@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations
from ._protection_intent_operations import ProtectionIntentOperations
from ._backup_status_operations import BackupStatusOperations
from ._feature_support_operations import FeatureSupportOperations
@ -62,7 +61,6 @@ from ._recovery_points_crr_operations import RecoveryPointsCrrOperations
from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations
__all__ = [
'BackupResourceStorageConfigsNonCRROperations',
'ProtectionIntentOperations',
'BackupStatusOperations',
'FeatureSupportOperations',

Просмотреть файл

@ -76,7 +76,7 @@ class BackupEnginesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):
@ -165,7 +165,7 @@ class BackupEnginesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -75,7 +75,7 @@ class BackupJobsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -77,7 +77,7 @@ class BackupOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -75,7 +75,7 @@ class BackupOperationStatusesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class BackupPoliciesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -77,7 +77,7 @@ class BackupProtectableItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -75,7 +75,7 @@ class BackupProtectedItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -72,7 +72,7 @@ class BackupProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -75,7 +75,7 @@ class BackupProtectionIntentOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -68,7 +68,7 @@ class BackupResourceEncryptionConfigsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -132,7 +132,7 @@ class BackupResourceEncryptionConfigsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -1,241 +0,0 @@
# 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 typing import TYPE_CHECKING
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat
from .. import models as _models
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Callable, Dict, Generic, Optional, TypeVar
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
class BackupResourceStorageConfigsNonCRROperations(object):
"""BackupResourceStorageConfigsNonCRROperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.recoveryservicesbackup.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = _models
def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def get(
self,
vault_name, # type: str
resource_group_name, # type: str
**kwargs # type: Any
):
# type: (...) -> "_models.BackupResourceConfigResource"
"""Fetches resource storage config.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: BackupResourceConfigResource, or the result of cls(response)
:rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
accept = "application/json"
# Construct URL
url = self.get.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore
def update(
self,
vault_name, # type: str
resource_group_name, # type: str
parameters, # type: "_models.BackupResourceConfigResource"
**kwargs # type: Any
):
# type: (...) -> "_models.BackupResourceConfigResource"
"""Updates vault storage model type.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:param parameters: Vault storage config request.
:type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:keyword callable cls: A custom type or function that will be passed the direct response
:return: BackupResourceConfigResource, or the result of cls(response)
:rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self.update.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'BackupResourceConfigResource')
body_content_kwargs['content'] = body_content
request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore
def patch(
self,
vault_name, # type: str
resource_group_name, # type: str
parameters, # type: "_models.BackupResourceConfigResource"
**kwargs # type: Any
):
# type: (...) -> None
"""Updates vault storage model type.
:param vault_name: The name of the recovery services vault.
:type vault_name: str
:param resource_group_name: The name of the resource group where the recovery services vault is
present.
:type resource_group_name: str
:param parameters: Vault storage config request.
:type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource
:keyword callable cls: A custom type or function that will be passed the direct response
:return: None, or the result of cls(response)
:rtype: None
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
# Construct URL
url = self.patch.metadata['url'] # type: ignore
path_format_arguments = {
'vaultName': self._serialize.url("vault_name", vault_name, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'BackupResourceConfigResource')
body_content_kwargs['content'] = body_content
request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
patch.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore

Просмотреть файл

@ -68,7 +68,7 @@ class BackupResourceVaultConfigsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -132,7 +132,7 @@ class BackupResourceVaultConfigsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -201,7 +201,7 @@ class BackupResourceVaultConfigsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -69,7 +69,7 @@ class BackupStatusOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -75,7 +75,7 @@ class BackupUsageSummariesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -83,7 +83,7 @@ class BackupWorkloadItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -82,7 +82,7 @@ class BackupsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -71,7 +71,7 @@ class BMSPrepareDataMoveOperationResultOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class ExportJobsOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -69,7 +69,7 @@ class FeatureSupportOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -89,7 +89,7 @@ class ItemLevelRecoveryConnectionsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -171,7 +171,7 @@ class ItemLevelRecoveryConnectionsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -72,7 +72,7 @@ class JobCancellationsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -71,7 +71,7 @@ class JobDetailsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class JobOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -71,7 +71,7 @@ class JobsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -71,7 +71,7 @@ class OperationOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -62,7 +62,7 @@ class Operations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -73,7 +73,7 @@ class PrivateEndpointConnectionOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -125,7 +125,7 @@ class PrivateEndpointConnectionOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -262,7 +262,7 @@ class PrivateEndpointConnectionOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -76,7 +76,7 @@ class PrivateEndpointOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -75,7 +75,7 @@ class ProtectableContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):

Просмотреть файл

@ -81,7 +81,7 @@ class ProtectedItemOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -84,7 +84,7 @@ class ProtectedItemOperationStatusesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -82,7 +82,7 @@ class ProtectedItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -162,7 +162,7 @@ class ProtectedItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -243,7 +243,7 @@ class ProtectedItemsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -78,7 +78,7 @@ class ProtectionContainerOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -75,7 +75,7 @@ class ProtectionContainerRefreshOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -74,7 +74,7 @@ class ProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -148,7 +148,7 @@ class ProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -227,7 +227,7 @@ class ProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -298,7 +298,7 @@ class ProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -368,7 +368,7 @@ class ProtectionContainersOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -79,7 +79,7 @@ class ProtectionIntentOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -151,7 +151,7 @@ class ProtectionIntentOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -222,7 +222,7 @@ class ProtectionIntentOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -295,7 +295,7 @@ class ProtectionIntentOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
# Construct URL
url = self.delete.metadata['url'] # type: ignore

Просмотреть файл

@ -75,7 +75,7 @@ class ProtectionPoliciesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -144,7 +144,7 @@ class ProtectionPoliciesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -201,7 +201,7 @@ class ProtectionPoliciesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -75,7 +75,7 @@ class ProtectionPolicyOperationResultsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -79,7 +79,7 @@ class ProtectionPolicyOperationStatusesOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -81,7 +81,7 @@ class RecoveryPointsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
def prepare_request(next_link=None):
@ -176,7 +176,7 @@ class RecoveryPointsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL

Просмотреть файл

@ -81,7 +81,7 @@ class RecoveryPointsRecommendedForMoveOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = "application/json"
accept = "application/json"

Просмотреть файл

@ -53,7 +53,7 @@ class RecoveryServicesBackupClientOperationsMixin(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL
@ -104,7 +104,7 @@ class RecoveryServicesBackupClientOperationsMixin(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -226,7 +226,7 @@ class RecoveryServicesBackupClientOperationsMixin(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
@ -352,7 +352,7 @@ class RecoveryServicesBackupClientOperationsMixin(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -63,7 +63,7 @@ class RestoresOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Просмотреть файл

@ -68,7 +68,7 @@ class SecurityPINsOperations(object):
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-04-01"
api_version = "2021-06-01"
accept = "application/json"
# Construct URL