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..222ad6f7d36d --- /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": "e74e5232ceb5b513bef9c7063f78650943465421", + "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 58% 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..7903ef50d34c 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,11 @@ 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 Operations +from . import models class DatabricksClient(SDKClient): @@ -76,7 +44,7 @@ def __init__( super(DatabricksClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-04-01' + self.api_version = '2021-04-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) 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..dfa96fa94e2f 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,95 @@ # -------------------------------------------------------------------------- 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 CreatedBy + from ._models_py3 import Encryption + from ._models_py3 import EncryptionEntitiesDefinition + from ._models_py3 import EncryptionV2 + from ._models_py3 import EncryptionV2KeyVaultProperties + 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 SystemData + from ._models_py3 import TrackedResource + 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 WorkspacePropertiesEncryption + 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 CreatedBy + from ._models import Encryption + from ._models import EncryptionEntitiesDefinition + from ._models import EncryptionV2 + from ._models import EncryptionV2KeyVaultProperties + 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 SystemData + from ._models import TrackedResource + 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 WorkspacePropertiesEncryption + from ._models import WorkspaceProviderAuthorization + from ._models import WorkspaceUpdate +from ._paged_models import OperationPaged +from ._paged_models import WorkspacePaged +from ._databricks_client_enums import ( + CustomParameterType, + KeySource, ProvisioningState, + CreatedByType, + PeeringProvisioningState, ) __all__ = [ - 'WorkspaceProviderAuthorization', - 'Sku', - 'Workspace', - 'TrackedResource', - 'Resource', - 'WorkspaceUpdate', + 'CreatedBy', + 'Encryption', + 'EncryptionEntitiesDefinition', + 'EncryptionV2', + 'EncryptionV2KeyVaultProperties', 'ErrorDetail', 'ErrorInfo', 'ErrorResponse', 'ErrorResponseException', - 'OperationDisplay', + 'ManagedIdentityConfiguration', 'Operation', + 'OperationDisplay', + 'Resource', + 'Sku', + 'SystemData', + 'TrackedResource', + 'Workspace', + 'WorkspaceCustomBooleanParameter', + 'WorkspaceCustomObjectParameter', + 'WorkspaceCustomParameters', + 'WorkspaceCustomStringParameter', + 'WorkspaceEncryptionParameter', + 'WorkspacePropertiesEncryption', + 'WorkspaceProviderAuthorization', + 'WorkspaceUpdate', 'WorkspacePaged', 'OperationPaged', + 'CustomParameterType', + 'KeySource', 'ProvisioningState', + 'CreatedByType', + 'PeeringProvisioningState', ] 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 61% 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..50570b4e97ed 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,19 @@ class ProvisioningState(str, Enum): failed = "Failed" succeeded = "Succeeded" updating = "Updating" + + +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class PeeringProvisioningState(str, Enum): + + succeeded = "Succeeded" + updating = "Updating" + deleting = "Deleting" + failed = "Failed" 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..e981d52d4cfa --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models.py @@ -0,0 +1,896 @@ +# 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 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 EncryptionEntitiesDefinition(Model): + """Encryption entities for databricks workspace resource. + + :param managed_services: Encryption properties for the databricks managed + services. + :type managed_services: ~azure.mgmt.databricks.models.EncryptionV2 + """ + + _attribute_map = { + 'managed_services': {'key': 'managedServices', 'type': 'EncryptionV2'}, + } + + def __init__(self, **kwargs): + super(EncryptionEntitiesDefinition, self).__init__(**kwargs) + self.managed_services = kwargs.get('managed_services', None) + + +class EncryptionV2(Model): + """The object that contains details of encryption used on the 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 key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Keyvault. Default value: + "Microsoft.Keyvault" . + :vartype key_source: str + :param key_vault_properties: Key Vault input properties for encryption. + :type key_vault_properties: + ~azure.mgmt.databricks.models.EncryptionV2KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionV2KeyVaultProperties'}, + } + + key_source = "Microsoft.Keyvault" + + def __init__(self, **kwargs): + super(EncryptionV2, self).__init__(**kwargs) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +class EncryptionV2KeyVaultProperties(Model): + """Key Vault input properties for encryption. + + All required parameters must be populated in order to send to Azure. + + :param key_vault_uri: Required. The Uri of KeyVault. + :type key_vault_uri: str + :param key_name: Required. The name of KeyVault key. + :type key_name: str + :param key_version: Required. The version of KeyVault key. + :type key_version: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionV2KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', 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 SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databricks.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databricks.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', 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 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 encryption: Encryption properties for databricks workspace + :type encryption: + ~azure.mgmt.databricks.models.WorkspacePropertiesEncryption + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.databricks.models.Sku + :ivar system_data: The system metadata relating to this resource + :vartype system_data: ~azure.mgmt.databricks.models.SystemData + """ + + _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}, + 'system_data': {'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'}, + 'encryption': {'key': 'properties.encryption', 'type': 'WorkspacePropertiesEncryption'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + 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.encryption = kwargs.get('encryption', None) + self.sku = kwargs.get('sku', None) + self.system_data = 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 WorkspacePropertiesEncryption(Model): + """Encryption properties for databricks workspace. + + All required parameters must be populated in order to send to Azure. + + :param entities: Required. Encryption entities definition for the + workspace. + :type entities: ~azure.mgmt.databricks.models.EncryptionEntitiesDefinition + """ + + _validation = { + 'entities': {'required': True}, + } + + _attribute_map = { + 'entities': {'key': 'entities', 'type': 'EncryptionEntitiesDefinition'}, + } + + def __init__(self, **kwargs): + super(WorkspacePropertiesEncryption, self).__init__(**kwargs) + self.entities = kwargs.get('entities', 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..2a9a7841c9e6 --- /dev/null +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_models_py3.py @@ -0,0 +1,896 @@ +# 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 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 EncryptionEntitiesDefinition(Model): + """Encryption entities for databricks workspace resource. + + :param managed_services: Encryption properties for the databricks managed + services. + :type managed_services: ~azure.mgmt.databricks.models.EncryptionV2 + """ + + _attribute_map = { + 'managed_services': {'key': 'managedServices', 'type': 'EncryptionV2'}, + } + + def __init__(self, *, managed_services=None, **kwargs) -> None: + super(EncryptionEntitiesDefinition, self).__init__(**kwargs) + self.managed_services = managed_services + + +class EncryptionV2(Model): + """The object that contains details of encryption used on the 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 key_source: Required. The encryption keySource (provider). Possible + values (case-insensitive): Microsoft.Keyvault. Default value: + "Microsoft.Keyvault" . + :vartype key_source: str + :param key_vault_properties: Key Vault input properties for encryption. + :type key_vault_properties: + ~azure.mgmt.databricks.models.EncryptionV2KeyVaultProperties + """ + + _validation = { + 'key_source': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionV2KeyVaultProperties'}, + } + + key_source = "Microsoft.Keyvault" + + def __init__(self, *, key_vault_properties=None, **kwargs) -> None: + super(EncryptionV2, self).__init__(**kwargs) + self.key_vault_properties = key_vault_properties + + +class EncryptionV2KeyVaultProperties(Model): + """Key Vault input properties for encryption. + + All required parameters must be populated in order to send to Azure. + + :param key_vault_uri: Required. The Uri of KeyVault. + :type key_vault_uri: str + :param key_name: Required. The name of KeyVault key. + :type key_name: str + :param key_version: Required. The version of KeyVault key. + :type key_version: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, key_vault_uri: str, key_name: str, key_version: str, **kwargs) -> None: + super(EncryptionV2KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_uri = key_vault_uri + self.key_name = key_name + self.key_version = key_version + + +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 SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.databricks.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.databricks.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +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 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 encryption: Encryption properties for databricks workspace + :type encryption: + ~azure.mgmt.databricks.models.WorkspacePropertiesEncryption + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.databricks.models.Sku + :ivar system_data: The system metadata relating to this resource + :vartype system_data: ~azure.mgmt.databricks.models.SystemData + """ + + _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}, + 'system_data': {'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'}, + 'encryption': {'key': 'properties.encryption', 'type': 'WorkspacePropertiesEncryption'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + 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, encryption=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.encryption = encryption + self.sku = sku + self.system_data = 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, *, 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 WorkspacePropertiesEncryption(Model): + """Encryption properties for databricks workspace. + + All required parameters must be populated in order to send to Azure. + + :param entities: Required. Encryption entities definition for the + workspace. + :type entities: ~azure.mgmt.databricks.models.EncryptionEntitiesDefinition + """ + + _validation = { + 'entities': {'required': True}, + } + + _attribute_map = { + 'entities': {'key': 'entities', 'type': 'EncryptionEntitiesDefinition'}, + } + + def __init__(self, *, entities, **kwargs) -> None: + super(WorkspacePropertiesEncryption, self).__init__(**kwargs) + self.entities = entities + + +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/workspace_paged.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py similarity index 68% rename from sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_paged.py rename to sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py index d514b8bd185a..ff6aad268a73 100644 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/workspace_paged.py +++ b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/_paged_models.py @@ -25,3 +25,16 @@ class WorkspacePaged(Paged): def __init__(self, *args, **kwargs): super(WorkspacePaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) 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_paged.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_paged.py deleted file mode 100644 index ec9d387e271b..000000000000 --- a/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/models/operation_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 OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) 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_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..a5ed1a00f406 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,8 +9,8 @@ # regenerated. # -------------------------------------------------------------------------- -from .workspaces_operations import WorkspacesOperations -from .operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._operations import Operations __all__ = [ 'WorkspacesOperations', 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 88% 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..fd1a5d7d5576 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,11 +18,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-04-01-preview". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-01" + self.api_version = "2021-04-01-preview" self.config = config @@ -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/workspaces_operations.py b/sdk/databricks/azure-mgmt-databricks/azure/mgmt/databricks/operations/_workspaces_operations.py similarity index 96% 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..8f644e24fad7 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,11 +20,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2018-04-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-04-01-preview". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-04-01" + self.api_version = "2021-04-01-preview" self.config = config @@ -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'}