Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from msrest import Serializer, Deserializer

from ._configuration import RecoveryServicesBackupClientConfiguration
from .operations import RecoveryServicesBackupClientOperationsMixin
from .operations import PrivateEndpointConnectionOperations
from .operations import BackupResourceVaultConfigsOperations
from .operations import ProtectedItemsOperations
from .operations import ProtectedItemOperationResultsOperations
Expand Down Expand Up @@ -54,12 +56,14 @@
from . import models


class RecoveryServicesBackupClient(SDKClient):
class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin, SDKClient):
"""Open API 2.0 Specs for Azure RecoveryServices Backup service

:ivar config: Configuration for client.
:vartype config: RecoveryServicesBackupClientConfiguration

:ivar private_endpoint_connection: PrivateEndpointConnection operations
:vartype private_endpoint_connection: azure.mgmt.recoveryservicesbackup.operations.PrivateEndpointConnectionOperations
:ivar backup_resource_vault_configs: BackupResourceVaultConfigs operations
:vartype backup_resource_vault_configs: azure.mgmt.recoveryservicesbackup.operations.BackupResourceVaultConfigsOperations
:ivar protected_items: ProtectedItems operations
Expand Down Expand Up @@ -155,6 +159,8 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.private_endpoint_connection = PrivateEndpointConnectionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_resource_vault_configs = BackupResourceVaultConfigsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.protected_items = ProtectedItemsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@
from ._models_py3 import DPMProtectedItem
from ._models_py3 import DPMProtectedItemExtendedInfo
from ._models_py3 import EncryptionDetails
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ExportJobsOperationResultInfo
from ._models_py3 import ExtendedProperties
from ._models_py3 import FeatureSupportRequest
Expand Down Expand Up @@ -195,6 +197,10 @@
from ._models_py3 import PreBackupValidation
from ._models_py3 import PreValidateEnableBackupRequest
from ._models_py3 import PreValidateEnableBackupResponse
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateEndpointConnectionResource
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProtectableContainer
from ._models_py3 import ProtectableContainerResource
from ._models_py3 import ProtectedItem
Expand Down Expand Up @@ -372,7 +378,9 @@
from ._models import DPMProtectedItem
from ._models import DPMProtectedItemExtendedInfo
from ._models import EncryptionDetails
from ._models import ErrorAdditionalInfo
from ._models import ErrorDetail
from ._models import ErrorResponse, ErrorResponseException
from ._models import ExportJobsOperationResultInfo
from ._models import ExtendedProperties
from ._models import FeatureSupportRequest
Expand Down Expand Up @@ -428,6 +436,10 @@
from ._models import PreBackupValidation
from ._models import PreValidateEnableBackupRequest
from ._models import PreValidateEnableBackupResponse
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateEndpointConnectionResource
from ._models import PrivateLinkServiceConnectionState
from ._models import ProtectableContainer
from ._models import ProtectableContainerResource
from ._models import ProtectedItem
Expand Down Expand Up @@ -488,6 +500,9 @@
from ._paged_models import WorkloadItemResourcePaged
from ._paged_models import WorkloadProtectableItemResourcePaged
from ._recovery_services_backup_client_enums import (
OperationStatusValues,
ProvisioningState,
PrivateEndpointConnectionStatus,
ProtectionState,
HealthStatus,
RecoveryType,
Expand Down Expand Up @@ -538,7 +553,6 @@
OperationType,
ContainerType,
BackupItemType,
OperationStatusValues,
)

__all__ = [
Expand Down Expand Up @@ -671,7 +685,9 @@
'DPMProtectedItem',
'DPMProtectedItemExtendedInfo',
'EncryptionDetails',
'ErrorAdditionalInfo',
'ErrorDetail',
'ErrorResponse', 'ErrorResponseException',
'ExportJobsOperationResultInfo',
'ExtendedProperties',
'FeatureSupportRequest',
Expand Down Expand Up @@ -727,6 +743,10 @@
'PreBackupValidation',
'PreValidateEnableBackupRequest',
'PreValidateEnableBackupResponse',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateEndpointConnectionResource',
'PrivateLinkServiceConnectionState',
'ProtectableContainer',
'ProtectableContainerResource',
'ProtectedItem',
Expand Down Expand Up @@ -786,6 +806,9 @@
'WorkloadProtectableItemResourcePaged',
'ProtectionContainerResourcePaged',
'ClientDiscoveryValueForSingleApiPaged',
'OperationStatusValues',
'ProvisioningState',
'PrivateEndpointConnectionStatus',
'ProtectionState',
'HealthStatus',
'RecoveryType',
Expand Down Expand Up @@ -836,5 +859,4 @@
'OperationType',
'ContainerType',
'BackupItemType',
'OperationStatusValues',
]
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from msrest.serialization import Model
from msrest.exceptions import HttpOperationError


class FeatureSupportRequest(Model):
Expand Down Expand Up @@ -7240,6 +7241,34 @@ def __init__(self, **kwargs):
self.secret_key_vault_id = kwargs.get('secret_key_vault_id', None)


class ErrorAdditionalInfo(Model):
"""The resource management error additional info.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: object
"""

_validation = {
'type': {'readonly': True},
'info': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'info': {'key': 'info', 'type': 'object'},
}

def __init__(self, **kwargs):
super(ErrorAdditionalInfo, self).__init__(**kwargs)
self.type = None
self.info = None


class ErrorDetail(Model):
"""Error Detail class which encapsulates Code, Message and Recommendations.

Expand Down Expand Up @@ -7273,6 +7302,63 @@ def __init__(self, **kwargs):
self.recommendations = None


class ErrorResponse(Model):
"""The resource management error response.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details:
list[~azure.mgmt.recoveryservicesbackup.models.ErrorResponse]
:ivar additional_info: The error additional info.
:vartype additional_info:
list[~azure.mgmt.recoveryservicesbackup.models.ErrorAdditionalInfo]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
'details': {'readonly': True},
'additional_info': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponse]'},
'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'},
}

def __init__(self, **kwargs):
super(ErrorResponse, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None


class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)


class OperationResultInfoBase(Model):
"""Base class for operation result info.

Expand Down Expand Up @@ -9284,6 +9370,125 @@ def __init__(self, **kwargs):
self.protected_item_name = kwargs.get('protected_item_name', None)


class PrivateEndpoint(Model):
"""The Private Endpoint network resource that is linked to the Private
Endpoint connection.

:param id: Gets or sets id
:type id: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpoint, self).__init__(**kwargs)
self.id = kwargs.get('id', None)


class PrivateEndpointConnection(Model):
"""Private Endpoint Connection Response Properties.

:param provisioning_state: Gets or sets provisioning state of the private
endpoint connection. Possible values include: 'Succeeded', 'Deleting',
'Failed', 'Pending'
:type provisioning_state: str or
~azure.mgmt.recoveryservicesbackup.models.ProvisioningState
:param private_endpoint: Gets or sets private endpoint associated with the
private endpoint connection
:type private_endpoint:
~azure.mgmt.recoveryservicesbackup.models.PrivateEndpoint
:param private_link_service_connection_state: Gets or sets private link
service connection state
:type private_link_service_connection_state:
~azure.mgmt.recoveryservicesbackup.models.PrivateLinkServiceConnectionState
"""

_attribute_map = {
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'},
'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'},
}

def __init__(self, **kwargs):
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.provisioning_state = kwargs.get('provisioning_state', None)
self.private_endpoint = kwargs.get('private_endpoint', None)
self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None)


class PrivateEndpointConnectionResource(Resource):
"""Private Endpoint Connection Response Properties.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id represents the complete path to the resource.
:vartype id: str
:ivar name: Resource name associated with the resource.
:vartype name: str
:ivar type: Resource type represents the complete path of the form
Namespace/ResourceType/ResourceType/...
:vartype type: str
:param location: Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param e_tag: Optional ETag.
:type e_tag: str
:param properties: PrivateEndpointConnectionResource properties
:type properties:
~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnection
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'e_tag': {'key': 'eTag', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'PrivateEndpointConnection'},
}

def __init__(self, **kwargs):
super(PrivateEndpointConnectionResource, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)


class PrivateLinkServiceConnectionState(Model):
"""Private Link Service Connection State.

:param status: Gets or sets the status. Possible values include:
'Pending', 'Approved', 'Rejected', 'Disconnected'
:type status: str or
~azure.mgmt.recoveryservicesbackup.models.PrivateEndpointConnectionStatus
:param description: Gets or sets description
:type description: str
:param action_required: Gets or sets actions required
:type action_required: str
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'action_required': {'key': 'actionRequired', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateLinkServiceConnectionState, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.description = kwargs.get('description', None)
self.action_required = kwargs.get('action_required', None)


class ProtectableContainerResource(Resource):
"""Protectable Container Class.

Expand Down
Loading