diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/README.md b/sdk/machinelearning/azure-mgmt-machinelearningservices/README.md index 237e6e9f59d2..3a7c5d648e9d 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/README.md +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/README.md @@ -1,30 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python -This is the Microsoft Azure Machine Learning Services Management Client -Library. +This is the Microsoft Azure Machine Learning Services Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Machine Learning Services Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). -## Usage +# Provide Feedback -For code examples, see [Machine Learning Services -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-machinelearningservices%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-machinelearningservices%2FREADME.png) 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 e0a0e2c4d834..9d1b81df2a67 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 @@ -13,15 +13,22 @@ from msrest import Serializer, Deserializer from ._configuration import AzureMachineLearningWorkspacesConfiguration +from .operations import AzureMachineLearningWorkspacesOperationsMixin from .operations import Operations from .operations import WorkspacesOperations +from .operations import WorkspaceFeaturesOperations +from .operations import NotebooksOperations from .operations import UsagesOperations from .operations import VirtualMachineSizesOperations +from .operations import QuotasOperations +from .operations import WorkspaceConnectionsOperations from .operations import MachineLearningComputeOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from . import models -class AzureMachineLearningWorkspaces(SDKClient): +class AzureMachineLearningWorkspaces(AzureMachineLearningWorkspacesOperationsMixin, SDKClient): """These APIs allow end users to operate on Azure Machine Learning Workspace resources. :ivar config: Configuration for client. @@ -31,12 +38,24 @@ class AzureMachineLearningWorkspaces(SDKClient): :vartype operations: azure.mgmt.machinelearningservices.operations.Operations :ivar workspaces: Workspaces operations :vartype workspaces: azure.mgmt.machinelearningservices.operations.WorkspacesOperations + :ivar workspace_features: WorkspaceFeatures operations + :vartype workspace_features: azure.mgmt.machinelearningservices.operations.WorkspaceFeaturesOperations + :ivar notebooks: Notebooks operations + :vartype notebooks: azure.mgmt.machinelearningservices.operations.NotebooksOperations :ivar usages: Usages operations :vartype usages: azure.mgmt.machinelearningservices.operations.UsagesOperations :ivar virtual_machine_sizes: VirtualMachineSizes operations :vartype virtual_machine_sizes: azure.mgmt.machinelearningservices.operations.VirtualMachineSizesOperations + :ivar quotas: Quotas operations + :vartype quotas: azure.mgmt.machinelearningservices.operations.QuotasOperations + :ivar workspace_connections: WorkspaceConnections operations + :vartype workspace_connections: azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations :ivar machine_learning_compute: MachineLearningCompute operations :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations + :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 :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -53,7 +72,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 = '2020-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -61,9 +80,21 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workspaces = WorkspacesOperations( self._client, self.config, self._serialize, self._deserialize) + self.workspace_features = WorkspaceFeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.notebooks = NotebooksOperations( + self._client, self.config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self.config, self._serialize, self._deserialize) self.virtual_machine_sizes = VirtualMachineSizesOperations( self._client, self.config, self._serialize, self._deserialize) + self.quotas = QuotasOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_connections = WorkspaceConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.machine_learning_compute = MachineLearningComputeOperations( 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) 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 2a709812fa94..04062887eb41 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 @@ -18,8 +18,15 @@ from ._models_py3 import AmlComputeNodeInformation from ._models_py3 import AmlComputeNodesInformation from ._models_py3 import AmlComputeProperties + from ._models_py3 import AmlUserFeature from ._models_py3 import ClusterUpdateParameters from ._models_py3 import Compute + from ._models_py3 import ComputeInstance + from ._models_py3 import ComputeInstanceApplication + from ._models_py3 import ComputeInstanceConnectivityEndpoints + from ._models_py3 import ComputeInstanceCreatedBy + from ._models_py3 import ComputeInstanceProperties + from ._models_py3 import ComputeInstanceSshSettings from ._models_py3 import ComputeNodesInformation from ._models_py3 import ComputeResource from ._models_py3 import ComputeSecrets @@ -29,24 +36,47 @@ from ._models_py3 import DataFactory from ._models_py3 import DataLakeAnalytics from ._models_py3 import DataLakeAnalyticsProperties + from ._models_py3 import EncryptionProperty from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import HDInsight from ._models_py3 import HDInsightProperties from ._models_py3 import Identity + from ._models_py3 import IdentityUserAssignedIdentitiesValue + from ._models_py3 import KeyVaultProperties from ._models_py3 import ListWorkspaceKeysResult from ._models_py3 import MachineLearningServiceError, MachineLearningServiceErrorException from ._models_py3 import NodeStateCounts + from ._models_py3 import NotebookListCredentialsResult + 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 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 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 ServicePrincipalCredentials + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import Sku + from ._models_py3 import SKUCapability from ._models_py3 import SslConfiguration from ._models_py3 import SystemService + 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 @@ -57,6 +87,9 @@ from ._models_py3 import VirtualMachineSizeListResult from ._models_py3 import VirtualMachineSshCredentials from ._models_py3 import Workspace + from ._models_py3 import WorkspaceConnection + from ._models_py3 import WorkspaceConnectionDto + from ._models_py3 import WorkspaceSku from ._models_py3 import WorkspaceUpdateParameters except (SyntaxError, ImportError): from ._models import AKS @@ -67,8 +100,15 @@ from ._models import AmlComputeNodeInformation from ._models import AmlComputeNodesInformation from ._models import AmlComputeProperties + from ._models import AmlUserFeature from ._models import ClusterUpdateParameters from ._models import Compute + from ._models import ComputeInstance + from ._models import ComputeInstanceApplication + from ._models import ComputeInstanceConnectivityEndpoints + from ._models import ComputeInstanceCreatedBy + from ._models import ComputeInstanceProperties + from ._models import ComputeInstanceSshSettings from ._models import ComputeNodesInformation from ._models import ComputeResource from ._models import ComputeSecrets @@ -78,24 +118,47 @@ from ._models import DataFactory from ._models import DataLakeAnalytics from ._models import DataLakeAnalyticsProperties + from ._models import EncryptionProperty from ._models import ErrorDetail - from ._models import ErrorResponse + from ._models import ErrorResponse, ErrorResponseException from ._models import HDInsight from ._models import HDInsightProperties from ._models import Identity + from ._models import IdentityUserAssignedIdentitiesValue + from ._models import KeyVaultProperties from ._models import ListWorkspaceKeysResult from ._models import MachineLearningServiceError, MachineLearningServiceErrorException from ._models import NodeStateCounts + from ._models import NotebookListCredentialsResult + from ._models import NotebookPreparationError + from ._models import NotebookResourceInfo from ._models import Operation from ._models import OperationDisplay from ._models import Password + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState + 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 ServicePrincipalCredentials + from ._models import SharedPrivateLinkResource + from ._models import Sku + from ._models import SKUCapability from ._models import SslConfiguration from ._models import SystemService + from ._models import UpdateWorkspaceQuotas + from ._models import UpdateWorkspaceQuotasResult from ._models import Usage from ._models import UsageName from ._models import UserAccountCredentials @@ -106,18 +169,36 @@ from ._models import VirtualMachineSizeListResult from ._models import VirtualMachineSshCredentials from ._models import Workspace + from ._models import WorkspaceConnection + from ._models import WorkspaceConnectionDto + from ._models import WorkspaceSku from ._models import WorkspaceUpdateParameters +from ._paged_models import AmlUserFeaturePaged from ._paged_models import ComputeResourcePaged from ._paged_models import OperationPaged +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, + EncryptionStatus, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, UsageUnit, + QuotaUnit, + Status, ResourceIdentityType, VmPriority, + RemoteLoginPortPublicAccess, AllocationState, + ApplicationSharingPolicy, + SshPublicAccess, + ComputeInstanceState, + NodeState, ComputeType, + ReasonCode, UnderlyingResourceAction, ) @@ -130,8 +211,15 @@ 'AmlComputeNodeInformation', 'AmlComputeNodesInformation', 'AmlComputeProperties', + 'AmlUserFeature', 'ClusterUpdateParameters', 'Compute', + 'ComputeInstance', + 'ComputeInstanceApplication', + 'ComputeInstanceConnectivityEndpoints', + 'ComputeInstanceCreatedBy', + 'ComputeInstanceProperties', + 'ComputeInstanceSshSettings', 'ComputeNodesInformation', 'ComputeResource', 'ComputeSecrets', @@ -141,24 +229,47 @@ 'DataFactory', 'DataLakeAnalytics', 'DataLakeAnalyticsProperties', + 'EncryptionProperty', 'ErrorDetail', - 'ErrorResponse', + 'ErrorResponse', 'ErrorResponseException', 'HDInsight', 'HDInsightProperties', 'Identity', + 'IdentityUserAssignedIdentitiesValue', + 'KeyVaultProperties', 'ListWorkspaceKeysResult', 'MachineLearningServiceError', 'MachineLearningServiceErrorException', 'NodeStateCounts', + 'NotebookListCredentialsResult', + 'NotebookPreparationError', + 'NotebookResourceInfo', 'Operation', 'OperationDisplay', 'Password', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'QuotaBaseProperties', + 'QuotaUpdateParameters', 'RegistryListCredentialsResult', 'Resource', 'ResourceId', + 'ResourceName', + 'ResourceQuota', + 'ResourceSkuLocationInfo', + 'ResourceSkuZoneDetails', + 'Restriction', 'ScaleSettings', 'ServicePrincipalCredentials', + 'SharedPrivateLinkResource', + 'Sku', + 'SKUCapability', 'SslConfiguration', 'SystemService', + 'UpdateWorkspaceQuotas', + 'UpdateWorkspaceQuotasResult', 'Usage', 'UsageName', 'UserAccountCredentials', @@ -169,16 +280,34 @@ 'VirtualMachineSizeListResult', 'VirtualMachineSshCredentials', 'Workspace', + 'WorkspaceConnection', + 'WorkspaceConnectionDto', + 'WorkspaceSku', 'WorkspaceUpdateParameters', 'OperationPaged', 'WorkspacePaged', + 'AmlUserFeaturePaged', 'UsagePaged', + 'ResourceQuotaPaged', + 'WorkspaceConnectionPaged', 'ComputeResourcePaged', + 'WorkspaceSkuPaged', 'ProvisioningState', + 'EncryptionStatus', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', 'UsageUnit', + 'QuotaUnit', + 'Status', 'ResourceIdentityType', 'VmPriority', + 'RemoteLoginPortPublicAccess', 'AllocationState', + 'ApplicationSharingPolicy', + 'SshPublicAccess', + 'ComputeInstanceState', + 'NodeState', 'ComputeType', + '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 0e95e8e3d7ff..47acba1dd592 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,14 +23,57 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class EncryptionStatus(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 UsageUnit(str, Enum): count = "Count" +class QuotaUnit(str, Enum): + + count = "Count" + + +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 ResourceIdentityType(str, Enum): system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" class VmPriority(str, Enum): @@ -39,16 +82,66 @@ class VmPriority(str, Enum): 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" + restart_failed = "RestartFailed" + job_running = "JobRunning" + setting_up = "SettingUp" + starting = "Starting" + start_failed = "StartFailed" + stop_failed = "StopFailed" + stopped = "Stopped" + stopping = "Stopping" + user_setting_up = "UserSettingUp" + unknown = "Unknown" + unusable = "Unusable" + + +class NodeState(str, Enum): + + idle = "idle" + running = "running" + preparing = "preparing" + unusable = "unusable" + leaving = "leaving" + preempted = "preempted" + + class ComputeType(str, Enum): aks = "AKS" aml_compute = "AmlCompute" + compute_instance = "ComputeInstance" data_factory = "DataFactory" virtual_machine = "VirtualMachine" hd_insight = "HDInsight" @@ -56,6 +149,13 @@ class ComputeType(str, Enum): data_lake_analytics = "DataLakeAnalytics" +class ReasonCode(str, Enum): + + not_specified = "NotSpecified" + not_available_for_region = "NotAvailableForRegion" + not_available_for_subscription = "NotAvailableForSubscription" + + class UnderlyingResourceAction(str, Enum): delete = "Delete" 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 8ded2b35dd56..ca266ab97d1b 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 Variables are only populated by the server, and will be ignored when sending a request. @@ -74,7 +74,7 @@ class Compute(Model): } _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'} } def __init__(self, **kwargs): @@ -383,29 +383,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 + self.node_state = None + self.run_id = None class ComputeNodesInformation(Model): @@ -503,6 +524,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 @@ -550,6 +582,7 @@ class AmlComputeProperties(Model): '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]'}, @@ -565,6 +598,7 @@ def __init__(self, **kwargs): 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 @@ -573,6 +607,30 @@ def __init__(self, **kwargs): self.node_state_counts = None +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 CloudError(Model): """CloudError. """ @@ -599,6 +657,278 @@ def __init__(self, **kwargs): self.scale_settings = kwargs.get('scale_settings', None) +class ComputeInstance(Compute): + """An Azure Machine Learning compute instance. + + 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 compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: Compute Instance properties + :type properties: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + } + + def __init__(self, **kwargs): + super(ComputeInstance, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'ComputeInstance' + + +class ComputeInstanceApplication(Model): + """Defines an Aml Instance application and its connectivity endpoint URI. + + :param display_name: Name of the ComputeInstance application. + :type display_name: str + :param endpoint_uri: Application' endpoint URI. + :type endpoint_uri: 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 a 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 = { + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None + + +class ComputeInstanceCreatedBy(Model): + """Describes information on user who created this ComputeInstance. + + 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 = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceProperties(Model): + """Compute Instance properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.MachineLearningServiceError] + :ivar state: The current state of this ComputeInstance. Possible values + include: 'Creating', 'CreateFailed', 'Deleting', 'Running', 'Restarting', + 'RestartFailed', 'JobRunning', 'SettingUp', 'Starting', 'StartFailed', + 'StopFailed', 'Stopped', 'Stopping', 'UserSettingUp', 'Unknown', + 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'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': '[MachineLearningServiceError]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + 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 + + +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 Resource(Model): """Azure Resource Manager resource envelope. @@ -609,20 +939,21 @@ class Resource(Model): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } @@ -633,16 +964,18 @@ class Resource(Model): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, } def __init__(self, **kwargs): super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.identity = None + self.identity = kwargs.get('identity', None) self.location = kwargs.get('location', None) self.type = None self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) class ComputeResource(Resource): @@ -655,14 +988,16 @@ class ComputeResource(Resource): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 properties: Compute properties :type properties: ~azure.mgmt.machinelearningservices.models.Compute """ @@ -670,7 +1005,6 @@ class ComputeResource(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } @@ -681,6 +1015,7 @@ class ComputeResource(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'properties': {'key': 'properties', 'type': 'Compute'}, } @@ -940,6 +1275,36 @@ def __init__(self, **kwargs): self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) +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 key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(EncryptionProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + class ErrorDetail(Model): """Error detail information. @@ -1001,6 +1366,18 @@ def __init__(self, **kwargs): self.details = None +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + class HDInsight(Compute): """A HDInsight compute. @@ -1100,24 +1477,35 @@ class Identity(Model): 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 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' + :param type: Required. The identity type. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with resource. The user identity dictionary key references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.IdentityUserAssignedIdentitiesValue] """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'type': {'required': 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': '{IdentityUserAssignedIdentitiesValue}'}, } def __init__(self, **kwargs): @@ -1125,6 +1513,69 @@ def __init__(self, **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 IdentityUserAssignedIdentitiesValue(Model): + """IdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = 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 ListWorkspaceKeysResult(Model): @@ -1142,6 +1593,9 @@ class ListWorkspaceKeysResult(Model): :ivar container_registry_credentials: :vartype container_registry_credentials: ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :param notebook_access_keys: + :type notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.NotebookListCredentialsResult """ _validation = { @@ -1156,6 +1610,7 @@ class ListWorkspaceKeysResult(Model): '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': 'NotebookListCredentialsResult'}, } def __init__(self, **kwargs): @@ -1164,6 +1619,7 @@ def __init__(self, **kwargs): self.user_storage_resource_id = None self.app_insights_instrumentation_key = None self.container_registry_credentials = None + self.notebook_access_keys = kwargs.get('notebook_access_keys', None) class MachineLearningServiceError(Model): @@ -1255,50 +1711,117 @@ def __init__(self, **kwargs): self.preempted_node_count = None -class Operation(Model): - """Azure Machine Learning workspace REST API operation. +class NotebookListCredentialsResult(Model): + """NotebookListCredentialsResult. - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display name of operation - :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + :param primary_access_key: + :type primary_access_key: str + :param secondary_access_key: + :type secondary_access_key: str """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, } def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) + super(NotebookListCredentialsResult, self).__init__(**kwargs) + self.primary_access_key = kwargs.get('primary_access_key', None) + self.secondary_access_key = kwargs.get('secondary_access_key', None) -class OperationDisplay(Model): - """Display name of operation. +class NotebookPreparationError(Model): + """NotebookPreparationError. - :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 error_message: + :type error_message: str + :param status_code: + :type status_code: int """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, } def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) + 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) @@ -1332,6 +1855,242 @@ def __init__(self, **kwargs): self.value = 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 + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.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: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: 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 + :ivar type: Specifies the type of the resource. + :vartype type: 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 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 + """ + + _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'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + 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) + + +class PrivateLinkResource(Resource): + """A private link 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 name: Specifies the name of the resource. + :vartype name: 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 + :ivar type: Specifies the type of the resource. + :vartype type: 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 + :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] + """ + + _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'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + 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) + + +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 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] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + } + + def __init__(self, **kwargs): + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class RegistryListCredentialsResult(Model): """RegistryListCredentialsResult. @@ -1387,6 +2146,181 @@ def __init__(self, **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 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}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', '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.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. @@ -1445,6 +2379,82 @@ def __init__(self, **kwargs): self.client_secret = kwargs.get('client_secret', 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. @@ -1507,6 +2517,83 @@ def __init__(self, **kwargs): self.version = None +class UpdateWorkspaceQuotas(Model): + """The properties for update Quota response. + + 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'}, + } + + def __init__(self, **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) + + +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 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 = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Usage(Model): """Describes AML Resource Usage. @@ -1755,6 +2842,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 @@ -1776,6 +2866,7 @@ class VirtualMachineSize(Model): '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,6 +2878,7 @@ 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'}, @@ -1799,6 +2891,7 @@ 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 @@ -1862,14 +2955,16 @@ class Workspace(Resource): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1903,16 +2998,47 @@ 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 + :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 """ _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}, } _attribute_map = { @@ -1922,6 +3048,7 @@ class Workspace(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, @@ -1932,6 +3059,15 @@ class Workspace(Resource): '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'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, } def __init__(self, **kwargs): @@ -1946,6 +3082,156 @@ def __init__(self, **kwargs): 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.private_endpoint_connections = None + self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None) + self.notebook_info = 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 + """ + + _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'}, + } + + 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) + + +class WorkspaceConnectionDto(Model): + """object used for creating workspace connection. + + :param name: Friendly name of the workspace connection + :type name: 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 + """ + + _attribute_map = { + 'name': {'key': 'name', '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'}, + } + + def __init__(self, **kwargs): + super(WorkspaceConnectionDto, self).__init__(**kwargs) + self.name = kwargs.get('name', 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) + + +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,6 +3239,8 @@ 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 description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. @@ -1961,6 +3249,7 @@ class WorkspaceUpdateParameters(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, } @@ -1968,5 +3257,6 @@ class WorkspaceUpdateParameters(Model): def __init__(self, **kwargs): super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', 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 f173a48382ad..3053d707facb 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 Variables are only populated by the server, and will be ignored when sending a request. @@ -74,7 +74,7 @@ class Compute(Model): } _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'} } def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: @@ -383,29 +383,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 + self.node_state = None + self.run_id = None class ComputeNodesInformation(Model): @@ -503,6 +524,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 @@ -550,6 +582,7 @@ class AmlComputeProperties(Model): '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]'}, @@ -558,13 +591,14 @@ class AmlComputeProperties(Model): 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, } - def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, user_account_credentials=None, subnet=None, **kwargs) -> None: + def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, user_account_credentials=None, subnet=None, remote_login_port_public_access="NotSpecified", **kwargs) -> None: super(AmlComputeProperties, self).__init__(**kwargs) self.vm_size = vm_size self.vm_priority = vm_priority 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 @@ -573,6 +607,30 @@ def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, self.node_state_counts = None +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 CloudError(Model): """CloudError. """ @@ -599,6 +657,278 @@ def __init__(self, *, scale_settings=None, **kwargs) -> None: self.scale_settings = scale_settings +class ComputeInstance(Compute): + """An Azure Machine Learning compute instance. + + 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 compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: Compute Instance properties + :type properties: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: + super(ComputeInstance, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + self.properties = properties + self.compute_type = 'ComputeInstance' + + +class ComputeInstanceApplication(Model): + """Defines an Aml Instance application and its connectivity endpoint URI. + + :param display_name: Name of the ComputeInstance application. + :type display_name: str + :param endpoint_uri: Application' endpoint URI. + :type endpoint_uri: 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 a 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 = { + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None + + +class ComputeInstanceCreatedBy(Model): + """Describes information on user who created this ComputeInstance. + + 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 = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceProperties(Model): + """Compute Instance properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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.MachineLearningServiceError] + :ivar state: The current state of this ComputeInstance. Possible values + include: 'Creating', 'CreateFailed', 'Deleting', 'Running', 'Restarting', + 'RestartFailed', 'JobRunning', 'SettingUp', 'Starting', 'StartFailed', + 'StopFailed', 'Stopped', 'Stopping', 'UserSettingUp', 'Unknown', + 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'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': '[MachineLearningServiceError]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, subnet=None, application_sharing_policy="Shared", ssh_settings=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 + + +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 Resource(Model): """Azure Resource Manager resource envelope. @@ -609,20 +939,21 @@ class Resource(Model): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } @@ -633,16 +964,18 @@ class Resource(Model): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, identity=None, location: str=None, tags=None, sku=None, **kwargs) -> None: super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.identity = None + self.identity = identity self.location = location self.type = None self.tags = tags + self.sku = sku class ComputeResource(Resource): @@ -655,14 +988,16 @@ class ComputeResource(Resource): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 properties: Compute properties :type properties: ~azure.mgmt.machinelearningservices.models.Compute """ @@ -670,7 +1005,6 @@ class ComputeResource(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, } @@ -681,11 +1015,12 @@ class ComputeResource(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'properties': {'key': 'properties', 'type': 'Compute'}, } - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(ComputeResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, identity=None, location: str=None, tags=None, sku=None, properties=None, **kwargs) -> None: + super(ComputeResource, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs) self.properties = properties @@ -940,6 +1275,36 @@ def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: self.data_lake_store_account_name = data_lake_store_account_name +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 key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, status, key_vault_properties, **kwargs) -> None: + super(EncryptionProperty, self).__init__(**kwargs) + self.status = status + self.key_vault_properties = key_vault_properties + + class ErrorDetail(Model): """Error detail information. @@ -1001,6 +1366,18 @@ def __init__(self, **kwargs) -> None: self.details = None +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + class HDInsight(Compute): """A HDInsight compute. @@ -1100,31 +1477,105 @@ class Identity(Model): 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 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' + :param type: Required. The identity type. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with resource. The user identity dictionary key references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.IdentityUserAssignedIdentitiesValue] """ _validation = { 'principal_id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'type': {'required': 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': '{IdentityUserAssignedIdentitiesValue}'}, } - def __init__(self, *, type=None, **kwargs) -> None: + def __init__(self, *, type, 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 IdentityUserAssignedIdentitiesValue(Model): + """IdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = 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, *, 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 ListWorkspaceKeysResult(Model): @@ -1142,6 +1593,9 @@ class ListWorkspaceKeysResult(Model): :ivar container_registry_credentials: :vartype container_registry_credentials: ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :param notebook_access_keys: + :type notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.NotebookListCredentialsResult """ _validation = { @@ -1156,14 +1610,16 @@ class ListWorkspaceKeysResult(Model): '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': 'NotebookListCredentialsResult'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, notebook_access_keys=None, **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 = notebook_access_keys class MachineLearningServiceError(Model): @@ -1255,6 +1711,73 @@ def __init__(self, **kwargs) -> None: self.preempted_node_count = None +class NotebookListCredentialsResult(Model): + """NotebookListCredentialsResult. + + :param primary_access_key: + :type primary_access_key: str + :param secondary_access_key: + :type secondary_access_key: str + """ + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__(self, *, primary_access_key: str=None, secondary_access_key: str=None, **kwargs) -> None: + super(NotebookListCredentialsResult, self).__init__(**kwargs) + self.primary_access_key = primary_access_key + self.secondary_access_key = secondary_access_key + + +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. @@ -1332,16 +1855,252 @@ def __init__(self, **kwargs) -> None: self.value = None -class RegistryListCredentialsResult(Model): - """RegistryListCredentialsResult. +class PrivateEndpoint(Model): + """The Private Endpoint resource. 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 + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.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: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: 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 + :ivar type: Specifies the type of the resource. + :vartype type: 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 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 + """ + + _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'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_link_service_connection_state, identity=None, location: str=None, tags=None, sku=None, private_endpoint=None, provisioning_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateLinkResource(Resource): + """A private link 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 name: Specifies the name of the resource. + :vartype name: 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 + :ivar type: Specifies the type of the resource. + :vartype type: 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 + :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] + """ + + _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'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, *, identity=None, location: str=None, tags=None, sku=None, required_zone_names=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +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 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] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = value + + +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] """ @@ -1387,6 +2146,181 @@ def __init__(self, *, id: str, **kwargs) -> None: 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 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}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', '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.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. @@ -1445,6 +2379,82 @@ def __init__(self, *, client_id: str, client_secret: str, **kwargs) -> None: self.client_secret = client_secret +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. @@ -1507,6 +2517,83 @@ def __init__(self, **kwargs) -> None: self.version = None +class UpdateWorkspaceQuotas(Model): + """The properties for update Quota response. + + 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'}, + } + + 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 + + +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 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 = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpdateWorkspaceQuotas]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateWorkspaceQuotasResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class Usage(Model): """Describes AML Resource Usage. @@ -1755,6 +2842,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 @@ -1776,6 +2866,7 @@ class VirtualMachineSize(Model): '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,6 +2878,7 @@ 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'}, @@ -1799,6 +2891,7 @@ def __init__(self, **kwargs) -> None: 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 @@ -1862,14 +2955,16 @@ class Workspace(Resource): :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity + :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 :ivar type: Specifies the type of the resource. :vartype type: 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 :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1903,16 +2998,47 @@ 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 + :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 """ _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}, } _attribute_map = { @@ -1922,6 +3048,7 @@ class Workspace(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, @@ -1932,10 +3059,19 @@ class Workspace(Resource): 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - 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) + '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'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + } + + def __init__(self, *, identity=None, location: str=None, tags=None, sku=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, encryption=None, hbi_workspace: bool=False, image_build_compute: str=None, allow_public_access_when_behind_vnet: bool=False, shared_private_link_resources=None, **kwargs) -> None: + super(Workspace, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs) self.workspace_id = None self.description = description self.friendly_name = friendly_name @@ -1946,6 +3082,156 @@ def __init__(self, *, location: str=None, tags=None, description: str=None, frie 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.private_endpoint_connections = None + self.shared_private_link_resources = shared_private_link_resources + self.notebook_info = 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 + """ + + _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'}, + } + + def __init__(self, *, category: str=None, target: str=None, auth_type: str=None, value: str=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 + + +class WorkspaceConnectionDto(Model): + """object used for creating workspace connection. + + :param name: Friendly name of the workspace connection + :type name: 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 + """ + + _attribute_map = { + 'name': {'key': 'name', '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'}, + } + + def __init__(self, *, name: str=None, category: str=None, target: str=None, auth_type: str=None, value: str=None, **kwargs) -> None: + super(WorkspaceConnectionDto, self).__init__(**kwargs) + self.name = name + self.category = category + self.target = target + self.auth_type = auth_type + self.value = value + + +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,6 +3239,8 @@ 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 description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. @@ -1961,12 +3249,14 @@ class WorkspaceUpdateParameters(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, } - def __init__(self, *, tags=None, description: str=None, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, description: str=None, friendly_name: str=None, **kwargs) -> None: super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.sku = sku self.description = description self.friendly_name = friendly_name 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 9bc3567bbf90..b963b0ea71be 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 @@ -38,6 +38,19 @@ class WorkspacePaged(Paged): def __init__(self, *args, **kwargs): super(WorkspacePaged, 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 UsagePaged(Paged): """ A paging container for iterating over a list of :class:`Usage ` object @@ -51,6 +64,32 @@ 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 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 ComputeResourcePaged(Paged): """ A paging container for iterating over a list of :class:`ComputeResource ` object @@ -64,3 +103,16 @@ class ComputeResourcePaged(Paged): def __init__(self, *args, **kwargs): super(ComputeResourcePaged, 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 4daae17a67dd..8095e901ee48 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 @@ -11,14 +11,28 @@ from ._operations import Operations from ._workspaces_operations import WorkspacesOperations +from ._workspace_features_operations import WorkspaceFeaturesOperations +from ._notebooks_operations import NotebooksOperations from ._usages_operations import UsagesOperations from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._quotas_operations import QuotasOperations +from ._workspace_connections_operations import WorkspaceConnectionsOperations from ._machine_learning_compute_operations import MachineLearningComputeOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._azure_machine_learning_workspaces_operations import AzureMachineLearningWorkspacesOperationsMixin __all__ = [ 'Operations', 'WorkspacesOperations', + 'WorkspaceFeaturesOperations', + 'NotebooksOperations', 'UsagesOperations', 'VirtualMachineSizesOperations', + 'QuotasOperations', + 'WorkspaceConnectionsOperations', 'MachineLearningComputeOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'AzureMachineLearningWorkspacesOperationsMixin', ] diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py new file mode 100644 index 000000000000..63f1cc36b32d --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_azure_machine_learning_workspaces_operations.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling +from .. import models +import uuid + + +class AzureMachineLearningWorkspacesOperationsMixin(object): + + def list_skus( + 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:`MachineLearningServiceErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(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_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus'} 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/_machine_learning_compute_operations.py index 203b86e19b28..6559570ec272 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/_machine_learning_compute_operations.py @@ -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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". """ models = models @@ -36,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 = "2020-06-01" self.config = config @@ -641,3 +641,171 @@ def list_keys( return deserialized list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} + + def start( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Posts a start action to a compute instance. + + :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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.start.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'), + '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') + + # 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 [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} + + def stop( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Posts a stop action to a compute instance. + + :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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct 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'), + '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') + + # 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 [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} + + def restart( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Posts a restart action to a compute instance. + + :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 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.restart.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'), + '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') + + # 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 [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + 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/_notebooks_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py new file mode 100644 index 000000000000..79c2bc41d410 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class NotebooksOperations(object): + """NotebooksOperations 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + + def _prepare_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.prepare.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'), + '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') + + # 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.MachineLearningServiceErrorException(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( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """ + + :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: 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:`MachineLearningServiceErrorException` + """ + raw_result = self._prepare_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.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook'} 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 7b558ec9d645..f91f0db52015 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-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 = "2020-06-01" self.config = config 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 000000000000..5bdea6b22bba --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,238 @@ +# 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + 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: 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 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') + + # 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 put( + 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: 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 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.put.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'), + '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') + + # 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 + put.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: 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 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') + + # 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 000000000000..dd0402acd4b7 --- /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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def list_by_workspace( + 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: 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: PrivateLinkResourceListResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.PrivateLinkResourceListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_workspace.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'), + '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') + + # 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_by_workspace.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 000000000000..c91a6053de6c --- /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 msrestazure.azure_exceptions import CloudError + +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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-01" + + self.config = config + + def update( + self, location, value=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 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:`MachineLearningServiceErrorException` + """ + parameters = models.QuotaUpdateParameters(value=value) + + # 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(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.MachineLearningServiceErrorException(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:`CloudError` + """ + 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'), + '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') + + 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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 212fbc700f27..c00f9383ab54 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-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 = "2020-06-01" self.config = config 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 afbf3b4fc0b4..6f72e94f9580 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-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 = "2020-06-01" self.config = config 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 000000000000..a9d76db03538 --- /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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-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: 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 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:`MachineLearningServiceErrorException` + """ + 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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 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.MachineLearningServiceErrorException(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: 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 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.WorkspaceConnectionDto + :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:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.create.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'), + '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') + + # 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, 'WorkspaceConnectionDto') + + # 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.MachineLearningServiceErrorException(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: 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 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:`MachineLearningServiceErrorException` + """ + # 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'), + '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') + + # 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.MachineLearningServiceErrorException(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: 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 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:`MachineLearningServiceErrorException` + """ + # 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'), + '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') + + # 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.MachineLearningServiceErrorException(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 000000000000..cd6337805e3f --- /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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-06-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: 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: An iterator like instance of AmlUserFeature + :rtype: + ~azure.mgmt.machinelearningservices.models.AmlUserFeaturePaged[~azure.mgmt.machinelearningservices.models.AmlUserFeature] + :raises: + :class:`MachineLearningServiceErrorException` + """ + 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') + + 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.MachineLearningServiceErrorException(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/_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py index 27bff19114d8..dab2bb5b8e69 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: Version of Azure Machine Learning resource provider API. Constant value: "2020-06-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 = "2020-06-01" self.config = config @@ -99,29 +101,9 @@ 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 = { @@ -153,10 +135,11 @@ 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]: + if response.status_code not in [200, 201, 202]: raise models.MachineLearningServiceErrorException(self._deserialize, response) deserialized = None + if response.status_code == 200: deserialized = self._deserialize('Workspace', response) if response.status_code == 201: @@ -167,27 +150,63 @@ def create_or_update( 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. :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` """ + 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 = { @@ -214,12 +233,54 @@ 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]: + if response.status_code not in [200, 202, 204]: raise models.MachineLearningServiceErrorException(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: 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: 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` + """ + 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( diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py index a30c32487f73..5dbc4fd594cd 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +69,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,