diff --git a/sdk/databricks/azure-mgmt-databricks/MANIFEST.in b/sdk/databricks/azure-mgmt-databricks/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/databricks/azure-mgmt-databricks/MANIFEST.in +++ b/sdk/databricks/azure-mgmt-databricks/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/databricks/azure-mgmt-databricks/_meta.json b/sdk/databricks/azure-mgmt-databricks/_meta.json new file mode 100644 index 000000000000..93c0bbe5a3f6 --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "bffd010720f8447b659c9b1881a4547100e3e1d1", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/databricks/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/databricks/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/__init__.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/__init__.py index dbdd6fc9d7c4..3b6f76411d08 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/__init__.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .databricks_client import DatabricksClient -from .version import VERSION +from ._configuration import DatabricksClientConfiguration +from ._databricks_client import DatabricksClient +__all__ = ['DatabricksClient', 'DatabricksClientConfiguration'] -__all__ = ['DatabricksClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_configuration.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_configuration.py new file mode 100644 index 000000000000..7ebff1648cc4 --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class DatabricksClientConfiguration(AzureConfiguration): + """Configuration for DatabricksClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DatabricksClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-databricks/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/databricks_client.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_databricks_client.py similarity index 59% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/databricks_client.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_databricks_client.py index ab52ced185ad..8155467d3a49 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/databricks_client.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/_databricks_client.py @@ -11,43 +11,12 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.workspaces_operations import WorkspacesOperations -from .operations.operations import Operations -from . import models - - -class DatabricksClientConfiguration(AzureConfiguration): - """Configuration for DatabricksClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(DatabricksClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-databricks/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import DatabricksClientConfiguration +from .operations import WorkspacesOperations +from .operations import VNetPeeringOperations +from .operations import Operations +from . import models class DatabricksClient(SDKClient): @@ -58,6 +27,8 @@ class DatabricksClient(SDKClient): :ivar workspaces: Workspaces operations :vartype workspaces: azure.mgmt.databricks.operations.WorkspacesOperations + :ivar vnet_peering: VNetPeering operations + :vartype vnet_peering: azure.mgmt.databricks.operations.VNetPeeringOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.databricks.operations.Operations @@ -82,5 +53,7 @@ def __init__( self.workspaces = WorkspacesOperations( self._client, self.config, self._serialize, self._deserialize) + self.vnet_peering = VNetPeeringOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/__init__.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/__init__.py index a9c9da55beb2..209d47c94fc5 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/__init__.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/__init__.py @@ -10,48 +10,94 @@ # -------------------------------------------------------------------------- try: - from .workspace_provider_authorization_py3 import WorkspaceProviderAuthorization - from .sku_py3 import Sku - from .workspace_py3 import Workspace - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .workspace_update_py3 import WorkspaceUpdate - from .error_detail_py3 import ErrorDetail - from .error_info_py3 import ErrorInfo - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation + from ._models_py3 import AddressSpace + from ._models_py3 import CreatedBy + from ._models_py3 import Encryption + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorInfo + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ManagedIdentityConfiguration + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import Resource + from ._models_py3 import Sku + from ._models_py3 import TrackedResource + from ._models_py3 import VirtualNetworkPeering + from ._models_py3 import VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork + from ._models_py3 import VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork + from ._models_py3 import Workspace + from ._models_py3 import WorkspaceCustomBooleanParameter + from ._models_py3 import WorkspaceCustomObjectParameter + from ._models_py3 import WorkspaceCustomParameters + from ._models_py3 import WorkspaceCustomStringParameter + from ._models_py3 import WorkspaceEncryptionParameter + from ._models_py3 import WorkspaceProviderAuthorization + from ._models_py3 import WorkspaceUpdate except (SyntaxError, ImportError): - from .workspace_provider_authorization import WorkspaceProviderAuthorization - from .sku import Sku - from .workspace import Workspace - from .tracked_resource import TrackedResource - from .resource import Resource - from .workspace_update import WorkspaceUpdate - from .error_detail import ErrorDetail - from .error_info import ErrorInfo - from .error_response import ErrorResponse, ErrorResponseException - from .operation_display import OperationDisplay - from .operation import Operation -from .workspace_paged import WorkspacePaged -from .operation_paged import OperationPaged -from .databricks_client_enums import ( + from ._models import AddressSpace + from ._models import CreatedBy + from ._models import Encryption + from ._models import ErrorDetail + from ._models import ErrorInfo + from ._models import ErrorResponse, ErrorResponseException + from ._models import ManagedIdentityConfiguration + from ._models import Operation + from ._models import OperationDisplay + from ._models import Resource + from ._models import Sku + from ._models import TrackedResource + from ._models import VirtualNetworkPeering + from ._models import VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork + from ._models import VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork + from ._models import Workspace + from ._models import WorkspaceCustomBooleanParameter + from ._models import WorkspaceCustomObjectParameter + from ._models import WorkspaceCustomParameters + from ._models import WorkspaceCustomStringParameter + from ._models import WorkspaceEncryptionParameter + from ._models import WorkspaceProviderAuthorization + from ._models import WorkspaceUpdate +from ._paged_models import OperationPaged +from ._paged_models import VirtualNetworkPeeringPaged +from ._paged_models import WorkspacePaged +from ._databricks_client_enums import ( + CustomParameterType, + KeySource, ProvisioningState, + PeeringProvisioningState, + PeeringState, ) __all__ = [ - 'WorkspaceProviderAuthorization', - 'Sku', - 'Workspace', - 'TrackedResource', - 'Resource', - 'WorkspaceUpdate', + 'AddressSpace', + 'CreatedBy', + 'Encryption', 'ErrorDetail', 'ErrorInfo', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'ManagedIdentityConfiguration', 'Operation', + 'OperationDisplay', + 'Resource', + 'Sku', + 'TrackedResource', + 'VirtualNetworkPeering', + 'VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork', + 'VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork', + 'Workspace', + 'WorkspaceCustomBooleanParameter', + 'WorkspaceCustomObjectParameter', + 'WorkspaceCustomParameters', + 'WorkspaceCustomStringParameter', + 'WorkspaceEncryptionParameter', + 'WorkspaceProviderAuthorization', + 'WorkspaceUpdate', 'WorkspacePaged', + 'VirtualNetworkPeeringPaged', 'OperationPaged', + 'CustomParameterType', + 'KeySource', 'ProvisioningState', + 'PeeringProvisioningState', + 'PeeringState', ] diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/databricks_client_enums.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_databricks_client_enums.py similarity index 62% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/databricks_client_enums.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_databricks_client_enums.py index 59c762eafc5d..e05ecdee6786 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/databricks_client_enums.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_databricks_client_enums.py @@ -12,6 +12,19 @@ from enum import Enum +class CustomParameterType(str, Enum): + + bool_enum = "Bool" + object_enum = "Object" + string = "String" + + +class KeySource(str, Enum): + + default = "Default" + microsoft_keyvault = "Microsoft.Keyvault" + + class ProvisioningState(str, Enum): accepted = "Accepted" @@ -25,3 +38,18 @@ class ProvisioningState(str, Enum): failed = "Failed" succeeded = "Succeeded" updating = "Updating" + + +class PeeringProvisioningState(str, Enum): + + succeeded = "Succeeded" + updating = "Updating" + deleting = "Deleting" + failed = "Failed" + + +class PeeringState(str, Enum): + + initiated = "Initiated" + connected = "Connected" + disconnected = "Disconnected" diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models.py new file mode 100644 index 000000000000..cbdb5c8eda9f --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models.py @@ -0,0 +1,894 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AddressSpace(Model): + """AddressSpace contains an array of IP address ranges that can be used by + subnets of the virtual network. + + :param address_prefixes: A list of address blocks reserved for this + virtual network in CIDR notation. + :type address_prefixes: list[str] + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AddressSpace, self).__init__(**kwargs) + self.address_prefixes = kwargs.get('address_prefixes', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreatedBy(Model): + """Provides details of the entity that created/updated the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar oid: The Object ID that created the workspace. + :vartype oid: str + :ivar puid: The Personal Object ID corresponding to the object ID above + :vartype puid: str + :ivar application_id: The application ID of the application that initiated + the creation of the workspace. For example, Azure Portal. + :vartype application_id: str + """ + + _validation = { + 'oid': {'readonly': True}, + 'puid': {'readonly': True}, + 'application_id': {'readonly': True}, + } + + _attribute_map = { + 'oid': {'key': 'oid', 'type': 'str'}, + 'puid': {'key': 'puid', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreatedBy, self).__init__(**kwargs) + self.oid = None + self.puid = None + self.application_id = None + + +class Encryption(Model): + """The object that contains details of encryption used on the workspace. + + :param key_source: The encryption keySource (provider). Possible values + (case-insensitive): Default, Microsoft.Keyvault. Possible values include: + 'Default', 'Microsoft.Keyvault'. Default value: "Default" . + :type key_source: str or ~azure.mgmt.databricks.models.KeySource + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_name': {'key': 'KeyName', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Encryption, self).__init__(**kwargs) + self.key_source = kwargs.get('key_source', "Default") + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + + +class ErrorDetail(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error's code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param target: Indicates which property in the request is responsible for + the error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + +class ErrorInfo(Model): + """The code and message for an error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. A machine readable error code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: error details. + :type details: list[~azure.mgmt.databricks.models.ErrorDetail] + :param innererror: Inner error details if they exist. + :type innererror: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'innererror': {'key': 'innererror', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + + +class ErrorResponse(Model): + """Error response. + + Contains details when the response code indicates an error. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The error details. + :type error: ~azure.mgmt.databricks.models.ErrorInfo + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorInfo'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', 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 ManagedIdentityConfiguration(Model): + """The Managed Identity details for storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The objectId of the Managed Identity that is linked to + the Managed Storage account. + :vartype principal_id: str + :ivar tenant_id: The tenant Id where the Managed Identity is created. + :vartype tenant_id: str + :ivar type: The type of Identity created. It can be either SystemAssigned + or UserAssigned. + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentityConfiguration, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.databricks.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _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'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Sku(Model): + """SKU for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The SKU name. + :type name: str + :param tier: The SKU tier. + :type tier: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class VirtualNetworkPeering(Model): + """Peerings in a VirtualNetwork resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param allow_virtual_network_access: Whether the VMs in the local virtual + network space would be able to access the VMs in remote virtual network + space. + :type allow_virtual_network_access: bool + :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs + in the local virtual network will be allowed/disallowed in remote virtual + network. + :type allow_forwarded_traffic: bool + :param allow_gateway_transit: If gateway links can be used in remote + virtual networking to link to this virtual network. + :type allow_gateway_transit: bool + :param use_remote_gateways: If remote gateways can be used on this virtual + network. If the flag is set to true, and allowGatewayTransit on remote + peering is also true, virtual network will use gateways of remote virtual + network for transit. Only one peering can have this flag set to true. This + flag cannot be set if virtual network already has a gateway. + :type use_remote_gateways: bool + :param databricks_virtual_network: The remote virtual network should be + in the same region. See here to learn more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + :type databricks_virtual_network: + ~azure.mgmt.databricks.models.VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork + :param databricks_address_space: The reference to the databricks virtual + network address space. + :type databricks_address_space: ~azure.mgmt.databricks.models.AddressSpace + :param remote_virtual_network: Required. The remote virtual network + should be in the same region. See here to learn more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + :type remote_virtual_network: + ~azure.mgmt.databricks.models.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork + :param remote_address_space: The reference to the remote virtual network + address space. + :type remote_address_space: ~azure.mgmt.databricks.models.AddressSpace + :ivar peering_state: The status of the virtual network peering. Possible + values include: 'Initiated', 'Connected', 'Disconnected' + :vartype peering_state: str or ~azure.mgmt.databricks.models.PeeringState + :ivar provisioning_state: The provisioning state of the virtual network + peering resource. Possible values include: 'Succeeded', 'Updating', + 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.databricks.models.PeeringProvisioningState + :ivar name: Name of the virtual network peering resource + :vartype name: str + :ivar id: Resource ID. + :vartype id: str + :ivar type: type of the virtual network peering resource + :vartype type: str + """ + + _validation = { + 'remote_virtual_network': {'required': True}, + 'peering_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, + 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, + 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, + 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, + 'databricks_virtual_network': {'key': 'properties.databricksVirtualNetwork', 'type': 'VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork'}, + 'databricks_address_space': {'key': 'properties.databricksAddressSpace', 'type': 'AddressSpace'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork'}, + 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, + 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkPeering, self).__init__(**kwargs) + self.allow_virtual_network_access = kwargs.get('allow_virtual_network_access', None) + self.allow_forwarded_traffic = kwargs.get('allow_forwarded_traffic', None) + self.allow_gateway_transit = kwargs.get('allow_gateway_transit', None) + self.use_remote_gateways = kwargs.get('use_remote_gateways', None) + self.databricks_virtual_network = kwargs.get('databricks_virtual_network', None) + self.databricks_address_space = kwargs.get('databricks_address_space', None) + self.remote_virtual_network = kwargs.get('remote_virtual_network', None) + self.remote_address_space = kwargs.get('remote_address_space', None) + self.peering_state = None + self.provisioning_state = None + self.name = None + self.id = None + self.type = None + + +class VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork(Model): + """The remote virtual network should be in the same region. See here to learn + more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + + :param id: The Id of the databricks virtual network. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork(Model): + """The remote virtual network should be in the same region. See here to learn + more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + + :param id: The Id of the remote virtual network. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class Workspace(TrackedResource): + """Information about workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param managed_resource_group_id: Required. The managed resource group Id. + :type managed_resource_group_id: str + :param parameters: The workspace's custom parameters. + :type parameters: ~azure.mgmt.databricks.models.WorkspaceCustomParameters + :ivar provisioning_state: The workspace provisioning state. Possible + values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', + 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.databricks.models.ProvisioningState + :param ui_definition_uri: The blob URI where the UI definition file is + located. + :type ui_definition_uri: str + :param authorizations: The workspace provider authorizations. + :type authorizations: + list[~azure.mgmt.databricks.models.WorkspaceProviderAuthorization] + :param created_by: Indicates the Object ID, PUID and Application ID of + entity that created the workspace. + :type created_by: ~azure.mgmt.databricks.models.CreatedBy + :param updated_by: Indicates the Object ID, PUID and Application ID of + entity that last updated the workspace. + :type updated_by: ~azure.mgmt.databricks.models.CreatedBy + :param created_date_time: Specifies the date and time when the workspace + is created. + :type created_date_time: datetime + :ivar workspace_id: The unique identifier of the databricks workspace in + databricks control plane. + :vartype workspace_id: str + :ivar workspace_url: The workspace URL which is of the format + 'adb-{workspaceId}.{random}.azuredatabricks.net' + :vartype workspace_url: str + :param storage_account_identity: The details of Managed Identity of + Storage Account + :type storage_account_identity: + ~azure.mgmt.databricks.models.ManagedIdentityConfiguration + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.databricks.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_resource_group_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'workspace_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'WorkspaceCustomParameters'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ui_definition_uri': {'key': 'properties.uiDefinitionUri', 'type': 'str'}, + 'authorizations': {'key': 'properties.authorizations', 'type': '[WorkspaceProviderAuthorization]'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'CreatedBy'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'CreatedBy'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'workspace_url': {'key': 'properties.workspaceUrl', 'type': 'str'}, + 'storage_account_identity': {'key': 'properties.storageAccountIdentity', 'type': 'ManagedIdentityConfiguration'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, **kwargs): + super(Workspace, self).__init__(**kwargs) + self.managed_resource_group_id = kwargs.get('managed_resource_group_id', None) + self.parameters = kwargs.get('parameters', None) + self.provisioning_state = None + self.ui_definition_uri = kwargs.get('ui_definition_uri', None) + self.authorizations = kwargs.get('authorizations', None) + self.created_by = kwargs.get('created_by', None) + self.updated_by = kwargs.get('updated_by', None) + self.created_date_time = kwargs.get('created_date_time', None) + self.workspace_id = None + self.workspace_url = None + self.storage_account_identity = kwargs.get('storage_account_identity', None) + self.sku = kwargs.get('sku', None) + + +class WorkspaceCustomBooleanParameter(Model): + """The value which should be used for this field. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: bool + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(WorkspaceCustomBooleanParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + + +class WorkspaceCustomObjectParameter(Model): + """The value which should be used for this field. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(WorkspaceCustomObjectParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + + +class WorkspaceCustomParameters(Model): + """Custom Parameters used for Cluster Creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param aml_workspace_id: The ID of a Azure Machine Learning workspace to + link with Databricks workspace + :type aml_workspace_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_virtual_network_id: The ID of a Virtual Network where this + Databricks Cluster should be created + :type custom_virtual_network_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_public_subnet_name: The name of a Public Subnet within the + Virtual Network + :type custom_public_subnet_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_private_subnet_name: The name of the Private Subnet within + the Virtual Network + :type custom_private_subnet_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param enable_no_public_ip: Should the Public IP be Disabled? + :type enable_no_public_ip: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param load_balancer_backend_pool_name: Name of the outbound Load Balancer + Backend Pool for Secure Cluster Connectivity (No Public IP). + :type load_balancer_backend_pool_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param load_balancer_id: Resource URI of Outbound Load balancer for Secure + Cluster Connectivity (No Public IP) workspace. + :type load_balancer_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param nat_gateway_name: Name of the NAT gateway for Secure Cluster + Connectivity (No Public IP) workspace subnets. + :type nat_gateway_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param public_ip_name: Name of the Public IP for No Public IP workspace + with managed vNet. + :type public_ip_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param prepare_encryption: Prepare the workspace for encryption. Enables + the Managed Identity for managed storage account. + :type prepare_encryption: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param encryption: Contains the encryption details for Customer-Managed + Key (CMK) enabled workspace. + :type encryption: + ~azure.mgmt.databricks.models.WorkspaceEncryptionParameter + :param require_infrastructure_encryption: A boolean indicating whether or + not the DBFS root file system will be enabled with secondary layer of + encryption with platform managed keys for data at rest. + :type require_infrastructure_encryption: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param storage_account_name: Default DBFS storage account name. + :type storage_account_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param storage_account_sku_name: Storage account SKU name, ex: + Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for valid + inputs. + :type storage_account_sku_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param vnet_address_prefix: Address prefix for Managed virtual network. + Default value for this input is 10.139. + :type vnet_address_prefix: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :ivar resource_tags: Tags applied to resources under Managed resource + group. These can be updated by updating tags at workspace level. + :vartype resource_tags: + ~azure.mgmt.databricks.models.WorkspaceCustomObjectParameter + """ + + _validation = { + 'resource_tags': {'readonly': True}, + } + + _attribute_map = { + 'aml_workspace_id': {'key': 'amlWorkspaceId', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_virtual_network_id': {'key': 'customVirtualNetworkId', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_public_subnet_name': {'key': 'customPublicSubnetName', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_private_subnet_name': {'key': 'customPrivateSubnetName', 'type': 'WorkspaceCustomStringParameter'}, + 'enable_no_public_ip': {'key': 'enableNoPublicIp', 'type': 'WorkspaceCustomBooleanParameter'}, + 'load_balancer_backend_pool_name': {'key': 'loadBalancerBackendPoolName', 'type': 'WorkspaceCustomStringParameter'}, + 'load_balancer_id': {'key': 'loadBalancerId', 'type': 'WorkspaceCustomStringParameter'}, + 'nat_gateway_name': {'key': 'natGatewayName', 'type': 'WorkspaceCustomStringParameter'}, + 'public_ip_name': {'key': 'publicIpName', 'type': 'WorkspaceCustomStringParameter'}, + 'prepare_encryption': {'key': 'prepareEncryption', 'type': 'WorkspaceCustomBooleanParameter'}, + 'encryption': {'key': 'encryption', 'type': 'WorkspaceEncryptionParameter'}, + 'require_infrastructure_encryption': {'key': 'requireInfrastructureEncryption', 'type': 'WorkspaceCustomBooleanParameter'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'WorkspaceCustomStringParameter'}, + 'storage_account_sku_name': {'key': 'storageAccountSkuName', 'type': 'WorkspaceCustomStringParameter'}, + 'vnet_address_prefix': {'key': 'vnetAddressPrefix', 'type': 'WorkspaceCustomStringParameter'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'WorkspaceCustomObjectParameter'}, + } + + def __init__(self, **kwargs): + super(WorkspaceCustomParameters, self).__init__(**kwargs) + self.aml_workspace_id = kwargs.get('aml_workspace_id', None) + self.custom_virtual_network_id = kwargs.get('custom_virtual_network_id', None) + self.custom_public_subnet_name = kwargs.get('custom_public_subnet_name', None) + self.custom_private_subnet_name = kwargs.get('custom_private_subnet_name', None) + self.enable_no_public_ip = kwargs.get('enable_no_public_ip', None) + self.load_balancer_backend_pool_name = kwargs.get('load_balancer_backend_pool_name', None) + self.load_balancer_id = kwargs.get('load_balancer_id', None) + self.nat_gateway_name = kwargs.get('nat_gateway_name', None) + self.public_ip_name = kwargs.get('public_ip_name', None) + self.prepare_encryption = kwargs.get('prepare_encryption', None) + self.encryption = kwargs.get('encryption', None) + self.require_infrastructure_encryption = kwargs.get('require_infrastructure_encryption', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.storage_account_sku_name = kwargs.get('storage_account_sku_name', None) + self.vnet_address_prefix = kwargs.get('vnet_address_prefix', None) + self.resource_tags = None + + +class WorkspaceCustomStringParameter(Model): + """The Value. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceCustomStringParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + + +class WorkspaceEncryptionParameter(Model): + """The object that contains details of encryption used on the workspace. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: The value which should be used for this field. + :type value: ~azure.mgmt.databricks.models.Encryption + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'Encryption'}, + } + + def __init__(self, **kwargs): + super(WorkspaceEncryptionParameter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.value = kwargs.get('value', None) + + +class WorkspaceProviderAuthorization(Model): + """The workspace provider authorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The provider's principal identifier. This + is the identity that the provider will use to call ARM to manage the + workspace resources. + :type principal_id: str + :param role_definition_id: Required. The provider's role definition + identifier. This role will define all the permissions that the provider + must have on the workspace's container resource group. This role + definition cannot have permission to delete the resource group. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceProviderAuthorization, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.role_definition_id = kwargs.get('role_definition_id', None) + + +class WorkspaceUpdate(Model): + """An update to a workspace. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(WorkspaceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models_py3.py new file mode 100644 index 000000000000..67491236ebae --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models_py3.py @@ -0,0 +1,894 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AddressSpace(Model): + """AddressSpace contains an array of IP address ranges that can be used by + subnets of the virtual network. + + :param address_prefixes: A list of address blocks reserved for this + virtual network in CIDR notation. + :type address_prefixes: list[str] + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + } + + def __init__(self, *, address_prefixes=None, **kwargs) -> None: + super(AddressSpace, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class CreatedBy(Model): + """Provides details of the entity that created/updated the workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar oid: The Object ID that created the workspace. + :vartype oid: str + :ivar puid: The Personal Object ID corresponding to the object ID above + :vartype puid: str + :ivar application_id: The application ID of the application that initiated + the creation of the workspace. For example, Azure Portal. + :vartype application_id: str + """ + + _validation = { + 'oid': {'readonly': True}, + 'puid': {'readonly': True}, + 'application_id': {'readonly': True}, + } + + _attribute_map = { + 'oid': {'key': 'oid', 'type': 'str'}, + 'puid': {'key': 'puid', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CreatedBy, self).__init__(**kwargs) + self.oid = None + self.puid = None + self.application_id = None + + +class Encryption(Model): + """The object that contains details of encryption used on the workspace. + + :param key_source: The encryption keySource (provider). Possible values + (case-insensitive): Default, Microsoft.Keyvault. Possible values include: + 'Default', 'Microsoft.Keyvault'. Default value: "Default" . + :type key_source: str or ~azure.mgmt.databricks.models.KeySource + :param key_name: The name of KeyVault key. + :type key_name: str + :param key_version: The version of KeyVault key. + :type key_version: str + :param key_vault_uri: The Uri of KeyVault. + :type key_vault_uri: str + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_name': {'key': 'KeyName', 'type': 'str'}, + 'key_version': {'key': 'keyversion', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyvaulturi', 'type': 'str'}, + } + + def __init__(self, *, key_source="Default", key_name: str=None, key_version: str=None, key_vault_uri: str=None, **kwargs) -> None: + super(Encryption, self).__init__(**kwargs) + self.key_source = key_source + self.key_name = key_name + self.key_version = key_version + self.key_vault_uri = key_vault_uri + + +class ErrorDetail(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. The error's code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param target: Indicates which property in the request is responsible for + the error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, target: str=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + +class ErrorInfo(Model): + """The code and message for an error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. A machine readable error code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: error details. + :type details: list[~azure.mgmt.databricks.models.ErrorDetail] + :param innererror: Inner error details if they exist. + :type innererror: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'innererror': {'key': 'innererror', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, details=None, innererror: str=None, **kwargs) -> None: + super(ErrorInfo, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.innererror = innererror + + +class ErrorResponse(Model): + """Error response. + + Contains details when the response code indicates an error. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The error details. + :type error: ~azure.mgmt.databricks.models.ErrorInfo + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorInfo'}, + } + + def __init__(self, *, error, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +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 ManagedIdentityConfiguration(Model): + """The Managed Identity details for storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The objectId of the Managed Identity that is linked to + the Managed Storage account. + :vartype principal_id: str + :ivar tenant_id: The tenant Id where the Managed Identity is created. + :vartype tenant_id: str + :ivar type: The type of Identity created. It can be either SystemAssigned + or UserAssigned. + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ManagedIdentityConfiguration, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.databricks.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.ResourceProvider + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + """ + + _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'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Sku(Model): + """SKU for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The SKU name. + :type name: str + :param tier: The SKU tier. + :type tier: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name: str, tier: str=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class VirtualNetworkPeering(Model): + """Peerings in a VirtualNetwork resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param allow_virtual_network_access: Whether the VMs in the local virtual + network space would be able to access the VMs in remote virtual network + space. + :type allow_virtual_network_access: bool + :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs + in the local virtual network will be allowed/disallowed in remote virtual + network. + :type allow_forwarded_traffic: bool + :param allow_gateway_transit: If gateway links can be used in remote + virtual networking to link to this virtual network. + :type allow_gateway_transit: bool + :param use_remote_gateways: If remote gateways can be used on this virtual + network. If the flag is set to true, and allowGatewayTransit on remote + peering is also true, virtual network will use gateways of remote virtual + network for transit. Only one peering can have this flag set to true. This + flag cannot be set if virtual network already has a gateway. + :type use_remote_gateways: bool + :param databricks_virtual_network: The remote virtual network should be + in the same region. See here to learn more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + :type databricks_virtual_network: + ~azure.mgmt.databricks.models.VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork + :param databricks_address_space: The reference to the databricks virtual + network address space. + :type databricks_address_space: ~azure.mgmt.databricks.models.AddressSpace + :param remote_virtual_network: Required. The remote virtual network + should be in the same region. See here to learn more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + :type remote_virtual_network: + ~azure.mgmt.databricks.models.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork + :param remote_address_space: The reference to the remote virtual network + address space. + :type remote_address_space: ~azure.mgmt.databricks.models.AddressSpace + :ivar peering_state: The status of the virtual network peering. Possible + values include: 'Initiated', 'Connected', 'Disconnected' + :vartype peering_state: str or ~azure.mgmt.databricks.models.PeeringState + :ivar provisioning_state: The provisioning state of the virtual network + peering resource. Possible values include: 'Succeeded', 'Updating', + 'Deleting', 'Failed' + :vartype provisioning_state: str or + ~azure.mgmt.databricks.models.PeeringProvisioningState + :ivar name: Name of the virtual network peering resource + :vartype name: str + :ivar id: Resource ID. + :vartype id: str + :ivar type: type of the virtual network peering resource + :vartype type: str + """ + + _validation = { + 'remote_virtual_network': {'required': True}, + 'peering_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, + 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, + 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, + 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, + 'databricks_virtual_network': {'key': 'properties.databricksVirtualNetwork', 'type': 'VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork'}, + 'databricks_address_space': {'key': 'properties.databricksAddressSpace', 'type': 'AddressSpace'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork'}, + 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, + 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, remote_virtual_network, allow_virtual_network_access: bool=None, allow_forwarded_traffic: bool=None, allow_gateway_transit: bool=None, use_remote_gateways: bool=None, databricks_virtual_network=None, databricks_address_space=None, remote_address_space=None, **kwargs) -> None: + super(VirtualNetworkPeering, self).__init__(**kwargs) + self.allow_virtual_network_access = allow_virtual_network_access + self.allow_forwarded_traffic = allow_forwarded_traffic + self.allow_gateway_transit = allow_gateway_transit + self.use_remote_gateways = use_remote_gateways + self.databricks_virtual_network = databricks_virtual_network + self.databricks_address_space = databricks_address_space + self.remote_virtual_network = remote_virtual_network + self.remote_address_space = remote_address_space + self.peering_state = None + self.provisioning_state = None + self.name = None + self.id = None + self.type = None + + +class VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork(Model): + """The remote virtual network should be in the same region. See here to learn + more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + + :param id: The Id of the databricks virtual network. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualNetworkPeeringPropertiesFormatDatabricksVirtualNetwork, self).__init__(**kwargs) + self.id = id + + +class VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork(Model): + """The remote virtual network should be in the same region. See here to learn + more + (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering). + + :param id: The Id of the remote virtual network. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork, self).__init__(**kwargs) + self.id = id + + +class Workspace(TrackedResource): + """Information about workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param managed_resource_group_id: Required. The managed resource group Id. + :type managed_resource_group_id: str + :param parameters: The workspace's custom parameters. + :type parameters: ~azure.mgmt.databricks.models.WorkspaceCustomParameters + :ivar provisioning_state: The workspace provisioning state. Possible + values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', + 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.databricks.models.ProvisioningState + :param ui_definition_uri: The blob URI where the UI definition file is + located. + :type ui_definition_uri: str + :param authorizations: The workspace provider authorizations. + :type authorizations: + list[~azure.mgmt.databricks.models.WorkspaceProviderAuthorization] + :param created_by: Indicates the Object ID, PUID and Application ID of + entity that created the workspace. + :type created_by: ~azure.mgmt.databricks.models.CreatedBy + :param updated_by: Indicates the Object ID, PUID and Application ID of + entity that last updated the workspace. + :type updated_by: ~azure.mgmt.databricks.models.CreatedBy + :param created_date_time: Specifies the date and time when the workspace + is created. + :type created_date_time: datetime + :ivar workspace_id: The unique identifier of the databricks workspace in + databricks control plane. + :vartype workspace_id: str + :ivar workspace_url: The workspace URL which is of the format + 'adb-{workspaceId}.{random}.azuredatabricks.net' + :vartype workspace_url: str + :param storage_account_identity: The details of Managed Identity of + Storage Account + :type storage_account_identity: + ~azure.mgmt.databricks.models.ManagedIdentityConfiguration + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.databricks.models.Sku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_resource_group_id': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'workspace_id': {'readonly': True}, + 'workspace_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': 'WorkspaceCustomParameters'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ui_definition_uri': {'key': 'properties.uiDefinitionUri', 'type': 'str'}, + 'authorizations': {'key': 'properties.authorizations', 'type': '[WorkspaceProviderAuthorization]'}, + 'created_by': {'key': 'properties.createdBy', 'type': 'CreatedBy'}, + 'updated_by': {'key': 'properties.updatedBy', 'type': 'CreatedBy'}, + 'created_date_time': {'key': 'properties.createdDateTime', 'type': 'iso-8601'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'workspace_url': {'key': 'properties.workspaceUrl', 'type': 'str'}, + 'storage_account_identity': {'key': 'properties.storageAccountIdentity', 'type': 'ManagedIdentityConfiguration'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + } + + def __init__(self, *, location: str, managed_resource_group_id: str, tags=None, parameters=None, ui_definition_uri: str=None, authorizations=None, created_by=None, updated_by=None, created_date_time=None, storage_account_identity=None, sku=None, **kwargs) -> None: + super(Workspace, self).__init__(tags=tags, location=location, **kwargs) + self.managed_resource_group_id = managed_resource_group_id + self.parameters = parameters + self.provisioning_state = None + self.ui_definition_uri = ui_definition_uri + self.authorizations = authorizations + self.created_by = created_by + self.updated_by = updated_by + self.created_date_time = created_date_time + self.workspace_id = None + self.workspace_url = None + self.storage_account_identity = storage_account_identity + self.sku = sku + + +class WorkspaceCustomBooleanParameter(Model): + """The value which should be used for this field. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: bool + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'}, + } + + def __init__(self, *, value: bool, type=None, **kwargs) -> None: + super(WorkspaceCustomBooleanParameter, self).__init__(**kwargs) + self.type = type + self.value = value + + +class WorkspaceCustomObjectParameter(Model): + """The value which should be used for this field. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: object + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + } + + def __init__(self, *, value, type=None, **kwargs) -> None: + super(WorkspaceCustomObjectParameter, self).__init__(**kwargs) + self.type = type + self.value = value + + +class WorkspaceCustomParameters(Model): + """Custom Parameters used for Cluster Creation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param aml_workspace_id: The ID of a Azure Machine Learning workspace to + link with Databricks workspace + :type aml_workspace_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_virtual_network_id: The ID of a Virtual Network where this + Databricks Cluster should be created + :type custom_virtual_network_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_public_subnet_name: The name of a Public Subnet within the + Virtual Network + :type custom_public_subnet_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param custom_private_subnet_name: The name of the Private Subnet within + the Virtual Network + :type custom_private_subnet_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param enable_no_public_ip: Should the Public IP be Disabled? + :type enable_no_public_ip: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param load_balancer_backend_pool_name: Name of the outbound Load Balancer + Backend Pool for Secure Cluster Connectivity (No Public IP). + :type load_balancer_backend_pool_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param load_balancer_id: Resource URI of Outbound Load balancer for Secure + Cluster Connectivity (No Public IP) workspace. + :type load_balancer_id: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param nat_gateway_name: Name of the NAT gateway for Secure Cluster + Connectivity (No Public IP) workspace subnets. + :type nat_gateway_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param public_ip_name: Name of the Public IP for No Public IP workspace + with managed vNet. + :type public_ip_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param prepare_encryption: Prepare the workspace for encryption. Enables + the Managed Identity for managed storage account. + :type prepare_encryption: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param encryption: Contains the encryption details for Customer-Managed + Key (CMK) enabled workspace. + :type encryption: + ~azure.mgmt.databricks.models.WorkspaceEncryptionParameter + :param require_infrastructure_encryption: A boolean indicating whether or + not the DBFS root file system will be enabled with secondary layer of + encryption with platform managed keys for data at rest. + :type require_infrastructure_encryption: + ~azure.mgmt.databricks.models.WorkspaceCustomBooleanParameter + :param storage_account_name: Default DBFS storage account name. + :type storage_account_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param storage_account_sku_name: Storage account SKU name, ex: + Standard_GRS, Standard_LRS. Refer https://aka.ms/storageskus for valid + inputs. + :type storage_account_sku_name: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :param vnet_address_prefix: Address prefix for Managed virtual network. + Default value for this input is 10.139. + :type vnet_address_prefix: + ~azure.mgmt.databricks.models.WorkspaceCustomStringParameter + :ivar resource_tags: Tags applied to resources under Managed resource + group. These can be updated by updating tags at workspace level. + :vartype resource_tags: + ~azure.mgmt.databricks.models.WorkspaceCustomObjectParameter + """ + + _validation = { + 'resource_tags': {'readonly': True}, + } + + _attribute_map = { + 'aml_workspace_id': {'key': 'amlWorkspaceId', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_virtual_network_id': {'key': 'customVirtualNetworkId', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_public_subnet_name': {'key': 'customPublicSubnetName', 'type': 'WorkspaceCustomStringParameter'}, + 'custom_private_subnet_name': {'key': 'customPrivateSubnetName', 'type': 'WorkspaceCustomStringParameter'}, + 'enable_no_public_ip': {'key': 'enableNoPublicIp', 'type': 'WorkspaceCustomBooleanParameter'}, + 'load_balancer_backend_pool_name': {'key': 'loadBalancerBackendPoolName', 'type': 'WorkspaceCustomStringParameter'}, + 'load_balancer_id': {'key': 'loadBalancerId', 'type': 'WorkspaceCustomStringParameter'}, + 'nat_gateway_name': {'key': 'natGatewayName', 'type': 'WorkspaceCustomStringParameter'}, + 'public_ip_name': {'key': 'publicIpName', 'type': 'WorkspaceCustomStringParameter'}, + 'prepare_encryption': {'key': 'prepareEncryption', 'type': 'WorkspaceCustomBooleanParameter'}, + 'encryption': {'key': 'encryption', 'type': 'WorkspaceEncryptionParameter'}, + 'require_infrastructure_encryption': {'key': 'requireInfrastructureEncryption', 'type': 'WorkspaceCustomBooleanParameter'}, + 'storage_account_name': {'key': 'storageAccountName', 'type': 'WorkspaceCustomStringParameter'}, + 'storage_account_sku_name': {'key': 'storageAccountSkuName', 'type': 'WorkspaceCustomStringParameter'}, + 'vnet_address_prefix': {'key': 'vnetAddressPrefix', 'type': 'WorkspaceCustomStringParameter'}, + 'resource_tags': {'key': 'resourceTags', 'type': 'WorkspaceCustomObjectParameter'}, + } + + def __init__(self, *, aml_workspace_id=None, custom_virtual_network_id=None, custom_public_subnet_name=None, custom_private_subnet_name=None, enable_no_public_ip=None, load_balancer_backend_pool_name=None, load_balancer_id=None, nat_gateway_name=None, public_ip_name=None, prepare_encryption=None, encryption=None, require_infrastructure_encryption=None, storage_account_name=None, storage_account_sku_name=None, vnet_address_prefix=None, **kwargs) -> None: + super(WorkspaceCustomParameters, self).__init__(**kwargs) + self.aml_workspace_id = aml_workspace_id + self.custom_virtual_network_id = custom_virtual_network_id + self.custom_public_subnet_name = custom_public_subnet_name + self.custom_private_subnet_name = custom_private_subnet_name + self.enable_no_public_ip = enable_no_public_ip + self.load_balancer_backend_pool_name = load_balancer_backend_pool_name + self.load_balancer_id = load_balancer_id + self.nat_gateway_name = nat_gateway_name + self.public_ip_name = public_ip_name + self.prepare_encryption = prepare_encryption + self.encryption = encryption + self.require_infrastructure_encryption = require_infrastructure_encryption + self.storage_account_name = storage_account_name + self.storage_account_sku_name = storage_account_sku_name + self.vnet_address_prefix = vnet_address_prefix + self.resource_tags = None + + +class WorkspaceCustomStringParameter(Model): + """The Value. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: Required. The value which should be used for this field. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str, type=None, **kwargs) -> None: + super(WorkspaceCustomStringParameter, self).__init__(**kwargs) + self.type = type + self.value = value + + +class WorkspaceEncryptionParameter(Model): + """The object that contains details of encryption used on the workspace. + + :param type: The type of variable that this is. Possible values include: + 'Bool', 'Object', 'String' + :type type: str or ~azure.mgmt.databricks.models.CustomParameterType + :param value: The value which should be used for this field. + :type value: ~azure.mgmt.databricks.models.Encryption + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'Encryption'}, + } + + def __init__(self, *, type=None, value=None, **kwargs) -> None: + super(WorkspaceEncryptionParameter, self).__init__(**kwargs) + self.type = type + self.value = value + + +class WorkspaceProviderAuthorization(Model): + """The workspace provider authorization. + + All required parameters must be populated in order to send to Azure. + + :param principal_id: Required. The provider's principal identifier. This + is the identity that the provider will use to call ARM to manage the + workspace resources. + :type principal_id: str + :param role_definition_id: Required. The provider's role definition + identifier. This role will define all the permissions that the provider + must have on the workspace's container resource group. This role + definition cannot have permission to delete the resource group. + :type role_definition_id: str + """ + + _validation = { + 'principal_id': {'required': True}, + 'role_definition_id': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, + } + + def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: + super(WorkspaceProviderAuthorization, self).__init__(**kwargs) + self.principal_id = principal_id + self.role_definition_id = role_definition_id + + +class WorkspaceUpdate(Model): + """An update to a workspace. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(WorkspaceUpdate, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_paged.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py similarity index 50% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_paged.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py index ec9d387e271b..209eadce1748 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_paged.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py @@ -12,6 +12,32 @@ from msrest.paging import Paged +class WorkspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`Workspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Workspace]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspacePaged, self).__init__(*args, **kwargs) +class VirtualNetworkPeeringPaged(Paged): + """ + A paging container for iterating over a list of :class:`VirtualNetworkPeering ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[VirtualNetworkPeering]'} + } + + def __init__(self, *args, **kwargs): + + super(VirtualNetworkPeeringPaged, self).__init__(*args, **kwargs) class OperationPaged(Paged): """ A paging container for iterating over a list of :class:`Operation ` object diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail.py deleted file mode 100644 index ac459ba41d0c..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail.py +++ /dev/null @@ -1,44 +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 msrest.serialization import Model - - -class ErrorDetail(Model): - """Error details. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error's code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param target: Indicates which property in the request is responsible for - the error. - :type target: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetail, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail_py3.py deleted file mode 100644 index 1bc297891118..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_detail_py3.py +++ /dev/null @@ -1,44 +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 msrest.serialization import Model - - -class ErrorDetail(Model): - """Error details. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error's code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param target: Indicates which property in the request is responsible for - the error. - :type target: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - } - - def __init__(self, *, code: str, message: str, target: str=None, **kwargs) -> None: - super(ErrorDetail, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info.py deleted file mode 100644 index eb4b250da207..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info.py +++ /dev/null @@ -1,47 +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 msrest.serialization import Model - - -class ErrorInfo(Model): - """The code and message for an error. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. A machine readable error code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param details: error details. - :type details: list[~azure.mgmt.databricks.models.ErrorDetail] - :param innererror: Inner error details if they exist. - :type innererror: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'innererror': {'key': 'innererror', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorInfo, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info_py3.py deleted file mode 100644 index b560e54f16b5..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_info_py3.py +++ /dev/null @@ -1,47 +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 msrest.serialization import Model - - -class ErrorInfo(Model): - """The code and message for an error. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. A machine readable error code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param details: error details. - :type details: list[~azure.mgmt.databricks.models.ErrorDetail] - :param innererror: Inner error details if they exist. - :type innererror: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'innererror': {'key': 'innererror', 'type': 'str'}, - } - - def __init__(self, *, code: str, message: str, details=None, innererror: str=None, **kwargs) -> None: - super(ErrorInfo, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - self.innererror = innererror diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response.py deleted file mode 100644 index ca3a62e0c779..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response.py +++ /dev/null @@ -1,49 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - Contains details when the response code indicates an error. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. The error details. - :type error: ~azure.mgmt.databricks.models.ErrorInfo - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInfo'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', 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) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response_py3.py deleted file mode 100644 index 0f68702ffa14..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/error_response_py3.py +++ /dev/null @@ -1,49 +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 msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error response. - - Contains details when the response code indicates an error. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. The error details. - :type error: ~azure.mgmt.databricks.models.ErrorInfo - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInfo'}, - } - - def __init__(self, *, error, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -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) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation.py deleted file mode 100644 index 2d3b42b12ad7..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.databricks.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display.py deleted file mode 100644 index 3f41bf8dc399..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display_py3.py deleted file mode 100644 index e999835f7548..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_display_py3.py +++ /dev/null @@ -1,36 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.ResourceProvider - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_py3.py deleted file mode 100644 index 043239e379c8..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_py3.py +++ /dev/null @@ -1,32 +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 msrest.serialization import Model - - -class Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.databricks.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource.py deleted file mode 100644 index d8f988cdf5f8..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource.py +++ /dev/null @@ -1,47 +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 msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _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'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource_py3.py deleted file mode 100644 index 7c8c3022e1fa..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/resource_py3.py +++ /dev/null @@ -1,47 +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 msrest.serialization import Model - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - """ - - _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'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku.py deleted file mode 100644 index 59bf3f22dd21..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku.py +++ /dev/null @@ -1,38 +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 msrest.serialization import Model - - -class Sku(Model): - """SKU for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The SKU name. - :type name: str - :param tier: The SKU tier. - :type tier: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku_py3.py deleted file mode 100644 index 6fe2d3126c54..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/sku_py3.py +++ /dev/null @@ -1,38 +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 msrest.serialization import Model - - -class Sku(Model): - """SKU for the resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The SKU name. - :type name: str - :param tier: The SKU tier. - :type tier: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__(self, *, name: str, tier: str=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.tier = tier diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource.py deleted file mode 100644 index 27ab94c7a8dd..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource.py +++ /dev/null @@ -1,55 +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 .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource_py3.py deleted file mode 100644 index b28cc1859448..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/tracked_resource_py3.py +++ /dev/null @@ -1,55 +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 .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace.py deleted file mode 100644 index 951ffd97b04d..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace.py +++ /dev/null @@ -1,85 +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 .tracked_resource import TrackedResource - - -class Workspace(TrackedResource): - """Information about workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param managed_resource_group_id: Required. The managed resource group Id. - :type managed_resource_group_id: str - :param parameters: Name and value pairs that define the workspace - parameters. - :type parameters: object - :ivar provisioning_state: The workspace provisioning state. Possible - values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', - 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.databricks.models.ProvisioningState - :param ui_definition_uri: The blob URI where the UI definition file is - located. - :type ui_definition_uri: str - :param authorizations: The workspace provider authorizations. - :type authorizations: - list[~azure.mgmt.databricks.models.WorkspaceProviderAuthorization] - :param sku: The SKU of the resource. - :type sku: ~azure.mgmt.databricks.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_resource_group_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'ui_definition_uri': {'key': 'properties.uiDefinitionUri', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[WorkspaceProviderAuthorization]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(Workspace, self).__init__(**kwargs) - self.managed_resource_group_id = kwargs.get('managed_resource_group_id', None) - self.parameters = kwargs.get('parameters', None) - self.provisioning_state = None - self.ui_definition_uri = kwargs.get('ui_definition_uri', None) - self.authorizations = kwargs.get('authorizations', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_paged.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_paged.py deleted file mode 100644 index d514b8bd185a..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class WorkspacePaged(Paged): - """ - A paging container for iterating over a list of :class:`Workspace ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workspace]'} - } - - def __init__(self, *args, **kwargs): - - super(WorkspacePaged, self).__init__(*args, **kwargs) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization.py deleted file mode 100644 index 050276511e13..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization.py +++ /dev/null @@ -1,44 +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 msrest.serialization import Model - - -class WorkspaceProviderAuthorization(Model): - """The workspace provider authorization. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. The provider's principal identifier. This - is the identity that the provider will use to call ARM to manage the - workspace resources. - :type principal_id: str - :param role_definition_id: Required. The provider's role definition - identifier. This role will define all the permissions that the provider - must have on the workspace's container resource group. This role - definition cannot have permission to delete the resource group. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(WorkspaceProviderAuthorization, self).__init__(**kwargs) - self.principal_id = kwargs.get('principal_id', None) - self.role_definition_id = kwargs.get('role_definition_id', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization_py3.py deleted file mode 100644 index e5584dbd1e78..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_provider_authorization_py3.py +++ /dev/null @@ -1,44 +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 msrest.serialization import Model - - -class WorkspaceProviderAuthorization(Model): - """The workspace provider authorization. - - All required parameters must be populated in order to send to Azure. - - :param principal_id: Required. The provider's principal identifier. This - is the identity that the provider will use to call ARM to manage the - workspace resources. - :type principal_id: str - :param role_definition_id: Required. The provider's role definition - identifier. This role will define all the permissions that the provider - must have on the workspace's container resource group. This role - definition cannot have permission to delete the resource group. - :type role_definition_id: str - """ - - _validation = { - 'principal_id': {'required': True}, - 'role_definition_id': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'role_definition_id': {'key': 'roleDefinitionId', 'type': 'str'}, - } - - def __init__(self, *, principal_id: str, role_definition_id: str, **kwargs) -> None: - super(WorkspaceProviderAuthorization, self).__init__(**kwargs) - self.principal_id = principal_id - self.role_definition_id = role_definition_id diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_py3.py deleted file mode 100644 index d046f0b78626..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_py3.py +++ /dev/null @@ -1,85 +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 .tracked_resource_py3 import TrackedResource - - -class Workspace(TrackedResource): - """Information about workspace. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource Id for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param managed_resource_group_id: Required. The managed resource group Id. - :type managed_resource_group_id: str - :param parameters: Name and value pairs that define the workspace - parameters. - :type parameters: object - :ivar provisioning_state: The workspace provisioning state. Possible - values include: 'Accepted', 'Running', 'Ready', 'Creating', 'Created', - 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.databricks.models.ProvisioningState - :param ui_definition_uri: The blob URI where the UI definition file is - located. - :type ui_definition_uri: str - :param authorizations: The workspace provider authorizations. - :type authorizations: - list[~azure.mgmt.databricks.models.WorkspaceProviderAuthorization] - :param sku: The SKU of the resource. - :type sku: ~azure.mgmt.databricks.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'managed_resource_group_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'managed_resource_group_id': {'key': 'properties.managedResourceGroupId', 'type': 'str'}, - 'parameters': {'key': 'properties.parameters', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'ui_definition_uri': {'key': 'properties.uiDefinitionUri', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[WorkspaceProviderAuthorization]'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, managed_resource_group_id: str, tags=None, parameters=None, ui_definition_uri: str=None, authorizations=None, sku=None, **kwargs) -> None: - super(Workspace, self).__init__(tags=tags, location=location, **kwargs) - self.managed_resource_group_id = managed_resource_group_id - self.parameters = parameters - self.provisioning_state = None - self.ui_definition_uri = ui_definition_uri - self.authorizations = authorizations - self.sku = sku diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update.py deleted file mode 100644 index 6692c6b62e60..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update.py +++ /dev/null @@ -1,28 +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 msrest.serialization import Model - - -class WorkspaceUpdate(Model): - """An update to a workspace. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(WorkspaceUpdate, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update_py3.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update_py3.py deleted file mode 100644 index 19903c679fb5..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_update_py3.py +++ /dev/null @@ -1,28 +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 msrest.serialization import Model - - -class WorkspaceUpdate(Model): - """An update to a workspace. - - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(WorkspaceUpdate, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/__init__.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/__init__.py index 2ef2dea3df5e..ffc6375cd968 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/__init__.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/__init__.py @@ -9,10 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .workspaces_operations import WorkspacesOperations -from .operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._vnet_peering_operations import VNetPeeringOperations +from ._operations import Operations __all__ = [ 'WorkspacesOperations', + 'VNetPeeringOperations', 'Operations', ] diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/operations.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_operations.py similarity index 90% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/operations.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_operations.py index a391f400a6c2..45336311afc5 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/operations.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_operations.py @@ -18,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -77,6 +78,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -85,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Databricks/operations'} diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_vnet_peering_operations.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_vnet_peering_operations.py new file mode 100644 index 000000000000..28c5b82c987b --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_vnet_peering_operations.py @@ -0,0 +1,368 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class VNetPeeringOperations(object): + """VNetPeeringOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + self.config = config + + def get( + self, resource_group_name, workspace_name, peering_name, custom_headers=None, raw=False, **operation_config): + """Gets the workspace vNet Peering. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param peering_name: The name of the workspace vNet peering. + :type peering_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: VirtualNetworkPeering or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.databricks.models.VirtualNetworkPeering or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkPeering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, peering_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, workspace_name, peering_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the workspace vNetPeering. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param peering_name: The name of the workspace vNet peering. + :type peering_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + peering_name=peering_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}'} + + + def _create_or_update_initial( + self, virtual_network_peering_parameters, resource_group_name, workspace_name, peering_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkPeering', response) + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkPeering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, virtual_network_peering_parameters, resource_group_name, workspace_name, peering_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates vNet Peering for workspace. + + :param virtual_network_peering_parameters: Parameters supplied to the + create workspace vNet Peering. + :type virtual_network_peering_parameters: + ~azure.mgmt.databricks.models.VirtualNetworkPeering + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param peering_name: The name of the workspace vNet peering. + :type peering_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns VirtualNetworkPeering + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.databricks.models.VirtualNetworkPeering] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.databricks.models.VirtualNetworkPeering]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + virtual_network_peering_parameters=virtual_network_peering_parameters, + resource_group_name=resource_group_name, + workspace_name=workspace_name, + peering_name=peering_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('VirtualNetworkPeering', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}'} + + def list_by_workspace( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Lists the workspace vNet Peerings. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of VirtualNetworkPeering + :rtype: + ~azure.mgmt.databricks.models.VirtualNetworkPeeringPaged[~azure.mgmt.databricks.models.VirtualNetworkPeering] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + '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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.VirtualNetworkPeeringPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings'} diff --git a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/workspaces_operations.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_workspaces_operations.py similarity index 97% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/workspaces_operations.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_workspaces_operations.py index a02b392eb252..9ca2760df9ad 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/workspaces_operations.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_workspaces_operations.py @@ -20,6 +20,8 @@ class WorkspacesOperations(object): """WorkspacesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -85,11 +87,10 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: + if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Workspace', response) @@ -129,7 +130,7 @@ def _delete_initial( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: raise models.ErrorResponseException(self._deserialize, response) if raw: @@ -402,8 +403,7 @@ def list_by_resource_group( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -433,6 +433,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -441,12 +446,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces'} @@ -466,8 +469,7 @@ def list_by_subscription( :raises: :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -496,6 +498,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -504,12 +511,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Databricks/workspaces'}