From ee6768f0e9bc9021a3452407851330adbd485977 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 10 Dec 2021 02:54:34 +0000 Subject: [PATCH] CodeGen from PR 17000 in Azure/azure-rest-api-specs [Go] Track2 modify readme.go.md 9 (#17000) * [Go] Track2 modify readme.go.md 9 * fix --- .../MANIFEST.in | 1 + .../_meta.json | 8 + .../_azure_machine_learning_workspaces.py | 42 +- .../machinelearningservices/_configuration.py | 2 +- .../models/__init__.py | 303 +- ...azure_machine_learning_workspaces_enums.py | 200 +- .../machinelearningservices/models/_models.py | 3892 +++++++++++++--- .../models/_models_py3.py | 3976 ++++++++++++++--- .../models/_paged_models.py | 78 + .../operations/__init__.py | 16 +- ...e_operations.py => _compute_operations.py} | 446 +- .../operations/_operations.py | 10 +- ...private_endpoint_connections_operations.py | 311 ++ .../_private_link_resources_operations.py | 105 + .../operations/_quotas_operations.py | 176 + .../operations/_usages_operations.py | 8 +- .../_virtual_machine_sizes_operations.py | 8 +- .../_workspace_connections_operations.py | 311 ++ .../_workspace_features_operations.py | 111 + .../operations/_workspace_skus_operations.py | 104 + .../operations/_workspaces_operations.py | 778 +++- 21 files changed, 9401 insertions(+), 1485 deletions(-) create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json rename sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/{_machine_learning_compute_operations.py => _compute_operations.py} (59%) create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in b/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json new file mode 100644 index 0000000000000..cc78b3145ed75 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "2ab4371edba33c23e8d680ed2bf6f98705b5cadb", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/machinelearningservices/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/machinelearningservices/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py index e0a0e2c4d8340..32f417dee335b 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py @@ -17,7 +17,13 @@ from .operations import WorkspacesOperations from .operations import UsagesOperations from .operations import VirtualMachineSizesOperations -from .operations import MachineLearningComputeOperations +from .operations import QuotasOperations +from .operations import ComputeOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import WorkspaceConnectionsOperations +from .operations import WorkspaceFeaturesOperations +from .operations import WorkspaceSkusOperations from . import models @@ -35,13 +41,25 @@ class AzureMachineLearningWorkspaces(SDKClient): :vartype usages: azure.mgmt.machinelearningservices.operations.UsagesOperations :ivar virtual_machine_sizes: VirtualMachineSizes operations :vartype virtual_machine_sizes: azure.mgmt.machinelearningservices.operations.VirtualMachineSizesOperations - :ivar machine_learning_compute: MachineLearningCompute operations - :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations + :ivar quotas: Quotas operations + :vartype quotas: azure.mgmt.machinelearningservices.operations.QuotasOperations + :ivar compute: Compute operations + :vartype compute: azure.mgmt.machinelearningservices.operations.ComputeOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.machinelearningservices.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.machinelearningservices.operations.PrivateLinkResourcesOperations + :ivar workspace_connections: WorkspaceConnections operations + :vartype workspace_connections: azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations + :ivar workspace_features: WorkspaceFeatures operations + :vartype workspace_features: azure.mgmt.machinelearningservices.operations.WorkspaceFeaturesOperations + :ivar workspace_skus: WorkspaceSkus operations + :vartype workspace_skus: azure.mgmt.machinelearningservices.operations.WorkspaceSkusOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Azure subscription identifier. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -53,7 +71,7 @@ def __init__( super(AzureMachineLearningWorkspaces, 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 = '2019-05-01' + self.api_version = '2021-07-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -65,5 +83,17 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.virtual_machine_sizes = VirtualMachineSizesOperations( self._client, self.config, self._serialize, self._deserialize) - self.machine_learning_compute = MachineLearningComputeOperations( + self.quotas = QuotasOperations( + self._client, self.config, self._serialize, self._deserialize) + self.compute = ComputeOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_connections = WorkspaceConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_features = WorkspaceFeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_skus = WorkspaceSkusOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py index 06a054e13cdb3..06a3bc95b65d7 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py @@ -21,7 +21,7 @@ class AzureMachineLearningWorkspacesConfiguration(AzureConfiguration): :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials object` - :param subscription_id: Azure subscription identifier. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py index 2a709812fa94d..750dab070a103 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/__init__.py @@ -12,173 +12,444 @@ try: from ._models_py3 import AKS from ._models_py3 import AksComputeSecrets + from ._models_py3 import AksComputeSecretsProperties from ._models_py3 import AksNetworkingConfiguration from ._models_py3 import AKSProperties from ._models_py3 import AmlCompute from ._models_py3 import AmlComputeNodeInformation - from ._models_py3 import AmlComputeNodesInformation from ._models_py3 import AmlComputeProperties + from ._models_py3 import AmlUserFeature + from ._models_py3 import AssignedUser + from ._models_py3 import AutoPauseProperties + from ._models_py3 import AutoScaleProperties + from ._models_py3 import AzureEntityResource from ._models_py3 import ClusterUpdateParameters from ._models_py3 import Compute - from ._models_py3 import ComputeNodesInformation + from ._models_py3 import ComputeInstance + from ._models_py3 import ComputeInstanceApplication + from ._models_py3 import ComputeInstanceConnectivityEndpoints + from ._models_py3 import ComputeInstanceCreatedBy + from ._models_py3 import ComputeInstanceLastOperation + from ._models_py3 import ComputeInstanceProperties + from ._models_py3 import ComputeInstanceSshSettings from ._models_py3 import ComputeResource from ._models_py3 import ComputeSecrets + from ._models_py3 import ContainerResourceRequirements + from ._models_py3 import CosmosDbSettings from ._models_py3 import Databricks from ._models_py3 import DatabricksComputeSecrets + from ._models_py3 import DatabricksComputeSecretsProperties from ._models_py3 import DatabricksProperties from ._models_py3 import DataFactory from ._models_py3 import DataLakeAnalytics from ._models_py3 import DataLakeAnalyticsProperties + from ._models_py3 import DiagnoseRequestProperties + from ._models_py3 import DiagnoseResponseResult + from ._models_py3 import DiagnoseResponseResultValue + from ._models_py3 import DiagnoseResult + from ._models_py3 import DiagnoseWorkspaceParameters + from ._models_py3 import EncryptionProperty + from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import EstimatedVMPrice + from ._models_py3 import EstimatedVMPrices + from ._models_py3 import ExternalFQDNResponse + from ._models_py3 import FQDNEndpoint + from ._models_py3 import FQDNEndpointDetail + from ._models_py3 import FQDNEndpoints + from ._models_py3 import FQDNEndpointsProperties from ._models_py3 import HDInsight from ._models_py3 import HDInsightProperties from ._models_py3 import Identity + from ._models_py3 import IdentityForCmk + from ._models_py3 import InstanceTypeSchema + from ._models_py3 import InstanceTypeSchemaResources + from ._models_py3 import KeyVaultProperties + from ._models_py3 import Kubernetes + from ._models_py3 import KubernetesProperties + from ._models_py3 import KubernetesSchema + from ._models_py3 import ListNotebookKeysResult + from ._models_py3 import ListStorageAccountKeysResult from ._models_py3 import ListWorkspaceKeysResult - from ._models_py3 import MachineLearningServiceError, MachineLearningServiceErrorException from ._models_py3 import NodeStateCounts + from ._models_py3 import NotebookAccessTokenResult + from ._models_py3 import NotebookPreparationError + from ._models_py3 import NotebookResourceInfo from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import Password + from ._models_py3 import PersonalComputeInstanceSettings + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource + from ._models_py3 import QuotaBaseProperties + from ._models_py3 import QuotaUpdateParameters from ._models_py3 import RegistryListCredentialsResult from ._models_py3 import Resource from ._models_py3 import ResourceId + from ._models_py3 import ResourceName + from ._models_py3 import ResourceQuota + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuZoneDetails + from ._models_py3 import Restriction from ._models_py3 import ScaleSettings + from ._models_py3 import ScaleSettingsInformation + from ._models_py3 import ScriptReference + from ._models_py3 import ScriptsToExecute + from ._models_py3 import ServiceManagedResourcesSettings from ._models_py3 import ServicePrincipalCredentials + from ._models_py3 import SetupScripts + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import Sku + from ._models_py3 import SKUCapability from ._models_py3 import SslConfiguration + from ._models_py3 import SynapseSpark + from ._models_py3 import SynapseSparkProperties + from ._models_py3 import SystemData from ._models_py3 import SystemService + from ._models_py3 import TrackedResource + from ._models_py3 import UpdateWorkspaceQuotas + from ._models_py3 import UpdateWorkspaceQuotasResult from ._models_py3 import Usage from ._models_py3 import UsageName from ._models_py3 import UserAccountCredentials + from ._models_py3 import UserAssignedIdentity from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineImage from ._models_py3 import VirtualMachineProperties from ._models_py3 import VirtualMachineSecrets from ._models_py3 import VirtualMachineSize from ._models_py3 import VirtualMachineSizeListResult from ._models_py3 import VirtualMachineSshCredentials from ._models_py3 import Workspace + from ._models_py3 import WorkspaceConnection + from ._models_py3 import WorkspaceSku from ._models_py3 import WorkspaceUpdateParameters except (SyntaxError, ImportError): from ._models import AKS from ._models import AksComputeSecrets + from ._models import AksComputeSecretsProperties from ._models import AksNetworkingConfiguration from ._models import AKSProperties from ._models import AmlCompute from ._models import AmlComputeNodeInformation - from ._models import AmlComputeNodesInformation from ._models import AmlComputeProperties + from ._models import AmlUserFeature + from ._models import AssignedUser + from ._models import AutoPauseProperties + from ._models import AutoScaleProperties + from ._models import AzureEntityResource from ._models import ClusterUpdateParameters from ._models import Compute - from ._models import ComputeNodesInformation + from ._models import ComputeInstance + from ._models import ComputeInstanceApplication + from ._models import ComputeInstanceConnectivityEndpoints + from ._models import ComputeInstanceCreatedBy + from ._models import ComputeInstanceLastOperation + from ._models import ComputeInstanceProperties + from ._models import ComputeInstanceSshSettings from ._models import ComputeResource from ._models import ComputeSecrets + from ._models import ContainerResourceRequirements + from ._models import CosmosDbSettings from ._models import Databricks from ._models import DatabricksComputeSecrets + from ._models import DatabricksComputeSecretsProperties from ._models import DatabricksProperties from ._models import DataFactory from ._models import DataLakeAnalytics from ._models import DataLakeAnalyticsProperties + from ._models import DiagnoseRequestProperties + from ._models import DiagnoseResponseResult + from ._models import DiagnoseResponseResultValue + from ._models import DiagnoseResult + from ._models import DiagnoseWorkspaceParameters + from ._models import EncryptionProperty + from ._models import ErrorAdditionalInfo from ._models import ErrorDetail - from ._models import ErrorResponse + from ._models import ErrorResponse, ErrorResponseException + from ._models import EstimatedVMPrice + from ._models import EstimatedVMPrices + from ._models import ExternalFQDNResponse + from ._models import FQDNEndpoint + from ._models import FQDNEndpointDetail + from ._models import FQDNEndpoints + from ._models import FQDNEndpointsProperties from ._models import HDInsight from ._models import HDInsightProperties from ._models import Identity + from ._models import IdentityForCmk + from ._models import InstanceTypeSchema + from ._models import InstanceTypeSchemaResources + from ._models import KeyVaultProperties + from ._models import Kubernetes + from ._models import KubernetesProperties + from ._models import KubernetesSchema + from ._models import ListNotebookKeysResult + from ._models import ListStorageAccountKeysResult from ._models import ListWorkspaceKeysResult - from ._models import MachineLearningServiceError, MachineLearningServiceErrorException from ._models import NodeStateCounts + from ._models import NotebookAccessTokenResult + from ._models import NotebookPreparationError + from ._models import NotebookResourceInfo from ._models import Operation from ._models import OperationDisplay from ._models import Password + from ._models import PersonalComputeInstanceSettings + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState + from ._models import ProxyResource + from ._models import QuotaBaseProperties + from ._models import QuotaUpdateParameters from ._models import RegistryListCredentialsResult from ._models import Resource from ._models import ResourceId + from ._models import ResourceName + from ._models import ResourceQuota + from ._models import ResourceSkuLocationInfo + from ._models import ResourceSkuZoneDetails + from ._models import Restriction from ._models import ScaleSettings + from ._models import ScaleSettingsInformation + from ._models import ScriptReference + from ._models import ScriptsToExecute + from ._models import ServiceManagedResourcesSettings from ._models import ServicePrincipalCredentials + from ._models import SetupScripts + from ._models import SharedPrivateLinkResource + from ._models import Sku + from ._models import SKUCapability from ._models import SslConfiguration + from ._models import SynapseSpark + from ._models import SynapseSparkProperties + from ._models import SystemData from ._models import SystemService + from ._models import TrackedResource + from ._models import UpdateWorkspaceQuotas + from ._models import UpdateWorkspaceQuotasResult from ._models import Usage from ._models import UsageName from ._models import UserAccountCredentials + from ._models import UserAssignedIdentity from ._models import VirtualMachine + from ._models import VirtualMachineImage from ._models import VirtualMachineProperties from ._models import VirtualMachineSecrets from ._models import VirtualMachineSize from ._models import VirtualMachineSizeListResult from ._models import VirtualMachineSshCredentials from ._models import Workspace + from ._models import WorkspaceConnection + from ._models import WorkspaceSku from ._models import WorkspaceUpdateParameters +from ._paged_models import AmlComputeNodeInformationPaged +from ._paged_models import AmlUserFeaturePaged from ._paged_models import ComputeResourcePaged from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged +from ._paged_models import ResourceQuotaPaged from ._paged_models import UsagePaged +from ._paged_models import WorkspaceConnectionPaged from ._paged_models import WorkspacePaged +from ._paged_models import WorkspaceSkuPaged from ._azure_machine_learning_workspaces_enums import ( ProvisioningState, - UsageUnit, + EncryptionStatus, + PublicNetworkAccess, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, ResourceIdentityType, + CreatedByType, + UsageUnit, + VMPriceOSType, + VMTier, + QuotaUnit, + DiagnoseResultLevel, + Status, + ClusterPurpose, + LoadBalancerType, + ComputeType, + OsType, VmPriority, + RemoteLoginPortPublicAccess, AllocationState, - ComputeType, + ApplicationSharingPolicy, + SshPublicAccess, + ComputeInstanceState, + ComputeInstanceAuthorizationType, + OperationName, + OperationStatus, + NodeState, + ValueFormat, + ReasonCode, UnderlyingResourceAction, ) __all__ = [ 'AKS', 'AksComputeSecrets', + 'AksComputeSecretsProperties', 'AksNetworkingConfiguration', 'AKSProperties', 'AmlCompute', 'AmlComputeNodeInformation', - 'AmlComputeNodesInformation', 'AmlComputeProperties', + 'AmlUserFeature', + 'AssignedUser', + 'AutoPauseProperties', + 'AutoScaleProperties', + 'AzureEntityResource', 'ClusterUpdateParameters', 'Compute', - 'ComputeNodesInformation', + 'ComputeInstance', + 'ComputeInstanceApplication', + 'ComputeInstanceConnectivityEndpoints', + 'ComputeInstanceCreatedBy', + 'ComputeInstanceLastOperation', + 'ComputeInstanceProperties', + 'ComputeInstanceSshSettings', 'ComputeResource', 'ComputeSecrets', + 'ContainerResourceRequirements', + 'CosmosDbSettings', 'Databricks', 'DatabricksComputeSecrets', + 'DatabricksComputeSecretsProperties', 'DatabricksProperties', 'DataFactory', 'DataLakeAnalytics', 'DataLakeAnalyticsProperties', + 'DiagnoseRequestProperties', + 'DiagnoseResponseResult', + 'DiagnoseResponseResultValue', + 'DiagnoseResult', + 'DiagnoseWorkspaceParameters', + 'EncryptionProperty', + 'ErrorAdditionalInfo', 'ErrorDetail', - 'ErrorResponse', + 'ErrorResponse', 'ErrorResponseException', + 'EstimatedVMPrice', + 'EstimatedVMPrices', + 'ExternalFQDNResponse', + 'FQDNEndpoint', + 'FQDNEndpointDetail', + 'FQDNEndpoints', + 'FQDNEndpointsProperties', 'HDInsight', 'HDInsightProperties', 'Identity', + 'IdentityForCmk', + 'InstanceTypeSchema', + 'InstanceTypeSchemaResources', + 'KeyVaultProperties', + 'Kubernetes', + 'KubernetesProperties', + 'KubernetesSchema', + 'ListNotebookKeysResult', + 'ListStorageAccountKeysResult', 'ListWorkspaceKeysResult', - 'MachineLearningServiceError', 'MachineLearningServiceErrorException', 'NodeStateCounts', + 'NotebookAccessTokenResult', + 'NotebookPreparationError', + 'NotebookResourceInfo', 'Operation', 'OperationDisplay', 'Password', + 'PersonalComputeInstanceSettings', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'ProxyResource', + 'QuotaBaseProperties', + 'QuotaUpdateParameters', 'RegistryListCredentialsResult', 'Resource', 'ResourceId', + 'ResourceName', + 'ResourceQuota', + 'ResourceSkuLocationInfo', + 'ResourceSkuZoneDetails', + 'Restriction', 'ScaleSettings', + 'ScaleSettingsInformation', + 'ScriptReference', + 'ScriptsToExecute', + 'ServiceManagedResourcesSettings', 'ServicePrincipalCredentials', + 'SetupScripts', + 'SharedPrivateLinkResource', + 'Sku', + 'SKUCapability', 'SslConfiguration', + 'SynapseSpark', + 'SynapseSparkProperties', + 'SystemData', 'SystemService', + 'TrackedResource', + 'UpdateWorkspaceQuotas', + 'UpdateWorkspaceQuotasResult', 'Usage', 'UsageName', 'UserAccountCredentials', + 'UserAssignedIdentity', 'VirtualMachine', + 'VirtualMachineImage', 'VirtualMachineProperties', 'VirtualMachineSecrets', 'VirtualMachineSize', 'VirtualMachineSizeListResult', 'VirtualMachineSshCredentials', 'Workspace', + 'WorkspaceConnection', + 'WorkspaceSku', 'WorkspaceUpdateParameters', 'OperationPaged', 'WorkspacePaged', 'UsagePaged', + 'ResourceQuotaPaged', 'ComputeResourcePaged', + 'AmlComputeNodeInformationPaged', + 'PrivateEndpointConnectionPaged', + 'WorkspaceConnectionPaged', + 'AmlUserFeaturePaged', + 'WorkspaceSkuPaged', 'ProvisioningState', - 'UsageUnit', + 'EncryptionStatus', + 'PublicNetworkAccess', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', 'ResourceIdentityType', + 'CreatedByType', + 'UsageUnit', + 'VMPriceOSType', + 'VMTier', + 'QuotaUnit', + 'DiagnoseResultLevel', + 'Status', + 'ClusterPurpose', + 'LoadBalancerType', + 'ComputeType', + 'OsType', 'VmPriority', + 'RemoteLoginPortPublicAccess', 'AllocationState', - 'ComputeType', + 'ApplicationSharingPolicy', + 'SshPublicAccess', + 'ComputeInstanceState', + 'ComputeInstanceAuthorizationType', + 'OperationName', + 'OperationStatus', + 'NodeState', + 'ValueFormat', + 'ReasonCode', 'UnderlyingResourceAction', ] diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py index 0e95e8e3d7ffb..a7d056cabf9fd 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py @@ -23,37 +23,223 @@ class ProvisioningState(str, Enum): canceled = "Canceled" -class UsageUnit(str, Enum): +class EncryptionStatus(str, Enum): - count = "Count" + enabled = "Enabled" + disabled = "Disabled" + + +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class PrivateEndpointServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + timeout = "Timeout" + + +class PrivateEndpointConnectionProvisioningState(str, Enum): + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" class ResourceIdentityType(str, Enum): system_assigned = "SystemAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" + user_assigned = "UserAssigned" + none = "None" -class VmPriority(str, Enum): +class CreatedByType(str, Enum): - dedicated = "Dedicated" + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class UsageUnit(str, Enum): + + count = "Count" + + +class VMPriceOSType(str, Enum): + + linux = "Linux" + windows = "Windows" + + +class VMTier(str, Enum): + + standard = "Standard" low_priority = "LowPriority" + spot = "Spot" -class AllocationState(str, Enum): +class QuotaUnit(str, Enum): + + count = "Count" + + +class DiagnoseResultLevel(str, Enum): + + warning = "Warning" + error = "Error" + information = "Information" - steady = "Steady" - resizing = "Resizing" + +class Status(str, Enum): + + undefined = "Undefined" + success = "Success" + failure = "Failure" + invalid_quota_below_cluster_minimum = "InvalidQuotaBelowClusterMinimum" + invalid_quota_exceeds_subscription_limit = "InvalidQuotaExceedsSubscriptionLimit" + invalid_vm_family_name = "InvalidVMFamilyName" + operation_not_supported_for_sku = "OperationNotSupportedForSku" + operation_not_enabled_for_region = "OperationNotEnabledForRegion" + + +class ClusterPurpose(str, Enum): + + fast_prod = "FastProd" + dense_prod = "DenseProd" + dev_test = "DevTest" + + +class LoadBalancerType(str, Enum): + + public_ip = "PublicIp" + internal_load_balancer = "InternalLoadBalancer" class ComputeType(str, Enum): aks = "AKS" + kubernetes = "Kubernetes" aml_compute = "AmlCompute" + compute_instance = "ComputeInstance" data_factory = "DataFactory" virtual_machine = "VirtualMachine" hd_insight = "HDInsight" databricks = "Databricks" data_lake_analytics = "DataLakeAnalytics" + synapse_spark = "SynapseSpark" + + +class OsType(str, Enum): + + linux = "Linux" + windows = "Windows" + + +class VmPriority(str, Enum): + + dedicated = "Dedicated" + low_priority = "LowPriority" + + +class RemoteLoginPortPublicAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + not_specified = "NotSpecified" + + +class AllocationState(str, Enum): + + steady = "Steady" + resizing = "Resizing" + + +class ApplicationSharingPolicy(str, Enum): + + personal = "Personal" + shared = "Shared" + + +class SshPublicAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ComputeInstanceState(str, Enum): + + creating = "Creating" + create_failed = "CreateFailed" + deleting = "Deleting" + running = "Running" + restarting = "Restarting" + job_running = "JobRunning" + setting_up = "SettingUp" + setup_failed = "SetupFailed" + starting = "Starting" + stopped = "Stopped" + stopping = "Stopping" + user_setting_up = "UserSettingUp" + user_setup_failed = "UserSetupFailed" + unknown = "Unknown" + unusable = "Unusable" + + +class ComputeInstanceAuthorizationType(str, Enum): + + personal = "personal" + + +class OperationName(str, Enum): + + create = "Create" + start = "Start" + stop = "Stop" + restart = "Restart" + reimage = "Reimage" + delete = "Delete" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + succeeded = "Succeeded" + create_failed = "CreateFailed" + start_failed = "StartFailed" + stop_failed = "StopFailed" + restart_failed = "RestartFailed" + reimage_failed = "ReimageFailed" + delete_failed = "DeleteFailed" + + +class NodeState(str, Enum): + + idle = "idle" + running = "running" + preparing = "preparing" + unusable = "unusable" + leaving = "leaving" + preempted = "preempted" + + +class ValueFormat(str, Enum): + + json = "JSON" + + +class ReasonCode(str, Enum): + + not_specified = "NotSpecified" + not_available_for_region = "NotAvailableForRegion" + not_available_for_subscription = "NotAvailableForSubscription" class UnderlyingResourceAction(str, Enum): diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py index 8ded2b35dd56e..cdddb91359e97 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py @@ -17,8 +17,8 @@ class Compute(Model): """Machine Learning compute object. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AKS, AmlCompute, VirtualMachine, HDInsight, DataFactory, - Databricks, DataLakeAnalytics + sub-classes are: AKS, AmlCompute, ComputeInstance, VirtualMachine, + HDInsight, DataFactory, Databricks, DataLakeAnalytics, SynapseSpark Variables are only populated by the server, and will be ignored when sending a request. @@ -35,19 +35,22 @@ class Compute(Model): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str """ @@ -68,13 +71,14 @@ class Compute(Model): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics', 'SynapseSpark': 'SynapseSpark'} } def __init__(self, **kwargs): @@ -87,6 +91,7 @@ def __init__(self, **kwargs): self.resource_id = kwargs.get('resource_id', None) self.provisioning_errors = None self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) self.compute_type = None @@ -108,19 +113,22 @@ class AKS(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: AKS properties @@ -143,8 +151,9 @@ class AKS(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AKSProperties'}, } @@ -155,18 +164,25 @@ def __init__(self, **kwargs): self.compute_type = 'AKS' -class ComputeSecrets(Model): - """Secrets related to a Machine Learning compute. Might differ for every type - of compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AksComputeSecrets, VirtualMachineSecrets, - DatabricksComputeSecrets +class AksComputeSecrets(Model): + """Secrets related to a Machine Learning compute based on AKS. All required parameters must be populated in order to send to Azure. - :param compute_type: Required. Constant filled by server. - :type compute_type: str + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param user_kube_config: Content of kubeconfig file that can be used to + connect to the Kubernetes cluster. + :type user_kube_config: str + :param admin_kube_config: Content of kubeconfig file that can be used to + connect to the Kubernetes cluster. + :type admin_kube_config: str + :param image_pull_secret_name: Image registry pull secret. + :type image_pull_secret_name: str """ _validation = { @@ -175,24 +191,22 @@ class ComputeSecrets(Model): _attribute_map = { 'compute_type': {'key': 'computeType', 'type': 'str'}, - } - - _subtype_map = { - 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets', 'Databricks': 'DatabricksComputeSecrets'} + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, } def __init__(self, **kwargs): - super(ComputeSecrets, self).__init__(**kwargs) - self.compute_type = None - + super(AksComputeSecrets, self).__init__(**kwargs) + self.compute_type = kwargs.get('compute_type', None) + self.user_kube_config = kwargs.get('user_kube_config', None) + self.admin_kube_config = kwargs.get('admin_kube_config', None) + self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) -class AksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on AKS. - All required parameters must be populated in order to send to Azure. +class AksComputeSecretsProperties(Model): + """Properties of AksComputeSecrets. - :param compute_type: Required. Constant filled by server. - :type compute_type: str :param user_kube_config: Content of kubeconfig file that can be used to connect to the Kubernetes cluster. :type user_kube_config: str @@ -203,23 +217,17 @@ class AksComputeSecrets(ComputeSecrets): :type image_pull_secret_name: str """ - _validation = { - 'compute_type': {'required': True}, - } - _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, } def __init__(self, **kwargs): - super(AksComputeSecrets, self).__init__(**kwargs) + super(AksComputeSecretsProperties, self).__init__(**kwargs) self.user_kube_config = kwargs.get('user_kube_config', None) self.admin_kube_config = kwargs.get('admin_kube_config', None) self.image_pull_secret_name = kwargs.get('image_pull_secret_name', None) - self.compute_type = 'AKS' class AksNetworkingConfiguration(Model): @@ -277,26 +285,39 @@ class AKSProperties(Model): :type agent_count: int :param agent_vm_size: Agent virtual machine size :type agent_vm_size: str + :param cluster_purpose: Intended usage of the cluster. Possible values + include: 'FastProd', 'DenseProd', 'DevTest'. Default value: "FastProd" . + :type cluster_purpose: str or + ~azure.mgmt.machinelearningservices.models.ClusterPurpose :param ssl_configuration: SSL configuration :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration :param aks_networking_configuration: AKS networking configuration for vnet :type aks_networking_configuration: ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :param load_balancer_type: Load Balancer Type. Possible values include: + 'PublicIp', 'InternalLoadBalancer'. Default value: "PublicIp" . + :type load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :param load_balancer_subnet: Load Balancer Subnet + :type load_balancer_subnet: str """ _validation = { 'system_services': {'readonly': True}, - 'agent_count': {'minimum': 1}, + 'agent_count': {'minimum': 0}, } _attribute_map = { 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, 'agent_count': {'key': 'agentCount', 'type': 'int'}, - 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, } def __init__(self, **kwargs): @@ -305,8 +326,11 @@ def __init__(self, **kwargs): self.system_services = None self.agent_count = kwargs.get('agent_count', None) self.agent_vm_size = kwargs.get('agent_vm_size', None) + self.cluster_purpose = kwargs.get('cluster_purpose', "FastProd") self.ssl_configuration = kwargs.get('ssl_configuration', None) self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None) + self.load_balancer_type = kwargs.get('load_balancer_type', "PublicIp") + self.load_balancer_subnet = kwargs.get('load_balancer_subnet', None) class AmlCompute(Compute): @@ -327,22 +351,25 @@ class AmlCompute(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: AML Compute properties + :param properties: Properties of AmlCompute :type properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties """ @@ -363,8 +390,9 @@ class AmlCompute(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, } @@ -383,102 +411,50 @@ class AmlComputeNodeInformation(Model): :ivar node_id: Node ID. ID of the compute node. :vartype node_id: str - :ivar ip_address: IP address. Public IP address of the compute node. - :vartype ip_address: str + :ivar private_ip_address: Private IP address. Private IP address of the + compute node. + :vartype private_ip_address: str + :ivar public_ip_address: Public IP address. Public IP address of the + compute node. + :vartype public_ip_address: str :ivar port: Port. SSH port number of the node. :vartype port: float + :ivar node_state: State of the compute node. Values are idle, running, + preparing, unusable, leaving and preempted. Possible values include: + 'idle', 'running', 'preparing', 'unusable', 'leaving', 'preempted' + :vartype node_state: str or + ~azure.mgmt.machinelearningservices.models.NodeState + :ivar run_id: Run ID. ID of the Experiment running on the node, if any + else null. + :vartype run_id: str """ _validation = { 'node_id': {'readonly': True}, - 'ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'public_ip_address': {'readonly': True}, 'port': {'readonly': True}, + 'node_state': {'readonly': True}, + 'run_id': {'readonly': True}, } _attribute_map = { 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, 'port': {'key': 'port', 'type': 'float'}, + 'node_state': {'key': 'nodeState', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, } def __init__(self, **kwargs): super(AmlComputeNodeInformation, self).__init__(**kwargs) self.node_id = None - self.ip_address = None + self.private_ip_address = None + self.public_ip_address = None self.port = None - - -class ComputeNodesInformation(Model): - """Compute nodes information related to a Machine Learning compute. Might - differ for every type of compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmlComputeNodesInformation - - 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 next_link: The continuation token. - :vartype next_link: str - :param compute_type: Required. Constant filled by server. - :type compute_type: str - """ - - _validation = { - 'next_link': {'readonly': True}, - 'compute_type': {'required': True}, - } - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - } - - _subtype_map = { - 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} - } - - def __init__(self, **kwargs): - super(ComputeNodesInformation, self).__init__(**kwargs) - self.next_link = None - self.compute_type = None - - -class AmlComputeNodesInformation(ComputeNodesInformation): - """Compute node information related to a AmlCompute. - - 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 next_link: The continuation token. - :vartype next_link: str - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :ivar nodes: The collection of returned AmlCompute nodes details. - :vartype nodes: - list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] - """ - - _validation = { - 'next_link': {'readonly': True}, - 'compute_type': {'required': True}, - 'nodes': {'readonly': True}, - } - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, - } - - def __init__(self, **kwargs): - super(AmlComputeNodesInformation, self).__init__(**kwargs) - self.nodes = None - self.compute_type = 'AmlCompute' + self.node_state = None + self.run_id = None class AmlComputeProperties(Model): @@ -487,12 +463,21 @@ class AmlComputeProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. + :param os_type: Compute OS Type. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.machinelearningservices.models.OsType :param vm_size: Virtual Machine Size :type vm_size: str :param vm_priority: Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority' :type vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :param virtual_machine_image: Virtual Machine image for AML Compute - + windows only + :type virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :param isolated_network: Network is isolated or not + :type isolated_network: bool :param scale_settings: Scale settings for AML Compute :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings @@ -503,6 +488,17 @@ class AmlComputeProperties(Model): :param subnet: Subnet. Virtual network subnet resource ID the compute nodes belong to. :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :param remote_login_port_public_access: Close remote Login Access Port. + State of the public SSH port. Possible values are: Disabled - Indicates + that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. + NotSpecified - Indicates that the public ssh port is closed on all nodes + of the cluster if VNet is defined, else is open all public nodes. It can + be default only during cluster creation time, after creation it will be + either enabled or disabled. Possible values include: 'Enabled', + 'Disabled', 'NotSpecified'. Default value: "NotSpecified" . + :type remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess :ivar allocation_state: Allocation state. Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in @@ -519,7 +515,7 @@ class AmlComputeProperties(Model): :ivar errors: Errors. Collection of errors encountered by various compute nodes during node setup. :vartype errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar current_node_count: Current node count. The number of compute nodes currently assigned to the compute. :vartype current_node_count: int @@ -533,6 +529,12 @@ class AmlComputeProperties(Model): on the compute. :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :param enable_node_public_ip: Enable node public IP. Enable or disable + node public IP address provisioning. Possible values are: Possible values + are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private + endpoint and no public IPs. Default value: True . + :type enable_node_public_ip: bool """ _validation = { @@ -545,152 +547,244 @@ class AmlComputeProperties(Model): } _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, 'allocation_state': {'key': 'allocationState', 'type': 'str'}, 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, } def __init__(self, **kwargs): super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', "Linux") self.vm_size = kwargs.get('vm_size', None) self.vm_priority = kwargs.get('vm_priority', None) + self.virtual_machine_image = kwargs.get('virtual_machine_image', None) + self.isolated_network = kwargs.get('isolated_network', None) self.scale_settings = kwargs.get('scale_settings', None) self.user_account_credentials = kwargs.get('user_account_credentials', None) self.subnet = kwargs.get('subnet', None) + self.remote_login_port_public_access = kwargs.get('remote_login_port_public_access', "NotSpecified") self.allocation_state = None self.allocation_state_transition_time = None self.errors = None self.current_node_count = None self.target_node_count = None self.node_state_counts = None + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', True) -class CloudError(Model): - """CloudError. +class AmlUserFeature(Model): + """Features enabled for a workspace. + + :param id: Specifies the feature ID + :type id: str + :param display_name: Specifies the feature name + :type display_name: str + :param description: Describes the feature for user experience + :type description: str """ _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } + def __init__(self, **kwargs): + super(AmlUserFeature, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) -class ClusterUpdateParameters(Model): - """AmlCompute update parameters. - :param scale_settings: Scale settings. Desired scale settings for the - amlCompute. - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings +class AssignedUser(Model): + """A user that can be assigned to a compute instance. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. User’s AAD Object Id. + :type object_id: str + :param tenant_id: Required. User’s AAD Tenant Id. + :type tenant_id: str """ + _validation = { + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, + } + _attribute_map = { - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } def __init__(self, **kwargs): - super(ClusterUpdateParameters, self).__init__(**kwargs) - self.scale_settings = kwargs.get('scale_settings', None) + super(AssignedUser, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class AutoPauseProperties(Model): + """Auto pause properties. + + :param delay_in_minutes: + :type delay_in_minutes: int + :param enabled: + :type enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = kwargs.get('delay_in_minutes', None) + self.enabled = kwargs.get('enabled', None) + + +class AutoScaleProperties(Model): + """Auto scale properties. + + :param min_node_count: + :type min_node_count: int + :param enabled: + :type enabled: bool + :param max_node_count: + :type max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = kwargs.get('min_node_count', None) + self.enabled = kwargs.get('enabled', None) + self.max_node_count = kwargs.get('max_node_count', None) class Resource(Model): - """Azure Resource Manager resource envelope. + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.identity = None - self.location = kwargs.get('location', None) self.type = None - self.tags = kwargs.get('tags', None) -class ComputeResource(Resource): - """Machine Learning compute object wrapped into ARM resource envelope. +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] - :param properties: Compute properties - :type properties: ~azure.mgmt.machinelearningservices.models.Compute + :ivar etag: Resource Etag. + :vartype etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'Compute'}, + 'etag': {'key': 'etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(ComputeResource, self).__init__(**kwargs) + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param properties: Properties of ClusterUpdate + :type properties: + ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + + _attribute_map = { + 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'}, + } + + def __init__(self, **kwargs): + super(ClusterUpdateParameters, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) -class Databricks(Compute): - """A DataFactory compute. +class ComputeInstance(Compute): + """An Azure Machine Learning compute instance. Variables are only populated by the server, and will be ignored when sending a request. @@ -707,24 +801,27 @@ class Databricks(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: + :param properties: Properties of ComputeInstance :type properties: - ~azure.mgmt.machinelearningservices.models.DatabricksProperties + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties """ _validation = { @@ -743,123 +840,429 @@ class Databricks(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, } def __init__(self, **kwargs): - super(Databricks, self).__init__(**kwargs) + super(ComputeInstance, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) - self.compute_type = 'Databricks' + self.compute_type = 'ComputeInstance' -class DatabricksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on Databricks. +class ComputeInstanceApplication(Model): + """Defines an Aml Instance application and its connectivity endpoint URI. - All required parameters must be populated in order to send to Azure. + :param display_name: Name of the ComputeInstance application. + :type display_name: str + :param endpoint_uri: Application' endpoint URI. + :type endpoint_uri: str + """ - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :param databricks_access_token: access token for databricks account. - :type databricks_access_token: str + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceApplication, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.endpoint_uri = kwargs.get('endpoint_uri', None) + + +class ComputeInstanceConnectivityEndpoints(Model): + """Defines all connectivity endpoints and properties for an ComputeInstance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ip_address: Public IP Address of this ComputeInstance. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP Address of this ComputeInstance + (local to the VNET in which the compute instance is deployed). + :vartype private_ip_address: str """ _validation = { - 'compute_type': {'required': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, } def __init__(self, **kwargs): - super(DatabricksComputeSecrets, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) - self.compute_type = 'Databricks' + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None -class DatabricksProperties(Model): - """DatabricksProperties. +class ComputeInstanceCreatedBy(Model): + """Describes information on user who created this ComputeInstance. - :param databricks_access_token: Databricks access token - :type databricks_access_token: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_name: Name of the user. + :vartype user_name: str + :ivar user_org_id: Uniquely identifies user' Azure Active Directory + organization. + :vartype user_org_id: str + :ivar user_id: Uniquely identifies the user within his/her organization. + :vartype user_id: str """ + _validation = { + 'user_name': {'readonly': True}, + 'user_org_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, } def __init__(self, **kwargs): - super(DatabricksProperties, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceLastOperation(Model): + """The last operation on ComputeInstance. + + :param operation_name: Name of the last operation. Possible values + include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' + :type operation_name: str or + ~azure.mgmt.machinelearningservices.models.OperationName + :param operation_time: Time of the last operation. + :type operation_time: datetime + :param operation_status: Operation status. Possible values include: + 'InProgress', 'Succeeded', 'CreateFailed', 'StartFailed', 'StopFailed', + 'RestartFailed', 'ReimageFailed', 'DeleteFailed' + :type operation_status: str or + ~azure.mgmt.machinelearningservices.models.OperationStatus + """ + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } -class DataFactory(Compute): - """A DataFactory compute. + def __init__(self, **kwargs): + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = kwargs.get('operation_name', None) + self.operation_time = kwargs.get('operation_time', None) + self.operation_status = kwargs.get('operation_status', None) + + +class ComputeInstanceProperties(Model): + """Compute Instance properties. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. + :param vm_size: Virtual Machine Size + :type vm_size: str + :param subnet: Subnet. Virtual network subnet resource ID the compute + nodes belong to. + :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :param application_sharing_policy: Sharing policy for applications on this + compute instance. Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access + applications on this compute instance. When Shared, any workspace user can + access applications on this instance depending on his/her assigned role. + Possible values include: 'Personal', 'Shared'. Default value: "Shared" . + :type application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :param ssh_settings: Specifies policy and settings for SSH access. + :type ssh_settings: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :ivar connectivity_endpoints: Describes all connectivity endpoints + available for this ComputeInstance. + :vartype connectivity_endpoints: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints + :ivar applications: Describes available applications and their endpoints + on this ComputeInstance. + :vartype applications: + list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication] + :ivar created_by: Describes information on user who created this + ComputeInstance. + :vartype created_by: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy + :ivar errors: Errors. Collection of errors encountered on this + ComputeInstance. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar state: The current state of this ComputeInstance. Possible values + include: 'Creating', 'CreateFailed', 'Deleting', 'Running', 'Restarting', + 'JobRunning', 'SettingUp', 'SetupFailed', 'Starting', 'Stopped', + 'Stopping', 'UserSettingUp', 'UserSetupFailed', 'Unknown', 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :param compute_instance_authorization_type: Compute Instance Authorization + type. The Compute Instance Authorization type. Available values are + personal (default). Possible values include: 'personal'. Default value: + "personal" . + :type compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :param personal_compute_instance_settings: Personal Compute Instance + settings. Settings for a personal compute instance. + :type personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :param setup_scripts: Details of customized scripts to execute for setting + up the cluster. + :type setup_scripts: + ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, + 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, + 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, + 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.subnet = kwargs.get('subnet', None) + self.application_sharing_policy = kwargs.get('application_sharing_policy', "Shared") + self.ssh_settings = kwargs.get('ssh_settings', None) + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = kwargs.get('compute_instance_authorization_type', "personal") + self.personal_compute_instance_settings = kwargs.get('personal_compute_instance_settings', None) + self.setup_scripts = kwargs.get('setup_scripts', None) + self.last_operation = None + + +class ComputeInstanceSshSettings(Model): + """Specifies policy and settings for SSH access. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param ssh_public_access: Access policy for SSH. State of the public SSH + port. Possible values are: Disabled - Indicates that the public ssh port + is closed on this instance. Enabled - Indicates that the public ssh port + is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: 'Enabled', 'Disabled'. Default value: "Disabled" + . + :type ssh_public_access: str or + ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :ivar admin_user_name: Describes the admin user name. + :vartype admin_user_name: str + :ivar ssh_port: Describes the port for connecting through SSH. + :vartype ssh_port: int + :param admin_public_key: Specifies the SSH rsa public key file as a + string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + :type admin_public_key: str + """ + + _validation = { + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, + } + + _attribute_map = { + 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceSshSettings, self).__init__(**kwargs) + self.ssh_public_access = kwargs.get('ssh_public_access', "Disabled") + self.admin_user_name = None + self.ssh_port = None + self.admin_public_key = kwargs.get('admin_public_key', None) + + +class ComputeResource(Resource): + """Machine Learning compute object wrapped into ARM resource envelope. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.system_data = kwargs.get('system_data', None) + + +class ComputeSecrets(Model): + """Secrets related to a Machine Learning compute. Might differ for every type + of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. - :param compute_location: Location for the underlying compute - :type compute_location: str - :ivar provisioning_state: The provision state of the cluster. Valid values - are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible - values include: 'Unknown', 'Updating', 'Creating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.machinelearningservices.models.ProvisioningState - :param description: The description of the Machine Learning compute. - :type description: str - :ivar created_on: The date and time when the compute was created. - :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. - :vartype modified_on: datetime - :param resource_id: ARM resource id of the underlying compute - :type resource_id: str - :ivar provisioning_errors: Errors during provisioning - :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] - :ivar is_attached_compute: Indicating whether the compute was provisioned - by user and brought from outside if true, or machine learning service - provisioned it if false. - :vartype is_attached_compute: bool :param compute_type: Required. Constant filled by server. :type compute_type: str """ _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, 'compute_type': {'required': True}, } _attribute_map = { - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } + _subtype_map = { + 'compute_type': {'VirtualMachine': 'VirtualMachineSecrets'} + } + def __init__(self, **kwargs): - super(DataFactory, self).__init__(**kwargs) - self.compute_type = 'DataFactory' + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None -class DataLakeAnalytics(Compute): - """A DataLakeAnalytics compute. +class ContainerResourceRequirements(Model): + """The resource requirements for the container (cpu and memory). + + :param cpu: The minimum amount of CPU cores to be used by the container. + More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu: float + :param cpu_limit: The maximum amount of CPU cores allowed to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu_limit: float + :param memory_in_gb: The minimum amount of memory (in GB) to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb: float + :param memory_in_gb_limit: The maximum amount of memory (in GB) allowed to + be used by the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb_limit: float + :param gpu: The number of GPU cores in the container. + :type gpu: int + :param fpga: The number of FPGA PCIE devices exposed to the container. + Must be multiple of 2. + :type fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.cpu_limit = kwargs.get('cpu_limit', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.memory_in_gb_limit = kwargs.get('memory_in_gb_limit', None) + self.gpu = kwargs.get('gpu', None) + self.fpga = kwargs.get('fpga', None) + + +class CosmosDbSettings(Model): + """CosmosDbSettings. + + :param collections_throughput: The throughput of the collections in + cosmosdb database + :type collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = kwargs.get('collections_throughput', None) + + +class Databricks(Compute): + """A DataFactory compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -876,24 +1279,27 @@ class DataLakeAnalytics(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: :type properties: - ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + ~azure.mgmt.machinelearningservices.models.DatabricksProperties """ _validation = { @@ -912,97 +1318,152 @@ class DataLakeAnalytics(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, } def __init__(self, **kwargs): - super(DataLakeAnalytics, self).__init__(**kwargs) + super(Databricks, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) - self.compute_type = 'DataLakeAnalytics' + self.compute_type = 'Databricks' -class DataLakeAnalyticsProperties(Model): - """DataLakeAnalyticsProperties. +class DatabricksComputeSecrets(Model): + """Secrets related to a Machine Learning compute based on Databricks. - :param data_lake_store_account_name: DataLake Store Account Name - :type data_lake_store_account_name: str + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str """ + _validation = { + 'compute_type': {'required': True}, + } + _attribute_map = { - 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, } def __init__(self, **kwargs): - super(DataLakeAnalyticsProperties, self).__init__(**kwargs) - self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) - + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.compute_type = kwargs.get('compute_type', None) + self.databricks_access_token = kwargs.get('databricks_access_token', None) -class ErrorDetail(Model): - """Error detail information. - All required parameters must be populated in order to send to Azure. +class DatabricksComputeSecretsProperties(Model): + """Properties of Databricks Compute Secrets. - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str """ - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, } + def __init__(self, **kwargs): + super(DatabricksComputeSecretsProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + + +class DatabricksProperties(Model): + """Properties of Databricks. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + :param workspace_url: Workspace Url + :type workspace_url: str + """ + _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, } def __init__(self, **kwargs): - super(ErrorDetail, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.workspace_url = kwargs.get('workspace_url', None) -class ErrorResponse(Model): - """Error response information. +class DataFactory(Compute): + """A DataFactory compute. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code. - :vartype code: str - :ivar message: Error message. - :vartype message: str - :ivar details: An array of error detail objects. - :vartype details: - list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, } def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + super(DataFactory, self).__init__(**kwargs) + self.compute_type = 'DataFactory' -class HDInsight(Compute): - """A HDInsight compute. +class DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -1019,24 +1480,27 @@ class HDInsight(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: :type properties: - ~azure.mgmt.machinelearningservices.models.HDInsightProperties + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties """ _validation = { @@ -1055,313 +1519,1577 @@ class HDInsight(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, } def __init__(self, **kwargs): - super(HDInsight, self).__init__(**kwargs) + super(DataLakeAnalytics, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) - self.compute_type = 'HDInsight' + self.compute_type = 'DataLakeAnalytics' -class HDInsightProperties(Model): - """HDInsightProperties. +class DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. - :param ssh_port: Port open for ssh connections on the master node of the - cluster. - :type ssh_port: int - :param address: Public IP address of the master node of the cluster. - :type address: str - :param administrator_account: Admin credentials for master node of the - cluster - :type administrator_account: - ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str """ _attribute_map = { - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, } def __init__(self, **kwargs): - super(HDInsightProperties, self).__init__(**kwargs) - self.ssh_port = kwargs.get('ssh_port', None) - self.address = kwargs.get('address', None) - self.administrator_account = kwargs.get('administrator_account', None) + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) -class Identity(Model): - """Identity for the resource. +class DiagnoseRequestProperties(Model): + """DiagnoseRequestProperties. + + :param udr: Setting for diagnosing user defined routing + :type udr: dict[str, object] + :param nsg: Setting for diagnosing network security group + :type nsg: dict[str, object] + :param resource_lock: Setting for diagnosing resource lock + :type resource_lock: dict[str, object] + :param dns_resolution: Setting for diagnosing dns resolution + :type dns_resolution: dict[str, object] + :param storage_account: Setting for diagnosing dependent storage account + :type storage_account: dict[str, object] + :param key_vault: Setting for diagnosing dependent key vault + :type key_vault: dict[str, object] + :param container_registry: Setting for diagnosing dependent container + registry + :type container_registry: dict[str, object] + :param application_insights: Setting for diagnosing dependent application + insights + :type application_insights: dict[str, object] + :param others: Setting for diagnosing unclassified category of problems + :type others: dict[str, object] + """ - Variables are only populated by the server, and will be ignored when - sending a request. + _attribute_map = { + 'udr': {'key': 'udr', 'type': '{object}'}, + 'nsg': {'key': 'nsg', 'type': '{object}'}, + 'resource_lock': {'key': 'resourceLock', 'type': '{object}'}, + 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'}, + 'storage_account': {'key': 'storageAccount', 'type': '{object}'}, + 'key_vault': {'key': 'keyVault', 'type': '{object}'}, + 'container_registry': {'key': 'containerRegistry', 'type': '{object}'}, + 'application_insights': {'key': 'applicationInsights', 'type': '{object}'}, + 'others': {'key': 'others', 'type': '{object}'}, + } - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + def __init__(self, **kwargs): + super(DiagnoseRequestProperties, self).__init__(**kwargs) + self.udr = kwargs.get('udr', None) + self.nsg = kwargs.get('nsg', None) + self.resource_lock = kwargs.get('resource_lock', None) + self.dns_resolution = kwargs.get('dns_resolution', None) + self.storage_account = kwargs.get('storage_account', None) + self.key_vault = kwargs.get('key_vault', None) + self.container_registry = kwargs.get('container_registry', None) + self.application_insights = kwargs.get('application_insights', None) + self.others = kwargs.get('others', None) + + +class DiagnoseResponseResult(Model): + """DiagnoseResponseResult. + + :param value: + :type value: + ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue """ - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'}, } + def __init__(self, **kwargs): + super(DiagnoseResponseResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DiagnoseResponseResultValue(Model): + """DiagnoseResponseResultValue. + + :param user_defined_route_results: + :type user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param network_security_rule_results: + :type network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param resource_lock_results: + :type resource_lock_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param dns_resolution_results: + :type dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param storage_account_results: + :type storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param key_vault_results: + :type key_vault_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param container_registry_results: + :type container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param application_insights_results: + :type application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param other_results: + :type other_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'}, + 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'}, + 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'}, + 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'}, + 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'}, + 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'}, + 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'}, + 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'}, + 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'}, } def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) + super(DiagnoseResponseResultValue, self).__init__(**kwargs) + self.user_defined_route_results = kwargs.get('user_defined_route_results', None) + self.network_security_rule_results = kwargs.get('network_security_rule_results', None) + self.resource_lock_results = kwargs.get('resource_lock_results', None) + self.dns_resolution_results = kwargs.get('dns_resolution_results', None) + self.storage_account_results = kwargs.get('storage_account_results', None) + self.key_vault_results = kwargs.get('key_vault_results', None) + self.container_registry_results = kwargs.get('container_registry_results', None) + self.application_insights_results = kwargs.get('application_insights_results', None) + self.other_results = kwargs.get('other_results', None) -class ListWorkspaceKeysResult(Model): - """ListWorkspaceKeysResult. +class DiagnoseResult(Model): + """Result of Diagnose. Variables are only populated by the server, and will be ignored when sending a request. - :ivar user_storage_key: - :vartype user_storage_key: str - :ivar user_storage_resource_id: - :vartype user_storage_resource_id: str - :ivar app_insights_instrumentation_key: - :vartype app_insights_instrumentation_key: str - :ivar container_registry_credentials: - :vartype container_registry_credentials: - ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar code: Code for workspace setup error + :vartype code: str + :ivar level: Level of workspace setup error. Possible values include: + 'Warning', 'Error', 'Information' + :vartype level: str or + ~azure.mgmt.machinelearningservices.models.DiagnoseResultLevel + :ivar message: Message of workspace setup error + :vartype message: str """ _validation = { - 'user_storage_key': {'readonly': True}, - 'user_storage_resource_id': {'readonly': True}, - 'app_insights_instrumentation_key': {'readonly': True}, - 'container_registry_credentials': {'readonly': True}, + 'code': {'readonly': True}, + 'level': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, - 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, - 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, - 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(ListWorkspaceKeysResult, self).__init__(**kwargs) - self.user_storage_key = None - self.user_storage_resource_id = None - self.app_insights_instrumentation_key = None - self.container_registry_credentials = None + super(DiagnoseResult, self).__init__(**kwargs) + self.code = None + self.level = None + self.message = None -class MachineLearningServiceError(Model): - """Wrapper for error response to follow ARM guidelines. +class DiagnoseWorkspaceParameters(Model): + """Parameters to diagnose a workspace. - Variables are only populated by the server, and will be ignored when - sending a request. + :param value: Value of Parameters + :type value: + ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'}, + } + + def __init__(self, **kwargs): + super(DiagnoseWorkspaceParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) - :ivar error: The error response. - :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + +class EncryptionProperty(Model): + """EncryptionProperty. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Indicates whether or not the encryption is + enabled for the workspace. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :param identity: The identity that will be used to access the key vault + for encryption at rest. + :type identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :param key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties """ _validation = { - 'error': {'readonly': True}, + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, } def __init__(self, **kwargs): - super(MachineLearningServiceError, self).__init__(**kwargs) - self.error = None + super(EncryptionProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.identity = kwargs.get('identity', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) -class MachineLearningServiceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MachineLearningServiceError'. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ - def __init__(self, deserialize, response, *args): + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } - super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class NodeStateCounts(Model): - """Counts of various compute node states on the amlCompute. +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar idle_node_count: Idle node count. Number of compute nodes in idle - state. - :vartype idle_node_count: int - :ivar running_node_count: Running node count. Number of compute nodes - which are running jobs. - :vartype running_node_count: int - :ivar preparing_node_count: Preparing node count. Number of compute nodes - which are being prepared. - :vartype preparing_node_count: int - :ivar unusable_node_count: Unusable node count. Number of compute nodes - which are in unusable state. - :vartype unusable_node_count: int - :ivar leaving_node_count: Leaving node count. Number of compute nodes - which are leaving the amlCompute. - :vartype leaving_node_count: int - :ivar preempted_node_count: Preempted node count. Number of compute nodes - which are in preempted state. - :vartype preempted_node_count: int + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] """ _validation = { - 'idle_node_count': {'readonly': True}, - 'running_node_count': {'readonly': True}, - 'preparing_node_count': {'readonly': True}, - 'unusable_node_count': {'readonly': True}, - 'leaving_node_count': {'readonly': True}, - 'preempted_node_count': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { - 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, - 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, - 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, - 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, - 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, - 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs): - super(NodeStateCounts, self).__init__(**kwargs) - self.idle_node_count = None - self.running_node_count = None - self.preparing_node_count = None - self.unusable_node_count = None - self.leaving_node_count = None - self.preempted_node_count = None + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None -class Operation(Model): - """Azure Machine Learning workspace REST API operation. +class ErrorResponse(Model): + """Error response. - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display name of operation - :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorDetail """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) -class OperationDisplay(Model): - """Display name of operation. +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. - :param provider: The resource provider name: - Microsoft.MachineLearningExperimentation - :type provider: str - :param resource: The resource on which the operation is performed. - :type resource: str - :param operation: The operation that users can perform. - :type operation: str - :param description: The description for the operation. - :type description: str + :param deserialize: A deserializer + :param response: Server response to be deserialized. """ - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } + def __init__(self, deserialize, response, *args): - 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) - self.description = kwargs.get('description', None) + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) -class Password(Model): - """Password. +class EstimatedVMPrice(Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. - 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 name: - :vartype name: str - :ivar value: - :vartype value: str + :param retail_price: Required. Retail price. The price charged for using + the VM. + :type retail_price: float + :param os_type: Required. OS type. Operating system type used by the VM. + Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :param vm_tier: Required. VM tier. The type of the VM. Possible values + include: 'Standard', 'LowPriority', 'Spot' + :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier """ _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, } def __init__(self, **kwargs): - super(Password, self).__init__(**kwargs) - self.name = None - self.value = None + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = kwargs.get('retail_price', None) + self.os_type = kwargs.get('os_type', None) + self.vm_tier = kwargs.get('vm_tier', None) -class RegistryListCredentialsResult(Model): - """RegistryListCredentialsResult. +class EstimatedVMPrices(Model): + """The estimated price info for using a VM. Variables are only populated by the server, and will be ignored when sending a request. - :ivar location: - :vartype location: str - :ivar username: - :vartype username: str - :param passwords: - :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Billing currency. Three lettered code + specifying the currency of the VM price. Example: USD. Default value: + "USD" . + :vartype billing_currency: str + :ivar unit_of_measure: Required. Unit of time measure. The unit of time + measurement for the specified VM price. Example: OneHour. Default value: + "OneHour" . + :vartype unit_of_measure: str + :param values: Required. List of estimated VM prices. The list of + estimated prices for using a VM of a particular OS type, tier, etc. + :type values: + list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] """ _validation = { - 'location': {'readonly': True}, - 'username': {'readonly': True}, + 'billing_currency': {'required': True, 'constant': True}, + 'unit_of_measure': {'required': True, 'constant': True}, + 'values': {'required': True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'passwords': {'key': 'passwords', 'type': '[Password]'}, + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, } - def __init__(self, **kwargs): - super(RegistryListCredentialsResult, self).__init__(**kwargs) - self.location = None - self.username = None - self.passwords = kwargs.get('passwords', None) + billing_currency = "USD" + + unit_of_measure = "OneHour" + + def __init__(self, **kwargs): + super(EstimatedVMPrices, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + + +class ExternalFQDNResponse(Model): + """ExternalFQDNResponse. + + :param value: + :type value: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FQDNEndpoints]'}, + } + + def __init__(self, **kwargs): + super(ExternalFQDNResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class FQDNEndpoint(Model): + """FQDNEndpoint. + + :param domain_name: + :type domain_name: str + :param endpoint_details: + :type endpoint_details: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'}, + } + + def __init__(self, **kwargs): + super(FQDNEndpoint, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class FQDNEndpointDetail(Model): + """FQDNEndpointDetail. + + :param port: + :type port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(FQDNEndpointDetail, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + + +class FQDNEndpoints(Model): + """FQDNEndpoints. + + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'FQDNEndpointsProperties'}, + } + + def __init__(self, **kwargs): + super(FQDNEndpoints, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class FQDNEndpointsProperties(Model): + """FQDNEndpointsProperties. + + :param category: + :type category: str + :param endpoints: + :type endpoints: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'}, + } + + def __init__(self, **kwargs): + super(FQDNEndpointsProperties, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, **kwargs): + super(HDInsight, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'HDInsight' + + +class HDInsightProperties(Model): + """HDInsight compute properties. + + :param ssh_port: Port open for ssh connections on the master node of the + cluster. + :type ssh_port: int + :param address: Public IP address of the master node of the cluster. + :type address: str + :param administrator_account: Admin credentials for master node of the + cluster + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, **kwargs): + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = kwargs.get('ssh_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned', + 'SystemAssigned,UserAssigned', 'UserAssigned', 'None' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The user assigned identities associated + with the resource. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class IdentityForCmk(Model): + """Identity that will be used to access key vault for encryption at rest. + + :param user_assigned_identity: The ArmId of the user assigned identity + that will be used to access the customer managed key vault + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + + +class InstanceTypeSchema(Model): + """Instance type schema. + + :param node_selector: Node Selector + :type node_selector: dict[str, str] + :param resources: Resource requests/limits for this instance type + :type resources: + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + + _attribute_map = { + 'node_selector': {'key': 'nodeSelector', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'}, + } + + def __init__(self, **kwargs): + super(InstanceTypeSchema, self).__init__(**kwargs) + self.node_selector = kwargs.get('node_selector', None) + self.resources = kwargs.get('resources', None) + + +class InstanceTypeSchemaResources(Model): + """Resource requests/limits for this instance type. + + :param requests: Resource requests for this instance type + :type requests: dict[str, str] + :param limits: Resource limits for this instance type + :type limits: dict[str, str] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': '{str}'}, + 'limits': {'key': 'limits', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(InstanceTypeSchemaResources, self).__init__(**kwargs) + self.requests = kwargs.get('requests', None) + self.limits = kwargs.get('limits', None) + + +class KeyVaultProperties(Model): + """KeyVaultProperties. + + All required parameters must be populated in order to send to Azure. + + :param key_vault_arm_id: Required. The ArmId of the keyVault where the + customer owned encryption key is present. + :type key_vault_arm_id: str + :param key_identifier: Required. Key vault uri to access the encryption + key. + :type key_identifier: str + :param identity_client_id: For future use - The client id of the identity + which will be used to access key vault. + :type identity_client_id: str + """ + + _validation = { + 'key_vault_arm_id': {'required': True}, + 'key_identifier': {'required': True}, + } + + _attribute_map = { + 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'}, + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_arm_id = kwargs.get('key_vault_arm_id', None) + self.key_identifier = kwargs.get('key_identifier', None) + self.identity_client_id = kwargs.get('identity_client_id', None) + + +class Kubernetes(Model): + """A Machine Learning compute based on Kubernetes Compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param properties: Properties of Kubernetes + :type properties: + ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _validation = { + 'compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__(self, **kwargs): + super(Kubernetes, self).__init__(**kwargs) + self.compute_type = kwargs.get('compute_type', None) + self.compute_location = kwargs.get('compute_location', None) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.properties = kwargs.get('properties', None) + + +class KubernetesProperties(Model): + """Kubernetes properties. + + :param relay_connection_string: Relay connection string. + :type relay_connection_string: str + :param service_bus_connection_string: ServiceBus connection string. + :type service_bus_connection_string: str + :param extension_principal_id: Extension principal-id. + :type extension_principal_id: str + :param extension_instance_release_train: Extension instance release train. + :type extension_instance_release_train: str + :param vc_name: VC name. + :type vc_name: str + :param namespace: Compute namespace. Default value: "default" . + :type namespace: str + :param default_instance_type: Default instance type + :type default_instance_type: str + :param instance_types: Instance Type Schema + :type instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + + _attribute_map = { + 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'}, + 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'}, + 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'}, + 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'}, + 'vc_name': {'key': 'vcName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'}, + 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'}, + } + + def __init__(self, **kwargs): + super(KubernetesProperties, self).__init__(**kwargs) + self.relay_connection_string = kwargs.get('relay_connection_string', None) + self.service_bus_connection_string = kwargs.get('service_bus_connection_string', None) + self.extension_principal_id = kwargs.get('extension_principal_id', None) + self.extension_instance_release_train = kwargs.get('extension_instance_release_train', None) + self.vc_name = kwargs.get('vc_name', None) + self.namespace = kwargs.get('namespace', "default") + self.default_instance_type = kwargs.get('default_instance_type', None) + self.instance_types = kwargs.get('instance_types', None) + + +class KubernetesSchema(Model): + """Kubernetes Compute Schema. + + :param properties: Properties of Kubernetes + :type properties: + ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__(self, **kwargs): + super(KubernetesSchema, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ListNotebookKeysResult(Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListWorkspaceKeysResult(Model): + """ListWorkspaceKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__(self, **kwargs): + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NotebookAccessTokenResult(Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(Model): + """NotebookPreparationError. + + :param error_message: + :type error_message: str + :param status_code: + :type status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.status_code = kwargs.get('status_code', None) + + +class NotebookResourceInfo(Model): + """NotebookResourceInfo. + + :param fqdn: + :type fqdn: str + :param resource_id: the data plane resourceId that used to initialize + notebook component + :type resource_id: str + :param notebook_preparation_error: The error that occurs when preparing + notebook. + :type notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__(self, **kwargs): + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.resource_id = kwargs.get('resource_id', None) + self.notebook_preparation_error = kwargs.get('notebook_preparation_error', None) + + +class Operation(Model): + """Azure Machine Learning workspace REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display name of operation + :type display: ~azure.mgmt.machinelearningservices.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): + """Display name of operation. + + :param provider: The resource provider name: + Microsoft.MachineLearningExperimentation + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', '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) + self.description = kwargs.get('description', None) + + +class Password(Model): + """Password. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PersonalComputeInstanceSettings(Model): + """Settings for a personal compute instance. + + :param assigned_user: Assigned User. A user explicitly assigned to a + personal compute instance. + :type assigned_user: + ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__(self, **kwargs): + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = kwargs.get('assigned_user', None) + + +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private + endpoint links to + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: + ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :param private_link_service_connection_state: Required. A collection of + information about the state of the connection between service consumer and + provider. + :type private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.system_data = kwargs.get('system_data', None) + + +class PrivateLinkResource(Resource): + """A private link resource. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.system_data = kwargs.get('system_data', None) + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: + list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(Model): + """A collection of information about the state of the connection between + service consumer and provider. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + :type status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + 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. E.g. + "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(ProxyResource, self).__init__(**kwargs) + + +class QuotaBaseProperties(Model): + """The properties for Quota update or retrieval. + + :param id: Specifies the resource ID. + :type id: str + :param type: Specifies the resource type. + :type type: str + :param limit: Limit. The maximum permitted quota of the resource. + :type limit: long + :param unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :type unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuotaBaseProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.limit = kwargs.get('limit', None) + self.unit = kwargs.get('unit', None) + + +class QuotaUpdateParameters(Model): + """Quota update parameters. + + :param value: The list for update quota. + :type value: + list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :param location: Region of workspace quota to be updated. + :type location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.location = kwargs.get('location', None) + + +class RegistryListCredentialsResult(Model): + """RegistryListCredentialsResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :param passwords: + :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + + _validation = { + 'location': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__(self, **kwargs): + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = kwargs.get('passwords', None) class ResourceId(Model): @@ -1370,141 +3098,798 @@ class ResourceId(Model): All required parameters must be populated in order to send to Azure. - :param id: Required. The ID of the resource - :type id: str + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ResourceName(Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceQuota(Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: Limit. The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. Possible values + include: 'NotSpecified', 'NotAvailableForRegion', + 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.machinelearningservices.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = kwargs.get('reason_code', None) + + +class ScaleSettings(Model): + """scale settings for AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param max_node_count: Required. Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use. Default value: 0 . + :type min_node_count: int + :param node_idle_time_before_scale_down: Node Idle Time before scaling + down amlCompute. This string needs to be in the RFC Format. + :type node_idle_time_before_scale_down: timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get('min_node_count', 0) + self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) + + +class ScaleSettingsInformation(Model): + """Desired scale settings for the amlCompute. + + :param scale_settings: Scale settings. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, **kwargs): + super(ScaleSettingsInformation, self).__init__(**kwargs) + self.scale_settings = kwargs.get('scale_settings', None) + + +class ScriptReference(Model): + """Script reference. + + :param script_source: The storage source of the script: inline, workspace. + :type script_source: str + :param script_data: The location of scripts in the mounted volume. + :type script_data: str + :param script_arguments: Optional command line arguments passed to the + script to run. + :type script_arguments: str + :param timeout: Optional time period passed to timeout command. + :type timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScriptReference, self).__init__(**kwargs) + self.script_source = kwargs.get('script_source', None) + self.script_data = kwargs.get('script_data', None) + self.script_arguments = kwargs.get('script_arguments', None) + self.timeout = kwargs.get('timeout', None) + + +class ScriptsToExecute(Model): + """Customized setup scripts. + + :param startup_script: Script that's run every time the machine starts. + :type startup_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + :param creation_script: Script that's run only once during provision of + the compute. + :type creation_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__(self, **kwargs): + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = kwargs.get('startup_script', None) + self.creation_script = kwargs.get('creation_script', None) + + +class ServiceManagedResourcesSettings(Model): + """ServiceManagedResourcesSettings. + + :param cosmos_db: The settings for the service managed cosmosdb account. + :type cosmos_db: + ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__(self, **kwargs): + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = kwargs.get('cosmos_db', None) + + +class ServicePrincipalCredentials(Model): + """Service principal credentials. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. Client Id + :type client_id: str + :param client_secret: Required. Client secret + :type client_secret: str + """ + + _validation = { + 'client_id': {'required': True}, + 'client_secret': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePrincipalCredentials, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class SetupScripts(Model): + """Details of customized scripts to execute for setting up the cluster. + + :param scripts: Customized setup scripts + :type scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + + def __init__(self, **kwargs): + super(SetupScripts, self).__init__(**kwargs) + self.scripts = kwargs.get('scripts', None) + + +class SharedPrivateLinkResource(Model): + """SharedPrivateLinkResource. + + :param name: Unique name of the private link. + :type name: str + :param private_link_resource_id: The resource id that private link links + to. + :type private_link_resource_id: str + :param group_id: The private link resource group id. + :type group_id: str + :param request_message: Request message. + :type request_message: str + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + :type status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.group_id = kwargs.get('group_id', None) + self.request_message = kwargs.get('request_message', None) + self.status = kwargs.get('status', None) + + +class Sku(Model): + """Sku of the resource. + + :param name: Name of the sku + :type name: str + :param tier: Tier of the sku like Basic or Enterprise + :type tier: str + """ + + _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 SKUCapability(Model): + """Features/user capabilities associated with the sku. + + :param name: Capability/Feature ID + :type name: str + :param value: Details about the feature/capability + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SKUCapability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class SslConfiguration(Model): + """The ssl configuration for scoring. + + :param status: Enable or disable ssl for scoring. Possible values include: + 'Disabled', 'Enabled', 'Auto' + :type status: str or ~azure.mgmt.machinelearningservices.models.enum + :param cert: Cert data + :type cert: str + :param key: Key data + :type key: str + :param cname: CNAME of the cert + :type cname: str + :param leaf_domain_label: Leaf domain label of public endpoint + :type leaf_domain_label: str + :param overwrite_existing_domain: Indicates whether to overwrite existing + domain label. + :type overwrite_existing_domain: bool + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(SslConfiguration, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.cert = kwargs.get('cert', None) + self.key = kwargs.get('key', None) + self.cname = kwargs.get('cname', None) + self.leaf_domain_label = kwargs.get('leaf_domain_label', None) + self.overwrite_existing_domain = kwargs.get('overwrite_existing_domain', None) + + +class SynapseSpark(Compute): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__(self, **kwargs): + super(SynapseSpark, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'SynapseSpark' + + +class SynapseSparkProperties(Model): + """SynapseSparkProperties. + + :param auto_scale_properties: Auto scale properties. + :type auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :param auto_pause_properties: Auto pause properties. + :type auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :param spark_version: Spark version. + :type spark_version: str + :param node_count: The number of compute nodes currently assigned to the + compute. + :type node_count: int + :param node_size: Node size. + :type node_size: str + :param node_size_family: Node size family. + :type node_size_family: str + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param resource_group: Name of the resource group in which workspace is + located. + :type resource_group: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param pool_name: Pool name. + :type pool_name: str """ - _validation = { - 'id': {'required': True}, + _attribute_map = { + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, } + def __init__(self, **kwargs): + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = kwargs.get('auto_scale_properties', None) + self.auto_pause_properties = kwargs.get('auto_pause_properties', None) + self.spark_version = kwargs.get('spark_version', None) + self.node_count = kwargs.get('node_count', None) + self.node_size = kwargs.get('node_size', None) + self.node_size_family = kwargs.get('node_size_family', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.workspace_name = kwargs.get('workspace_name', None) + self.pool_name = kwargs.get('pool_name', 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.machinelearningservices.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.machinelearningservices.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + '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(ResourceId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + 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 ScaleSettings(Model): - """scale settings for AML Compute. +class SystemService(Model): + """A system service running on a compute. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param max_node_count: Required. Max number of nodes to use - :type max_node_count: int - :param min_node_count: Min number of nodes to use. Default value: 0 . - :type min_node_count: int - :param node_idle_time_before_scale_down: Node Idle Time before scaling - down amlCompute - :type node_idle_time_before_scale_down: timedelta + :ivar system_service_type: The type of this system service. + :vartype system_service_type: str + :ivar public_ip_address: Public IP address + :vartype public_ip_address: str + :ivar version: The version for this type. + :vartype version: str """ _validation = { - 'max_node_count': {'required': True}, + 'system_service_type': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'version': {'readonly': True}, } _attribute_map = { - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, - 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, } def __init__(self, **kwargs): - super(ScaleSettings, self).__init__(**kwargs) - self.max_node_count = kwargs.get('max_node_count', None) - self.min_node_count = kwargs.get('min_node_count', 0) - self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) + super(SystemService, self).__init__(**kwargs) + self.system_service_type = None + self.public_ip_address = None + self.version = None -class ServicePrincipalCredentials(Model): - """Service principal credentials. +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param client_id: Required. Client Id - :type client_id: str - :param client_secret: Required. Client secret - :type client_secret: str + :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. E.g. + "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 = { - 'client_id': {'required': True}, - 'client_secret': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + '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(ServicePrincipalCredentials, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) -class SslConfiguration(Model): - """The ssl configuration for scoring. +class UpdateWorkspaceQuotas(Model): + """The properties for update Quota response. - :param status: Enable or disable ssl for scoring. Possible values include: - 'Disabled', 'Enabled' - :type status: str or ~azure.mgmt.machinelearningservices.models.enum - :param cert: Cert data - :type cert: str - :param key: Key data - :type key: str - :param cname: CNAME of the cert - :type cname: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :param limit: Limit. The maximum permitted quota of the resource. + :type limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + :param status: Update Workspace Quota Status. Status of update workspace + quota. Possible values include: 'Undefined', 'Success', 'Failure', + 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', + 'InvalidVMFamilyName', 'OperationNotSupportedForSku', + 'OperationNotEnabledForRegion' + :type status: str or ~azure.mgmt.machinelearningservices.models.Status """ + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + } + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, - 'cert': {'key': 'cert', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'cname': {'key': 'cname', 'type': 'str'}, } def __init__(self, **kwargs): - super(SslConfiguration, self).__init__(**kwargs) + super(UpdateWorkspaceQuotas, self).__init__(**kwargs) + self.id = None + self.type = None + self.limit = kwargs.get('limit', None) + self.unit = None self.status = kwargs.get('status', None) - self.cert = kwargs.get('cert', None) - self.key = kwargs.get('key', None) - self.cname = kwargs.get('cname', None) -class SystemService(Model): - """A system service running on a compute. +class UpdateWorkspaceQuotasResult(Model): + """The result of update workspace quota. Variables are only populated by the server, and will be ignored when sending a request. - :ivar system_service_type: The type of this system service. - :vartype system_service_type: str - :ivar public_ip_address: Public IP address - :vartype public_ip_address: str - :ivar version: The version for this type. - :vartype version: str + :ivar value: The list of workspace quota update result. + :vartype value: + list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas] + :ivar next_link: The URI to fetch the next page of workspace quota update + result. Call ListNext() with this to fetch the next page of Workspace + Quota update result. + :vartype next_link: str """ _validation = { - 'system_service_type': {'readonly': True}, - 'public_ip_address': {'readonly': True}, - 'version': {'readonly': True}, + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, **kwargs): - super(SystemService, self).__init__(**kwargs) - self.system_service_type = None - self.public_ip_address = None - self.version = None + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None class Usage(Model): @@ -1515,6 +3900,8 @@ class Usage(Model): :ivar id: Specifies the resource ID. :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str :ivar type: Specifies the resource type. :vartype type: str :ivar unit: An enum describing the unit of usage measurement. Possible @@ -1530,6 +3917,7 @@ class Usage(Model): _validation = { 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, 'type': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -1539,6 +3927,7 @@ class Usage(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'current_value': {'key': 'currentValue', 'type': 'long'}, @@ -1549,6 +3938,7 @@ class Usage(Model): def __init__(self, **kwargs): super(Usage, self).__init__(**kwargs) self.id = None + self.aml_workspace_location = None self.type = None self.unit = None self.current_value = None @@ -1618,6 +4008,39 @@ def __init__(self, **kwargs): self.admin_user_password = kwargs.get('admin_user_password', None) +class UserAssignedIdentity(Model): + """User Assigned Identity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the user assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the user assigned identity. + :vartype tenant_id: str + :ivar client_id: The clientId(aka appId) of the user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.client_id = None + + class VirtualMachine(Compute): """A Machine Learning compute based on Azure Virtual Machines. @@ -1636,19 +4059,22 @@ class VirtualMachine(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: @@ -1672,8 +4098,9 @@ class VirtualMachine(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, } @@ -1684,6 +4111,28 @@ def __init__(self, **kwargs): self.compute_type = 'VirtualMachine' +class VirtualMachineImage(Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Virtual Machine image path + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + class VirtualMachineProperties(Model): """VirtualMachineProperties. @@ -1696,6 +4145,9 @@ class VirtualMachineProperties(Model): :param administrator_account: Admin credentials for virtual machine :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param is_notebook_instance_compute: Indicates whether this compute will + be used for running notebooks. + :type is_notebook_instance_compute: bool """ _attribute_map = { @@ -1703,6 +4155,7 @@ class VirtualMachineProperties(Model): 'ssh_port': {'key': 'sshPort', 'type': 'int'}, 'address': {'key': 'address', 'type': 'str'}, 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -1711,6 +4164,7 @@ def __init__(self, **kwargs): self.ssh_port = kwargs.get('ssh_port', None) self.address = kwargs.get('address', None) self.administrator_account = kwargs.get('administrator_account', None) + self.is_notebook_instance_compute = kwargs.get('is_notebook_instance_compute', None) class VirtualMachineSecrets(ComputeSecrets): @@ -1755,6 +4209,9 @@ class VirtualMachineSize(Model): :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the virtual machine size. :vartype v_cp_us: int + :ivar gpus: Number of gPUs. The number of gPUs supported by the virtual + machine size. + :vartype gpus: int :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, allowed by the virtual machine size. :vartype os_vhd_size_mb: int @@ -1770,12 +4227,20 @@ class VirtualMachineSize(Model): :ivar premium_io: Premium IO supported. Specifies if the virtual machine size supports premium IO. :vartype premium_io: bool + :param estimated_vm_prices: Estimated VM prices. The estimated price + information for using a VM. + :type estimated_vm_prices: + ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :param supported_compute_types: Supported Compute Types. Specifies the + compute types supported by the virtual machine size. + :type supported_compute_types: list[str] """ _validation = { 'name': {'readonly': True}, 'family': {'readonly': True}, 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, 'os_vhd_size_mb': {'readonly': True}, 'max_resource_volume_mb': {'readonly': True}, 'memory_gb': {'readonly': True}, @@ -1787,11 +4252,14 @@ class VirtualMachineSize(Model): 'name': {'key': 'name', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, + 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1799,29 +4267,31 @@ def __init__(self, **kwargs): self.name = None self.family = None self.v_cp_us = None + self.gpus = None self.os_vhd_size_mb = None self.max_resource_volume_mb = None self.memory_gb = None self.low_priority_capable = None self.premium_io = None + self.estimated_vm_prices = kwargs.get('estimated_vm_prices', None) + self.supported_compute_types = kwargs.get('supported_compute_types', None) class VirtualMachineSizeListResult(Model): """The List Virtual Machine size operation response. - :param aml_compute: The list of virtual machine sizes supported by - AmlCompute. - :type aml_compute: + :param value: The list of virtual machine sizes supported by AmlCompute. + :type value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] """ _attribute_map = { - 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'}, + 'value': {'key': 'value', 'type': '[VirtualMachineSize]'}, } def __init__(self, **kwargs): super(VirtualMachineSizeListResult, self).__init__(**kwargs) - self.aml_compute = kwargs.get('aml_compute', None) + self.value = kwargs.get('value', None) class VirtualMachineSshCredentials(Model): @@ -1858,18 +4328,14 @@ class Workspace(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1877,9 +4343,6 @@ class Workspace(Resource): :param friendly_name: The friendly name for this workspace. This name in mutable :type friendly_name: str - :ivar creation_time: The creation time of the machine learning workspace - in ISO8601 format. - :vartype creation_time: datetime :param key_vault: ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created :type key_vault: str @@ -1903,35 +4366,113 @@ class Workspace(Resource): 'Deleting', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param encryption: The encryption settings of Azure ML workspace. + :type encryption: + ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :param hbi_workspace: The flag to signal HBI data in the workspace and + reduce diagnostic data collected by the service. Default value: False . + :type hbi_workspace: bool + :ivar service_provisioned_resource_group: The name of the managed resource + group created by workspace RP in customer subscription if the workspace is + CMK workspace + :vartype service_provisioned_resource_group: str + :ivar private_link_count: Count of private connections in the workspace + :vartype private_link_count: int + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param allow_public_access_when_behind_vnet: The flag to indicate whether + to allow public access when behind VNet. Default value: False . + :type allow_public_access_when_behind_vnet: bool + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar private_endpoint_connections: The list of private endpoint + connections in the workspace. + :vartype private_endpoint_connections: + list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + :param shared_private_link_resources: The list of shared private link + resources in this workspace. + :type shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :ivar notebook_info: The notebook info of Azure ML workspace. + :vartype notebook_info: + ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str + :ivar storage_hns_enabled: If the storage associated with the workspace + has hierarchical namespace(HNS) enabled. + :vartype storage_hns_enabled: bool + :ivar ml_flow_tracking_uri: The URI associated with this workspace that + machine learning flow must point at to set up tracking. + :vartype ml_flow_tracking_uri: str + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, 'workspace_id': {'readonly': True}, - 'creation_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'storage_hns_enabled': {'readonly': True}, + 'ml_flow_tracking_uri': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'}, + 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -1939,13 +4480,147 @@ def __init__(self, **kwargs): self.workspace_id = None self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', None) - self.creation_time = None self.key_vault = kwargs.get('key_vault', None) self.application_insights = kwargs.get('application_insights', None) self.container_registry = kwargs.get('container_registry', None) self.storage_account = kwargs.get('storage_account', None) self.discovery_url = kwargs.get('discovery_url', None) self.provisioning_state = None + self.encryption = kwargs.get('encryption', None) + self.hbi_workspace = kwargs.get('hbi_workspace', False) + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = kwargs.get('image_build_compute', None) + self.allow_public_access_when_behind_vnet = kwargs.get('allow_public_access_when_behind_vnet', False) + self.public_network_access = kwargs.get('public_network_access', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None) + self.notebook_info = None + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.tenant_id = None + self.storage_hns_enabled = None + self.ml_flow_tracking_uri = None + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.system_data = kwargs.get('system_data', None) + + +class WorkspaceConnection(Model): + """Workspace connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ResourceId of the workspace connection. + :vartype id: str + :ivar name: Friendly name of the workspace connection. + :vartype name: str + :ivar type: Resource type of workspace connection. + :vartype type: str + :param category: Category of the workspace connection. + :type category: str + :param target: Target of the workspace connection. + :type target: str + :param auth_type: Authorization type of the workspace connection. + :type auth_type: str + :param value: Value details of the workspace connection. + :type value: str + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _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'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'auth_type': {'key': 'properties.authType', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'value_format': {'key': 'properties.valueFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.category = kwargs.get('category', None) + self.target = kwargs.get('target', None) + self.auth_type = kwargs.get('auth_type', None) + self.value = kwargs.get('value', None) + self.value_format = kwargs.get('value_format', None) + + +class WorkspaceSku(Model): + """Describes Workspace Sku details and features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo] + :ivar tier: Sku Tier like Basic or Enterprise + :vartype tier: str + :ivar resource_type: + :vartype resource_type: str + :ivar name: + :vartype name: str + :ivar capabilities: List of features/user capabilities associated with the + sku + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.machinelearningservices.models.Restriction] + """ + + _validation = { + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSku, self).__init__(**kwargs) + self.locations = None + self.location_info = None + self.tier = None + self.resource_type = None + self.name = None + self.capabilities = None + self.restrictions = kwargs.get('restrictions', None) class WorkspaceUpdateParameters(Model): @@ -1953,20 +4628,49 @@ class WorkspaceUpdateParameters(Model): :param tags: The resource tags for the machine learning workspace. :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity :param description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. :type friendly_name: str + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__(self, **kwargs): super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', None) + self.image_build_compute = kwargs.get('image_build_compute', None) + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.public_network_access = kwargs.get('public_network_access', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py index f173a48382adf..6d66070088bfd 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py @@ -17,8 +17,8 @@ class Compute(Model): """Machine Learning compute object. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AKS, AmlCompute, VirtualMachine, HDInsight, DataFactory, - Databricks, DataLakeAnalytics + sub-classes are: AKS, AmlCompute, ComputeInstance, VirtualMachine, + HDInsight, DataFactory, Databricks, DataLakeAnalytics, SynapseSpark Variables are only populated by the server, and will be ignored when sending a request. @@ -35,19 +35,22 @@ class Compute(Model): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str """ @@ -68,16 +71,17 @@ class Compute(Model): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics', 'SynapseSpark': 'SynapseSpark'} } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, **kwargs) -> None: super(Compute, self).__init__(**kwargs) self.compute_location = compute_location self.provisioning_state = None @@ -87,6 +91,7 @@ def __init__(self, *, compute_location: str=None, description: str=None, resourc self.resource_id = resource_id self.provisioning_errors = None self.is_attached_compute = None + self.disable_local_auth = disable_local_auth self.compute_type = None @@ -108,19 +113,22 @@ class AKS(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: AKS properties @@ -143,30 +151,38 @@ class AKS(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AKSProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties self.compute_type = 'AKS' -class ComputeSecrets(Model): - """Secrets related to a Machine Learning compute. Might differ for every type - of compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AksComputeSecrets, VirtualMachineSecrets, - DatabricksComputeSecrets +class AksComputeSecrets(Model): + """Secrets related to a Machine Learning compute based on AKS. All required parameters must be populated in order to send to Azure. - :param compute_type: Required. Constant filled by server. - :type compute_type: str + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param user_kube_config: Content of kubeconfig file that can be used to + connect to the Kubernetes cluster. + :type user_kube_config: str + :param admin_kube_config: Content of kubeconfig file that can be used to + connect to the Kubernetes cluster. + :type admin_kube_config: str + :param image_pull_secret_name: Image registry pull secret. + :type image_pull_secret_name: str """ _validation = { @@ -175,24 +191,22 @@ class ComputeSecrets(Model): _attribute_map = { 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, + 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, } - _subtype_map = { - 'compute_type': {'AKS': 'AksComputeSecrets', 'VirtualMachine': 'VirtualMachineSecrets', 'Databricks': 'DatabricksComputeSecrets'} - } - - def __init__(self, **kwargs) -> None: - super(ComputeSecrets, self).__init__(**kwargs) - self.compute_type = None - + def __init__(self, *, compute_type, user_kube_config: str=None, admin_kube_config: str=None, image_pull_secret_name: str=None, **kwargs) -> None: + super(AksComputeSecrets, self).__init__(**kwargs) + self.compute_type = compute_type + self.user_kube_config = user_kube_config + self.admin_kube_config = admin_kube_config + self.image_pull_secret_name = image_pull_secret_name -class AksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on AKS. - All required parameters must be populated in order to send to Azure. +class AksComputeSecretsProperties(Model): + """Properties of AksComputeSecrets. - :param compute_type: Required. Constant filled by server. - :type compute_type: str :param user_kube_config: Content of kubeconfig file that can be used to connect to the Kubernetes cluster. :type user_kube_config: str @@ -203,23 +217,17 @@ class AksComputeSecrets(ComputeSecrets): :type image_pull_secret_name: str """ - _validation = { - 'compute_type': {'required': True}, - } - _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, 'user_kube_config': {'key': 'userKubeConfig', 'type': 'str'}, 'admin_kube_config': {'key': 'adminKubeConfig', 'type': 'str'}, 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, } def __init__(self, *, user_kube_config: str=None, admin_kube_config: str=None, image_pull_secret_name: str=None, **kwargs) -> None: - super(AksComputeSecrets, self).__init__(**kwargs) + super(AksComputeSecretsProperties, self).__init__(**kwargs) self.user_kube_config = user_kube_config self.admin_kube_config = admin_kube_config self.image_pull_secret_name = image_pull_secret_name - self.compute_type = 'AKS' class AksNetworkingConfiguration(Model): @@ -277,36 +285,52 @@ class AKSProperties(Model): :type agent_count: int :param agent_vm_size: Agent virtual machine size :type agent_vm_size: str + :param cluster_purpose: Intended usage of the cluster. Possible values + include: 'FastProd', 'DenseProd', 'DevTest'. Default value: "FastProd" . + :type cluster_purpose: str or + ~azure.mgmt.machinelearningservices.models.ClusterPurpose :param ssl_configuration: SSL configuration :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration :param aks_networking_configuration: AKS networking configuration for vnet :type aks_networking_configuration: ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :param load_balancer_type: Load Balancer Type. Possible values include: + 'PublicIp', 'InternalLoadBalancer'. Default value: "PublicIp" . + :type load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :param load_balancer_subnet: Load Balancer Subnet + :type load_balancer_subnet: str """ _validation = { 'system_services': {'readonly': True}, - 'agent_count': {'minimum': 1}, + 'agent_count': {'minimum': 0}, } _attribute_map = { 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, 'agent_count': {'key': 'agentCount', 'type': 'int'}, - 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, } - def __init__(self, *, cluster_fqdn: str=None, agent_count: int=None, agent_vm_size: str=None, ssl_configuration=None, aks_networking_configuration=None, **kwargs) -> None: + def __init__(self, *, cluster_fqdn: str=None, agent_count: int=None, agent_vm_size: str=None, cluster_purpose="FastProd", ssl_configuration=None, aks_networking_configuration=None, load_balancer_type="PublicIp", load_balancer_subnet: str=None, **kwargs) -> None: super(AKSProperties, self).__init__(**kwargs) self.cluster_fqdn = cluster_fqdn self.system_services = None self.agent_count = agent_count self.agent_vm_size = agent_vm_size + self.cluster_purpose = cluster_purpose self.ssl_configuration = ssl_configuration self.aks_networking_configuration = aks_networking_configuration + self.load_balancer_type = load_balancer_type + self.load_balancer_subnet = load_balancer_subnet class AmlCompute(Compute): @@ -327,22 +351,25 @@ class AmlCompute(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: AML Compute properties + :param properties: Properties of AmlCompute :type properties: ~azure.mgmt.machinelearningservices.models.AmlComputeProperties """ @@ -363,14 +390,15 @@ class AmlCompute(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties self.compute_type = 'AmlCompute' @@ -383,102 +411,50 @@ class AmlComputeNodeInformation(Model): :ivar node_id: Node ID. ID of the compute node. :vartype node_id: str - :ivar ip_address: IP address. Public IP address of the compute node. - :vartype ip_address: str + :ivar private_ip_address: Private IP address. Private IP address of the + compute node. + :vartype private_ip_address: str + :ivar public_ip_address: Public IP address. Public IP address of the + compute node. + :vartype public_ip_address: str :ivar port: Port. SSH port number of the node. :vartype port: float + :ivar node_state: State of the compute node. Values are idle, running, + preparing, unusable, leaving and preempted. Possible values include: + 'idle', 'running', 'preparing', 'unusable', 'leaving', 'preempted' + :vartype node_state: str or + ~azure.mgmt.machinelearningservices.models.NodeState + :ivar run_id: Run ID. ID of the Experiment running on the node, if any + else null. + :vartype run_id: str """ _validation = { 'node_id': {'readonly': True}, - 'ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'public_ip_address': {'readonly': True}, 'port': {'readonly': True}, + 'node_state': {'readonly': True}, + 'run_id': {'readonly': True}, } _attribute_map = { 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, 'port': {'key': 'port', 'type': 'float'}, + 'node_state': {'key': 'nodeState', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, } def __init__(self, **kwargs) -> None: super(AmlComputeNodeInformation, self).__init__(**kwargs) self.node_id = None - self.ip_address = None + self.private_ip_address = None + self.public_ip_address = None self.port = None - - -class ComputeNodesInformation(Model): - """Compute nodes information related to a Machine Learning compute. Might - differ for every type of compute. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmlComputeNodesInformation - - 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 next_link: The continuation token. - :vartype next_link: str - :param compute_type: Required. Constant filled by server. - :type compute_type: str - """ - - _validation = { - 'next_link': {'readonly': True}, - 'compute_type': {'required': True}, - } - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - } - - _subtype_map = { - 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} - } - - def __init__(self, **kwargs) -> None: - super(ComputeNodesInformation, self).__init__(**kwargs) - self.next_link = None - self.compute_type = None - - -class AmlComputeNodesInformation(ComputeNodesInformation): - """Compute node information related to a AmlCompute. - - 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 next_link: The continuation token. - :vartype next_link: str - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :ivar nodes: The collection of returned AmlCompute nodes details. - :vartype nodes: - list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] - """ - - _validation = { - 'next_link': {'readonly': True}, - 'compute_type': {'required': True}, - 'nodes': {'readonly': True}, - } - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, - } - - def __init__(self, **kwargs) -> None: - super(AmlComputeNodesInformation, self).__init__(**kwargs) - self.nodes = None - self.compute_type = 'AmlCompute' + self.node_state = None + self.run_id = None class AmlComputeProperties(Model): @@ -487,12 +463,21 @@ class AmlComputeProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. + :param os_type: Compute OS Type. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.machinelearningservices.models.OsType :param vm_size: Virtual Machine Size :type vm_size: str :param vm_priority: Virtual Machine priority. Possible values include: 'Dedicated', 'LowPriority' :type vm_priority: str or ~azure.mgmt.machinelearningservices.models.VmPriority + :param virtual_machine_image: Virtual Machine image for AML Compute - + windows only + :type virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :param isolated_network: Network is isolated or not + :type isolated_network: bool :param scale_settings: Scale settings for AML Compute :type scale_settings: ~azure.mgmt.machinelearningservices.models.ScaleSettings @@ -503,6 +488,17 @@ class AmlComputeProperties(Model): :param subnet: Subnet. Virtual network subnet resource ID the compute nodes belong to. :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :param remote_login_port_public_access: Close remote Login Access Port. + State of the public SSH port. Possible values are: Disabled - Indicates + that the public ssh port is closed on all nodes of the cluster. Enabled - + Indicates that the public ssh port is open on all nodes of the cluster. + NotSpecified - Indicates that the public ssh port is closed on all nodes + of the cluster if VNet is defined, else is open all public nodes. It can + be default only during cluster creation time, after creation it will be + either enabled or disabled. Possible values include: 'Enabled', + 'Disabled', 'NotSpecified'. Default value: "NotSpecified" . + :type remote_login_port_public_access: str or + ~azure.mgmt.machinelearningservices.models.RemoteLoginPortPublicAccess :ivar allocation_state: Allocation state. Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in @@ -519,7 +515,7 @@ class AmlComputeProperties(Model): :ivar errors: Errors. Collection of errors encountered by various compute nodes during node setup. :vartype errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar current_node_count: Current node count. The number of compute nodes currently assigned to the compute. :vartype current_node_count: int @@ -533,6 +529,12 @@ class AmlComputeProperties(Model): on the compute. :vartype node_state_counts: ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :param enable_node_public_ip: Enable node public IP. Enable or disable + node public IP address provisioning. Possible values are: Possible values + are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private + endpoint and no public IPs. Default value: True . + :type enable_node_public_ip: bool """ _validation = { @@ -545,152 +547,244 @@ class AmlComputeProperties(Model): } _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, 'vm_size': {'key': 'vmSize', 'type': 'str'}, 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, 'allocation_state': {'key': 'allocationState', 'type': 'str'}, 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, } - def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, user_account_credentials=None, subnet=None, **kwargs) -> None: + def __init__(self, *, os_type="Linux", vm_size: str=None, vm_priority=None, virtual_machine_image=None, isolated_network: bool=None, scale_settings=None, user_account_credentials=None, subnet=None, remote_login_port_public_access="NotSpecified", enable_node_public_ip: bool=True, **kwargs) -> None: super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = os_type self.vm_size = vm_size self.vm_priority = vm_priority + self.virtual_machine_image = virtual_machine_image + self.isolated_network = isolated_network self.scale_settings = scale_settings self.user_account_credentials = user_account_credentials self.subnet = subnet + self.remote_login_port_public_access = remote_login_port_public_access self.allocation_state = None self.allocation_state_transition_time = None self.errors = None self.current_node_count = None self.target_node_count = None self.node_state_counts = None + self.enable_node_public_ip = enable_node_public_ip -class CloudError(Model): - """CloudError. +class AmlUserFeature(Model): + """Features enabled for a workspace. + + :param id: Specifies the feature ID + :type id: str + :param display_name: Specifies the feature name + :type display_name: str + :param description: Describes the feature for user experience + :type description: str """ _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } + def __init__(self, *, id: str=None, display_name: str=None, description: str=None, **kwargs) -> None: + super(AmlUserFeature, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + self.description = description -class ClusterUpdateParameters(Model): - """AmlCompute update parameters. - :param scale_settings: Scale settings. Desired scale settings for the - amlCompute. - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings +class AssignedUser(Model): + """A user that can be assigned to a compute instance. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. User’s AAD Object Id. + :type object_id: str + :param tenant_id: Required. User’s AAD Tenant Id. + :type tenant_id: str """ + _validation = { + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, + } + _attribute_map = { - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, scale_settings=None, **kwargs) -> None: - super(ClusterUpdateParameters, self).__init__(**kwargs) - self.scale_settings = scale_settings + def __init__(self, *, object_id: str, tenant_id: str, **kwargs) -> None: + super(AssignedUser, self).__init__(**kwargs) + self.object_id = object_id + self.tenant_id = tenant_id + + +class AutoPauseProperties(Model): + """Auto pause properties. + + :param delay_in_minutes: + :type delay_in_minutes: int + :param enabled: + :type enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, delay_in_minutes: int=None, enabled: bool=None, **kwargs) -> None: + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = delay_in_minutes + self.enabled = enabled + + +class AutoScaleProperties(Model): + """Auto scale properties. + + :param min_node_count: + :type min_node_count: int + :param enabled: + :type enabled: bool + :param max_node_count: + :type max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__(self, *, min_node_count: int=None, enabled: bool=None, max_node_count: int=None, **kwargs) -> None: + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = min_node_count + self.enabled = enabled + self.max_node_count = max_node_count class Resource(Model): - """Azure Resource Manager resource envelope. + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.identity = None - self.location = location self.type = None - self.tags = tags -class ComputeResource(Resource): - """Machine Learning compute object wrapped into ARM resource envelope. +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] - :param properties: Compute properties - :type properties: ~azure.mgmt.machinelearningservices.models.Compute + :ivar etag: Resource Etag. + :vartype etag: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'Compute'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param properties: Properties of ClusterUpdate + :type properties: + ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation + """ + + _attribute_map = { + 'properties': {'key': 'properties.properties', 'type': 'ScaleSettingsInformation'}, } - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(ComputeResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, properties=None, **kwargs) -> None: + super(ClusterUpdateParameters, self).__init__(**kwargs) self.properties = properties -class Databricks(Compute): - """A DataFactory compute. +class ComputeInstance(Compute): + """An Azure Machine Learning compute instance. Variables are only populated by the server, and will be ignored when sending a request. @@ -707,24 +801,27 @@ class Databricks(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: + :param properties: Properties of ComputeInstance :type properties: - ~azure.mgmt.machinelearningservices.models.DatabricksProperties + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties """ _validation = { @@ -743,123 +840,429 @@ class Databricks(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(ComputeInstance, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties - self.compute_type = 'Databricks' + self.compute_type = 'ComputeInstance' -class DatabricksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on Databricks. +class ComputeInstanceApplication(Model): + """Defines an Aml Instance application and its connectivity endpoint URI. - All required parameters must be populated in order to send to Azure. + :param display_name: Name of the ComputeInstance application. + :type display_name: str + :param endpoint_uri: Application' endpoint URI. + :type endpoint_uri: str + """ - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :param databricks_access_token: access token for databricks account. - :type databricks_access_token: str + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, + } + + def __init__(self, *, display_name: str=None, endpoint_uri: str=None, **kwargs) -> None: + super(ComputeInstanceApplication, self).__init__(**kwargs) + self.display_name = display_name + self.endpoint_uri = endpoint_uri + + +class ComputeInstanceConnectivityEndpoints(Model): + """Defines all connectivity endpoints and properties for an ComputeInstance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ip_address: Public IP Address of this ComputeInstance. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP Address of this ComputeInstance + (local to the VNET in which the compute instance is deployed). + :vartype private_ip_address: str """ _validation = { - 'compute_type': {'required': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, } - def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: - super(DatabricksComputeSecrets, self).__init__(**kwargs) - self.databricks_access_token = databricks_access_token - self.compute_type = 'Databricks' + def __init__(self, **kwargs) -> None: + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None -class DatabricksProperties(Model): - """DatabricksProperties. +class ComputeInstanceCreatedBy(Model): + """Describes information on user who created this ComputeInstance. - :param databricks_access_token: Databricks access token - :type databricks_access_token: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_name: Name of the user. + :vartype user_name: str + :ivar user_org_id: Uniquely identifies user' Azure Active Directory + organization. + :vartype user_org_id: str + :ivar user_id: Uniquely identifies the user within his/her organization. + :vartype user_id: str """ + _validation = { + 'user_name': {'readonly': True}, + 'user_org_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, } - def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: - super(DatabricksProperties, self).__init__(**kwargs) - self.databricks_access_token = databricks_access_token + def __init__(self, **kwargs) -> None: + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceLastOperation(Model): + """The last operation on ComputeInstance. + + :param operation_name: Name of the last operation. Possible values + include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' + :type operation_name: str or + ~azure.mgmt.machinelearningservices.models.OperationName + :param operation_time: Time of the last operation. + :type operation_time: datetime + :param operation_status: Operation status. Possible values include: + 'InProgress', 'Succeeded', 'CreateFailed', 'StartFailed', 'StopFailed', + 'RestartFailed', 'ReimageFailed', 'DeleteFailed' + :type operation_status: str or + ~azure.mgmt.machinelearningservices.models.OperationStatus + """ + + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + def __init__(self, *, operation_name=None, operation_time=None, operation_status=None, **kwargs) -> None: + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = operation_name + self.operation_time = operation_time + self.operation_status = operation_status -class DataFactory(Compute): - """A DataFactory compute. + +class ComputeInstanceProperties(Model): + """Compute Instance properties. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param compute_location: Location for the underlying compute - :type compute_location: str - :ivar provisioning_state: The provision state of the cluster. Valid values - are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible - values include: 'Unknown', 'Updating', 'Creating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.machinelearningservices.models.ProvisioningState - :param description: The description of the Machine Learning compute. - :type description: str - :ivar created_on: The date and time when the compute was created. - :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. - :vartype modified_on: datetime - :param resource_id: ARM resource id of the underlying compute - :type resource_id: str - :ivar provisioning_errors: Errors during provisioning - :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] - :ivar is_attached_compute: Indicating whether the compute was provisioned - by user and brought from outside if true, or machine learning service - provisioned it if false. - :vartype is_attached_compute: bool + :param vm_size: Virtual Machine Size + :type vm_size: str + :param subnet: Subnet. Virtual network subnet resource ID the compute + nodes belong to. + :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId + :param application_sharing_policy: Sharing policy for applications on this + compute instance. Policy for sharing applications on this compute instance + among users of parent workspace. If Personal, only the creator can access + applications on this compute instance. When Shared, any workspace user can + access applications on this instance depending on his/her assigned role. + Possible values include: 'Personal', 'Shared'. Default value: "Shared" . + :type application_sharing_policy: str or + ~azure.mgmt.machinelearningservices.models.ApplicationSharingPolicy + :param ssh_settings: Specifies policy and settings for SSH access. + :type ssh_settings: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceSshSettings + :ivar connectivity_endpoints: Describes all connectivity endpoints + available for this ComputeInstance. + :vartype connectivity_endpoints: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceConnectivityEndpoints + :ivar applications: Describes available applications and their endpoints + on this ComputeInstance. + :vartype applications: + list[~azure.mgmt.machinelearningservices.models.ComputeInstanceApplication] + :ivar created_by: Describes information on user who created this + ComputeInstance. + :vartype created_by: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceCreatedBy + :ivar errors: Errors. Collection of errors encountered on this + ComputeInstance. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar state: The current state of this ComputeInstance. Possible values + include: 'Creating', 'CreateFailed', 'Deleting', 'Running', 'Restarting', + 'JobRunning', 'SettingUp', 'SetupFailed', 'Starting', 'Stopped', + 'Stopping', 'UserSettingUp', 'UserSetupFailed', 'Unknown', 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :param compute_instance_authorization_type: Compute Instance Authorization + type. The Compute Instance Authorization type. Available values are + personal (default). Possible values include: 'personal'. Default value: + "personal" . + :type compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :param personal_compute_instance_settings: Personal Compute Instance + settings. Settings for a personal compute instance. + :type personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :param setup_scripts: Details of customized scripts to execute for setting + up the cluster. + :type setup_scripts: + ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, + 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, + 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, + 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, + 'errors': {'key': 'errors', 'type': '[ErrorResponse]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, + } + + def __init__(self, *, vm_size: str=None, subnet=None, application_sharing_policy="Shared", ssh_settings=None, compute_instance_authorization_type="personal", personal_compute_instance_settings=None, setup_scripts=None, **kwargs) -> None: + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.subnet = subnet + self.application_sharing_policy = application_sharing_policy + self.ssh_settings = ssh_settings + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = compute_instance_authorization_type + self.personal_compute_instance_settings = personal_compute_instance_settings + self.setup_scripts = setup_scripts + self.last_operation = None + + +class ComputeInstanceSshSettings(Model): + """Specifies policy and settings for SSH access. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param ssh_public_access: Access policy for SSH. State of the public SSH + port. Possible values are: Disabled - Indicates that the public ssh port + is closed on this instance. Enabled - Indicates that the public ssh port + is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: 'Enabled', 'Disabled'. Default value: "Disabled" + . + :type ssh_public_access: str or + ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :ivar admin_user_name: Describes the admin user name. + :vartype admin_user_name: str + :ivar ssh_port: Describes the port for connecting through SSH. + :vartype ssh_port: int + :param admin_public_key: Specifies the SSH rsa public key file as a + string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + :type admin_public_key: str + """ + + _validation = { + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, + } + + _attribute_map = { + 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + } + + def __init__(self, *, ssh_public_access="Disabled", admin_public_key: str=None, **kwargs) -> None: + super(ComputeInstanceSshSettings, self).__init__(**kwargs) + self.ssh_public_access = ssh_public_access + self.admin_user_name = None + self.ssh_port = None + self.admin_public_key = admin_public_key + + +class ComputeResource(Resource): + """Machine Learning compute object wrapped into ARM resource envelope. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, properties=None, identity=None, location: str=None, tags=None, sku=None, system_data=None, **kwargs) -> None: + super(ComputeResource, self).__init__(**kwargs) + self.properties = properties + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.system_data = system_data + + +class ComputeSecrets(Model): + """Secrets related to a Machine Learning compute. Might differ for every type + of compute. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VirtualMachineSecrets + + All required parameters must be populated in order to send to Azure. + :param compute_type: Required. Constant filled by server. :type compute_type: str """ _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, 'compute_type': {'required': True}, } _attribute_map = { - 'compute_location': {'key': 'computeLocation', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, - 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, - 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: - super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) - self.compute_type = 'DataFactory' + _subtype_map = { + 'compute_type': {'VirtualMachine': 'VirtualMachineSecrets'} + } + + def __init__(self, **kwargs) -> None: + super(ComputeSecrets, self).__init__(**kwargs) + self.compute_type = None -class DataLakeAnalytics(Compute): - """A DataLakeAnalytics compute. +class ContainerResourceRequirements(Model): + """The resource requirements for the container (cpu and memory). + + :param cpu: The minimum amount of CPU cores to be used by the container. + More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu: float + :param cpu_limit: The maximum amount of CPU cores allowed to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu_limit: float + :param memory_in_gb: The minimum amount of memory (in GB) to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb: float + :param memory_in_gb_limit: The maximum amount of memory (in GB) allowed to + be used by the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb_limit: float + :param gpu: The number of GPU cores in the container. + :type gpu: int + :param fpga: The number of FPGA PCIE devices exposed to the container. + Must be multiple of 2. + :type fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__(self, *, cpu: float=None, cpu_limit: float=None, memory_in_gb: float=None, memory_in_gb_limit: float=None, gpu: int=None, fpga: int=None, **kwargs) -> None: + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = cpu + self.cpu_limit = cpu_limit + self.memory_in_gb = memory_in_gb + self.memory_in_gb_limit = memory_in_gb_limit + self.gpu = gpu + self.fpga = fpga + + +class CosmosDbSettings(Model): + """CosmosDbSettings. + + :param collections_throughput: The throughput of the collections in + cosmosdb database + :type collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__(self, *, collections_throughput: int=None, **kwargs) -> None: + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = collections_throughput + + +class Databricks(Compute): + """A DataFactory compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -876,24 +1279,27 @@ class DataLakeAnalytics(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: :type properties: - ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + ~azure.mgmt.machinelearningservices.models.DatabricksProperties """ _validation = { @@ -912,97 +1318,152 @@ class DataLakeAnalytics(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties - self.compute_type = 'DataLakeAnalytics' + self.compute_type = 'Databricks' -class DataLakeAnalyticsProperties(Model): - """DataLakeAnalyticsProperties. +class DatabricksComputeSecrets(Model): + """Secrets related to a Machine Learning compute based on Databricks. - :param data_lake_store_account_name: DataLake Store Account Name - :type data_lake_store_account_name: str + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str """ - _attribute_map = { - 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + _validation = { + 'compute_type': {'required': True}, } - def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: - super(DataLakeAnalyticsProperties, self).__init__(**kwargs) - self.data_lake_store_account_name = data_lake_store_account_name + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + def __init__(self, *, compute_type, databricks_access_token: str=None, **kwargs) -> None: + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.compute_type = compute_type + self.databricks_access_token = databricks_access_token -class ErrorDetail(Model): - """Error detail information. - All required parameters must be populated in order to send to Azure. +class DatabricksComputeSecretsProperties(Model): + """Properties of Databricks Compute Secrets. - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str """ - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, } + def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: + super(DatabricksComputeSecretsProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + + +class DatabricksProperties(Model): + """Properties of Databricks. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + :param workspace_url: Workspace Url + :type workspace_url: str + """ + _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, } - def __init__(self, *, code: str, message: str, **kwargs) -> None: - super(ErrorDetail, self).__init__(**kwargs) - self.code = code - self.message = message + def __init__(self, *, databricks_access_token: str=None, workspace_url: str=None, **kwargs) -> None: + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + self.workspace_url = workspace_url -class ErrorResponse(Model): - """Error response information. +class DataFactory(Compute): + """A DataFactory compute. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code. - :vartype code: str - :ivar message: Error message. - :vartype message: str - :ivar details: An array of error detail objects. - :vartype details: - list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, **kwargs) -> None: + super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.compute_type = 'DataFactory' -class HDInsight(Compute): - """A HDInsight compute. +class DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -1019,24 +1480,27 @@ class HDInsight(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: :type properties: - ~azure.mgmt.machinelearningservices.models.HDInsightProperties + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties """ _validation = { @@ -1055,456 +1519,2377 @@ class HDInsight(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties - self.compute_type = 'HDInsight' + self.compute_type = 'DataLakeAnalytics' -class HDInsightProperties(Model): - """HDInsightProperties. +class DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. - :param ssh_port: Port open for ssh connections on the master node of the - cluster. - :type ssh_port: int - :param address: Public IP address of the master node of the cluster. - :type address: str - :param administrator_account: Admin credentials for master node of the - cluster - :type administrator_account: - ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str """ _attribute_map = { - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, } - def __init__(self, *, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: - super(HDInsightProperties, self).__init__(**kwargs) - self.ssh_port = ssh_port - self.address = address - self.administrator_account = administrator_account + def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = data_lake_store_account_name -class Identity(Model): - """Identity for the resource. +class DiagnoseRequestProperties(Model): + """DiagnoseRequestProperties. + + :param udr: Setting for diagnosing user defined routing + :type udr: dict[str, object] + :param nsg: Setting for diagnosing network security group + :type nsg: dict[str, object] + :param resource_lock: Setting for diagnosing resource lock + :type resource_lock: dict[str, object] + :param dns_resolution: Setting for diagnosing dns resolution + :type dns_resolution: dict[str, object] + :param storage_account: Setting for diagnosing dependent storage account + :type storage_account: dict[str, object] + :param key_vault: Setting for diagnosing dependent key vault + :type key_vault: dict[str, object] + :param container_registry: Setting for diagnosing dependent container + registry + :type container_registry: dict[str, object] + :param application_insights: Setting for diagnosing dependent application + insights + :type application_insights: dict[str, object] + :param others: Setting for diagnosing unclassified category of problems + :type others: dict[str, object] + """ - Variables are only populated by the server, and will be ignored when - sending a request. + _attribute_map = { + 'udr': {'key': 'udr', 'type': '{object}'}, + 'nsg': {'key': 'nsg', 'type': '{object}'}, + 'resource_lock': {'key': 'resourceLock', 'type': '{object}'}, + 'dns_resolution': {'key': 'dnsResolution', 'type': '{object}'}, + 'storage_account': {'key': 'storageAccount', 'type': '{object}'}, + 'key_vault': {'key': 'keyVault', 'type': '{object}'}, + 'container_registry': {'key': 'containerRegistry', 'type': '{object}'}, + 'application_insights': {'key': 'applicationInsights', 'type': '{object}'}, + 'others': {'key': 'others', 'type': '{object}'}, + } - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + def __init__(self, *, udr=None, nsg=None, resource_lock=None, dns_resolution=None, storage_account=None, key_vault=None, container_registry=None, application_insights=None, others=None, **kwargs) -> None: + super(DiagnoseRequestProperties, self).__init__(**kwargs) + self.udr = udr + self.nsg = nsg + self.resource_lock = resource_lock + self.dns_resolution = dns_resolution + self.storage_account = storage_account + self.key_vault = key_vault + self.container_registry = container_registry + self.application_insights = application_insights + self.others = others + + +class DiagnoseResponseResult(Model): + """DiagnoseResponseResult. + + :param value: + :type value: + ~azure.mgmt.machinelearningservices.models.DiagnoseResponseResultValue """ - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseResponseResultValue'}, } + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnoseResponseResult, self).__init__(**kwargs) + self.value = value + + +class DiagnoseResponseResultValue(Model): + """DiagnoseResponseResultValue. + + :param user_defined_route_results: + :type user_defined_route_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param network_security_rule_results: + :type network_security_rule_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param resource_lock_results: + :type resource_lock_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param dns_resolution_results: + :type dns_resolution_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param storage_account_results: + :type storage_account_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param key_vault_results: + :type key_vault_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param container_registry_results: + :type container_registry_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param application_insights_results: + :type application_insights_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + :param other_results: + :type other_results: + list[~azure.mgmt.machinelearningservices.models.DiagnoseResult] + """ + _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_defined_route_results': {'key': 'userDefinedRouteResults', 'type': '[DiagnoseResult]'}, + 'network_security_rule_results': {'key': 'networkSecurityRuleResults', 'type': '[DiagnoseResult]'}, + 'resource_lock_results': {'key': 'resourceLockResults', 'type': '[DiagnoseResult]'}, + 'dns_resolution_results': {'key': 'dnsResolutionResults', 'type': '[DiagnoseResult]'}, + 'storage_account_results': {'key': 'storageAccountResults', 'type': '[DiagnoseResult]'}, + 'key_vault_results': {'key': 'keyVaultResults', 'type': '[DiagnoseResult]'}, + 'container_registry_results': {'key': 'containerRegistryResults', 'type': '[DiagnoseResult]'}, + 'application_insights_results': {'key': 'applicationInsightsResults', 'type': '[DiagnoseResult]'}, + 'other_results': {'key': 'otherResults', 'type': '[DiagnoseResult]'}, } - def __init__(self, *, type=None, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type + def __init__(self, *, user_defined_route_results=None, network_security_rule_results=None, resource_lock_results=None, dns_resolution_results=None, storage_account_results=None, key_vault_results=None, container_registry_results=None, application_insights_results=None, other_results=None, **kwargs) -> None: + super(DiagnoseResponseResultValue, self).__init__(**kwargs) + self.user_defined_route_results = user_defined_route_results + self.network_security_rule_results = network_security_rule_results + self.resource_lock_results = resource_lock_results + self.dns_resolution_results = dns_resolution_results + self.storage_account_results = storage_account_results + self.key_vault_results = key_vault_results + self.container_registry_results = container_registry_results + self.application_insights_results = application_insights_results + self.other_results = other_results -class ListWorkspaceKeysResult(Model): - """ListWorkspaceKeysResult. +class DiagnoseResult(Model): + """Result of Diagnose. Variables are only populated by the server, and will be ignored when sending a request. - :ivar user_storage_key: - :vartype user_storage_key: str - :ivar user_storage_resource_id: - :vartype user_storage_resource_id: str - :ivar app_insights_instrumentation_key: - :vartype app_insights_instrumentation_key: str - :ivar container_registry_credentials: - :vartype container_registry_credentials: - ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar code: Code for workspace setup error + :vartype code: str + :ivar level: Level of workspace setup error. Possible values include: + 'Warning', 'Error', 'Information' + :vartype level: str or + ~azure.mgmt.machinelearningservices.models.DiagnoseResultLevel + :ivar message: Message of workspace setup error + :vartype message: str """ _validation = { - 'user_storage_key': {'readonly': True}, - 'user_storage_resource_id': {'readonly': True}, - 'app_insights_instrumentation_key': {'readonly': True}, - 'container_registry_credentials': {'readonly': True}, + 'code': {'readonly': True}, + 'level': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, - 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, - 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, - 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'code': {'key': 'code', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(ListWorkspaceKeysResult, self).__init__(**kwargs) - self.user_storage_key = None - self.user_storage_resource_id = None - self.app_insights_instrumentation_key = None - self.container_registry_credentials = None + super(DiagnoseResult, self).__init__(**kwargs) + self.code = None + self.level = None + self.message = None -class MachineLearningServiceError(Model): - """Wrapper for error response to follow ARM guidelines. +class DiagnoseWorkspaceParameters(Model): + """Parameters to diagnose a workspace. - Variables are only populated by the server, and will be ignored when - sending a request. + :param value: Value of Parameters + :type value: + ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'DiagnoseRequestProperties'}, + } - :ivar error: The error response. - :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + def __init__(self, *, value=None, **kwargs) -> None: + super(DiagnoseWorkspaceParameters, self).__init__(**kwargs) + self.value = value + + +class EncryptionProperty(Model): + """EncryptionProperty. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Indicates whether or not the encryption is + enabled for the workspace. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :param identity: The identity that will be used to access the key vault + for encryption at rest. + :type identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :param key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties """ _validation = { - 'error': {'readonly': True}, + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, } - def __init__(self, **kwargs) -> None: - super(MachineLearningServiceError, self).__init__(**kwargs) - self.error = None + def __init__(self, *, status, key_vault_properties, identity=None, **kwargs) -> None: + super(EncryptionProperty, self).__init__(**kwargs) + self.status = status + self.identity = identity + self.key_vault_properties = key_vault_properties -class MachineLearningServiceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MachineLearningServiceError'. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ - def __init__(self, deserialize, response, *args): + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } - super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class NodeStateCounts(Model): - """Counts of various compute node states on the amlCompute. + +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar idle_node_count: Idle node count. Number of compute nodes in idle - state. - :vartype idle_node_count: int - :ivar running_node_count: Running node count. Number of compute nodes - which are running jobs. - :vartype running_node_count: int - :ivar preparing_node_count: Preparing node count. Number of compute nodes - which are being prepared. - :vartype preparing_node_count: int - :ivar unusable_node_count: Unusable node count. Number of compute nodes - which are in unusable state. - :vartype unusable_node_count: int - :ivar leaving_node_count: Leaving node count. Number of compute nodes - which are leaving the amlCompute. - :vartype leaving_node_count: int - :ivar preempted_node_count: Preempted node count. Number of compute nodes - which are in preempted state. - :vartype preempted_node_count: int + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.machinelearningservices.models.ErrorAdditionalInfo] """ _validation = { - 'idle_node_count': {'readonly': True}, - 'running_node_count': {'readonly': True}, - 'preparing_node_count': {'readonly': True}, - 'unusable_node_count': {'readonly': True}, - 'leaving_node_count': {'readonly': True}, - 'preempted_node_count': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { - 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, - 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, - 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, - 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, - 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, - 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs) -> None: - super(NodeStateCounts, self).__init__(**kwargs) - self.idle_node_count = None - self.running_node_count = None - self.preparing_node_count = None - self.unusable_node_count = None - self.leaving_node_count = None - self.preempted_node_count = None + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None -class Operation(Model): - """Azure Machine Learning workspace REST API operation. +class ErrorResponse(Model): + """Error response. - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display name of operation - :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.machinelearningservices.models.ErrorDetail """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error -class OperationDisplay(Model): - """Display name of operation. +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. - :param provider: The resource provider name: - Microsoft.MachineLearningExperimentation - :type provider: str - :param resource: The resource on which the operation is performed. - :type resource: str - :param operation: The operation that users can perform. - :type operation: str - :param description: The description for the operation. - :type description: str + :param deserialize: A deserializer + :param response: Server response to be deserialized. """ - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } + def __init__(self, deserialize, response, *args): - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) -class Password(Model): - """Password. +class EstimatedVMPrice(Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. - 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 name: - :vartype name: str - :ivar value: - :vartype value: str + :param retail_price: Required. Retail price. The price charged for using + the VM. + :type retail_price: float + :param os_type: Required. OS type. Operating system type used by the VM. + Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :param vm_tier: Required. VM tier. The type of the VM. Possible values + include: 'Standard', 'LowPriority', 'Spot' + :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier """ _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(Password, self).__init__(**kwargs) - self.name = None - self.value = None + def __init__(self, *, retail_price: float, os_type, vm_tier, **kwargs) -> None: + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = retail_price + self.os_type = os_type + self.vm_tier = vm_tier -class RegistryListCredentialsResult(Model): - """RegistryListCredentialsResult. +class EstimatedVMPrices(Model): + """The estimated price info for using a VM. Variables are only populated by the server, and will be ignored when sending a request. - :ivar location: - :vartype location: str - :ivar username: - :vartype username: str - :param passwords: - :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Billing currency. Three lettered code + specifying the currency of the VM price. Example: USD. Default value: + "USD" . + :vartype billing_currency: str + :ivar unit_of_measure: Required. Unit of time measure. The unit of time + measurement for the specified VM price. Example: OneHour. Default value: + "OneHour" . + :vartype unit_of_measure: str + :param values: Required. List of estimated VM prices. The list of + estimated prices for using a VM of a particular OS type, tier, etc. + :type values: + list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] """ _validation = { - 'location': {'readonly': True}, - 'username': {'readonly': True}, + 'billing_currency': {'required': True, 'constant': True}, + 'unit_of_measure': {'required': True, 'constant': True}, + 'values': {'required': True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'passwords': {'key': 'passwords', 'type': '[Password]'}, + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, } - def __init__(self, *, passwords=None, **kwargs) -> None: - super(RegistryListCredentialsResult, self).__init__(**kwargs) - self.location = None - self.username = None - self.passwords = passwords + billing_currency = "USD" + unit_of_measure = "OneHour" -class ResourceId(Model): - """Represents a resource ID. For example, for a subnet, it is the resource URL - for the subnet. + def __init__(self, *, values, **kwargs) -> None: + super(EstimatedVMPrices, self).__init__(**kwargs) + self.values = values - All required parameters must be populated in order to send to Azure. - :param id: Required. The ID of the resource - :type id: str +class ExternalFQDNResponse(Model): + """ExternalFQDNResponse. + + :param value: + :type value: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpoints] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FQDNEndpoints]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ExternalFQDNResponse, self).__init__(**kwargs) + self.value = value + + +class FQDNEndpoint(Model): + """FQDNEndpoint. + + :param domain_name: + :type domain_name: str + :param endpoint_details: + :type endpoint_details: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[FQDNEndpointDetail]'}, + } + + def __init__(self, *, domain_name: str=None, endpoint_details=None, **kwargs) -> None: + super(FQDNEndpoint, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class FQDNEndpointDetail(Model): + """FQDNEndpointDetail. + + :param port: + :type port: int + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, port: int=None, **kwargs) -> None: + super(FQDNEndpointDetail, self).__init__(**kwargs) + self.port = port + + +class FQDNEndpoints(Model): + """FQDNEndpoints. + + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.FQDNEndpointsProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'FQDNEndpointsProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(FQDNEndpoints, self).__init__(**kwargs) + self.properties = properties + + +class FQDNEndpointsProperties(Model): + """FQDNEndpointsProperties. + + :param category: + :type category: str + :param endpoints: + :type endpoints: + list[~azure.mgmt.machinelearningservices.models.FQDNEndpoint] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[FQDNEndpoint]'}, + } + + def __init__(self, *, category: str=None, endpoints=None, **kwargs) -> None: + super(FQDNEndpointsProperties, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'HDInsight' + + +class HDInsightProperties(Model): + """HDInsight compute properties. + + :param ssh_port: Port open for ssh connections on the master node of the + cluster. + :type ssh_port: int + :param address: Public IP address of the master node of the cluster. + :type address: str + :param administrator_account: Admin credentials for master node of the + cluster + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, *, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = ssh_port + self.address = address + self.administrator_account = administrator_account + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned', + 'SystemAssigned,UserAssigned', 'UserAssigned', 'None' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The user assigned identities associated + with the resource. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class IdentityForCmk(Model): + """Identity that will be used to access key vault for encryption at rest. + + :param user_assigned_identity: The ArmId of the user assigned identity + that will be used to access the customer managed key vault + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__(self, *, user_assigned_identity: str=None, **kwargs) -> None: + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + + +class InstanceTypeSchema(Model): + """Instance type schema. + + :param node_selector: Node Selector + :type node_selector: dict[str, str] + :param resources: Resource requests/limits for this instance type + :type resources: + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchemaResources + """ + + _attribute_map = { + 'node_selector': {'key': 'nodeSelector', 'type': '{str}'}, + 'resources': {'key': 'resources', 'type': 'InstanceTypeSchemaResources'}, + } + + def __init__(self, *, node_selector=None, resources=None, **kwargs) -> None: + super(InstanceTypeSchema, self).__init__(**kwargs) + self.node_selector = node_selector + self.resources = resources + + +class InstanceTypeSchemaResources(Model): + """Resource requests/limits for this instance type. + + :param requests: Resource requests for this instance type + :type requests: dict[str, str] + :param limits: Resource limits for this instance type + :type limits: dict[str, str] + """ + + _attribute_map = { + 'requests': {'key': 'requests', 'type': '{str}'}, + 'limits': {'key': 'limits', 'type': '{str}'}, + } + + def __init__(self, *, requests=None, limits=None, **kwargs) -> None: + super(InstanceTypeSchemaResources, self).__init__(**kwargs) + self.requests = requests + self.limits = limits + + +class KeyVaultProperties(Model): + """KeyVaultProperties. + + All required parameters must be populated in order to send to Azure. + + :param key_vault_arm_id: Required. The ArmId of the keyVault where the + customer owned encryption key is present. + :type key_vault_arm_id: str + :param key_identifier: Required. Key vault uri to access the encryption + key. + :type key_identifier: str + :param identity_client_id: For future use - The client id of the identity + which will be used to access key vault. + :type identity_client_id: str + """ + + _validation = { + 'key_vault_arm_id': {'required': True}, + 'key_identifier': {'required': True}, + } + + _attribute_map = { + 'key_vault_arm_id': {'key': 'keyVaultArmId', 'type': 'str'}, + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'identity_client_id': {'key': 'identityClientId', 'type': 'str'}, + } + + def __init__(self, *, key_vault_arm_id: str, key_identifier: str, identity_client_id: str=None, **kwargs) -> None: + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_vault_arm_id = key_vault_arm_id + self.key_identifier = key_identifier + self.identity_client_id = identity_client_id + + +class Kubernetes(Model): + """A Machine Learning compute based on Kubernetes Compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'Kubernetes', 'AmlCompute', 'ComputeInstance', + 'DataFactory', 'VirtualMachine', 'HDInsight', 'Databricks', + 'DataLakeAnalytics', 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param properties: Properties of Kubernetes + :type properties: + ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _validation = { + 'compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__(self, *, compute_type, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(Kubernetes, self).__init__(**kwargs) + self.compute_type = compute_type + self.compute_location = compute_location + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + self.properties = properties + + +class KubernetesProperties(Model): + """Kubernetes properties. + + :param relay_connection_string: Relay connection string. + :type relay_connection_string: str + :param service_bus_connection_string: ServiceBus connection string. + :type service_bus_connection_string: str + :param extension_principal_id: Extension principal-id. + :type extension_principal_id: str + :param extension_instance_release_train: Extension instance release train. + :type extension_instance_release_train: str + :param vc_name: VC name. + :type vc_name: str + :param namespace: Compute namespace. Default value: "default" . + :type namespace: str + :param default_instance_type: Default instance type + :type default_instance_type: str + :param instance_types: Instance Type Schema + :type instance_types: dict[str, + ~azure.mgmt.machinelearningservices.models.InstanceTypeSchema] + """ + + _attribute_map = { + 'relay_connection_string': {'key': 'relayConnectionString', 'type': 'str'}, + 'service_bus_connection_string': {'key': 'serviceBusConnectionString', 'type': 'str'}, + 'extension_principal_id': {'key': 'extensionPrincipalId', 'type': 'str'}, + 'extension_instance_release_train': {'key': 'extensionInstanceReleaseTrain', 'type': 'str'}, + 'vc_name': {'key': 'vcName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'default_instance_type': {'key': 'defaultInstanceType', 'type': 'str'}, + 'instance_types': {'key': 'instanceTypes', 'type': '{InstanceTypeSchema}'}, + } + + def __init__(self, *, relay_connection_string: str=None, service_bus_connection_string: str=None, extension_principal_id: str=None, extension_instance_release_train: str=None, vc_name: str=None, namespace: str="default", default_instance_type: str=None, instance_types=None, **kwargs) -> None: + super(KubernetesProperties, self).__init__(**kwargs) + self.relay_connection_string = relay_connection_string + self.service_bus_connection_string = service_bus_connection_string + self.extension_principal_id = extension_principal_id + self.extension_instance_release_train = extension_instance_release_train + self.vc_name = vc_name + self.namespace = namespace + self.default_instance_type = default_instance_type + self.instance_types = instance_types + + +class KubernetesSchema(Model): + """Kubernetes Compute Schema. + + :param properties: Properties of Kubernetes + :type properties: + ~azure.mgmt.machinelearningservices.models.KubernetesProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'KubernetesProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(KubernetesSchema, self).__init__(**kwargs) + self.properties = properties + + +class ListNotebookKeysResult(Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListWorkspaceKeysResult(Model): + """ListWorkspaceKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__(self, **kwargs) -> None: + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NotebookAccessTokenResult(Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(Model): + """NotebookPreparationError. + + :param error_message: + :type error_message: str + :param status_code: + :type status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__(self, *, error_message: str=None, status_code: int=None, **kwargs) -> None: + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = error_message + self.status_code = status_code + + +class NotebookResourceInfo(Model): + """NotebookResourceInfo. + + :param fqdn: + :type fqdn: str + :param resource_id: the data plane resourceId that used to initialize + notebook component + :type resource_id: str + :param notebook_preparation_error: The error that occurs when preparing + notebook. + :type notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__(self, *, fqdn: str=None, resource_id: str=None, notebook_preparation_error=None, **kwargs) -> None: + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = fqdn + self.resource_id = resource_id + self.notebook_preparation_error = notebook_preparation_error + + +class Operation(Model): + """Azure Machine Learning workspace REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display name of operation + :type display: ~azure.mgmt.machinelearningservices.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): + """Display name of operation. + + :param provider: The resource provider name: + Microsoft.MachineLearningExperimentation + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Password(Model): + """Password. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PersonalComputeInstanceSettings(Model): + """Settings for a personal compute instance. + + :param assigned_user: Assigned User. A user explicitly assigned to a + personal compute instance. + :type assigned_user: + ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__(self, *, assigned_user=None, **kwargs) -> None: + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = assigned_user + + +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private + endpoint links to + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: + ~azure.mgmt.machinelearningservices.models.PrivateEndpoint + :param private_link_service_connection_state: Required. A collection of + information about the state of the connection between service consumer and + provider. + :type private_link_service_connection_state: + ~azure.mgmt.machinelearningservices.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionProvisioningState + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, private_link_service_connection_state, private_endpoint=None, provisioning_state=None, identity=None, location: str=None, tags=None, sku=None, system_data=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.system_data = system_data + + +class PrivateLinkResource(Resource): + """A private link resource. + + 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. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, required_zone_names=None, identity=None, location: str=None, tags=None, sku=None, system_data=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.system_data = system_data + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: + list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(Model): + """A collection of information about the state of the connection between + service consumer and provider. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + :type status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + 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. E.g. + "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(ProxyResource, self).__init__(**kwargs) + + +class QuotaBaseProperties(Model): + """The properties for Quota update or retrieval. + + :param id: Specifies the resource ID. + :type id: str + :param type: Specifies the resource type. + :type type: str + :param limit: Limit. The maximum permitted quota of the resource. + :type limit: long + :param unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :type unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, type: str=None, limit: int=None, unit=None, **kwargs) -> None: + super(QuotaBaseProperties, self).__init__(**kwargs) + self.id = id + self.type = type + self.limit = limit + self.unit = unit + + +class QuotaUpdateParameters(Model): + """Quota update parameters. + + :param value: The list for update quota. + :type value: + list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :param location: Region of workspace quota to be updated. + :type location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, value=None, location: str=None, **kwargs) -> None: + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = value + self.location = location + + +class RegistryListCredentialsResult(Model): + """RegistryListCredentialsResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :param passwords: + :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + + _validation = { + 'location': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__(self, *, passwords=None, **kwargs) -> None: + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = passwords + + +class ResourceId(Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL + for the subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceId, self).__init__(**kwargs) + self.id = id + + +class ResourceName(Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceQuota(Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: Limit. The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. Possible values + include: 'NotSpecified', 'NotAvailableForRegion', + 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.machinelearningservices.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, *, reason_code=None, **kwargs) -> None: + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = reason_code + + +class ScaleSettings(Model): + """scale settings for AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param max_node_count: Required. Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use. Default value: 0 . + :type min_node_count: int + :param node_idle_time_before_scale_down: Node Idle Time before scaling + down amlCompute. This string needs to be in the RFC Format. + :type node_idle_time_before_scale_down: timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__(self, *, max_node_count: int, min_node_count: int=0, node_idle_time_before_scale_down=None, **kwargs) -> None: + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = max_node_count + self.min_node_count = min_node_count + self.node_idle_time_before_scale_down = node_idle_time_before_scale_down + + +class ScaleSettingsInformation(Model): + """Desired scale settings for the amlCompute. + + :param scale_settings: Scale settings. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, *, scale_settings=None, **kwargs) -> None: + super(ScaleSettingsInformation, self).__init__(**kwargs) + self.scale_settings = scale_settings + + +class ScriptReference(Model): + """Script reference. + + :param script_source: The storage source of the script: inline, workspace. + :type script_source: str + :param script_data: The location of scripts in the mounted volume. + :type script_data: str + :param script_arguments: Optional command line arguments passed to the + script to run. + :type script_arguments: str + :param timeout: Optional time period passed to timeout command. + :type timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__(self, *, script_source: str=None, script_data: str=None, script_arguments: str=None, timeout: str=None, **kwargs) -> None: + super(ScriptReference, self).__init__(**kwargs) + self.script_source = script_source + self.script_data = script_data + self.script_arguments = script_arguments + self.timeout = timeout + + +class ScriptsToExecute(Model): + """Customized setup scripts. + + :param startup_script: Script that's run every time the machine starts. + :type startup_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + :param creation_script: Script that's run only once during provision of + the compute. + :type creation_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__(self, *, startup_script=None, creation_script=None, **kwargs) -> None: + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = startup_script + self.creation_script = creation_script + + +class ServiceManagedResourcesSettings(Model): + """ServiceManagedResourcesSettings. + + :param cosmos_db: The settings for the service managed cosmosdb account. + :type cosmos_db: + ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__(self, *, cosmos_db=None, **kwargs) -> None: + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = cosmos_db + + +class ServicePrincipalCredentials(Model): + """Service principal credentials. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. Client Id + :type client_id: str + :param client_secret: Required. Client secret + :type client_secret: str + """ + + _validation = { + 'client_id': {'required': True}, + 'client_secret': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str, client_secret: str, **kwargs) -> None: + super(ServicePrincipalCredentials, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + + +class SetupScripts(Model): + """Details of customized scripts to execute for setting up the cluster. + + :param scripts: Customized setup scripts + :type scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + + def __init__(self, *, scripts=None, **kwargs) -> None: + super(SetupScripts, self).__init__(**kwargs) + self.scripts = scripts + + +class SharedPrivateLinkResource(Model): + """SharedPrivateLinkResource. + + :param name: Unique name of the private link. + :type name: str + :param private_link_resource_id: The resource id that private link links + to. + :type private_link_resource_id: str + :param group_id: The private link resource group id. + :type group_id: str + :param request_message: Request message. + :type request_message: str + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + :type status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, private_link_resource_id: str=None, group_id: str=None, request_message: str=None, status=None, **kwargs) -> None: + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.name = name + self.private_link_resource_id = private_link_resource_id + self.group_id = group_id + self.request_message = request_message + self.status = status + + +class Sku(Model): + """Sku of the resource. + + :param name: Name of the sku + :type name: str + :param tier: Tier of the sku like Basic or Enterprise + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, tier: str=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SKUCapability(Model): + """Features/user capabilities associated with the sku. + + :param name: Capability/Feature ID + :type name: str + :param value: Details about the feature/capability + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(SKUCapability, self).__init__(**kwargs) + self.name = name + self.value = value + + +class SslConfiguration(Model): + """The ssl configuration for scoring. + + :param status: Enable or disable ssl for scoring. Possible values include: + 'Disabled', 'Enabled', 'Auto' + :type status: str or ~azure.mgmt.machinelearningservices.models.enum + :param cert: Cert data + :type cert: str + :param key: Key data + :type key: str + :param cname: CNAME of the cert + :type cname: str + :param leaf_domain_label: Leaf domain label of public endpoint + :type leaf_domain_label: str + :param overwrite_existing_domain: Indicates whether to overwrite existing + domain label. + :type overwrite_existing_domain: bool + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, + } + + def __init__(self, *, status=None, cert: str=None, key: str=None, cname: str=None, leaf_domain_label: str=None, overwrite_existing_domain: bool=None, **kwargs) -> None: + super(SslConfiguration, self).__init__(**kwargs) + self.status = status + self.cert = cert + self.key = key + self.cname = cname + self.leaf_domain_label = leaf_domain_label + self.overwrite_existing_domain = overwrite_existing_domain + + +class SynapseSpark(Compute): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] + :ivar is_attached_compute: Indicating whether the compute was provisioned + by user and brought from outside if true, or machine learning service + provisioned it if false. + :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(SynapseSpark, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'SynapseSpark' + + +class SynapseSparkProperties(Model): + """SynapseSparkProperties. + + :param auto_scale_properties: Auto scale properties. + :type auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :param auto_pause_properties: Auto pause properties. + :type auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :param spark_version: Spark version. + :type spark_version: str + :param node_count: The number of compute nodes currently assigned to the + compute. + :type node_count: int + :param node_size: Node size. + :type node_size: str + :param node_size_family: Node size family. + :type node_size_family: str + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param resource_group: Name of the resource group in which workspace is + located. + :type resource_group: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param pool_name: Pool name. + :type pool_name: str """ - _validation = { - 'id': {'required': True}, + _attribute_map = { + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, } + def __init__(self, *, auto_scale_properties=None, auto_pause_properties=None, spark_version: str=None, node_count: int=None, node_size: str=None, node_size_family: str=None, subscription_id: str=None, resource_group: str=None, workspace_name: str=None, pool_name: str=None, **kwargs) -> None: + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = auto_scale_properties + self.auto_pause_properties = auto_pause_properties + self.spark_version = spark_version + self.node_count = node_count + self.node_size = node_size + self.node_size_family = node_size_family + self.subscription_id = subscription_id + self.resource_group = resource_group + self.workspace_name = workspace_name + self.pool_name = pool_name + + +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.machinelearningservices.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.machinelearningservices.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + '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, *, id: str, **kwargs) -> None: - super(ResourceId, self).__init__(**kwargs) - self.id = id + 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 ScaleSettings(Model): - """scale settings for AML Compute. +class SystemService(Model): + """A system service running on a compute. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when + sending a request. - :param max_node_count: Required. Max number of nodes to use - :type max_node_count: int - :param min_node_count: Min number of nodes to use. Default value: 0 . - :type min_node_count: int - :param node_idle_time_before_scale_down: Node Idle Time before scaling - down amlCompute - :type node_idle_time_before_scale_down: timedelta + :ivar system_service_type: The type of this system service. + :vartype system_service_type: str + :ivar public_ip_address: Public IP address + :vartype public_ip_address: str + :ivar version: The version for this type. + :vartype version: str """ _validation = { - 'max_node_count': {'required': True}, + 'system_service_type': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'version': {'readonly': True}, } _attribute_map = { - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, - 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, *, max_node_count: int, min_node_count: int=0, node_idle_time_before_scale_down=None, **kwargs) -> None: - super(ScaleSettings, self).__init__(**kwargs) - self.max_node_count = max_node_count - self.min_node_count = min_node_count - self.node_idle_time_before_scale_down = node_idle_time_before_scale_down + def __init__(self, **kwargs) -> None: + super(SystemService, self).__init__(**kwargs) + self.system_service_type = None + self.public_ip_address = None + self.version = None -class ServicePrincipalCredentials(Model): - """Service principal credentials. +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param client_id: Required. Client Id - :type client_id: str - :param client_secret: Required. Client secret - :type client_secret: str + :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. E.g. + "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 = { - 'client_id': {'required': True}, - 'client_secret': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + '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, *, client_id: str, client_secret: str, **kwargs) -> None: - super(ServicePrincipalCredentials, self).__init__(**kwargs) - self.client_id = client_id - self.client_secret = client_secret + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location -class SslConfiguration(Model): - """The ssl configuration for scoring. +class UpdateWorkspaceQuotas(Model): + """The properties for update Quota response. - :param status: Enable or disable ssl for scoring. Possible values include: - 'Disabled', 'Enabled' - :type status: str or ~azure.mgmt.machinelearningservices.models.enum - :param cert: Cert data - :type cert: str - :param key: Key data - :type key: str - :param cname: CNAME of the cert - :type cname: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar type: Specifies the resource type. + :vartype type: str + :param limit: Limit. The maximum permitted quota of the resource. + :type limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + :param status: Update Workspace Quota Status. Status of update workspace + quota. Possible values include: 'Undefined', 'Success', 'Failure', + 'InvalidQuotaBelowClusterMinimum', 'InvalidQuotaExceedsSubscriptionLimit', + 'InvalidVMFamilyName', 'OperationNotSupportedForSku', + 'OperationNotEnabledForRegion' + :type status: str or ~azure.mgmt.machinelearningservices.models.Status """ + _validation = { + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'unit': {'readonly': True}, + } + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, 'status': {'key': 'status', 'type': 'str'}, - 'cert': {'key': 'cert', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'cname': {'key': 'cname', 'type': 'str'}, } - def __init__(self, *, status=None, cert: str=None, key: str=None, cname: str=None, **kwargs) -> None: - super(SslConfiguration, self).__init__(**kwargs) + def __init__(self, *, limit: int=None, status=None, **kwargs) -> None: + super(UpdateWorkspaceQuotas, self).__init__(**kwargs) + self.id = None + self.type = None + self.limit = limit + self.unit = None self.status = status - self.cert = cert - self.key = key - self.cname = cname -class SystemService(Model): - """A system service running on a compute. +class UpdateWorkspaceQuotasResult(Model): + """The result of update workspace quota. Variables are only populated by the server, and will be ignored when sending a request. - :ivar system_service_type: The type of this system service. - :vartype system_service_type: str - :ivar public_ip_address: Public IP address - :vartype public_ip_address: str - :ivar version: The version for this type. - :vartype version: str + :ivar value: The list of workspace quota update result. + :vartype value: + list[~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotas] + :ivar next_link: The URI to fetch the next page of workspace quota update + result. Call ListNext() with this to fetch the next page of Workspace + Quota update result. + :vartype next_link: str """ _validation = { - 'system_service_type': {'readonly': True}, - 'public_ip_address': {'readonly': True}, - 'version': {'readonly': True}, + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, } _attribute_map = { - 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, - 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(SystemService, self).__init__(**kwargs) - self.system_service_type = None - self.public_ip_address = None - self.version = None + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None class Usage(Model): @@ -1515,6 +3900,8 @@ class Usage(Model): :ivar id: Specifies the resource ID. :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str :ivar type: Specifies the resource type. :vartype type: str :ivar unit: An enum describing the unit of usage measurement. Possible @@ -1530,6 +3917,7 @@ class Usage(Model): _validation = { 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, 'type': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -1539,6 +3927,7 @@ class Usage(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'current_value': {'key': 'currentValue', 'type': 'long'}, @@ -1549,6 +3938,7 @@ class Usage(Model): def __init__(self, **kwargs) -> None: super(Usage, self).__init__(**kwargs) self.id = None + self.aml_workspace_location = None self.type = None self.unit = None self.current_value = None @@ -1618,6 +4008,39 @@ def __init__(self, *, admin_user_name: str, admin_user_ssh_public_key: str=None, self.admin_user_password = admin_user_password +class UserAssignedIdentity(Model): + """User Assigned Identity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the user assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the user assigned identity. + :vartype tenant_id: str + :ivar client_id: The clientId(aka appId) of the user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.client_id = None + + class VirtualMachine(Compute): """A Machine Learning compute based on Azure Virtual Machines. @@ -1636,19 +4059,22 @@ class VirtualMachine(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str :ivar provisioning_errors: Errors during provisioning :vartype provisioning_errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + list[~azure.mgmt.machinelearningservices.models.ErrorResponse] :ivar is_attached_compute: Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: @@ -1672,18 +4098,41 @@ class VirtualMachine(Compute): 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[ErrorResponse]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties self.compute_type = 'VirtualMachine' +class VirtualMachineImage(Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Virtual Machine image path + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = id + + class VirtualMachineProperties(Model): """VirtualMachineProperties. @@ -1696,6 +4145,9 @@ class VirtualMachineProperties(Model): :param administrator_account: Admin credentials for virtual machine :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param is_notebook_instance_compute: Indicates whether this compute will + be used for running notebooks. + :type is_notebook_instance_compute: bool """ _attribute_map = { @@ -1703,14 +4155,16 @@ class VirtualMachineProperties(Model): 'ssh_port': {'key': 'sshPort', 'type': 'int'}, 'address': {'key': 'address', 'type': 'str'}, 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, } - def __init__(self, *, virtual_machine_size: str=None, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: + def __init__(self, *, virtual_machine_size: str=None, ssh_port: int=None, address: str=None, administrator_account=None, is_notebook_instance_compute: bool=None, **kwargs) -> None: super(VirtualMachineProperties, self).__init__(**kwargs) self.virtual_machine_size = virtual_machine_size self.ssh_port = ssh_port self.address = address self.administrator_account = administrator_account + self.is_notebook_instance_compute = is_notebook_instance_compute class VirtualMachineSecrets(ComputeSecrets): @@ -1755,6 +4209,9 @@ class VirtualMachineSize(Model): :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the virtual machine size. :vartype v_cp_us: int + :ivar gpus: Number of gPUs. The number of gPUs supported by the virtual + machine size. + :vartype gpus: int :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, allowed by the virtual machine size. :vartype os_vhd_size_mb: int @@ -1770,12 +4227,20 @@ class VirtualMachineSize(Model): :ivar premium_io: Premium IO supported. Specifies if the virtual machine size supports premium IO. :vartype premium_io: bool + :param estimated_vm_prices: Estimated VM prices. The estimated price + information for using a VM. + :type estimated_vm_prices: + ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices + :param supported_compute_types: Supported Compute Types. Specifies the + compute types supported by the virtual machine size. + :type supported_compute_types: list[str] """ _validation = { 'name': {'readonly': True}, 'family': {'readonly': True}, 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, 'os_vhd_size_mb': {'readonly': True}, 'max_resource_volume_mb': {'readonly': True}, 'memory_gb': {'readonly': True}, @@ -1787,41 +4252,46 @@ class VirtualMachineSize(Model): 'name': {'key': 'name', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, + 'supported_compute_types': {'key': 'supportedComputeTypes', 'type': '[str]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, estimated_vm_prices=None, supported_compute_types=None, **kwargs) -> None: super(VirtualMachineSize, self).__init__(**kwargs) self.name = None self.family = None self.v_cp_us = None + self.gpus = None self.os_vhd_size_mb = None self.max_resource_volume_mb = None self.memory_gb = None self.low_priority_capable = None self.premium_io = None + self.estimated_vm_prices = estimated_vm_prices + self.supported_compute_types = supported_compute_types class VirtualMachineSizeListResult(Model): """The List Virtual Machine size operation response. - :param aml_compute: The list of virtual machine sizes supported by - AmlCompute. - :type aml_compute: + :param value: The list of virtual machine sizes supported by AmlCompute. + :type value: list[~azure.mgmt.machinelearningservices.models.VirtualMachineSize] """ _attribute_map = { - 'aml_compute': {'key': 'amlCompute', 'type': '[VirtualMachineSize]'}, + 'value': {'key': 'value', 'type': '[VirtualMachineSize]'}, } - def __init__(self, *, aml_compute=None, **kwargs) -> None: + def __init__(self, *, value=None, **kwargs) -> None: super(VirtualMachineSizeListResult, self).__init__(**kwargs) - self.aml_compute = aml_compute + self.value = value class VirtualMachineSshCredentials(Model): @@ -1858,18 +4328,14 @@ class Workspace(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Specifies the resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Specifies the name of the resource. + :ivar name: The name of the resource :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1877,9 +4343,6 @@ class Workspace(Resource): :param friendly_name: The friendly name for this workspace. This name in mutable :type friendly_name: str - :ivar creation_time: The creation time of the machine learning workspace - in ISO8601 format. - :vartype creation_time: datetime :param key_vault: ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created :type key_vault: str @@ -1903,49 +4366,261 @@ class Workspace(Resource): 'Deleting', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param encryption: The encryption settings of Azure ML workspace. + :type encryption: + ~azure.mgmt.machinelearningservices.models.EncryptionProperty + :param hbi_workspace: The flag to signal HBI data in the workspace and + reduce diagnostic data collected by the service. Default value: False . + :type hbi_workspace: bool + :ivar service_provisioned_resource_group: The name of the managed resource + group created by workspace RP in customer subscription if the workspace is + CMK workspace + :vartype service_provisioned_resource_group: str + :ivar private_link_count: Count of private connections in the workspace + :vartype private_link_count: int + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param allow_public_access_when_behind_vnet: The flag to indicate whether + to allow public access when behind VNet. Default value: False . + :type allow_public_access_when_behind_vnet: bool + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess + :ivar private_endpoint_connections: The list of private endpoint + connections in the workspace. + :vartype private_endpoint_connections: + list[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + :param shared_private_link_resources: The list of shared private link + resources in this workspace. + :type shared_private_link_resources: + list[~azure.mgmt.machinelearningservices.models.SharedPrivateLinkResource] + :ivar notebook_info: The notebook info of Azure ML workspace. + :vartype notebook_info: + ~azure.mgmt.machinelearningservices.models.NotebookResourceInfo + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str + :ivar storage_hns_enabled: If the storage associated with the workspace + has hierarchical namespace(HNS) enabled. + :vartype storage_hns_enabled: bool + :ivar ml_flow_tracking_uri: The URI associated with this workspace that + machine learning flow must point at to set up tracking. + :vartype ml_flow_tracking_uri: str + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity + :param location: Specifies the location of the resource. + :type location: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param system_data: System data + :type system_data: ~azure.mgmt.machinelearningservices.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, 'workspace_id': {'readonly': True}, - 'creation_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'storage_hns_enabled': {'readonly': True}, + 'ml_flow_tracking_uri': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, + 'storage_hns_enabled': {'key': 'properties.storageHnsEnabled', 'type': 'bool'}, + 'ml_flow_tracking_uri': {'key': 'properties.mlFlowTrackingUri', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: - super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, encryption=None, hbi_workspace: bool=False, image_build_compute: str=None, allow_public_access_when_behind_vnet: bool=False, public_network_access=None, shared_private_link_resources=None, service_managed_resources_settings=None, primary_user_assigned_identity: str=None, identity=None, location: str=None, tags=None, sku=None, system_data=None, **kwargs) -> None: + super(Workspace, self).__init__(**kwargs) self.workspace_id = None self.description = description self.friendly_name = friendly_name - self.creation_time = None self.key_vault = key_vault self.application_insights = application_insights self.container_registry = container_registry self.storage_account = storage_account self.discovery_url = discovery_url self.provisioning_state = None + self.encryption = encryption + self.hbi_workspace = hbi_workspace + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = image_build_compute + self.allow_public_access_when_behind_vnet = allow_public_access_when_behind_vnet + self.public_network_access = public_network_access + self.private_endpoint_connections = None + self.shared_private_link_resources = shared_private_link_resources + self.notebook_info = None + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity + self.tenant_id = None + self.storage_hns_enabled = None + self.ml_flow_tracking_uri = None + self.identity = identity + self.location = location + self.tags = tags + self.sku = sku + self.system_data = system_data + + +class WorkspaceConnection(Model): + """Workspace connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ResourceId of the workspace connection. + :vartype id: str + :ivar name: Friendly name of the workspace connection. + :vartype name: str + :ivar type: Resource type of workspace connection. + :vartype type: str + :param category: Category of the workspace connection. + :type category: str + :param target: Target of the workspace connection. + :type target: str + :param auth_type: Authorization type of the workspace connection. + :type auth_type: str + :param value: Value details of the workspace connection. + :type value: str + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _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'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'auth_type': {'key': 'properties.authType', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'value_format': {'key': 'properties.valueFormat', 'type': 'str'}, + } + + def __init__(self, *, category: str=None, target: str=None, auth_type: str=None, value: str=None, value_format=None, **kwargs) -> None: + super(WorkspaceConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.category = category + self.target = target + self.auth_type = auth_type + self.value = value + self.value_format = value_format + + +class WorkspaceSku(Model): + """Describes Workspace Sku details and features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo] + :ivar tier: Sku Tier like Basic or Enterprise + :vartype tier: str + :ivar resource_type: + :vartype resource_type: str + :ivar name: + :vartype name: str + :ivar capabilities: List of features/user capabilities associated with the + sku + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.machinelearningservices.models.Restriction] + """ + + _validation = { + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, *, restrictions=None, **kwargs) -> None: + super(WorkspaceSku, self).__init__(**kwargs) + self.locations = None + self.location_info = None + self.tier = None + self.resource_type = None + self.name = None + self.capabilities = None + self.restrictions = restrictions class WorkspaceUpdateParameters(Model): @@ -1953,20 +4628,49 @@ class WorkspaceUpdateParameters(Model): :param tags: The resource tags for the machine learning workspace. :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity :param description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. :type friendly_name: str + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.machinelearningservices.models.PublicNetworkAccess """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } - def __init__(self, *, tags=None, description: str=None, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, identity=None, description: str=None, friendly_name: str=None, image_build_compute: str=None, service_managed_resources_settings=None, primary_user_assigned_identity: str=None, public_network_access=None, **kwargs) -> None: super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.sku = sku + self.identity = identity self.description = description self.friendly_name = friendly_name + self.image_build_compute = image_build_compute + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity + self.public_network_access = public_network_access diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py index 9bc3567bbf905..3b6d28650034f 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py @@ -51,6 +51,19 @@ class UsagePaged(Paged): def __init__(self, *args, **kwargs): super(UsagePaged, self).__init__(*args, **kwargs) +class ResourceQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceQuotaPaged, self).__init__(*args, **kwargs) class ComputeResourcePaged(Paged): """ A paging container for iterating over a list of :class:`ComputeResource ` object @@ -64,3 +77,68 @@ class ComputeResourcePaged(Paged): def __init__(self, *args, **kwargs): super(ComputeResourcePaged, self).__init__(*args, **kwargs) +class AmlComputeNodeInformationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AmlComputeNodeInformation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'} + } + + def __init__(self, *args, **kwargs): + + super(AmlComputeNodeInformationPaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) +class WorkspaceConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkspaceConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkspaceConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspaceConnectionPaged, self).__init__(*args, **kwargs) +class AmlUserFeaturePaged(Paged): + """ + A paging container for iterating over a list of :class:`AmlUserFeature ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AmlUserFeature]'} + } + + def __init__(self, *args, **kwargs): + + super(AmlUserFeaturePaged, self).__init__(*args, **kwargs) +class WorkspaceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`WorkspaceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[WorkspaceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(WorkspaceSkuPaged, self).__init__(*args, **kwargs) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py index 4daae17a67dd1..2009ff04ab24d 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py @@ -13,12 +13,24 @@ from ._workspaces_operations import WorkspacesOperations from ._usages_operations import UsagesOperations from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations -from ._machine_learning_compute_operations import MachineLearningComputeOperations +from ._quotas_operations import QuotasOperations +from ._compute_operations import ComputeOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._workspace_connections_operations import WorkspaceConnectionsOperations +from ._workspace_features_operations import WorkspaceFeaturesOperations +from ._workspace_skus_operations import WorkspaceSkusOperations __all__ = [ 'Operations', 'WorkspacesOperations', 'UsagesOperations', 'VirtualMachineSizesOperations', - 'MachineLearningComputeOperations', + 'QuotasOperations', + 'ComputeOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'WorkspaceConnectionsOperations', + 'WorkspaceFeaturesOperations', + 'WorkspaceSkusOperations', ] diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py similarity index 59% rename from sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py rename to sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py index 203b86e19b286..a66b8227385b7 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_compute_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_compute_operations.py @@ -17,8 +17,8 @@ from .. import models -class MachineLearningComputeOperations(object): - """MachineLearningComputeOperations operations. +class ComputeOperations(object): + """ComputeOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. @@ -26,7 +26,7 @@ class MachineLearningComputeOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2019-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-07-01". """ models = models @@ -36,21 +36,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-07-01" self.config = config - def list_by_workspace( - self, resource_group_name, workspace_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + def list( + self, resource_group_name, workspace_name, skip=None, custom_headers=None, raw=False, **operation_config): """Gets computes in specified workspace. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -60,24 +60,24 @@ def list_by_workspace( :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResourcePaged[~azure.mgmt.machinelearningservices.models.ComputeResource] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_workspace.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -103,7 +103,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -114,7 +114,7 @@ def internal_paging(next_link=None): deserialized = models.ComputeResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'} def get( self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): @@ -122,8 +122,8 @@ def get( credentials, etc) are not returned - use 'keys' nested resource to get them. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -138,13 +138,13 @@ def get( :rtype: ~azure.mgmt.machinelearningservices.models.ComputeResource or ~msrest.pipeline.ClientRawResponse :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -152,7 +152,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -169,7 +169,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -188,8 +188,8 @@ def _create_or_update_initial( # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -197,7 +197,7 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -218,7 +218,7 @@ def _create_or_update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None header_dict = {} @@ -247,8 +247,8 @@ def create_or_update( exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -269,7 +269,7 @@ def create_or_update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.ComputeResource]] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -305,14 +305,14 @@ def get_long_running_output(response): def _update_initial( - self, resource_group_name, workspace_name, compute_name, scale_settings=None, custom_headers=None, raw=False, **operation_config): - parameters = models.ClusterUpdateParameters(scale_settings=scale_settings) + self, resource_group_name, workspace_name, compute_name, properties=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ClusterUpdateParameters(properties=properties) # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -320,7 +320,7 @@ def _update_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -341,7 +341,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -355,21 +355,20 @@ def _update_initial( return deserialized def update( - self, resource_group_name, workspace_name, compute_name, scale_settings=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, workspace_name, compute_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): """Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str :param compute_name: Name of the Azure Machine Learning compute. :type compute_name: str - :param scale_settings: Scale settings. Desired scale settings for the - amlCompute. - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings + :param properties: Properties of ClusterUpdate + :type properties: + ~azure.mgmt.machinelearningservices.models.ScaleSettingsInformation :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -382,13 +381,13 @@ def update( or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.ComputeResource]] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, workspace_name=workspace_name, compute_name=compute_name, - scale_settings=scale_settings, + properties=properties, custom_headers=custom_headers, raw=True, **operation_config @@ -418,8 +417,8 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -427,7 +426,7 @@ def _delete_initial( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) query_parameters['underlyingResourceAction'] = self._serialize.query("underlying_resource_action", underlying_resource_action, 'str') # Construct headers @@ -444,7 +443,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -459,8 +458,8 @@ def delete( self, resource_group_name, workspace_name, compute_name, underlying_resource_action, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes specified Machine Learning compute. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -481,7 +480,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -516,8 +515,8 @@ def list_nodes( """Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -528,18 +527,93 @@ def list_nodes( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AmlComputeNodesInformation or ClientRawResponse if raw=true + :return: An iterator like instance of AmlComputeNodeInformation :rtype: - ~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformationPaged[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_nodes.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'computeName': self._serialize.url("compute_name", compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AmlComputeNodeInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} + + def list_keys( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Gets secrets related to Machine Learning compute (storage keys, service + credentials, etc). + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ComputeSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` """ # Construct URL - url = self.list_nodes.metadata['url'] + url = self.list_keys.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -547,7 +621,7 @@ def list_nodes( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -564,47 +638,110 @@ def list_nodes( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AmlComputeNodesInformation', response) + deserialized = self._deserialize('ComputeSecrets', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} - def list_keys( + + def _start_initial( self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): - """Gets secrets related to Machine Learning compute (storage keys, service - credentials, etc). + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'computeName': self._serialize.url("compute_name", compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) - :param resource_group_name: Name of the resource group in which - workspace is located. + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Posts a start action to a compute instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str :param compute_name: Name of the Azure Machine Learning compute. :type compute_name: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ComputeSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets or - ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} + + + def _stop_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.list_keys.metadata['url'] + url = self.stop.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), 'computeName': self._serialize.url("compute_name", compute_name, 'str') } @@ -612,11 +749,10 @@ def list_keys( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -628,16 +764,138 @@ def list_keys( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ComputeSecrets', response) + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Posts a stop action to a compute instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._stop_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} + + + def _restart_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'computeName': self._serialize.url("compute_name", compute_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + raise models.ErrorResponseException(self._deserialize, response) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} + def restart( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Posts a restart action to a compute instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param compute_name: Name of the Azure Machine Learning compute. + :type compute_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py index 7b558ec9d6457..c684f9c78ca68 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2019-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-07-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-07-01" self.config = config @@ -52,7 +52,7 @@ def list( :rtype: ~azure.mgmt.machinelearningservices.models.OperationPaged[~azure.mgmt.machinelearningservices.models.Operation] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: @@ -61,7 +61,7 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link @@ -87,7 +87,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py new file mode 100644 index 0000000000000..d335f9fbf8adf --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,311 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """List all the private endpoint connections associated with the + workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnectionPaged[~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections'} + + def get( + self, resource_group_name, workspace_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified private endpoint connection associated with the + workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the workspace + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def create_or_update( + self, resource_group_name, workspace_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config): + """Update the state of specified private endpoint connection associated + with the workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the workspace + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.PrivateEndpointConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def delete( + self, resource_group_name, workspace_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Deletes the specified private endpoint connection associated with the + workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the workspace + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py new file mode 100644 index 0000000000000..f79c37852b445 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the private link resources that need to be created for a + workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourceListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourceListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py new file mode 100644 index 0000000000000..013235f447d6b --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class QuotasOperations(object): + """QuotasOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def update( + self, location, value=None, location1=None, custom_headers=None, raw=False, **operation_config): + """Update quota for each VM family in workspace. + + :param location: The location for update quota is queried. + :type location: str + :param value: The list for update quota. + :type value: + list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :param location1: Region of workspace quota to be updated. + :type location1: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UpdateWorkspaceQuotasResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.QuotaUpdateParameters(value=value, location=location1) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'QuotaUpdateParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UpdateWorkspaceQuotasResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas'} + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the currently assigned Workspace Quotas based on VMFamily. + + :param location: The location for which resource usage is queried. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceQuota + :rtype: + ~azure.mgmt.machinelearningservices.models.ResourceQuotaPaged[~azure.mgmt.machinelearningservices.models.ResourceQuota] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py index 212fbc700f274..a596bd8f7e0f6 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py @@ -25,7 +25,7 @@ class UsagesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2019-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-07-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-07-01" self.config = config @@ -61,14 +61,14 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) else: url = next_link diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py index afbf3b4fc0b4a..b61c09b79ea41 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_virtual_machine_sizes_operations.py @@ -25,7 +25,7 @@ class VirtualMachineSizesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2019-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-07-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-07-01" self.config = config @@ -61,13 +61,13 @@ def list( url = self.list.metadata['url'] path_format_arguments = { 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py new file mode 100644 index 0000000000000..8141ed18bd9b1 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_connections_operations.py @@ -0,0 +1,311 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkspaceConnectionsOperations(object): + """WorkspaceConnectionsOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def list( + self, resource_group_name, workspace_name, target=None, category=None, custom_headers=None, raw=False, **operation_config): + """List all connections under a AML workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param target: Target of the workspace connection. + :type target: str + :param category: Category of the workspace connection. + :type category: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkspaceConnection + :rtype: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnectionPaged[~azure.mgmt.machinelearningservices.models.WorkspaceConnection] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if target is not None: + query_parameters['target'] = self._serialize.query("target", target, 'str') + if category is not None: + query_parameters['category'] = self._serialize.query("category", category, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkspaceConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections'} + + def create( + self, resource_group_name, workspace_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Add a new workspace connection. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection + :type connection_name: str + :param parameters: The object for creating or updating a new workspace + connection + :type parameters: + ~azure.mgmt.machinelearningservices.models.WorkspaceConnection + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'WorkspaceConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} + + def get( + self, resource_group_name, workspace_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Get the detail of a workspace connection. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspaceConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.WorkspaceConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspaceConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} + + def delete( + self, resource_group_name, workspace_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Delete a workspace connection. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param connection_name: Friendly name of the workspace connection + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py new file mode 100644 index 0000000000000..8e95926804d8f --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_features_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkspaceFeaturesOperations(object): + """WorkspaceFeaturesOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Lists all enabled features for a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AmlUserFeature + :rtype: + ~azure.mgmt.machinelearningservices.models.AmlUserFeaturePaged[~azure.mgmt.machinelearningservices.models.AmlUserFeature] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AmlUserFeaturePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py new file mode 100644 index 0000000000000..4025ab1c3be5c --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_skus_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkspaceSkusOperations(object): + """WorkspaceSkusOperations 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: "2021-07-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-07-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all skus with associated features. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of WorkspaceSku + :rtype: + ~azure.mgmt.machinelearningservices.models.WorkspaceSkuPaged[~azure.mgmt.machinelearningservices.models.WorkspaceSku] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.WorkspaceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py index 27bff19114d87..96499dd0491fa 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py @@ -11,6 +11,8 @@ import uuid from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -24,7 +26,7 @@ class WorkspacesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2019-05-01". + :ivar api_version: The API version to use for this operation. Constant value: "2021-07-01". """ 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 = "2019-05-01" + self.api_version = "2021-07-01" self.config = config @@ -42,8 +44,8 @@ def get( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets the properties of the specified machine learning workspace. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -56,20 +58,20 @@ def get( :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or ~msrest.pipeline.ClientRawResponse :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -86,7 +88,7 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -99,41 +101,21 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} - def create_or_update( - self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or updates a workspace with the specified parameters. - :param resource_group_name: Name of the resource group in which - workspace is located. - :type resource_group_name: str - :param workspace_name: Name of Azure Machine Learning workspace. - :type workspace_name: str - :param parameters: The parameters for creating or updating a machine - learning workspace. - :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Workspace or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MachineLearningServiceErrorException` - """ + def _create_or_update_initial( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -153,53 +135,88 @@ def create_or_update( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 201]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('Workspace', response) - if response.status_code == 201: - deserialized = self._deserialize('Workspace', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} - def delete( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Deletes a machine learning workspace. + def create_or_update( + self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a workspace with the specified parameters. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str + :param parameters: The parameters for creating or updating a machine + learning workspace. + :type parameters: ~azure.mgmt.machinelearningservices.models.Workspace :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Workspace or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningservices.models.Workspace] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.Workspace]] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Workspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -214,20 +231,62 @@ def delete( request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a machine learning workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} def update( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): """Updates a machine learning workspace with the specified parameters. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -244,20 +303,20 @@ def update( :rtype: ~azure.mgmt.machinelearningservices.models.Workspace or ~msrest.pipeline.ClientRawResponse :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -278,7 +337,7 @@ def update( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -292,15 +351,15 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} def list_by_resource_group( - self, resource_group_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all the available machine learning workspaces under the specified resource group. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -310,23 +369,23 @@ def list_by_resource_group( :rtype: ~azure.mgmt.machinelearningservices.models.WorkspacePaged[~azure.mgmt.machinelearningservices.models.Workspace] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -352,7 +411,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -365,14 +424,133 @@ def internal_paging(next_link=None): return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces'} + + def _diagnose_initial( + self, resource_group_name, workspace_name, value=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if value is not None: + parameters = models.DiagnoseWorkspaceParameters(value=value) + + # Construct URL + url = self.diagnose.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'DiagnoseWorkspaceParameters') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('DiagnoseResponseResult', response) + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def diagnose( + self, resource_group_name, workspace_name, value=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Diagnose workspace setup issue. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param value: Value of Parameters + :type value: + ~azure.mgmt.machinelearningservices.models.DiagnoseRequestProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns DiagnoseResponseResult + or ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningservices.models.DiagnoseResponseResult] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.DiagnoseResponseResult]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._diagnose_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + value=value, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + 'Retry-After': 'int', + } + deserialized = self._deserialize('DiagnoseResponseResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + diagnose.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose'} + def list_keys( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - :param resource_group_name: Name of the resource group in which - workspace is located. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str @@ -386,20 +564,20 @@ def list_keys( ~azure.mgmt.machinelearningservices.models.ListWorkspaceKeysResult or ~msrest.pipeline.ClientRawResponse :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ # Construct URL url = self.list_keys.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -416,7 +594,7 @@ def list_keys( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: @@ -429,39 +607,21 @@ def list_keys( return deserialized list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} - def resync_keys( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Resync all the keys associated with this workspace. This includes keys - for the storage account, app insights and password for container - registry. - :param resource_group_name: Name of the resource group in which - workspace is located. - :type resource_group_name: str - :param workspace_name: Name of Azure Machine Learning workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MachineLearningServiceErrorException` - """ + def _resync_keys_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.resync_keys.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) # Construct headers header_parameters = {} @@ -476,21 +636,65 @@ def resync_keys( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def resync_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Resync all the keys associated with this workspace. This includes keys + for the storage account, app insights and password for container + registry. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._resync_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} def list_by_subscription( - self, skiptoken=None, custom_headers=None, raw=False, **operation_config): + self, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all the available machine learning workspaces under the specified subscription. - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -500,22 +704,22 @@ def list_by_subscription( :rtype: ~azure.mgmt.machinelearningservices.models.WorkspacePaged[~azure.mgmt.machinelearningservices.models.Workspace] :raises: - :class:`MachineLearningServiceErrorException` + :class:`ErrorResponseException` """ def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -541,7 +745,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - raise models.MachineLearningServiceErrorException(self._deserialize, response) + raise models.ErrorResponseException(self._deserialize, response) return response @@ -553,3 +757,345 @@ def internal_paging(next_link=None): return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} + + def list_notebook_access_token( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """return notebook access token and refresh token. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NotebookAccessTokenResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.NotebookAccessTokenResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_notebook_access_token.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookAccessTokenResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'} + + + def _prepare_notebook_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.prepare_notebook.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NotebookResourceInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def prepare_notebook( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Prepare a notebook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns NotebookResourceInfo or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.NotebookResourceInfo]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._prepare_notebook_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('NotebookResourceInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + prepare_notebook.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} + + def list_storage_account_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """List storage account keys of a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListStorageAccountKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ListStorageAccountKeysResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_storage_account_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ListStorageAccountKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_storage_account_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} + + def list_notebook_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """List keys of a notebook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListNotebookKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_notebook_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ListNotebookKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_notebook_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} + + def list_outbound_network_dependencies_endpoints( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Called by Client (Portal, CLI, etc) to get a list of all external + outbound dependencies (FQDNs) programmatically. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ExternalFQDNResponse or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ExternalFQDNResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExternalFQDNResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints'}