diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in b/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json new file mode 100644 index 0000000000000..6fd0d5e45b709 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "0031cae613fe4eaa91865d1cd7e1e0ba60d7abd4", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/machinelearningservices/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/machinelearningservices/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py index e0a0e2c4d8340..a081d894e2876 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 @@ -15,9 +15,18 @@ from ._configuration import AzureMachineLearningWorkspacesConfiguration from .operations import Operations from .operations import WorkspacesOperations +from .operations import WorkspaceFeaturesOperations from .operations import UsagesOperations from .operations import VirtualMachineSizesOperations +from .operations import QuotasOperations from .operations import MachineLearningComputeOperations +from .operations import WorkspaceOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import MachineLearningServiceOperations +from .operations import NotebooksOperations +from .operations import StorageAccountOperations +from .operations import WorkspaceConnectionsOperations from . import models @@ -31,12 +40,30 @@ 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 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 machine_learning_compute: MachineLearningCompute operations :vartype machine_learning_compute: azure.mgmt.machinelearningservices.operations.MachineLearningComputeOperations + :ivar workspace: Workspace operations + :vartype workspace: azure.mgmt.machinelearningservices.operations.WorkspaceOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.machinelearningservices.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.machinelearningservices.operations.PrivateLinkResourcesOperations + :ivar machine_learning_service: MachineLearningService operations + :vartype machine_learning_service: azure.mgmt.machinelearningservices.operations.MachineLearningServiceOperations + :ivar notebooks: Notebooks operations + :vartype notebooks: azure.mgmt.machinelearningservices.operations.NotebooksOperations + :ivar storage_account: StorageAccount operations + :vartype storage_account: azure.mgmt.machinelearningservices.operations.StorageAccountOperations + :ivar workspace_connections: WorkspaceConnections operations + :vartype workspace_connections: azure.mgmt.machinelearningservices.operations.WorkspaceConnectionsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -53,7 +80,7 @@ def __init__( super(AzureMachineLearningWorkspaces, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-05-01' + self.api_version = '2021-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -61,9 +88,27 @@ 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.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.machine_learning_compute = MachineLearningComputeOperations( self._client, self.config, self._serialize, self._deserialize) + self.workspace = WorkspaceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.machine_learning_service = MachineLearningServiceOperations( + self._client, self.config, self._serialize, self._deserialize) + self.notebooks = NotebooksOperations( + self._client, self.config, self._serialize, self._deserialize) + self.storage_account = StorageAccountOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_connections = WorkspaceConnectionsOperations( + 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 2a709812fa94d..791224ef61b07 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 @@ -10,175 +10,603 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import ACIServiceCreateRequest + from ._models_py3 import ACIServiceCreateRequestDataCollection + from ._models_py3 import ACIServiceCreateRequestEncryptionProperties + from ._models_py3 import ACIServiceCreateRequestVnetConfiguration + from ._models_py3 import ACIServiceResponse + from ._models_py3 import ACIServiceResponseDataCollection + from ._models_py3 import ACIServiceResponseEncryptionProperties + from ._models_py3 import ACIServiceResponseEnvironmentImageRequest + from ._models_py3 import ACIServiceResponseVnetConfiguration from ._models_py3 import AKS from ._models_py3 import AksComputeSecrets from ._models_py3 import AksNetworkingConfiguration from ._models_py3 import AKSProperties + from ._models_py3 import AKSReplicaStatus + from ._models_py3 import AKSReplicaStatusError + from ._models_py3 import AKSServiceCreateRequest + from ._models_py3 import AKSServiceCreateRequestAutoScaler + from ._models_py3 import AKSServiceCreateRequestDataCollection + from ._models_py3 import AKSServiceCreateRequestLivenessProbeRequirements + from ._models_py3 import AKSServiceResponse + from ._models_py3 import AKSServiceResponseAutoScaler + from ._models_py3 import AKSServiceResponseDataCollection + from ._models_py3 import AKSServiceResponseDeploymentStatus + from ._models_py3 import AKSServiceResponseEnvironmentImageRequest + from ._models_py3 import AKSServiceResponseLivenessProbeRequirements + from ._models_py3 import AKSVariantResponse from ._models_py3 import AmlCompute from ._models_py3 import AmlComputeNodeInformation - from ._models_py3 import AmlComputeNodesInformation from ._models_py3 import AmlComputeProperties + from ._models_py3 import AmlUserFeature + from ._models_py3 import AssignedUser + from ._models_py3 import AuthKeys + from ._models_py3 import AutoPauseProperties + from ._models_py3 import AutoScaleProperties + from ._models_py3 import AutoScaler 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 ComputeInstanceLastOperation + 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 + from ._models_py3 import ContainerRegistry + from ._models_py3 import ContainerRegistryResponse + from ._models_py3 import ContainerResourceRequirements + from ._models_py3 import CosmosDbSettings + from ._models_py3 import CreateEndpointVariantRequest + from ._models_py3 import CreateServiceRequest + from ._models_py3 import CreateServiceRequestEnvironmentImageRequest + from ._models_py3 import CreateServiceRequestKeys from ._models_py3 import Databricks from ._models_py3 import DatabricksComputeSecrets from ._models_py3 import DatabricksProperties from ._models_py3 import DataFactory from ._models_py3 import DataLakeAnalytics from ._models_py3 import DataLakeAnalyticsProperties + from ._models_py3 import DatasetReference + from ._models_py3 import EncryptionProperties + from ._models_py3 import EncryptionProperty + from ._models_py3 import EnvironmentImageRequest + from ._models_py3 import EnvironmentImageRequestEnvironment + from ._models_py3 import EnvironmentImageRequestEnvironmentReference + from ._models_py3 import EnvironmentImageResponse + from ._models_py3 import EnvironmentImageResponseEnvironment + from ._models_py3 import EnvironmentImageResponseEnvironmentReference + from ._models_py3 import EnvironmentReference from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import EstimatedVMPrice + from ._models_py3 import EstimatedVMPrices from ._models_py3 import HDInsight from ._models_py3 import HDInsightProperties from ._models_py3 import Identity + from ._models_py3 import IdentityForCmk + from ._models_py3 import ImageAsset + from ._models_py3 import KeyVaultProperties + from ._models_py3 import ListNotebookKeysResult + from ._models_py3 import ListStorageAccountKeysResult from ._models_py3 import ListWorkspaceKeysResult + from ._models_py3 import LivenessProbeRequirements from ._models_py3 import MachineLearningServiceError, MachineLearningServiceErrorException + from ._models_py3 import Model + from ._models_py3 import ModelDataCollection + from ._models_py3 import ModelDockerSection + from ._models_py3 import ModelDockerSectionBaseImageRegistry + from ._models_py3 import ModelDockerSectionResponse + from ._models_py3 import ModelDockerSectionResponseBaseImageRegistry + from ._models_py3 import ModelEnvironmentDefinition + from ._models_py3 import ModelEnvironmentDefinitionDocker + from ._models_py3 import ModelEnvironmentDefinitionPython + from ._models_py3 import ModelEnvironmentDefinitionR + from ._models_py3 import ModelEnvironmentDefinitionResponse + from ._models_py3 import ModelEnvironmentDefinitionResponseDocker + from ._models_py3 import ModelEnvironmentDefinitionResponsePython + from ._models_py3 import ModelEnvironmentDefinitionResponseR + from ._models_py3 import ModelEnvironmentDefinitionResponseSpark + from ._models_py3 import ModelEnvironmentDefinitionSpark + from ._models_py3 import ModelPythonSection + from ._models_py3 import ModelSparkSection from ._models_py3 import NodeStateCounts + from ._models_py3 import NotebookAccessTokenResult + from ._models_py3 import NotebookPreparationError + from ._models_py3 import NotebookResourceInfo from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import Password + from ._models_py3 import PersonalComputeInstanceSettings + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import QuotaBaseProperties + from ._models_py3 import QuotaUpdateParameters + from ._models_py3 import RCranPackage 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 RGitHubPackage + from ._models_py3 import RGitHubPackageResponse + from ._models_py3 import RSection + from ._models_py3 import RSectionResponse from ._models_py3 import ScaleSettings + from ._models_py3 import ScriptReference + from ._models_py3 import ScriptsToExecute + from ._models_py3 import ServiceManagedResourcesSettings from ._models_py3 import ServicePrincipalCredentials + from ._models_py3 import ServiceResource + from ._models_py3 import ServiceResponseBase + from ._models_py3 import ServiceResponseBaseError + from ._models_py3 import SetupScripts + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import Sku + from ._models_py3 import SKUCapability + from ._models_py3 import SparkMavenPackage from ._models_py3 import SslConfiguration + from ._models_py3 import SynapseSpark + from ._models_py3 import SynapseSparkPoolProperties + from ._models_py3 import SynapseSparkProperties + from ._models_py3 import SystemData 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 + from ._models_py3 import UserAssignedIdentity from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineImage from ._models_py3 import VirtualMachineProperties from ._models_py3 import VirtualMachineSecrets from ._models_py3 import VirtualMachineSize from ._models_py3 import VirtualMachineSizeListResult from ._models_py3 import VirtualMachineSshCredentials + from ._models_py3 import VnetConfiguration 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 ACIServiceCreateRequest + from ._models import ACIServiceCreateRequestDataCollection + from ._models import ACIServiceCreateRequestEncryptionProperties + from ._models import ACIServiceCreateRequestVnetConfiguration + from ._models import ACIServiceResponse + from ._models import ACIServiceResponseDataCollection + from ._models import ACIServiceResponseEncryptionProperties + from ._models import ACIServiceResponseEnvironmentImageRequest + from ._models import ACIServiceResponseVnetConfiguration from ._models import AKS from ._models import AksComputeSecrets from ._models import AksNetworkingConfiguration from ._models import AKSProperties + from ._models import AKSReplicaStatus + from ._models import AKSReplicaStatusError + from ._models import AKSServiceCreateRequest + from ._models import AKSServiceCreateRequestAutoScaler + from ._models import AKSServiceCreateRequestDataCollection + from ._models import AKSServiceCreateRequestLivenessProbeRequirements + from ._models import AKSServiceResponse + from ._models import AKSServiceResponseAutoScaler + from ._models import AKSServiceResponseDataCollection + from ._models import AKSServiceResponseDeploymentStatus + from ._models import AKSServiceResponseEnvironmentImageRequest + from ._models import AKSServiceResponseLivenessProbeRequirements + from ._models import AKSVariantResponse from ._models import AmlCompute from ._models import AmlComputeNodeInformation - from ._models import AmlComputeNodesInformation from ._models import AmlComputeProperties + from ._models import AmlUserFeature + from ._models import AssignedUser + from ._models import AuthKeys + from ._models import AutoPauseProperties + from ._models import AutoScaleProperties + from ._models import AutoScaler 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 ComputeInstanceLastOperation + from ._models import ComputeInstanceProperties + from ._models import ComputeInstanceSshSettings from ._models import ComputeNodesInformation from ._models import ComputeResource from ._models import ComputeSecrets + from ._models import ContainerRegistry + from ._models import ContainerRegistryResponse + from ._models import ContainerResourceRequirements + from ._models import CosmosDbSettings + from ._models import CreateEndpointVariantRequest + from ._models import CreateServiceRequest + from ._models import CreateServiceRequestEnvironmentImageRequest + from ._models import CreateServiceRequestKeys from ._models import Databricks from ._models import DatabricksComputeSecrets from ._models import DatabricksProperties from ._models import DataFactory from ._models import DataLakeAnalytics from ._models import DataLakeAnalyticsProperties + from ._models import DatasetReference + from ._models import EncryptionProperties + from ._models import EncryptionProperty + from ._models import EnvironmentImageRequest + from ._models import EnvironmentImageRequestEnvironment + from ._models import EnvironmentImageRequestEnvironmentReference + from ._models import EnvironmentImageResponse + from ._models import EnvironmentImageResponseEnvironment + from ._models import EnvironmentImageResponseEnvironmentReference + from ._models import EnvironmentReference from ._models import ErrorDetail from ._models import ErrorResponse + from ._models import EstimatedVMPrice + from ._models import EstimatedVMPrices from ._models import HDInsight from ._models import HDInsightProperties from ._models import Identity + from ._models import IdentityForCmk + from ._models import ImageAsset + from ._models import KeyVaultProperties + from ._models import ListNotebookKeysResult + from ._models import ListStorageAccountKeysResult from ._models import ListWorkspaceKeysResult + from ._models import LivenessProbeRequirements from ._models import MachineLearningServiceError, MachineLearningServiceErrorException + from ._models import Model + from ._models import ModelDataCollection + from ._models import ModelDockerSection + from ._models import ModelDockerSectionBaseImageRegistry + from ._models import ModelDockerSectionResponse + from ._models import ModelDockerSectionResponseBaseImageRegistry + from ._models import ModelEnvironmentDefinition + from ._models import ModelEnvironmentDefinitionDocker + from ._models import ModelEnvironmentDefinitionPython + from ._models import ModelEnvironmentDefinitionR + from ._models import ModelEnvironmentDefinitionResponse + from ._models import ModelEnvironmentDefinitionResponseDocker + from ._models import ModelEnvironmentDefinitionResponsePython + from ._models import ModelEnvironmentDefinitionResponseR + from ._models import ModelEnvironmentDefinitionResponseSpark + from ._models import ModelEnvironmentDefinitionSpark + from ._models import ModelPythonSection + from ._models import ModelSparkSection from ._models import NodeStateCounts + from ._models import NotebookAccessTokenResult + from ._models import NotebookPreparationError + from ._models import NotebookResourceInfo from ._models import Operation from ._models import OperationDisplay from ._models import Password + from ._models import PersonalComputeInstanceSettings + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState + from ._models import QuotaBaseProperties + from ._models import QuotaUpdateParameters + from ._models import RCranPackage 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 RGitHubPackage + from ._models import RGitHubPackageResponse + from ._models import RSection + from ._models import RSectionResponse from ._models import ScaleSettings + from ._models import ScriptReference + from ._models import ScriptsToExecute + from ._models import ServiceManagedResourcesSettings from ._models import ServicePrincipalCredentials + from ._models import ServiceResource + from ._models import ServiceResponseBase + from ._models import ServiceResponseBaseError + from ._models import SetupScripts + from ._models import SharedPrivateLinkResource + from ._models import Sku + from ._models import SKUCapability + from ._models import SparkMavenPackage from ._models import SslConfiguration + from ._models import SynapseSpark + from ._models import SynapseSparkPoolProperties + from ._models import SynapseSparkProperties + from ._models import SystemData from ._models import SystemService + from ._models import UpdateWorkspaceQuotas + from ._models import UpdateWorkspaceQuotasResult from ._models import Usage from ._models import UsageName from ._models import UserAccountCredentials + from ._models import UserAssignedIdentity from ._models import VirtualMachine + from ._models import VirtualMachineImage from ._models import VirtualMachineProperties from ._models import VirtualMachineSecrets from ._models import VirtualMachineSize from ._models import VirtualMachineSizeListResult from ._models import VirtualMachineSshCredentials + from ._models import VnetConfiguration from ._models import Workspace + from ._models import WorkspaceConnection + from ._models import WorkspaceConnectionDto + from ._models import WorkspaceSku from ._models import WorkspaceUpdateParameters +from ._paged_models import AmlComputeNodeInformationPaged +from ._paged_models import AmlUserFeaturePaged from ._paged_models import ComputeResourcePaged from ._paged_models import OperationPaged +from ._paged_models import ResourceQuotaPaged +from ._paged_models import ServiceResourcePaged from ._paged_models import UsagePaged +from ._paged_models import WorkspaceConnectionPaged from ._paged_models import WorkspacePaged +from ._paged_models import WorkspaceSkuPaged from ._azure_machine_learning_workspaces_enums import ( ProvisioningState, - UsageUnit, + EncryptionStatus, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, ResourceIdentityType, + UsageUnit, + VMPriceOSType, + VMTier, + QuotaUnit, + Status, + IdentityType, + ClusterPurpose, + LoadBalancerType, + OsType, VmPriority, + RemoteLoginPortPublicAccess, AllocationState, + ApplicationSharingPolicy, + SshPublicAccess, + ComputeInstanceState, + ComputeInstanceAuthorizationType, + OperationName, + OperationStatus, ComputeType, + NodeState, + ReasonCode, + WebServiceState, + DeploymentType, + VariantType, + ValueFormat, UnderlyingResourceAction, + OrderString, ) __all__ = [ + 'ACIServiceCreateRequest', + 'ACIServiceCreateRequestDataCollection', + 'ACIServiceCreateRequestEncryptionProperties', + 'ACIServiceCreateRequestVnetConfiguration', + 'ACIServiceResponse', + 'ACIServiceResponseDataCollection', + 'ACIServiceResponseEncryptionProperties', + 'ACIServiceResponseEnvironmentImageRequest', + 'ACIServiceResponseVnetConfiguration', 'AKS', 'AksComputeSecrets', 'AksNetworkingConfiguration', 'AKSProperties', + 'AKSReplicaStatus', + 'AKSReplicaStatusError', + 'AKSServiceCreateRequest', + 'AKSServiceCreateRequestAutoScaler', + 'AKSServiceCreateRequestDataCollection', + 'AKSServiceCreateRequestLivenessProbeRequirements', + 'AKSServiceResponse', + 'AKSServiceResponseAutoScaler', + 'AKSServiceResponseDataCollection', + 'AKSServiceResponseDeploymentStatus', + 'AKSServiceResponseEnvironmentImageRequest', + 'AKSServiceResponseLivenessProbeRequirements', + 'AKSVariantResponse', 'AmlCompute', 'AmlComputeNodeInformation', - 'AmlComputeNodesInformation', 'AmlComputeProperties', + 'AmlUserFeature', + 'AssignedUser', + 'AuthKeys', + 'AutoPauseProperties', + 'AutoScaleProperties', + 'AutoScaler', 'ClusterUpdateParameters', 'Compute', + 'ComputeInstance', + 'ComputeInstanceApplication', + 'ComputeInstanceConnectivityEndpoints', + 'ComputeInstanceCreatedBy', + 'ComputeInstanceLastOperation', + 'ComputeInstanceProperties', + 'ComputeInstanceSshSettings', 'ComputeNodesInformation', 'ComputeResource', 'ComputeSecrets', + 'ContainerRegistry', + 'ContainerRegistryResponse', + 'ContainerResourceRequirements', + 'CosmosDbSettings', + 'CreateEndpointVariantRequest', + 'CreateServiceRequest', + 'CreateServiceRequestEnvironmentImageRequest', + 'CreateServiceRequestKeys', 'Databricks', 'DatabricksComputeSecrets', 'DatabricksProperties', 'DataFactory', 'DataLakeAnalytics', 'DataLakeAnalyticsProperties', + 'DatasetReference', + 'EncryptionProperties', + 'EncryptionProperty', + 'EnvironmentImageRequest', + 'EnvironmentImageRequestEnvironment', + 'EnvironmentImageRequestEnvironmentReference', + 'EnvironmentImageResponse', + 'EnvironmentImageResponseEnvironment', + 'EnvironmentImageResponseEnvironmentReference', + 'EnvironmentReference', 'ErrorDetail', 'ErrorResponse', + 'EstimatedVMPrice', + 'EstimatedVMPrices', 'HDInsight', 'HDInsightProperties', 'Identity', + 'IdentityForCmk', + 'ImageAsset', + 'KeyVaultProperties', + 'ListNotebookKeysResult', + 'ListStorageAccountKeysResult', 'ListWorkspaceKeysResult', + 'LivenessProbeRequirements', 'MachineLearningServiceError', 'MachineLearningServiceErrorException', + 'Model', + 'ModelDataCollection', + 'ModelDockerSection', + 'ModelDockerSectionBaseImageRegistry', + 'ModelDockerSectionResponse', + 'ModelDockerSectionResponseBaseImageRegistry', + 'ModelEnvironmentDefinition', + 'ModelEnvironmentDefinitionDocker', + 'ModelEnvironmentDefinitionPython', + 'ModelEnvironmentDefinitionR', + 'ModelEnvironmentDefinitionResponse', + 'ModelEnvironmentDefinitionResponseDocker', + 'ModelEnvironmentDefinitionResponsePython', + 'ModelEnvironmentDefinitionResponseR', + 'ModelEnvironmentDefinitionResponseSpark', + 'ModelEnvironmentDefinitionSpark', + 'ModelPythonSection', + 'ModelSparkSection', 'NodeStateCounts', + 'NotebookAccessTokenResult', + 'NotebookPreparationError', + 'NotebookResourceInfo', 'Operation', 'OperationDisplay', 'Password', + 'PersonalComputeInstanceSettings', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'QuotaBaseProperties', + 'QuotaUpdateParameters', + 'RCranPackage', 'RegistryListCredentialsResult', 'Resource', 'ResourceId', + 'ResourceName', + 'ResourceQuota', + 'ResourceSkuLocationInfo', + 'ResourceSkuZoneDetails', + 'Restriction', + 'RGitHubPackage', + 'RGitHubPackageResponse', + 'RSection', + 'RSectionResponse', 'ScaleSettings', + 'ScriptReference', + 'ScriptsToExecute', + 'ServiceManagedResourcesSettings', 'ServicePrincipalCredentials', + 'ServiceResource', + 'ServiceResponseBase', + 'ServiceResponseBaseError', + 'SetupScripts', + 'SharedPrivateLinkResource', + 'Sku', + 'SKUCapability', + 'SparkMavenPackage', 'SslConfiguration', + 'SynapseSpark', + 'SynapseSparkPoolProperties', + 'SynapseSparkProperties', + 'SystemData', 'SystemService', + 'UpdateWorkspaceQuotas', + 'UpdateWorkspaceQuotasResult', 'Usage', 'UsageName', 'UserAccountCredentials', + 'UserAssignedIdentity', 'VirtualMachine', + 'VirtualMachineImage', 'VirtualMachineProperties', 'VirtualMachineSecrets', 'VirtualMachineSize', 'VirtualMachineSizeListResult', 'VirtualMachineSshCredentials', + 'VnetConfiguration', 'Workspace', + 'WorkspaceConnection', + 'WorkspaceConnectionDto', + 'WorkspaceSku', 'WorkspaceUpdateParameters', 'OperationPaged', 'WorkspacePaged', + 'AmlUserFeaturePaged', 'UsagePaged', + 'ResourceQuotaPaged', 'ComputeResourcePaged', + 'AmlComputeNodeInformationPaged', + 'WorkspaceSkuPaged', + 'ServiceResourcePaged', + 'WorkspaceConnectionPaged', 'ProvisioningState', - 'UsageUnit', + 'EncryptionStatus', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', 'ResourceIdentityType', + 'UsageUnit', + 'VMPriceOSType', + 'VMTier', + 'QuotaUnit', + 'Status', + 'IdentityType', + 'ClusterPurpose', + 'LoadBalancerType', + 'OsType', 'VmPriority', + 'RemoteLoginPortPublicAccess', 'AllocationState', + 'ApplicationSharingPolicy', + 'SshPublicAccess', + 'ComputeInstanceState', + 'ComputeInstanceAuthorizationType', + 'OperationName', + 'OperationStatus', 'ComputeType', + 'NodeState', + 'ReasonCode', + 'WebServiceState', + 'DeploymentType', + 'VariantType', + 'ValueFormat', 'UnderlyingResourceAction', + 'OrderString', ] diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_azure_machine_learning_workspaces_enums.py index 0e95e8e3d7ffb..7f9e664e16ddb 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,97 @@ class ProvisioningState(str, Enum): canceled = "Canceled" -class UsageUnit(str, Enum): +class EncryptionStatus(str, Enum): - count = "Count" + enabled = "Enabled" + disabled = "Disabled" + + +class PrivateEndpointServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + timeout = "Timeout" + + +class PrivateEndpointConnectionProvisioningState(str, Enum): + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" class ResourceIdentityType(str, Enum): system_assigned = "SystemAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" + user_assigned = "UserAssigned" + none = "None" + + +class UsageUnit(str, Enum): + + count = "Count" + + +class VMPriceOSType(str, Enum): + + linux = "Linux" + windows = "Windows" + + +class VMTier(str, Enum): + + standard = "Standard" + low_priority = "LowPriority" + spot = "Spot" + + +class 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 IdentityType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class ClusterPurpose(str, Enum): + + fast_prod = "FastProd" + dense_prod = "DenseProd" + dev_test = "DevTest" + + +class LoadBalancerType(str, Enum): + + public_ip = "PublicIp" + internal_load_balancer = "InternalLoadBalancer" + + +class OsType(str, Enum): + + linux = "Linux" + windows = "Windows" class VmPriority(str, Enum): @@ -39,24 +122,143 @@ 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" + job_running = "JobRunning" + setting_up = "SettingUp" + setup_failed = "SetupFailed" + starting = "Starting" + stopped = "Stopped" + stopping = "Stopping" + user_setting_up = "UserSettingUp" + user_setup_failed = "UserSetupFailed" + unknown = "Unknown" + unusable = "Unusable" + + +class ComputeInstanceAuthorizationType(str, Enum): + + personal = "personal" + + +class OperationName(str, Enum): + + create = "Create" + start = "Start" + stop = "Stop" + restart = "Restart" + reimage = "Reimage" + delete = "Delete" + + +class OperationStatus(str, Enum): + + in_progress = "InProgress" + succeeded = "Succeeded" + create_failed = "CreateFailed" + start_failed = "StartFailed" + stop_failed = "StopFailed" + restart_failed = "RestartFailed" + reimage_failed = "ReimageFailed" + delete_failed = "DeleteFailed" + + class ComputeType(str, Enum): aks = "AKS" aml_compute = "AmlCompute" + compute_instance = "ComputeInstance" data_factory = "DataFactory" virtual_machine = "VirtualMachine" hd_insight = "HDInsight" databricks = "Databricks" data_lake_analytics = "DataLakeAnalytics" + synapse_spark = "SynapseSpark" + + +class NodeState(str, Enum): + + idle = "idle" + running = "running" + preparing = "preparing" + unusable = "unusable" + leaving = "leaving" + preempted = "preempted" + + +class ReasonCode(str, Enum): + + not_specified = "NotSpecified" + not_available_for_region = "NotAvailableForRegion" + not_available_for_subscription = "NotAvailableForSubscription" + + +class WebServiceState(str, Enum): + + transitioning = "Transitioning" + healthy = "Healthy" + unhealthy = "Unhealthy" + failed = "Failed" + unschedulable = "Unschedulable" + + +class DeploymentType(str, Enum): + + grpc_realtime_endpoint = "GRPCRealtimeEndpoint" + http_realtime_endpoint = "HttpRealtimeEndpoint" + batch = "Batch" + + +class VariantType(str, Enum): + + control = "Control" + treatment = "Treatment" + + +class ValueFormat(str, Enum): + + json = "JSON" class UnderlyingResourceAction(str, Enum): delete = "Delete" detach = "Detach" + + +class OrderString(str, Enum): + + created_at_desc = "CreatedAtDesc" + created_at_asc = "CreatedAtAsc" + updated_at_desc = "UpdatedAtDesc" + updated_at_asc = "UpdatedAtAsc" diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models.py index 8ded2b35dd56e..1a9b308c4f090 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 @@ -13,12 +13,643 @@ from msrest.exceptions import HttpOperationError +class CreateServiceRequest(Model): + """The base class for creating a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ACIServiceCreateRequest, CreateEndpointVariantRequest + + All required parameters must be populated in order to send to Azure. + + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'ACI': 'ACIServiceCreateRequest', 'Custom': 'CreateEndpointVariantRequest'} + } + + def __init__(self, **kwargs): + super(CreateServiceRequest, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.keys = kwargs.get('keys', None) + self.environment_image_request = kwargs.get('environment_image_request', None) + self.location = kwargs.get('location', None) + self.compute_type = None + + +class ACIServiceCreateRequest(CreateServiceRequest): + """ACIServiceCreateRequest. + + All required parameters must be populated in order to send to Azure. + + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param auth_enabled: Whether or not authentication is enabled on the + service. Default value: False . + :type auth_enabled: bool + :param ssl_enabled: Whether or not SSL is enabled. Default value: False . + :type ssl_enabled: bool + :param app_insights_enabled: Whether or not Application Insights is + enabled. Default value: False . + :type app_insights_enabled: bool + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestDataCollection + :param ssl_certificate: The public SSL certificate in PEM format to use if + SSL is enabled. + :type ssl_certificate: str + :param ssl_key: The public SSL key in PEM format for the certificate. + :type ssl_key: str + :param cname: The CName for the service. + :type cname: str + :param dns_name_label: The Dns label for the service. + :type dns_name_label: str + :param vnet_configuration: The virtual network configuration. + :type vnet_configuration: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestVnetConfiguration + :param encryption_properties: The encryption properties. + :type encryption_properties: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestEncryptionProperties + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'ssl_enabled': {'key': 'sslEnabled', 'type': 'bool'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'data_collection': {'key': 'dataCollection', 'type': 'ACIServiceCreateRequestDataCollection'}, + 'ssl_certificate': {'key': 'sslCertificate', 'type': 'str'}, + 'ssl_key': {'key': 'sslKey', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, + 'vnet_configuration': {'key': 'vnetConfiguration', 'type': 'ACIServiceCreateRequestVnetConfiguration'}, + 'encryption_properties': {'key': 'encryptionProperties', 'type': 'ACIServiceCreateRequestEncryptionProperties'}, + } + + def __init__(self, **kwargs): + super(ACIServiceCreateRequest, self).__init__(**kwargs) + self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + self.auth_enabled = kwargs.get('auth_enabled', False) + self.ssl_enabled = kwargs.get('ssl_enabled', False) + self.app_insights_enabled = kwargs.get('app_insights_enabled', False) + self.data_collection = kwargs.get('data_collection', None) + self.ssl_certificate = kwargs.get('ssl_certificate', None) + self.ssl_key = kwargs.get('ssl_key', None) + self.cname = kwargs.get('cname', None) + self.dns_name_label = kwargs.get('dns_name_label', None) + self.vnet_configuration = kwargs.get('vnet_configuration', None) + self.encryption_properties = kwargs.get('encryption_properties', None) + self.compute_type = 'ACI' + + +class ModelDataCollection(Model): + """The Model data collection properties. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ModelDataCollection, self).__init__(**kwargs) + self.event_hub_enabled = kwargs.get('event_hub_enabled', None) + self.storage_enabled = kwargs.get('storage_enabled', None) + + +class ACIServiceCreateRequestDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ACIServiceCreateRequestDataCollection, self).__init__(**kwargs) + + +class EncryptionProperties(Model): + """EncryptionProperties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EncryptionProperties, self).__init__(**kwargs) + self.vault_base_url = kwargs.get('vault_base_url', None) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + + +class ACIServiceCreateRequestEncryptionProperties(EncryptionProperties): + """The encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ACIServiceCreateRequestEncryptionProperties, self).__init__(**kwargs) + + +class VnetConfiguration(Model): + """VnetConfiguration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VnetConfiguration, self).__init__(**kwargs) + self.vnet_name = kwargs.get('vnet_name', None) + self.subnet_name = kwargs.get('subnet_name', None) + + +class ACIServiceCreateRequestVnetConfiguration(VnetConfiguration): + """The virtual network configuration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ACIServiceCreateRequestVnetConfiguration, self).__init__(**kwargs) + + +class ServiceResponseBase(Model): + """The base service response. The correct inherited response based on + computeType will be returned (ex. ACIServiceResponse). + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ACIServiceResponse, AKSVariantResponse + + 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 description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'ACI': 'ACIServiceResponse', 'Custom': 'AKSVariantResponse'} + } + + def __init__(self, **kwargs): + super(ServiceResponseBase, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.state = None + self.error = None + self.deployment_type = kwargs.get('deployment_type', None) + self.compute_type = None + + +class ACIServiceResponse(ServiceResponseBase): + """The response for an ACI service. + + 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 description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :ivar scoring_uri: The Uri for sending scoring requests. + :vartype scoring_uri: str + :param location: The name of the Azure location/region. + :type location: str + :param auth_enabled: Whether or not authentication is enabled on the + service. + :type auth_enabled: bool + :param ssl_enabled: Whether or not SSL is enabled. + :type ssl_enabled: bool + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseDataCollection + :param ssl_certificate: The public SSL certificate in PEM format to use if + SSL is enabled. + :type ssl_certificate: str + :param ssl_key: The public SSL key in PEM format for the certificate. + :type ssl_key: str + :param cname: The CName for the service. + :type cname: str + :param public_ip: The public IP address for the service. + :type public_ip: str + :param public_fqdn: The public Fqdn for the service. + :type public_fqdn: str + :ivar swagger_uri: The Uri for sending swagger requests. + :vartype swagger_uri: str + :ivar model_config_map: Details on the models and configurations. + :vartype model_config_map: dict[str, object] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment_image_request: The Environment, models and assets used + for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseEnvironmentImageRequest + :param vnet_configuration: The virtual network configuration. + :type vnet_configuration: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseVnetConfiguration + :param encryption_properties: The encryption properties. + :type encryption_properties: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseEncryptionProperties + """ + + _validation = { + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'model_config_map': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'ssl_enabled': {'key': 'sslEnabled', 'type': 'bool'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'data_collection': {'key': 'dataCollection', 'type': 'ACIServiceResponseDataCollection'}, + 'ssl_certificate': {'key': 'sslCertificate', 'type': 'str'}, + 'ssl_key': {'key': 'sslKey', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'public_ip': {'key': 'publicIp', 'type': 'str'}, + 'public_fqdn': {'key': 'publicFqdn', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'model_config_map': {'key': 'modelConfigMap', 'type': '{object}'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'ACIServiceResponseEnvironmentImageRequest'}, + 'vnet_configuration': {'key': 'vnetConfiguration', 'type': 'ACIServiceResponseVnetConfiguration'}, + 'encryption_properties': {'key': 'encryptionProperties', 'type': 'ACIServiceResponseEncryptionProperties'}, + } + + def __init__(self, **kwargs): + super(ACIServiceResponse, self).__init__(**kwargs) + self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + self.scoring_uri = None + self.location = kwargs.get('location', None) + self.auth_enabled = kwargs.get('auth_enabled', None) + self.ssl_enabled = kwargs.get('ssl_enabled', None) + self.app_insights_enabled = kwargs.get('app_insights_enabled', None) + self.data_collection = kwargs.get('data_collection', None) + self.ssl_certificate = kwargs.get('ssl_certificate', None) + self.ssl_key = kwargs.get('ssl_key', None) + self.cname = kwargs.get('cname', None) + self.public_ip = kwargs.get('public_ip', None) + self.public_fqdn = kwargs.get('public_fqdn', None) + self.swagger_uri = None + self.model_config_map = None + self.models_property = kwargs.get('models_property', None) + self.environment_image_request = kwargs.get('environment_image_request', None) + self.vnet_configuration = kwargs.get('vnet_configuration', None) + self.encryption_properties = kwargs.get('encryption_properties', None) + self.compute_type = 'ACI' + + +class ACIServiceResponseDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ACIServiceResponseDataCollection, self).__init__(**kwargs) + + +class ACIServiceResponseEncryptionProperties(EncryptionProperties): + """The encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ACIServiceResponseEncryptionProperties, self).__init__(**kwargs) + + +class EnvironmentImageResponse(Model): + """Request to create a Docker image based on Environment. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageResponse, self).__init__(**kwargs) + self.driver_program = kwargs.get('driver_program', None) + self.assets = kwargs.get('assets', None) + self.model_ids = kwargs.get('model_ids', None) + self.models_property = kwargs.get('models_property', None) + self.environment = kwargs.get('environment', None) + self.environment_reference = kwargs.get('environment_reference', None) + + +class ACIServiceResponseEnvironmentImageRequest(EnvironmentImageResponse): + """The Environment, models and assets used for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, + } + + def __init__(self, **kwargs): + super(ACIServiceResponseEnvironmentImageRequest, self).__init__(**kwargs) + + +class ACIServiceResponseVnetConfiguration(VnetConfiguration): + """The virtual network configuration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ACIServiceResponseVnetConfiguration, self).__init__(**kwargs) + + 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. @@ -35,9 +666,9 @@ class Compute(Model): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -48,6 +679,9 @@ class Compute(Model): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str """ @@ -70,11 +704,12 @@ class Compute(Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} } def __init__(self, **kwargs): @@ -87,6 +722,7 @@ def __init__(self, **kwargs): self.resource_id = kwargs.get('resource_id', None) self.provisioning_errors = None self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) self.compute_type = None @@ -108,9 +744,9 @@ class AKS(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -121,6 +757,9 @@ class AKS(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: AKS properties @@ -145,6 +784,7 @@ class AKS(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AKSProperties'}, } @@ -277,26 +917,39 @@ class AKSProperties(Model): :type agent_count: int :param agent_vm_size: Agent virtual machine size :type agent_vm_size: str + :param cluster_purpose: Intended usage of the cluster. Possible values + include: 'FastProd', 'DenseProd', 'DevTest'. Default value: "FastProd" . + :type cluster_purpose: str or + ~azure.mgmt.machinelearningservices.models.ClusterPurpose :param ssl_configuration: SSL configuration :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration :param aks_networking_configuration: AKS networking configuration for vnet :type aks_networking_configuration: ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :param load_balancer_type: Load Balancer Type. Possible values include: + 'PublicIp', 'InternalLoadBalancer'. Default value: "PublicIp" . + :type load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :param load_balancer_subnet: Load Balancer Subnet + :type load_balancer_subnet: str """ _validation = { 'system_services': {'readonly': True}, - 'agent_count': {'minimum': 1}, + 'agent_count': {'minimum': 0}, } _attribute_map = { 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, 'agent_count': {'key': 'agentCount', 'type': 'int'}, - 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, } def __init__(self, **kwargs): @@ -305,561 +958,784 @@ def __init__(self, **kwargs): self.system_services = None self.agent_count = kwargs.get('agent_count', None) self.agent_vm_size = kwargs.get('agent_vm_size', None) + self.cluster_purpose = kwargs.get('cluster_purpose', "FastProd") self.ssl_configuration = kwargs.get('ssl_configuration', None) self.aks_networking_configuration = kwargs.get('aks_networking_configuration', None) + self.load_balancer_type = kwargs.get('load_balancer_type', "PublicIp") + self.load_balancer_subnet = kwargs.get('load_balancer_subnet', None) + + +class AKSReplicaStatus(Model): + """AKSReplicaStatus. + + :param desired_replicas: The desired number of replicas. + :type desired_replicas: int + :param updated_replicas: The number of updated replicas. + :type updated_replicas: int + :param available_replicas: The number of available replicas. + :type available_replicas: int + :param error: The error details. + :type error: + ~azure.mgmt.machinelearningservices.models.AKSReplicaStatusError + """ + _attribute_map = { + 'desired_replicas': {'key': 'desiredReplicas', 'type': 'int'}, + 'updated_replicas': {'key': 'updatedReplicas', 'type': 'int'}, + 'available_replicas': {'key': 'availableReplicas', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'AKSReplicaStatusError'}, + } -class AmlCompute(Compute): - """An Azure Machine Learning compute. + def __init__(self, **kwargs): + super(AKSReplicaStatus, self).__init__(**kwargs) + self.desired_replicas = kwargs.get('desired_replicas', None) + self.updated_replicas = kwargs.get('updated_replicas', None) + self.available_replicas = kwargs.get('available_replicas', None) + self.error = kwargs.get('error', None) + + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. 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: AML Compute properties - :type properties: - ~azure.mgmt.machinelearningservices.models.AmlComputeProperties - """ + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ _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}, + 'error': {'readonly': 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': 'AmlComputeProperties'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } def __init__(self, **kwargs): - super(AmlCompute, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'AmlCompute' + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = None -class AmlComputeNodeInformation(Model): - """Compute node information related to a AmlCompute. +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + + +class AKSReplicaStatusError(MachineLearningServiceError): + """The error details. Variables are only populated by the server, and will be ignored when sending a request. - :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 port: Port. SSH port number of the node. - :vartype port: float + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse """ _validation = { - 'node_id': {'readonly': True}, - 'ip_address': {'readonly': True}, - 'port': {'readonly': True}, + 'error': {'readonly': True}, } _attribute_map = { - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'float'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } def __init__(self, **kwargs): - super(AmlComputeNodeInformation, self).__init__(**kwargs) - self.node_id = None - self.ip_address = None - self.port = None + super(AKSReplicaStatusError, self).__init__(**kwargs) -class ComputeNodesInformation(Model): - """Compute nodes information related to a Machine Learning compute. Might - differ for every type of compute. +class CreateEndpointVariantRequest(CreateServiceRequest): + """The Variant properties. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmlComputeNodesInformation - - Variables are only populated by the server, and will be ignored when - sending a request. + sub-classes are: AKSServiceCreateRequest All required parameters must be populated in order to send to Azure. - :ivar next_link: The continuation token. - :vartype next_link: str + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str :param compute_type: Required. Constant filled by server. :type compute_type: str + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType """ _validation = { - 'next_link': {'readonly': True}, 'compute_type': {'required': True}, } _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} + 'compute_type': {'AKS': 'AKSServiceCreateRequest'} } def __init__(self, **kwargs): - super(ComputeNodesInformation, self).__init__(**kwargs) - self.next_link = None - self.compute_type = None - + super(CreateEndpointVariantRequest, self).__init__(**kwargs) + self.is_default = kwargs.get('is_default', None) + self.traffic_percentile = kwargs.get('traffic_percentile', None) + self.type = kwargs.get('type', None) + self.compute_type = 'Custom' -class AmlComputeNodesInformation(ComputeNodesInformation): - """Compute node information related to a AmlCompute. - Variables are only populated by the server, and will be ignored when - sending a request. +class AKSServiceCreateRequest(CreateEndpointVariantRequest): + """The request to create an AKS service. All required parameters must be populated in order to send to Azure. - :ivar next_link: The continuation token. - :vartype next_link: str + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str :param compute_type: Required. Constant filled by server. :type compute_type: str - :ivar nodes: The collection of returned AmlCompute nodes details. - :vartype nodes: - list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType + :param num_replicas: The number of replicas on the cluster. + :type num_replicas: int + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestDataCollection + :param compute_name: The name of the compute resource. + :type compute_name: str + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param auto_scaler: The auto scaler properties. + :type auto_scaler: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestAutoScaler + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param max_concurrent_requests_per_container: The maximum number of + concurrent requests per container. + :type max_concurrent_requests_per_container: int + :param max_queue_wait_ms: Maximum time a request will wait in the queue + (in milliseconds). After this time, the service will return 503 (Service + Unavailable) + :type max_queue_wait_ms: int + :param namespace: Kubernetes namespace for the service. + :type namespace: str + :param scoring_timeout_ms: The scoring timeout in milliseconds. + :type scoring_timeout_ms: int + :param auth_enabled: Whether or not authentication is enabled. + :type auth_enabled: bool + :param liveness_probe_requirements: The liveness probe requirements. + :type liveness_probe_requirements: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestLivenessProbeRequirements + :param aad_auth_enabled: Whether or not AAD authentication is enabled. + :type aad_auth_enabled: bool """ _validation = { - 'next_link': {'readonly': True}, 'compute_type': {'required': True}, - 'nodes': {'readonly': True}, } _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, + 'num_replicas': {'key': 'numReplicas', 'type': 'int'}, + 'data_collection': {'key': 'dataCollection', 'type': 'AKSServiceCreateRequestDataCollection'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'auto_scaler': {'key': 'autoScaler', 'type': 'AKSServiceCreateRequestAutoScaler'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'max_concurrent_requests_per_container': {'key': 'maxConcurrentRequestsPerContainer', 'type': 'int'}, + 'max_queue_wait_ms': {'key': 'maxQueueWaitMs', 'type': 'int'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'scoring_timeout_ms': {'key': 'scoringTimeoutMs', 'type': 'int'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'liveness_probe_requirements': {'key': 'livenessProbeRequirements', 'type': 'AKSServiceCreateRequestLivenessProbeRequirements'}, + 'aad_auth_enabled': {'key': 'aadAuthEnabled', 'type': 'bool'}, } def __init__(self, **kwargs): - super(AmlComputeNodesInformation, self).__init__(**kwargs) - self.nodes = None - self.compute_type = 'AmlCompute' - - -class AmlComputeProperties(Model): - """AML Compute properties. + super(AKSServiceCreateRequest, self).__init__(**kwargs) + self.num_replicas = kwargs.get('num_replicas', None) + self.data_collection = kwargs.get('data_collection', None) + self.compute_name = kwargs.get('compute_name', None) + self.app_insights_enabled = kwargs.get('app_insights_enabled', None) + self.auto_scaler = kwargs.get('auto_scaler', None) + self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + self.max_concurrent_requests_per_container = kwargs.get('max_concurrent_requests_per_container', None) + self.max_queue_wait_ms = kwargs.get('max_queue_wait_ms', None) + self.namespace = kwargs.get('namespace', None) + self.scoring_timeout_ms = kwargs.get('scoring_timeout_ms', None) + self.auth_enabled = kwargs.get('auth_enabled', None) + self.liveness_probe_requirements = kwargs.get('liveness_probe_requirements', None) + self.aad_auth_enabled = kwargs.get('aad_auth_enabled', None) + self.compute_type = 'AKS' - 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 vm_priority: Virtual Machine priority. Possible values include: - 'Dedicated', 'LowPriority' - :type vm_priority: str or - ~azure.mgmt.machinelearningservices.models.VmPriority - :param scale_settings: Scale settings for AML Compute - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings - :param user_account_credentials: User account credentials. Credentials for - an administrator user account that will be created on each compute node. - :type user_account_credentials: - ~azure.mgmt.machinelearningservices.models.UserAccountCredentials - :param subnet: Subnet. Virtual network subnet resource ID the compute - nodes belong to. - :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId - :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 - progress. A compute enters this state when it is created and when no - operations are being performed on the compute to change the number of - compute nodes. resizing - Indicates that the compute is resizing; that is, - compute nodes are being added to or removed from the compute. Possible - values include: 'Steady', 'Resizing' - :vartype allocation_state: str or - ~azure.mgmt.machinelearningservices.models.AllocationState - :ivar allocation_state_transition_time: Allocation state transition time. - The time at which the compute entered its current allocation state. - :vartype allocation_state_transition_time: datetime - :ivar errors: Errors. Collection of errors encountered by various compute - nodes during node setup. - :vartype errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] - :ivar current_node_count: Current node count. The number of compute nodes - currently assigned to the compute. - :vartype current_node_count: int - :ivar target_node_count: Target node count. The target number of compute - nodes for the compute. If the allocationState is resizing, this property - denotes the target node count for the ongoing resize operation. If the - allocationState is steady, this property denotes the target node count for - the previous resize operation. - :vartype target_node_count: int - :ivar node_state_counts: Node state counts. Counts of various node states - on the compute. - :vartype node_state_counts: - ~azure.mgmt.machinelearningservices.models.NodeStateCounts +class AutoScaler(Model): + """The Auto Scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int """ - _validation = { - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'current_node_count': {'readonly': True}, - 'target_node_count': {'readonly': True}, - 'node_state_counts': {'readonly': True}, + _attribute_map = { + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } + def __init__(self, **kwargs): + super(AutoScaler, self).__init__(**kwargs) + self.autoscale_enabled = kwargs.get('autoscale_enabled', None) + self.min_replicas = kwargs.get('min_replicas', None) + self.max_replicas = kwargs.get('max_replicas', None) + self.target_utilization = kwargs.get('target_utilization', None) + self.refresh_period_in_seconds = kwargs.get('refresh_period_in_seconds', None) + + +class AKSServiceCreateRequestAutoScaler(AutoScaler): + """The auto scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int + """ + _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, - 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, - 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, - 'allocation_state': {'key': 'allocationState', 'type': 'str'}, - 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, - 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, - 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, - 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } def __init__(self, **kwargs): - super(AmlComputeProperties, self).__init__(**kwargs) - self.vm_size = kwargs.get('vm_size', None) - self.vm_priority = kwargs.get('vm_priority', None) - self.scale_settings = kwargs.get('scale_settings', None) - self.user_account_credentials = kwargs.get('user_account_credentials', None) - self.subnet = kwargs.get('subnet', None) - self.allocation_state = None - self.allocation_state_transition_time = None - self.errors = None - self.current_node_count = None - self.target_node_count = None - self.node_state_counts = None + super(AKSServiceCreateRequestAutoScaler, self).__init__(**kwargs) -class CloudError(Model): - """CloudError. +class AKSServiceCreateRequestDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool """ _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, } + def __init__(self, **kwargs): + super(AKSServiceCreateRequestDataCollection, self).__init__(**kwargs) + + +class LivenessProbeRequirements(Model): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int + """ -class ClusterUpdateParameters(Model): - """AmlCompute update parameters. + _attribute_map = { + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + } - :param scale_settings: Scale settings. Desired scale settings for the - amlCompute. - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings + def __init__(self, **kwargs): + super(LivenessProbeRequirements, self).__init__(**kwargs) + self.failure_threshold = kwargs.get('failure_threshold', None) + self.success_threshold = kwargs.get('success_threshold', None) + self.timeout_seconds = kwargs.get('timeout_seconds', None) + self.period_seconds = kwargs.get('period_seconds', None) + self.initial_delay_seconds = kwargs.get('initial_delay_seconds', None) + + +class AKSServiceCreateRequestLivenessProbeRequirements(LivenessProbeRequirements): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int """ _attribute_map = { - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, } def __init__(self, **kwargs): - super(ClusterUpdateParameters, self).__init__(**kwargs) - self.scale_settings = kwargs.get('scale_settings', None) + super(AKSServiceCreateRequestLivenessProbeRequirements, self).__init__(**kwargs) -class Resource(Model): - """Azure Resource Manager resource envelope. +class AKSVariantResponse(ServiceResponseBase): + """The response for an AKS variant. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKSServiceResponse 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 - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. - :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] + All required parameters must be populated in order to send to Azure. + + :param description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'identity': {'readonly': True}, - 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + } + + _subtype_map = { + 'compute_type': {'AKS': 'AKSServiceResponse'} } def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.identity = None - self.location = kwargs.get('location', None) - self.type = None - self.tags = kwargs.get('tags', None) + super(AKSVariantResponse, self).__init__(**kwargs) + self.is_default = kwargs.get('is_default', None) + self.traffic_percentile = kwargs.get('traffic_percentile', None) + self.type = kwargs.get('type', None) + self.compute_type = 'Custom' -class ComputeResource(Resource): - """Machine Learning compute object wrapped into ARM resource envelope. +class AKSServiceResponse(AKSVariantResponse): + """The response for an AKS service. 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 - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. - :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] - :param properties: Compute properties - :type properties: ~azure.mgmt.machinelearningservices.models.Compute - """ + All required parameters must be populated in order to send to Azure. - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'identity': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'Compute'}, - } - - def __init__(self, **kwargs): - super(ComputeResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class Databricks(Compute): - """A DataFactory compute. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param compute_location: Location for the underlying compute - :type compute_location: str - :ivar provisioning_state: The provision state of the cluster. Valid values - are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible - values include: 'Unknown', 'Updating', 'Creating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.machinelearningservices.models.ProvisioningState - :param description: The description of the Machine Learning compute. + :param description: The service description. :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 kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: - :type properties: - ~azure.mgmt.machinelearningservices.models.DatabricksProperties + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param max_concurrent_requests_per_container: The maximum number of + concurrent requests per container. + :type max_concurrent_requests_per_container: int + :param max_queue_wait_ms: Maximum time a request will wait in the queue + (in milliseconds). After this time, the service will return 503 (Service + Unavailable) + :type max_queue_wait_ms: int + :param compute_name: The name of the compute resource. + :type compute_name: str + :param namespace: The Kubernetes namespace of the deployment. + :type namespace: str + :param num_replicas: The number of replicas on the cluster. + :type num_replicas: int + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseDataCollection + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param auto_scaler: The auto scaler properties. + :type auto_scaler: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseAutoScaler + :ivar scoring_uri: The Uri for sending scoring requests. + :vartype scoring_uri: str + :ivar deployment_status: The deployment status. + :vartype deployment_status: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseDeploymentStatus + :param scoring_timeout_ms: The scoring timeout in milliseconds. + :type scoring_timeout_ms: int + :param liveness_probe_requirements: The liveness probe requirements. + :type liveness_probe_requirements: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseLivenessProbeRequirements + :param auth_enabled: Whether or not authentication is enabled. + :type auth_enabled: bool + :param aad_auth_enabled: Whether or not AAD authentication is enabled. + :type aad_auth_enabled: bool + :ivar swagger_uri: The Uri for sending swagger requests. + :vartype swagger_uri: str + :ivar model_config_map: Details on the models and configurations. + :vartype model_config_map: dict[str, object] + :param environment_image_request: The Environment, models and assets used + for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseEnvironmentImageRequest """ _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + 'state': {'readonly': True}, + 'error': {'readonly': True}, 'compute_type': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'deployment_status': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'model_config_map': {'readonly': 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'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'max_concurrent_requests_per_container': {'key': 'maxConcurrentRequestsPerContainer', 'type': 'int'}, + 'max_queue_wait_ms': {'key': 'maxQueueWaitMs', 'type': 'int'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'num_replicas': {'key': 'numReplicas', 'type': 'int'}, + 'data_collection': {'key': 'dataCollection', 'type': 'AKSServiceResponseDataCollection'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'auto_scaler': {'key': 'autoScaler', 'type': 'AKSServiceResponseAutoScaler'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'AKSServiceResponseDeploymentStatus'}, + 'scoring_timeout_ms': {'key': 'scoringTimeoutMs', 'type': 'int'}, + 'liveness_probe_requirements': {'key': 'livenessProbeRequirements', 'type': 'AKSServiceResponseLivenessProbeRequirements'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'aad_auth_enabled': {'key': 'aadAuthEnabled', 'type': 'bool'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'model_config_map': {'key': 'modelConfigMap', 'type': '{object}'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'AKSServiceResponseEnvironmentImageRequest'}, } def __init__(self, **kwargs): - super(Databricks, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.compute_type = 'Databricks' - - -class DatabricksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on Databricks. + super(AKSServiceResponse, self).__init__(**kwargs) + self.models_property = kwargs.get('models_property', None) + self.container_resource_requirements = kwargs.get('container_resource_requirements', None) + self.max_concurrent_requests_per_container = kwargs.get('max_concurrent_requests_per_container', None) + self.max_queue_wait_ms = kwargs.get('max_queue_wait_ms', None) + self.compute_name = kwargs.get('compute_name', None) + self.namespace = kwargs.get('namespace', None) + self.num_replicas = kwargs.get('num_replicas', None) + self.data_collection = kwargs.get('data_collection', None) + self.app_insights_enabled = kwargs.get('app_insights_enabled', None) + self.auto_scaler = kwargs.get('auto_scaler', None) + self.scoring_uri = None + self.deployment_status = None + self.scoring_timeout_ms = kwargs.get('scoring_timeout_ms', None) + self.liveness_probe_requirements = kwargs.get('liveness_probe_requirements', None) + self.auth_enabled = kwargs.get('auth_enabled', None) + self.aad_auth_enabled = kwargs.get('aad_auth_enabled', None) + self.swagger_uri = None + self.model_config_map = None + self.environment_image_request = kwargs.get('environment_image_request', None) + self.compute_type = 'AKS' - All required parameters must be populated in order to send to Azure. - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :param databricks_access_token: access token for databricks account. - :type databricks_access_token: str +class AKSServiceResponseAutoScaler(AutoScaler): + """The auto scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int """ - _validation = { - 'compute_type': {'required': True}, - } - _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } def __init__(self, **kwargs): - super(DatabricksComputeSecrets, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) - self.compute_type = 'Databricks' + super(AKSServiceResponseAutoScaler, self).__init__(**kwargs) -class DatabricksProperties(Model): - """DatabricksProperties. +class AKSServiceResponseDataCollection(ModelDataCollection): + """Details of the data collection options specified. - :param databricks_access_token: Databricks access token - :type databricks_access_token: str + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool """ _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, } def __init__(self, **kwargs): - super(DatabricksProperties, self).__init__(**kwargs) - self.databricks_access_token = kwargs.get('databricks_access_token', None) + super(AKSServiceResponseDataCollection, self).__init__(**kwargs) -class DataFactory(Compute): - """A DataFactory compute. +class AKSServiceResponseDeploymentStatus(AKSReplicaStatus): + """The deployment status. - Variables are only populated by the server, and will be ignored when - sending a request. + :param desired_replicas: The desired number of replicas. + :type desired_replicas: int + :param updated_replicas: The number of updated replicas. + :type updated_replicas: int + :param available_replicas: The number of available replicas. + :type available_replicas: int + :param error: The error details. + :type error: + ~azure.mgmt.machinelearningservices.models.AKSReplicaStatusError + """ - All required parameters must be populated in order to send to Azure. + _attribute_map = { + 'desired_replicas': {'key': 'desiredReplicas', 'type': 'int'}, + 'updated_replicas': {'key': 'updatedReplicas', 'type': 'int'}, + 'available_replicas': {'key': 'availableReplicas', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'AKSReplicaStatusError'}, + } - :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 + def __init__(self, **kwargs): + super(AKSServiceResponseDeploymentStatus, self).__init__(**kwargs) + + +class AKSServiceResponseEnvironmentImageRequest(EnvironmentImageResponse): + """The Environment, models and assets used for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference """ - _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 = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, } + def __init__(self, **kwargs): + super(AKSServiceResponseEnvironmentImageRequest, self).__init__(**kwargs) + + +class AKSServiceResponseLivenessProbeRequirements(LivenessProbeRequirements): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int + """ + _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'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, } def __init__(self, **kwargs): - super(DataFactory, self).__init__(**kwargs) - self.compute_type = 'DataFactory' + super(AKSServiceResponseLivenessProbeRequirements, self).__init__(**kwargs) -class DataLakeAnalytics(Compute): - """A DataLakeAnalytics compute. +class AmlCompute(Compute): + """An Azure Machine Learning compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -876,9 +1752,9 @@ class DataLakeAnalytics(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -889,11 +1765,14 @@ class DataLakeAnalytics(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: + :param properties: AML Compute properties :type properties: - ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + ~azure.mgmt.machinelearningservices.models.AmlComputeProperties """ _validation = { @@ -914,114 +1793,361 @@ class DataLakeAnalytics(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, } def __init__(self, **kwargs): - super(DataLakeAnalytics, self).__init__(**kwargs) + super(AmlCompute, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) - self.compute_type = 'DataLakeAnalytics' - - -class DataLakeAnalyticsProperties(Model): - """DataLakeAnalyticsProperties. - - :param data_lake_store_account_name: DataLake Store Account Name - :type data_lake_store_account_name: str - """ - - _attribute_map = { - 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(DataLakeAnalyticsProperties, self).__init__(**kwargs) - self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) - - -class ErrorDetail(Model): - """Error detail information. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetail, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + self.compute_type = 'AmlCompute' -class ErrorResponse(Model): - """Error response information. +class AmlComputeNodeInformation(Model): + """Compute node information related to a AmlCompute. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code. - :vartype code: str - :ivar message: Error message. - :vartype message: str - :ivar details: An array of error detail objects. - :vartype details: - list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :ivar node_id: Node ID. ID of the compute node. + :vartype node_id: 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 = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'node_id': {'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 = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'node_id': {'key': 'nodeId', '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(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + super(AmlComputeNodeInformation, self).__init__(**kwargs) + self.node_id = None + self.private_ip_address = None + self.public_ip_address = None + self.port = None + self.node_state = None + self.run_id = None -class HDInsight(Compute): - """A HDInsight compute. +class AmlComputeProperties(Model): + """AML Compute properties. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param compute_location: Location for the underlying compute - :type compute_location: str - :ivar provisioning_state: The provision state of the cluster. Valid values - are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible - values include: 'Unknown', 'Updating', 'Creating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or + :param os_type: Compute OS Type. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority. Possible values include: + 'Dedicated', 'LowPriority' + :type vm_priority: str or + ~azure.mgmt.machinelearningservices.models.VmPriority + :param virtual_machine_image: Virtual Machine image for AML Compute - + windows only + :type virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :param isolated_network: Network is isolated or not + :type isolated_network: bool + :param scale_settings: Scale settings for AML Compute + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + :param user_account_credentials: User account credentials. Credentials for + an administrator user account that will be created on each compute node. + :type user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :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 + progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of + compute nodes. resizing - Indicates that the compute is resizing; that is, + compute nodes are being added to or removed from the compute. Possible + values include: 'Steady', 'Resizing' + :vartype allocation_state: str or + ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: Allocation state transition time. + The time at which the compute entered its current allocation state. + :vartype allocation_state_transition_time: datetime + :ivar errors: Errors. Collection of errors encountered by various compute + nodes during node setup. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar current_node_count: Current node count. The number of compute nodes + currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: Target node count. The target number of compute + nodes for the compute. If the allocationState is resizing, this property + denotes the target node count for the ongoing resize operation. If the + allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Node state counts. Counts of various node states + on the compute. + :vartype node_state_counts: + ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :param enable_node_public_ip: Enable node public IP. Enable or disable + node public IP address provisioning. Possible values are: Possible values + are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private + endpoint and no public IPs. Default value: True . + :type enable_node_public_ip: bool + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', "Linux") + self.vm_size = kwargs.get('vm_size', None) + self.vm_priority = kwargs.get('vm_priority', None) + self.virtual_machine_image = kwargs.get('virtual_machine_image', None) + self.isolated_network = kwargs.get('isolated_network', None) + self.scale_settings = kwargs.get('scale_settings', None) + self.user_account_credentials = kwargs.get('user_account_credentials', None) + self.subnet = kwargs.get('subnet', None) + self.remote_login_port_public_access = kwargs.get('remote_login_port_public_access', "NotSpecified") + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', True) + + +class 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 AssignedUser(Model): + """A user that can be assigned to a compute instance. + + All required parameters must be populated in order to send to Azure. + + :param object_id: Required. User’s AAD Object Id. + :type object_id: str + :param tenant_id: Required. User’s AAD Tenant Id. + :type tenant_id: str + """ + + _validation = { + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, + } + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AssignedUser, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class AuthKeys(Model): + """AuthKeys. + + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + + +class AutoPauseProperties(Model): + """Auto pause properties. + + :param delay_in_minutes: + :type delay_in_minutes: int + :param enabled: + :type enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = kwargs.get('delay_in_minutes', None) + self.enabled = kwargs.get('enabled', None) + + +class AutoScaleProperties(Model): + """Auto scale properties. + + :param min_node_count: + :type min_node_count: int + :param enabled: + :type enabled: bool + :param max_node_count: + :type max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = kwargs.get('min_node_count', None) + self.enabled = kwargs.get('enabled', None) + self.max_node_count = kwargs.get('max_node_count', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param scale_settings: Scale settings. Desired scale settings for the + amlCompute. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, **kwargs): + super(ClusterUpdateParameters, self).__init__(**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. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -1032,11 +2158,14 @@ class HDInsight(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: + :param properties: Compute Instance properties :type properties: - ~azure.mgmt.machinelearningservices.models.HDInsightProperties + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties """ _validation = { @@ -1057,117 +2186,3207 @@ class HDInsight(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + 'properties': {'key': 'properties', 'type': 'ComputeInstanceProperties'}, } def __init__(self, **kwargs): - super(HDInsight, self).__init__(**kwargs) + super(ComputeInstance, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) - self.compute_type = 'HDInsight' + self.compute_type = 'ComputeInstance' -class HDInsightProperties(Model): - """HDInsightProperties. +class ComputeInstanceApplication(Model): + """Defines an Aml Instance application and its connectivity endpoint URI. - :param ssh_port: Port open for ssh connections on the master node of the - cluster. - :type ssh_port: int - :param address: Public IP address of the master node of the cluster. - :type address: str - :param administrator_account: Admin credentials for master node of the - cluster - :type administrator_account: - ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param display_name: Name of the ComputeInstance application. + :type display_name: str + :param endpoint_uri: Application' endpoint URI. + :type endpoint_uri: str """ _attribute_map = { - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_uri': {'key': 'endpointUri', 'type': 'str'}, } def __init__(self, **kwargs): - super(HDInsightProperties, self).__init__(**kwargs) - self.ssh_port = kwargs.get('ssh_port', None) - self.address = kwargs.get('address', None) - self.administrator_account = kwargs.get('administrator_account', None) + super(ComputeInstanceApplication, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.endpoint_uri = kwargs.get('endpoint_uri', None) -class Identity(Model): - """Identity for the resource. +class ComputeInstanceConnectivityEndpoints(Model): + """Defines all connectivity endpoints and properties for an ComputeInstance. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar public_ip_address: Public IP Address of this ComputeInstance. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP Address of this ComputeInstance + (local to the VNET in which the compute instance is deployed). + :vartype private_ip_address: str + """ + + _validation = { + '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 ComputeInstanceLastOperation(Model): + """The last operation on ComputeInstance. + + :param operation_name: Name of the last operation. Possible values + include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' + :type operation_name: str or + ~azure.mgmt.machinelearningservices.models.OperationName + :param operation_time: Time of the last operation. + :type operation_time: datetime + :param operation_status: Operation status. Possible values include: + 'InProgress', 'Succeeded', 'CreateFailed', 'StartFailed', 'StopFailed', + 'RestartFailed', 'ReimageFailed', 'DeleteFailed' + :type operation_status: str or + ~azure.mgmt.machinelearningservices.models.OperationStatus + """ + + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = kwargs.get('operation_name', None) + self.operation_time = kwargs.get('operation_time', None) + self.operation_status = kwargs.get('operation_status', None) + + +class ComputeInstanceProperties(Model): + """Compute Instance properties. Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :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', + 'JobRunning', 'SettingUp', 'SetupFailed', 'Starting', 'Stopped', + 'Stopping', 'UserSettingUp', 'UserSetupFailed', 'Unknown', 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :param compute_instance_authorization_type: Compute Instance Authorization + type. The Compute Instance Authorization type. Available values are + personal (default). Possible values include: 'personal'. Default value: + "personal" . + :type compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :param personal_compute_instance_settings: Personal Compute Instance + settings. Settings for a personal compute instance. + :type personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :param setup_scripts: Details of customized scripts to execute for setting + up the cluster. + :type setup_scripts: + ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation + """ + + _validation = { + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, + } + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'application_sharing_policy': {'key': 'applicationSharingPolicy', 'type': 'str'}, + 'ssh_settings': {'key': 'sshSettings', 'type': 'ComputeInstanceSshSettings'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': 'ComputeInstanceConnectivityEndpoints'}, + 'applications': {'key': 'applications', 'type': '[ComputeInstanceApplication]'}, + 'created_by': {'key': 'createdBy', 'type': 'ComputeInstanceCreatedBy'}, + 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.subnet = kwargs.get('subnet', None) + self.application_sharing_policy = kwargs.get('application_sharing_policy', "Shared") + self.ssh_settings = kwargs.get('ssh_settings', None) + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = kwargs.get('compute_instance_authorization_type', "personal") + self.personal_compute_instance_settings = kwargs.get('personal_compute_instance_settings', None) + self.setup_scripts = kwargs.get('setup_scripts', None) + self.last_operation = None + + +class ComputeInstanceSshSettings(Model): + """Specifies policy and settings for SSH access. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param ssh_public_access: Access policy for SSH. State of the public SSH + port. Possible values are: Disabled - Indicates that the public ssh port + is closed on this instance. Enabled - Indicates that the public ssh port + is open and accessible according to the VNet/subnet policy if applicable. + Possible values include: 'Enabled', 'Disabled'. Default value: "Disabled" + . + :type ssh_public_access: str or + ~azure.mgmt.machinelearningservices.models.SshPublicAccess + :ivar admin_user_name: Describes the admin user name. + :vartype admin_user_name: str + :ivar ssh_port: Describes the port for connecting through SSH. + :vartype ssh_port: int + :param admin_public_key: Specifies the SSH rsa public key file as a + string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + :type admin_public_key: str + """ + + _validation = { + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, + } + + _attribute_map = { + 'ssh_public_access': {'key': 'sshPublicAccess', 'type': 'str'}, + 'admin_user_name': {'key': 'adminUserName', 'type': 'str'}, + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'admin_public_key': {'key': 'adminPublicKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeInstanceSshSettings, self).__init__(**kwargs) + self.ssh_public_access = kwargs.get('ssh_public_access', "Disabled") + self.admin_user_name = None + self.ssh_port = None + self.admin_public_key = kwargs.get('admin_public_key', None) + + +class ComputeNodesInformation(Model): + """Compute nodes information related to a Machine Learning compute. Might + differ for every type of compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: The continuation token. + :vartype next_link: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'next_link': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ComputeNodesInformation, self).__init__(**kwargs) + self.next_link = None + self.compute_type = None + + +class Resource(Model): + """Azure Resource Manager resource envelope. + + 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = 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) + self.system_data = None + + +class ComputeResource(Resource): + """Machine Learning compute object wrapped into ARM resource envelope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + def __init__(self, **kwargs): + super(ComputeResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ContainerRegistry(Model): + """ContainerRegistry. + + :param address: + :type address: str + :param username: + :type username: str + :param password: + :type password: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistry, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class ContainerRegistryResponse(Model): + """ContainerRegistryResponse. + + :param address: + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerRegistryResponse, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + + +class ContainerResourceRequirements(Model): + """The resource requirements for the container (cpu and memory). + + :param cpu: The minimum amount of CPU cores to be used by the container. + More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu: float + :param cpu_limit: The maximum amount of CPU cores allowed to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu_limit: float + :param memory_in_gb: The minimum amount of memory (in GB) to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb: float + :param memory_in_gb_limit: The maximum amount of memory (in GB) allowed to + be used by the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb_limit: float + :param gpu: The number of GPU cores in the container. + :type gpu: int + :param fpga: The number of FPGA PCIE devices exposed to the container. + Must be multiple of 2. + :type fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = kwargs.get('cpu', None) + self.cpu_limit = kwargs.get('cpu_limit', None) + self.memory_in_gb = kwargs.get('memory_in_gb', None) + self.memory_in_gb_limit = kwargs.get('memory_in_gb_limit', None) + self.gpu = kwargs.get('gpu', None) + self.fpga = kwargs.get('fpga', None) + + +class CosmosDbSettings(Model): + """CosmosDbSettings. + + :param collections_throughput: The throughput of the collections in + cosmosdb database + :type collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = kwargs.get('collections_throughput', None) + + +class EnvironmentImageRequest(Model): + """Request to create a Docker image based on Environment. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageRequestEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageRequestEnvironmentReference'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageRequest, self).__init__(**kwargs) + self.driver_program = kwargs.get('driver_program', None) + self.assets = kwargs.get('assets', None) + self.model_ids = kwargs.get('model_ids', None) + self.models_property = kwargs.get('models_property', None) + self.environment = kwargs.get('environment', None) + self.environment_reference = kwargs.get('environment_reference', None) + + +class CreateServiceRequestEnvironmentImageRequest(EnvironmentImageRequest): + """The Environment, models and assets needed for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageRequestEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageRequestEnvironmentReference'}, + } + + def __init__(self, **kwargs): + super(CreateServiceRequestEnvironmentImageRequest, self).__init__(**kwargs) + + +class CreateServiceRequestKeys(AuthKeys): + """The authentication keys. + + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CreateServiceRequestKeys, self).__init__(**kwargs) + + +class Databricks(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__(self, **kwargs): + super(Databricks, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'Databricks' + + +class DatabricksComputeSecrets(ComputeSecrets): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.compute_type = 'Databricks' + + +class DatabricksProperties(Model): + """DatabricksProperties. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + :param workspace_url: Workspace Url + :type workspace_url: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = kwargs.get('databricks_access_token', None) + self.workspace_url = kwargs.get('workspace_url', None) + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + '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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataFactory, self).__init__(**kwargs) + self.compute_type = 'DataFactory' + + +class DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + """ + + _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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + } + + def __init__(self, **kwargs): + super(DataLakeAnalytics, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'DataLakeAnalytics' + + +class DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. + + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = kwargs.get('data_lake_store_account_name', None) + + +class DatasetReference(Model): + """The dataset reference object. + + :param name: The name of the dataset reference. + :type name: str + :param id: The id of the dataset reference. + :type id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DatasetReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', 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 identity: The identity that will be used to access the key vault + for encryption at rest. + :type identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :param key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, **kwargs): + super(EncryptionProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.identity = kwargs.get('identity', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +class ModelEnvironmentDefinition(Model): + """ModelEnvironmentDefinition. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionPython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionPython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.python = kwargs.get('python', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.docker = kwargs.get('docker', None) + self.spark = kwargs.get('spark', None) + self.r = kwargs.get('r', None) + self.inferencing_stack_version = kwargs.get('inferencing_stack_version', None) + + +class EnvironmentImageRequestEnvironment(ModelEnvironmentDefinition): + """The details of the AZURE ML environment. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionPython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionPython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageRequestEnvironment, self).__init__(**kwargs) + + +class EnvironmentReference(Model): + """EnvironmentReference. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentReference, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class EnvironmentImageRequestEnvironmentReference(EnvironmentReference): + """The unique identifying details of the AZURE ML environment. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageRequestEnvironmentReference, self).__init__(**kwargs) + + +class ModelEnvironmentDefinitionResponse(Model): + """ModelEnvironmentDefinitionResponse. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponsePython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionResponsePython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionResponseDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionResponseSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionResponseR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionResponse, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + self.python = kwargs.get('python', None) + self.environment_variables = kwargs.get('environment_variables', None) + self.docker = kwargs.get('docker', None) + self.spark = kwargs.get('spark', None) + self.r = kwargs.get('r', None) + self.inferencing_stack_version = kwargs.get('inferencing_stack_version', None) + + +class EnvironmentImageResponseEnvironment(ModelEnvironmentDefinitionResponse): + """The details of the AZURE ML environment. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponsePython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionResponsePython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionResponseDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionResponseSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionResponseR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageResponseEnvironment, self).__init__(**kwargs) + + +class EnvironmentImageResponseEnvironmentReference(EnvironmentReference): + """The unique identifying details of the AZURE ML environment. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EnvironmentImageResponseEnvironmentReference, self).__init__(**kwargs) + + +class ErrorDetail(Model): + """Error detail information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse(Model): + """Error response information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar target: The target of the particular error + :vartype target: str + :ivar details: An array of error detail objects. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + + +class EstimatedVMPrice(Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. + + All required parameters must be populated in order to send to Azure. + + :param retail_price: Required. Retail price. The price charged for using + the VM. + :type retail_price: float + :param os_type: Required. OS type. Operating system type used by the VM. + Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :param vm_tier: Required. VM tier. The type of the VM. Possible values + include: 'Standard', 'LowPriority', 'Spot' + :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + + _validation = { + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, + } + + _attribute_map = { + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = kwargs.get('retail_price', None) + self.os_type = kwargs.get('os_type', None) + self.vm_tier = kwargs.get('vm_tier', None) + + +class EstimatedVMPrices(Model): + """The estimated price info for using a VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Billing currency. Three lettered code + specifying the currency of the VM price. Example: USD. Default value: + "USD" . + :vartype billing_currency: str + :ivar unit_of_measure: Required. Unit of time measure. The unit of time + measurement for the specified VM price. Example: OneHour. Default value: + "OneHour" . + :vartype unit_of_measure: str + :param values: Required. List of estimated VM prices. The list of + estimated prices for using a VM of a particular OS type, tier, etc. + :type values: + list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + + _validation = { + 'billing_currency': {'required': True, 'constant': True}, + 'unit_of_measure': {'required': True, 'constant': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, + } + + billing_currency = "USD" + + unit_of_measure = "OneHour" + + def __init__(self, **kwargs): + super(EstimatedVMPrices, self).__init__(**kwargs) + self.values = kwargs.get('values', None) + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, **kwargs): + super(HDInsight, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.compute_type = 'HDInsight' + + +class HDInsightProperties(Model): + """HDInsightProperties. + + :param ssh_port: Port open for ssh connections on the master node of the + cluster. + :type ssh_port: int + :param address: Public IP address of the master node of the cluster. + :type address: str + :param administrator_account: Admin credentials for master node of the + cluster + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, **kwargs): + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = kwargs.get('ssh_port', None) + self.address = kwargs.get('address', None) + self.administrator_account = kwargs.get('administrator_account', None) + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned', + 'SystemAssigned,UserAssigned', 'UserAssigned', 'None' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The user assigned identities associated + with the resource. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class IdentityForCmk(Model): + """Identity that will be used to access key vault for encryption at rest. + + :param user_assigned_identity: The ArmId of the user assigned identity + that will be used to access the customer managed key vault + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) + + +class ImageAsset(Model): + """An Image asset. + + :param id: The Asset Id. + :type id: str + :param mime_type: The mime type. + :type mime_type: str + :param url: The Url of the Asset. + :type url: str + :param unpack: Whether the Asset is unpacked. + :type unpack: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ImageAsset, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.mime_type = kwargs.get('mime_type', None) + self.url = kwargs.get('url', None) + self.unpack = kwargs.get('unpack', 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 ListNotebookKeysResult(Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListWorkspaceKeysResult(Model): + """ListWorkspaceKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__(self, **kwargs): + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class Model(Model): + """An Azure Machine Learning Model. + + All required parameters must be populated in order to send to Azure. + + :param id: The Model Id. + :type id: str + :param name: Required. The Model name. + :type name: str + :param framework: The Model framework. + :type framework: str + :param framework_version: The Model framework version. + :type framework_version: str + :param version: The Model version assigned by Model Management Service. + :type version: long + :param datasets: The list of datasets associated with the model. + :type datasets: + list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :param url: Required. The URL of the Model. Usually a SAS URL. + :type url: str + :param mime_type: Required. The MIME type of Model content. For more + details about MIME type, please open + https://www.iana.org/assignments/media-types/media-types.xhtml + :type mime_type: str + :param description: The Model description text. + :type description: str + :param created_time: The Model creation time (UTC). + :type created_time: datetime + :param modified_time: The Model last modified time (UTC). + :type modified_time: datetime + :param unpack: Indicates whether we need to unpack the Model during docker + Image creation. + :type unpack: bool + :param parent_model_id: The Parent Model Id. + :type parent_model_id: str + :param run_id: The RunId that created this model. + :type run_id: str + :param experiment_name: The name of the experiment where this model was + created. + :type experiment_name: str + :param kv_tags: The Model tag dictionary. Items are mutable. + :type kv_tags: dict[str, str] + :param properties: The Model property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param derived_model_ids: Models derived from this model + :type derived_model_ids: list[str] + :param sample_input_data: Sample Input Data for the Model. A reference to + a dataset in the workspace in the format aml://dataset/{datasetId} + :type sample_input_data: str + :param sample_output_data: Sample Output Data for the Model. A reference + to a dataset in the workspace in the format aml://dataset/{datasetId} + :type sample_output_data: str + :param resource_requirements: Resource requirements for the model + :type resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + + _validation = { + 'name': {'required': True}, + 'url': {'required': True}, + 'mime_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'framework_version': {'key': 'frameworkVersion', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'long'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + 'parent_model_id': {'key': 'parentModelId', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'derived_model_ids': {'key': 'derivedModelIds', 'type': '[str]'}, + 'sample_input_data': {'key': 'sampleInputData', 'type': 'str'}, + 'sample_output_data': {'key': 'sampleOutputData', 'type': 'str'}, + 'resource_requirements': {'key': 'resourceRequirements', 'type': 'ContainerResourceRequirements'}, + } + + def __init__(self, **kwargs): + super(Model, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.framework = kwargs.get('framework', None) + self.framework_version = kwargs.get('framework_version', None) + self.version = kwargs.get('version', None) + self.datasets = kwargs.get('datasets', None) + self.url = kwargs.get('url', None) + self.mime_type = kwargs.get('mime_type', None) + self.description = kwargs.get('description', None) + self.created_time = kwargs.get('created_time', None) + self.modified_time = kwargs.get('modified_time', None) + self.unpack = kwargs.get('unpack', None) + self.parent_model_id = kwargs.get('parent_model_id', None) + self.run_id = kwargs.get('run_id', None) + self.experiment_name = kwargs.get('experiment_name', None) + self.kv_tags = kwargs.get('kv_tags', None) + self.properties = kwargs.get('properties', None) + self.derived_model_ids = kwargs.get('derived_model_ids', None) + self.sample_input_data = kwargs.get('sample_input_data', None) + self.sample_output_data = kwargs.get('sample_output_data', None) + self.resource_requirements = kwargs.get('resource_requirements', None) + + +class ModelDockerSection(Model): + """ModelDockerSection. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionBaseImageRegistry'}, + } + + def __init__(self, **kwargs): + super(ModelDockerSection, self).__init__(**kwargs) + self.base_image = kwargs.get('base_image', None) + self.base_dockerfile = kwargs.get('base_dockerfile', None) + self.base_image_registry = kwargs.get('base_image_registry', None) + + +class ModelDockerSectionBaseImageRegistry(ContainerRegistry): + """Image registry that contains the base image. + + :param address: + :type address: str + :param username: + :type username: str + :param password: + :type password: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelDockerSectionBaseImageRegistry, self).__init__(**kwargs) + + +class ModelDockerSectionResponse(Model): + """ModelDockerSectionResponse. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionResponseBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionResponseBaseImageRegistry'}, + } + + def __init__(self, **kwargs): + super(ModelDockerSectionResponse, self).__init__(**kwargs) + self.base_image = kwargs.get('base_image', None) + self.base_dockerfile = kwargs.get('base_dockerfile', None) + self.base_image_registry = kwargs.get('base_image_registry', None) + + +class ModelDockerSectionResponseBaseImageRegistry(ContainerRegistryResponse): + """Image registry that contains the base image. + + :param address: + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelDockerSectionResponseBaseImageRegistry, self).__init__(**kwargs) + + +class ModelEnvironmentDefinitionDocker(ModelDockerSection): + """The definition of a Docker container. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionBaseImageRegistry'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionDocker, self).__init__(**kwargs) + + +class ModelPythonSection(Model): + """ModelPythonSection. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelPythonSection, self).__init__(**kwargs) + self.interpreter_path = kwargs.get('interpreter_path', None) + self.user_managed_dependencies = kwargs.get('user_managed_dependencies', None) + self.conda_dependencies = kwargs.get('conda_dependencies', None) + self.base_conda_environment = kwargs.get('base_conda_environment', None) + + +class ModelEnvironmentDefinitionPython(ModelPythonSection): + """Settings for a Python environment. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionPython, self).__init__(**kwargs) + + +class RSection(Model): + """RSection. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackage] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackage]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RSection, self).__init__(**kwargs) + self.r_version = kwargs.get('r_version', None) + self.user_managed = kwargs.get('user_managed', None) + self.rscript_path = kwargs.get('rscript_path', None) + self.snapshot_date = kwargs.get('snapshot_date', None) + self.cran_packages = kwargs.get('cran_packages', None) + self.git_hub_packages = kwargs.get('git_hub_packages', None) + self.custom_url_packages = kwargs.get('custom_url_packages', None) + self.bio_conductor_packages = kwargs.get('bio_conductor_packages', None) + + +class ModelEnvironmentDefinitionR(RSection): + """Settings for a R environment. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackage] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackage]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionR, self).__init__(**kwargs) + + +class ModelEnvironmentDefinitionResponseDocker(ModelDockerSectionResponse): + """The definition of a Docker container. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionResponseBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionResponseBaseImageRegistry'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionResponseDocker, self).__init__(**kwargs) + + +class ModelEnvironmentDefinitionResponsePython(ModelPythonSection): + """Settings for a Python environment. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionResponsePython, self).__init__(**kwargs) + + +class RSectionResponse(Model): + """RSectionResponse. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackageResponse] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackageResponse]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RSectionResponse, self).__init__(**kwargs) + self.r_version = kwargs.get('r_version', None) + self.user_managed = kwargs.get('user_managed', None) + self.rscript_path = kwargs.get('rscript_path', None) + self.snapshot_date = kwargs.get('snapshot_date', None) + self.cran_packages = kwargs.get('cran_packages', None) + self.git_hub_packages = kwargs.get('git_hub_packages', None) + self.custom_url_packages = kwargs.get('custom_url_packages', None) + self.bio_conductor_packages = kwargs.get('bio_conductor_packages', None) + + +class ModelEnvironmentDefinitionResponseR(RSectionResponse): + """Settings for a R environment. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackageResponse] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackageResponse]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionResponseR, self).__init__(**kwargs) + + +class ModelSparkSection(Model): + """ModelSparkSection. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ModelSparkSection, self).__init__(**kwargs) + self.repositories = kwargs.get('repositories', None) + self.packages = kwargs.get('packages', None) + self.precache_packages = kwargs.get('precache_packages', None) + + +class ModelEnvironmentDefinitionResponseSpark(ModelSparkSection): + """The configuration for a Spark environment. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionResponseSpark, self).__init__(**kwargs) + + +class ModelEnvironmentDefinitionSpark(ModelSparkSection): + """The configuration for a Spark environment. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ModelEnvironmentDefinitionSpark, self).__init__(**kwargs) + + +class NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NotebookAccessTokenResult(Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(Model): + """NotebookPreparationError. + + :param error_message: + :type error_message: str + :param status_code: + :type status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = kwargs.get('error_message', None) + self.status_code = kwargs.get('status_code', None) + + +class NotebookResourceInfo(Model): + """NotebookResourceInfo. + + :param fqdn: + :type fqdn: str + :param resource_id: the data plane resourceId that used to initialize + notebook component + :type resource_id: str + :param notebook_preparation_error: The error that occurs when preparing + notebook. + :type notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__(self, **kwargs): + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.resource_id = kwargs.get('resource_id', None) + self.notebook_preparation_error = kwargs.get('notebook_preparation_error', None) + + +class Operation(Model): + """Azure Machine Learning workspace REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display name of operation + :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """Display name of operation. + + :param provider: The resource provider name: + Microsoft.MachineLearningExperimentation + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class Password(Model): + """Password. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PersonalComputeInstanceSettings(Model): + """Settings for a personal compute instance. + + :param assigned_user: Assigned User. A user explicitly assigned to a + personal compute instance. + :type assigned_user: + ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__(self, **kwargs): + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = kwargs.get('assigned_user', None) + + +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private + endpoint links to + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :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}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :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}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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] + :param location: Region of workspace quota to be updated. + :type location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.location = kwargs.get('location', None) + + +class RCranPackage(Model): + """RCranPackage. + + :param name: The package name. + :type name: str + :param repository: The repository name. + :type repository: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RCranPackage, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.repository = kwargs.get('repository', None) + + +class RegistryListCredentialsResult(Model): + """RegistryListCredentialsResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :param passwords: + :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + """ + + _validation = { + 'location': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__(self, **kwargs): + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = kwargs.get('passwords', None) + + +class ResourceId(Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL + for the subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ResourceName(Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None + + +class ResourceQuota(Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: Limit. The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit + """ + + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None + + +class Restriction(Model): + """The restriction because of which SKU cannot be used. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. As of now only possible value for + this is location. + :vartype type: str + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :param reason_code: The reason for the restriction. Possible values + include: 'NotSpecified', 'NotAvailableForRegion', + 'NotAvailableForSubscription' + :type reason_code: str or + ~azure.mgmt.machinelearningservices.models.ReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Restriction, self).__init__(**kwargs) + self.type = None + self.values = None + self.reason_code = kwargs.get('reason_code', None) + + +class RGitHubPackage(Model): + """RGitHubPackage. + + :param repository: Repository address in the format + username/repo[/subdir][@ref|#pull]. + :type repository: str + :param auth_token: Personal access token to install from a private repo + :type auth_token: str + """ + + _attribute_map = { + 'repository': {'key': 'repository', 'type': 'str'}, + 'auth_token': {'key': 'authToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RGitHubPackage, self).__init__(**kwargs) + self.repository = kwargs.get('repository', None) + self.auth_token = kwargs.get('auth_token', None) + + +class RGitHubPackageResponse(Model): + """RGitHubPackageResponse. + + :param repository: Repository address in the format + username/repo[/subdir][@ref|#pull]. + :type repository: str + """ + + _attribute_map = { + 'repository': {'key': 'repository', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RGitHubPackageResponse, self).__init__(**kwargs) + self.repository = kwargs.get('repository', None) + + +class ScaleSettings(Model): + """scale settings for AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param max_node_count: Required. Max number of nodes to use + :type max_node_count: int + :param min_node_count: Min number of nodes to use. Default value: 0 . + :type min_node_count: int + :param node_idle_time_before_scale_down: Node Idle Time before scaling + down amlCompute. This string needs to be in the RFC Format. + :type node_idle_time_before_scale_down: timedelta + """ + + _validation = { + 'max_node_count': {'required': True}, + } + + _attribute_map = { + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ScaleSettings, self).__init__(**kwargs) + self.max_node_count = kwargs.get('max_node_count', None) + self.min_node_count = kwargs.get('min_node_count', 0) + self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) + + +class ScriptReference(Model): + """Script reference. + + :param script_source: The storage source of the script: inline, workspace. + :type script_source: str + :param script_data: The location of scripts in the mounted volume. + :type script_data: str + :param script_arguments: Optional command line arguments passed to the + script to run. + :type script_arguments: str + :param timeout: Optional time period passed to timeout command. + :type timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScriptReference, self).__init__(**kwargs) + self.script_source = kwargs.get('script_source', None) + self.script_data = kwargs.get('script_data', None) + self.script_arguments = kwargs.get('script_arguments', None) + self.timeout = kwargs.get('timeout', None) + + +class ScriptsToExecute(Model): + """Customized setup scripts. + + :param startup_script: Script that's run every time the machine starts. + :type startup_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + :param creation_script: Script that's run only once during provision of + the compute. + :type creation_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__(self, **kwargs): + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = kwargs.get('startup_script', None) + self.creation_script = kwargs.get('creation_script', None) + + +class ServiceManagedResourcesSettings(Model): + """ServiceManagedResourcesSettings. + + :param cosmos_db: The settings for the service managed cosmosdb account. + :type cosmos_db: + ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__(self, **kwargs): + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = kwargs.get('cosmos_db', None) + + +class ServicePrincipalCredentials(Model): + """Service principal credentials. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. Client Id + :type client_id: str + :param client_secret: Required. Client secret + :type client_secret: str """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + 'client_id': {'required': True}, + 'client_secret': {'required': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, } def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) + super(ServicePrincipalCredentials, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) -class ListWorkspaceKeysResult(Model): - """ListWorkspaceKeysResult. +class ServiceResource(Resource): + """Machine Learning service object wrapped into ARM resource envelope. Variables are only populated by the server, and will be ignored when sending a request. - :ivar user_storage_key: - :vartype user_storage_key: str - :ivar user_storage_resource_id: - :vartype user_storage_resource_id: str - :ivar app_insights_instrumentation_key: - :vartype app_insights_instrumentation_key: str - :ivar container_registry_credentials: - :vartype container_registry_credentials: - ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :param properties: Service properties + :type properties: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBase """ _validation = { - 'user_storage_key': {'readonly': True}, - 'user_storage_resource_id': {'readonly': True}, - 'app_insights_instrumentation_key': {'readonly': True}, - 'container_registry_credentials': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, - 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, - 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, - 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + '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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ServiceResponseBase'}, } def __init__(self, **kwargs): - super(ListWorkspaceKeysResult, self).__init__(**kwargs) - self.user_storage_key = None - self.user_storage_resource_id = None - self.app_insights_instrumentation_key = None - self.container_registry_credentials = None + super(ServiceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) -class MachineLearningServiceError(Model): - """Wrapper for error response to follow ARM guidelines. +class ServiceResponseBaseError(MachineLearningServiceError): + """The error details. Variables are only populated by the server, and will be ignored when sending a request. @@ -1185,293 +5404,360 @@ class MachineLearningServiceError(Model): } def __init__(self, **kwargs): - super(MachineLearningServiceError, self).__init__(**kwargs) - self.error = None + super(ServiceResponseBaseError, self).__init__(**kwargs) -class MachineLearningServiceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MachineLearningServiceError'. +class SetupScripts(Model): + """Details of customized scripts to execute for setting up the cluster. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + :param scripts: Customized setup scripts + :type scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute """ - def __init__(self, deserialize, response, *args): - - super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + def __init__(self, **kwargs): + super(SetupScripts, self).__init__(**kwargs) + self.scripts = kwargs.get('scripts', None) -class NodeStateCounts(Model): - """Counts of various compute node states on the amlCompute. - Variables are only populated by the server, and will be ignored when - sending a request. +class SharedPrivateLinkResource(Model): + """SharedPrivateLinkResource. - :ivar idle_node_count: Idle node count. Number of compute nodes in idle - state. - :vartype idle_node_count: int - :ivar running_node_count: Running node count. Number of compute nodes - which are running jobs. - :vartype running_node_count: int - :ivar preparing_node_count: Preparing node count. Number of compute nodes - which are being prepared. - :vartype preparing_node_count: int - :ivar unusable_node_count: Unusable node count. Number of compute nodes - which are in unusable state. - :vartype unusable_node_count: int - :ivar leaving_node_count: Leaving node count. Number of compute nodes - which are leaving the amlCompute. - :vartype leaving_node_count: int - :ivar preempted_node_count: Preempted node count. Number of compute nodes - which are in preempted state. - :vartype preempted_node_count: int + :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 """ - _validation = { - 'idle_node_count': {'readonly': True}, - 'running_node_count': {'readonly': True}, - 'preparing_node_count': {'readonly': True}, - 'unusable_node_count': {'readonly': True}, - 'leaving_node_count': {'readonly': True}, - 'preempted_node_count': {'readonly': True}, - } - _attribute_map = { - 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, - 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, - 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, - 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, - 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, - 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + '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(NodeStateCounts, self).__init__(**kwargs) - self.idle_node_count = None - self.running_node_count = None - self.preparing_node_count = None - self.unusable_node_count = None - self.leaving_node_count = None - self.preempted_node_count = None + super(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 Operation(Model): - """Azure Machine Learning workspace REST API operation. +class Sku(Model): + """Sku of the resource. - :param name: Operation name: {provider}/{resource}/{operation} + :param name: Name of the sku :type name: str - :param display: Display name of operation - :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + :param tier: Tier of the sku like Basic or Enterprise + :type tier: str """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'tier': {'key': 'tier', 'type': 'str'}, } def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) + super(Sku, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) + self.tier = kwargs.get('tier', None) -class OperationDisplay(Model): - """Display name of operation. +class SKUCapability(Model): + """Features/user capabilities associated with the sku. - :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 name: Capability/Feature ID + :type name: str + :param value: Details about the feature/capability + :type value: str """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', '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) - + super(SKUCapability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) -class Password(Model): - """Password. - Variables are only populated by the server, and will be ignored when - sending a request. +class SparkMavenPackage(Model): + """SparkMavenPackage. - :ivar name: - :vartype name: str - :ivar value: - :vartype value: str + :param group: + :type group: str + :param artifact: + :type artifact: str + :param version: + :type version: str """ - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + 'group': {'key': 'group', 'type': 'str'}, + 'artifact': {'key': 'artifact', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, } def __init__(self, **kwargs): - super(Password, self).__init__(**kwargs) - self.name = None - self.value = None - + super(SparkMavenPackage, self).__init__(**kwargs) + self.group = kwargs.get('group', None) + self.artifact = kwargs.get('artifact', None) + self.version = kwargs.get('version', None) -class RegistryListCredentialsResult(Model): - """RegistryListCredentialsResult. - Variables are only populated by the server, and will be ignored when - sending a request. +class SslConfiguration(Model): + """The ssl configuration for scoring. - :ivar location: - :vartype location: str - :ivar username: - :vartype username: str - :param passwords: - :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + :param status: Enable or disable ssl for scoring. Possible values include: + 'Disabled', 'Enabled', 'Auto' + :type status: str or ~azure.mgmt.machinelearningservices.models.enum + :param cert: Cert data + :type cert: str + :param key: Key data + :type key: str + :param cname: CNAME of the cert + :type cname: str + :param leaf_domain_label: Leaf domain label of public endpoint + :type leaf_domain_label: str + :param overwrite_existing_domain: Indicates whether to overwrite existing + domain label. + :type overwrite_existing_domain: bool """ - _validation = { - 'location': {'readonly': True}, - 'username': {'readonly': True}, - } - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'passwords': {'key': 'passwords', 'type': '[Password]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, } def __init__(self, **kwargs): - super(RegistryListCredentialsResult, self).__init__(**kwargs) - self.location = None - self.username = None - self.passwords = kwargs.get('passwords', None) + super(SslConfiguration, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.cert = kwargs.get('cert', None) + self.key = kwargs.get('key', None) + self.cname = kwargs.get('cname', None) + self.leaf_domain_label = kwargs.get('leaf_domain_label', None) + self.overwrite_existing_domain = kwargs.get('overwrite_existing_domain', None) -class ResourceId(Model): - """Represents a resource ID. For example, for a subnet, it is the resource URL - for the subnet. +class SynapseSpark(Model): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when + sending a request. All required parameters must be populated in order to send to Azure. - :param id: Required. The ID of the resource - :type id: str + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'AmlCompute', 'ComputeInstance', 'DataFactory', + 'VirtualMachine', 'HDInsight', 'Databricks', 'DataLakeAnalytics', + 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param properties: AKS properties + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties """ _validation = { - 'id': {'required': True}, + 'compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, } def __init__(self, **kwargs): - super(ResourceId, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - + super(SynapseSpark, self).__init__(**kwargs) + self.compute_type = kwargs.get('compute_type', None) + self.compute_location = kwargs.get('compute_location', None) + self.provisioning_state = None + self.description = kwargs.get('description', None) + self.created_on = None + self.modified_on = None + self.resource_id = kwargs.get('resource_id', None) + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.properties = kwargs.get('properties', None) -class ScaleSettings(Model): - """scale settings for AML Compute. - All required parameters must be populated in order to send to Azure. +class SynapseSparkPoolProperties(Model): + """Properties specific to Synapse Spark pools. - :param max_node_count: Required. Max number of nodes to use - :type max_node_count: int - :param min_node_count: Min number of nodes to use. Default value: 0 . - :type min_node_count: int - :param node_idle_time_before_scale_down: Node Idle Time before scaling - down amlCompute - :type node_idle_time_before_scale_down: timedelta + :param properties: AKS properties + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties """ - _validation = { - 'max_node_count': {'required': True}, - } - _attribute_map = { - 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, - 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, - 'node_idle_time_before_scale_down': {'key': 'nodeIdleTimeBeforeScaleDown', 'type': 'duration'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, } def __init__(self, **kwargs): - super(ScaleSettings, self).__init__(**kwargs) - self.max_node_count = kwargs.get('max_node_count', None) - self.min_node_count = kwargs.get('min_node_count', 0) - self.node_idle_time_before_scale_down = kwargs.get('node_idle_time_before_scale_down', None) - + super(SynapseSparkPoolProperties, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) -class ServicePrincipalCredentials(Model): - """Service principal credentials. - All required parameters must be populated in order to send to Azure. +class SynapseSparkProperties(Model): + """AKS properties. - :param client_id: Required. Client Id - :type client_id: str - :param client_secret: Required. Client secret - :type client_secret: str + :param auto_scale_properties: Auto scale properties. + :type auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :param auto_pause_properties: Auto pause properties. + :type auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :param spark_version: Spark version. + :type spark_version: str + :param node_count: The number of compute nodes currently assigned to the + compute. + :type node_count: int + :param node_size: Node size. + :type node_size: str + :param node_size_family: Node size family. + :type node_size_family: str + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param resource_group: Name of the resource group in which workspace is + located. + :type resource_group: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param pool_name: Pool name. + :type pool_name: str """ - _validation = { - 'client_id': {'required': True}, - 'client_secret': {'required': True}, - } - _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, } def __init__(self, **kwargs): - super(ServicePrincipalCredentials, self).__init__(**kwargs) - self.client_id = kwargs.get('client_id', None) - self.client_secret = kwargs.get('client_secret', None) - - -class SslConfiguration(Model): - """The ssl configuration for scoring. - - :param status: Enable or disable ssl for scoring. Possible values include: - 'Disabled', 'Enabled' - :type status: str or ~azure.mgmt.machinelearningservices.models.enum - :param cert: Cert data - :type cert: str - :param key: Key data - :type key: str - :param cname: CNAME of the cert - :type cname: str + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = kwargs.get('auto_scale_properties', None) + self.auto_pause_properties = kwargs.get('auto_pause_properties', None) + self.spark_version = kwargs.get('spark_version', None) + self.node_count = kwargs.get('node_count', None) + self.node_size = kwargs.get('node_size', None) + self.node_size_family = kwargs.get('node_size_family', None) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group = kwargs.get('resource_group', None) + self.workspace_name = kwargs.get('workspace_name', None) + self.pool_name = kwargs.get('pool_name', None) + + +class SystemData(Model): + """Read only system data. + + :param created_by: An identifier for the identity that created the + resource + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityType + :param created_at: The timestamp of resource creation (UTC) + :type created_at: datetime + :param last_modified_by: An identifier for the identity that last modified + the resource + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime """ _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'cert': {'key': 'cert', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - 'cname': {'key': 'cname', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(SslConfiguration, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.cert = kwargs.get('cert', None) - self.key = kwargs.get('key', None) - self.cname = kwargs.get('cname', None) + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) class SystemService(Model): @@ -1507,6 +5793,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. @@ -1515,6 +5878,8 @@ class Usage(Model): :ivar id: Specifies the resource ID. :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str :ivar type: Specifies the resource type. :vartype type: str :ivar unit: An enum describing the unit of usage measurement. Possible @@ -1530,6 +5895,7 @@ class Usage(Model): _validation = { 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, 'type': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -1539,6 +5905,7 @@ class Usage(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'current_value': {'key': 'currentValue', 'type': 'long'}, @@ -1549,6 +5916,7 @@ class Usage(Model): def __init__(self, **kwargs): super(Usage, self).__init__(**kwargs) self.id = None + self.aml_workspace_location = None self.type = None self.unit = None self.current_value = None @@ -1618,6 +5986,39 @@ def __init__(self, **kwargs): self.admin_user_password = kwargs.get('admin_user_password', None) +class UserAssignedIdentity(Model): + """User Assigned Identity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the user assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the user assigned identity. + :vartype tenant_id: str + :ivar client_id: The clientId(aka appId) of the user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.client_id = None + + class VirtualMachine(Compute): """A Machine Learning compute based on Azure Virtual Machines. @@ -1636,9 +6037,9 @@ class VirtualMachine(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -1649,6 +6050,9 @@ class VirtualMachine(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: @@ -1674,6 +6078,7 @@ class VirtualMachine(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, } @@ -1684,6 +6089,28 @@ def __init__(self, **kwargs): self.compute_type = 'VirtualMachine' +class VirtualMachineImage(Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Virtual Machine image path + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + class VirtualMachineProperties(Model): """VirtualMachineProperties. @@ -1696,6 +6123,9 @@ class VirtualMachineProperties(Model): :param administrator_account: Admin credentials for virtual machine :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param is_notebook_instance_compute: Indicates whether this compute will + be used for running notebooks. + :type is_notebook_instance_compute: bool """ _attribute_map = { @@ -1703,6 +6133,7 @@ class VirtualMachineProperties(Model): 'ssh_port': {'key': 'sshPort', 'type': 'int'}, 'address': {'key': 'address', 'type': 'str'}, 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -1711,6 +6142,7 @@ def __init__(self, **kwargs): self.ssh_port = kwargs.get('ssh_port', None) self.address = kwargs.get('address', None) self.administrator_account = kwargs.get('administrator_account', None) + self.is_notebook_instance_compute = kwargs.get('is_notebook_instance_compute', None) class VirtualMachineSecrets(ComputeSecrets): @@ -1755,6 +6187,9 @@ class VirtualMachineSize(Model): :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the virtual machine size. :vartype v_cp_us: int + :ivar gpus: Number of gPUs. The number of gPUs supported by the virtual + machine size. + :vartype gpus: int :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, allowed by the virtual machine size. :vartype os_vhd_size_mb: int @@ -1770,12 +6205,17 @@ class VirtualMachineSize(Model): :ivar premium_io: Premium IO supported. Specifies if the virtual machine size supports premium IO. :vartype premium_io: bool + :param estimated_vm_prices: Estimated VM prices. The estimated price + information for using a VM. + :type estimated_vm_prices: + ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices """ _validation = { 'name': {'readonly': True}, 'family': {'readonly': True}, 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, 'os_vhd_size_mb': {'readonly': True}, 'max_resource_volume_mb': {'readonly': True}, 'memory_gb': {'readonly': True}, @@ -1787,11 +6227,13 @@ class VirtualMachineSize(Model): 'name': {'key': 'name', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, } def __init__(self, **kwargs): @@ -1799,11 +6241,13 @@ def __init__(self, **kwargs): self.name = None self.family = None self.v_cp_us = None + self.gpus = None self.os_vhd_size_mb = None self.max_resource_volume_mb = None self.memory_gb = None self.low_priority_capable = None self.premium_io = None + self.estimated_vm_prices = kwargs.get('estimated_vm_prices', None) class VirtualMachineSizeListResult(Model): @@ -1862,14 +6306,19 @@ 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1877,9 +6326,6 @@ class Workspace(Resource): :param friendly_name: The friendly name for this workspace. This name in mutable :type friendly_name: str - :ivar creation_time: The creation time of the machine learning workspace - in ISO8601 format. - :vartype creation_time: datetime :param key_vault: ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created :type key_vault: str @@ -1903,16 +6349,57 @@ 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 + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'workspace_id': {'readonly': True}, - 'creation_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, } _attribute_map = { @@ -1922,16 +6409,29 @@ class Workspace(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1939,13 +6439,177 @@ def __init__(self, **kwargs): self.workspace_id = None self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', None) - self.creation_time = None self.key_vault = kwargs.get('key_vault', None) self.application_insights = kwargs.get('application_insights', None) self.container_registry = kwargs.get('container_registry', None) self.storage_account = kwargs.get('storage_account', None) self.discovery_url = kwargs.get('discovery_url', None) self.provisioning_state = None + self.encryption = kwargs.get('encryption', None) + self.hbi_workspace = kwargs.get('hbi_workspace', False) + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = kwargs.get('image_build_compute', None) + self.allow_public_access_when_behind_vnet = kwargs.get('allow_public_access_when_behind_vnet', False) + self.private_endpoint_connections = None + self.shared_private_link_resources = kwargs.get('shared_private_link_resources', None) + self.notebook_info = None + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) + self.tenant_id = None + + +class WorkspaceConnection(Model): + """Workspace connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ResourceId of the workspace connection. + :vartype id: str + :ivar name: Friendly name of the workspace connection. + :vartype name: str + :ivar type: Resource type of workspace connection. + :vartype type: str + :param category: Category of the workspace connection. + :type category: str + :param target: Target of the workspace connection. + :type target: str + :param auth_type: Authorization type of the workspace connection. + :type auth_type: str + :param value: Value details of the workspace connection. + :type value: str + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'auth_type': {'key': 'properties.authType', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'value_format': {'key': 'properties.valueFormat', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspaceConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.category = kwargs.get('category', None) + self.target = kwargs.get('target', None) + self.auth_type = kwargs.get('auth_type', None) + self.value = kwargs.get('value', None) + self.value_format = kwargs.get('value_format', None) + + +class 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 + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _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'}, + 'value_format': {'key': 'properties.valueFormat', '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) + self.value_format = kwargs.get('value_format', None) + + +class WorkspaceSku(Model): + """Describes Workspace Sku details and features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo] + :ivar tier: Sku Tier like Basic or Enterprise + :vartype tier: str + :ivar resource_type: + :vartype resource_type: str + :ivar name: + :vartype name: str + :ivar capabilities: List of features/user capabilities associated with the + sku + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.machinelearningservices.models.Restriction] + """ + + _validation = { + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, **kwargs): + super(WorkspaceSku, self).__init__(**kwargs) + self.locations = None + self.location_info = None + self.tier = None + self.resource_type = None + self.name = None + self.capabilities = None + self.restrictions = kwargs.get('restrictions', None) class WorkspaceUpdateParameters(Model): @@ -1953,20 +6617,43 @@ class WorkspaceUpdateParameters(Model): :param tags: The resource tags for the machine learning workspace. :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity :param description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. :type friendly_name: str + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, } def __init__(self, **kwargs): super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) self.description = kwargs.get('description', None) self.friendly_name = kwargs.get('friendly_name', None) + self.image_build_compute = kwargs.get('image_build_compute', None) + self.service_managed_resources_settings = kwargs.get('service_managed_resources_settings', None) + self.primary_user_assigned_identity = kwargs.get('primary_user_assigned_identity', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_models_py3.py index f173a48382adf..93a1084f13b26 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 @@ -13,12 +13,643 @@ from msrest.exceptions import HttpOperationError +class CreateServiceRequest(Model): + """The base class for creating a service. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ACIServiceCreateRequest, CreateEndpointVariantRequest + + All required parameters must be populated in order to send to Azure. + + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'ACI': 'ACIServiceCreateRequest', 'Custom': 'CreateEndpointVariantRequest'} + } + + def __init__(self, *, description: str=None, kv_tags=None, properties=None, keys=None, environment_image_request=None, location: str=None, **kwargs) -> None: + super(CreateServiceRequest, self).__init__(**kwargs) + self.description = description + self.kv_tags = kv_tags + self.properties = properties + self.keys = keys + self.environment_image_request = environment_image_request + self.location = location + self.compute_type = None + + +class ACIServiceCreateRequest(CreateServiceRequest): + """ACIServiceCreateRequest. + + All required parameters must be populated in order to send to Azure. + + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param auth_enabled: Whether or not authentication is enabled on the + service. Default value: False . + :type auth_enabled: bool + :param ssl_enabled: Whether or not SSL is enabled. Default value: False . + :type ssl_enabled: bool + :param app_insights_enabled: Whether or not Application Insights is + enabled. Default value: False . + :type app_insights_enabled: bool + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestDataCollection + :param ssl_certificate: The public SSL certificate in PEM format to use if + SSL is enabled. + :type ssl_certificate: str + :param ssl_key: The public SSL key in PEM format for the certificate. + :type ssl_key: str + :param cname: The CName for the service. + :type cname: str + :param dns_name_label: The Dns label for the service. + :type dns_name_label: str + :param vnet_configuration: The virtual network configuration. + :type vnet_configuration: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestVnetConfiguration + :param encryption_properties: The encryption properties. + :type encryption_properties: + ~azure.mgmt.machinelearningservices.models.ACIServiceCreateRequestEncryptionProperties + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'ssl_enabled': {'key': 'sslEnabled', 'type': 'bool'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'data_collection': {'key': 'dataCollection', 'type': 'ACIServiceCreateRequestDataCollection'}, + 'ssl_certificate': {'key': 'sslCertificate', 'type': 'str'}, + 'ssl_key': {'key': 'sslKey', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'dns_name_label': {'key': 'dnsNameLabel', 'type': 'str'}, + 'vnet_configuration': {'key': 'vnetConfiguration', 'type': 'ACIServiceCreateRequestVnetConfiguration'}, + 'encryption_properties': {'key': 'encryptionProperties', 'type': 'ACIServiceCreateRequestEncryptionProperties'}, + } + + def __init__(self, *, description: str=None, kv_tags=None, properties=None, keys=None, environment_image_request=None, location: str=None, container_resource_requirements=None, auth_enabled: bool=False, ssl_enabled: bool=False, app_insights_enabled: bool=False, data_collection=None, ssl_certificate: str=None, ssl_key: str=None, cname: str=None, dns_name_label: str=None, vnet_configuration=None, encryption_properties=None, **kwargs) -> None: + super(ACIServiceCreateRequest, self).__init__(description=description, kv_tags=kv_tags, properties=properties, keys=keys, environment_image_request=environment_image_request, location=location, **kwargs) + self.container_resource_requirements = container_resource_requirements + self.auth_enabled = auth_enabled + self.ssl_enabled = ssl_enabled + self.app_insights_enabled = app_insights_enabled + self.data_collection = data_collection + self.ssl_certificate = ssl_certificate + self.ssl_key = ssl_key + self.cname = cname + self.dns_name_label = dns_name_label + self.vnet_configuration = vnet_configuration + self.encryption_properties = encryption_properties + self.compute_type = 'ACI' + + +class ModelDataCollection(Model): + """The Model data collection properties. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, *, event_hub_enabled: bool=None, storage_enabled: bool=None, **kwargs) -> None: + super(ModelDataCollection, self).__init__(**kwargs) + self.event_hub_enabled = event_hub_enabled + self.storage_enabled = storage_enabled + + +class ACIServiceCreateRequestDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, *, event_hub_enabled: bool=None, storage_enabled: bool=None, **kwargs) -> None: + super(ACIServiceCreateRequestDataCollection, self).__init__(event_hub_enabled=event_hub_enabled, storage_enabled=storage_enabled, **kwargs) + + +class EncryptionProperties(Model): + """EncryptionProperties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, vault_base_url: str, key_name: str, key_version: str, **kwargs) -> None: + super(EncryptionProperties, self).__init__(**kwargs) + self.vault_base_url = vault_base_url + self.key_name = key_name + self.key_version = key_version + + +class ACIServiceCreateRequestEncryptionProperties(EncryptionProperties): + """The encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, vault_base_url: str, key_name: str, key_version: str, **kwargs) -> None: + super(ACIServiceCreateRequestEncryptionProperties, self).__init__(vault_base_url=vault_base_url, key_name=key_name, key_version=key_version, **kwargs) + + +class VnetConfiguration(Model): + """VnetConfiguration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, *, vnet_name: str=None, subnet_name: str=None, **kwargs) -> None: + super(VnetConfiguration, self).__init__(**kwargs) + self.vnet_name = vnet_name + self.subnet_name = subnet_name + + +class ACIServiceCreateRequestVnetConfiguration(VnetConfiguration): + """The virtual network configuration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, *, vnet_name: str=None, subnet_name: str=None, **kwargs) -> None: + super(ACIServiceCreateRequestVnetConfiguration, self).__init__(vnet_name=vnet_name, subnet_name=subnet_name, **kwargs) + + +class ServiceResponseBase(Model): + """The base service response. The correct inherited response based on + computeType will be returned (ex. ACIServiceResponse). + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ACIServiceResponse, AKSVariantResponse + + 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 description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + _subtype_map = { + 'compute_type': {'ACI': 'ACIServiceResponse', 'Custom': 'AKSVariantResponse'} + } + + def __init__(self, *, description: str=None, kv_tags=None, properties=None, deployment_type=None, **kwargs) -> None: + super(ServiceResponseBase, self).__init__(**kwargs) + self.description = description + self.kv_tags = kv_tags + self.properties = properties + self.state = None + self.error = None + self.deployment_type = deployment_type + self.compute_type = None + + +class ACIServiceResponse(ServiceResponseBase): + """The response for an ACI service. + + 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 description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :ivar scoring_uri: The Uri for sending scoring requests. + :vartype scoring_uri: str + :param location: The name of the Azure location/region. + :type location: str + :param auth_enabled: Whether or not authentication is enabled on the + service. + :type auth_enabled: bool + :param ssl_enabled: Whether or not SSL is enabled. + :type ssl_enabled: bool + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseDataCollection + :param ssl_certificate: The public SSL certificate in PEM format to use if + SSL is enabled. + :type ssl_certificate: str + :param ssl_key: The public SSL key in PEM format for the certificate. + :type ssl_key: str + :param cname: The CName for the service. + :type cname: str + :param public_ip: The public IP address for the service. + :type public_ip: str + :param public_fqdn: The public Fqdn for the service. + :type public_fqdn: str + :ivar swagger_uri: The Uri for sending swagger requests. + :vartype swagger_uri: str + :ivar model_config_map: Details on the models and configurations. + :vartype model_config_map: dict[str, object] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment_image_request: The Environment, models and assets used + for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseEnvironmentImageRequest + :param vnet_configuration: The virtual network configuration. + :type vnet_configuration: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseVnetConfiguration + :param encryption_properties: The encryption properties. + :type encryption_properties: + ~azure.mgmt.machinelearningservices.models.ACIServiceResponseEncryptionProperties + """ + + _validation = { + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'model_config_map': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'ssl_enabled': {'key': 'sslEnabled', 'type': 'bool'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'data_collection': {'key': 'dataCollection', 'type': 'ACIServiceResponseDataCollection'}, + 'ssl_certificate': {'key': 'sslCertificate', 'type': 'str'}, + 'ssl_key': {'key': 'sslKey', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + 'public_ip': {'key': 'publicIp', 'type': 'str'}, + 'public_fqdn': {'key': 'publicFqdn', 'type': 'str'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'model_config_map': {'key': 'modelConfigMap', 'type': '{object}'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'ACIServiceResponseEnvironmentImageRequest'}, + 'vnet_configuration': {'key': 'vnetConfiguration', 'type': 'ACIServiceResponseVnetConfiguration'}, + 'encryption_properties': {'key': 'encryptionProperties', 'type': 'ACIServiceResponseEncryptionProperties'}, + } + + def __init__(self, *, description: str=None, kv_tags=None, properties=None, deployment_type=None, container_resource_requirements=None, location: str=None, auth_enabled: bool=None, ssl_enabled: bool=None, app_insights_enabled: bool=None, data_collection=None, ssl_certificate: str=None, ssl_key: str=None, cname: str=None, public_ip: str=None, public_fqdn: str=None, models_property=None, environment_image_request=None, vnet_configuration=None, encryption_properties=None, **kwargs) -> None: + super(ACIServiceResponse, self).__init__(description=description, kv_tags=kv_tags, properties=properties, deployment_type=deployment_type, **kwargs) + self.container_resource_requirements = container_resource_requirements + self.scoring_uri = None + self.location = location + self.auth_enabled = auth_enabled + self.ssl_enabled = ssl_enabled + self.app_insights_enabled = app_insights_enabled + self.data_collection = data_collection + self.ssl_certificate = ssl_certificate + self.ssl_key = ssl_key + self.cname = cname + self.public_ip = public_ip + self.public_fqdn = public_fqdn + self.swagger_uri = None + self.model_config_map = None + self.models_property = models_property + self.environment_image_request = environment_image_request + self.vnet_configuration = vnet_configuration + self.encryption_properties = encryption_properties + self.compute_type = 'ACI' + + +class ACIServiceResponseDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, *, event_hub_enabled: bool=None, storage_enabled: bool=None, **kwargs) -> None: + super(ACIServiceResponseDataCollection, self).__init__(event_hub_enabled=event_hub_enabled, storage_enabled=storage_enabled, **kwargs) + + +class ACIServiceResponseEncryptionProperties(EncryptionProperties): + """The encryption properties. + + All required parameters must be populated in order to send to Azure. + + :param vault_base_url: Required. vault base Url + :type vault_base_url: str + :param key_name: Required. Encryption Key name + :type key_name: str + :param key_version: Required. Encryption Key Version + :type key_version: str + """ + + _validation = { + 'vault_base_url': {'required': True}, + 'key_name': {'required': True}, + 'key_version': {'required': True}, + } + + _attribute_map = { + 'vault_base_url': {'key': 'vaultBaseUrl', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__(self, *, vault_base_url: str, key_name: str, key_version: str, **kwargs) -> None: + super(ACIServiceResponseEncryptionProperties, self).__init__(vault_base_url=vault_base_url, key_name=key_name, key_version=key_version, **kwargs) + + +class EnvironmentImageResponse(Model): + """Request to create a Docker image based on Environment. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, + } + + def __init__(self, *, driver_program: str=None, assets=None, model_ids=None, models_property=None, environment=None, environment_reference=None, **kwargs) -> None: + super(EnvironmentImageResponse, self).__init__(**kwargs) + self.driver_program = driver_program + self.assets = assets + self.model_ids = model_ids + self.models_property = models_property + self.environment = environment + self.environment_reference = environment_reference + + +class ACIServiceResponseEnvironmentImageRequest(EnvironmentImageResponse): + """The Environment, models and assets used for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, + } + + def __init__(self, *, driver_program: str=None, assets=None, model_ids=None, models_property=None, environment=None, environment_reference=None, **kwargs) -> None: + super(ACIServiceResponseEnvironmentImageRequest, self).__init__(driver_program=driver_program, assets=assets, model_ids=model_ids, models_property=models_property, environment=environment, environment_reference=environment_reference, **kwargs) + + +class ACIServiceResponseVnetConfiguration(VnetConfiguration): + """The virtual network configuration. + + :param vnet_name: The name of the virtual network. + :type vnet_name: str + :param subnet_name: The name of the virtual network subnet. + :type subnet_name: str + """ + + _attribute_map = { + 'vnet_name': {'key': 'vnetName', 'type': 'str'}, + 'subnet_name': {'key': 'subnetName', 'type': 'str'}, + } + + def __init__(self, *, vnet_name: str=None, subnet_name: str=None, **kwargs) -> None: + super(ACIServiceResponseVnetConfiguration, self).__init__(vnet_name=vnet_name, subnet_name=subnet_name, **kwargs) + + 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. @@ -35,9 +666,9 @@ class Compute(Model): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -48,6 +679,9 @@ class Compute(Model): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str """ @@ -70,14 +704,15 @@ class Compute(Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} + 'compute_type': {'AKS': 'AKS', 'AmlCompute': 'AmlCompute', 'ComputeInstance': 'ComputeInstance', 'VirtualMachine': 'VirtualMachine', 'HDInsight': 'HDInsight', 'DataFactory': 'DataFactory', 'Databricks': 'Databricks', 'DataLakeAnalytics': 'DataLakeAnalytics'} } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, **kwargs) -> None: + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, **kwargs) -> None: super(Compute, self).__init__(**kwargs) self.compute_location = compute_location self.provisioning_state = None @@ -87,6 +722,7 @@ def __init__(self, *, compute_location: str=None, description: str=None, resourc self.resource_id = resource_id self.provisioning_errors = None self.is_attached_compute = None + self.disable_local_auth = disable_local_auth self.compute_type = None @@ -108,9 +744,9 @@ class AKS(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -121,6 +757,9 @@ class AKS(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: AKS properties @@ -145,12 +784,13 @@ class AKS(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AKSProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(AKS, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties self.compute_type = 'AKS' @@ -277,420 +917,825 @@ class AKSProperties(Model): :type agent_count: int :param agent_vm_size: Agent virtual machine size :type agent_vm_size: str + :param cluster_purpose: Intended usage of the cluster. Possible values + include: 'FastProd', 'DenseProd', 'DevTest'. Default value: "FastProd" . + :type cluster_purpose: str or + ~azure.mgmt.machinelearningservices.models.ClusterPurpose :param ssl_configuration: SSL configuration :type ssl_configuration: ~azure.mgmt.machinelearningservices.models.SslConfiguration :param aks_networking_configuration: AKS networking configuration for vnet :type aks_networking_configuration: ~azure.mgmt.machinelearningservices.models.AksNetworkingConfiguration + :param load_balancer_type: Load Balancer Type. Possible values include: + 'PublicIp', 'InternalLoadBalancer'. Default value: "PublicIp" . + :type load_balancer_type: str or + ~azure.mgmt.machinelearningservices.models.LoadBalancerType + :param load_balancer_subnet: Load Balancer Subnet + :type load_balancer_subnet: str """ _validation = { 'system_services': {'readonly': True}, - 'agent_count': {'minimum': 1}, + 'agent_count': {'minimum': 0}, } _attribute_map = { 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, 'agent_count': {'key': 'agentCount', 'type': 'int'}, - 'agent_vm_size': {'key': 'agentVMSize', 'type': 'str'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + 'cluster_purpose': {'key': 'clusterPurpose', 'type': 'str'}, 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, 'aks_networking_configuration': {'key': 'aksNetworkingConfiguration', 'type': 'AksNetworkingConfiguration'}, + 'load_balancer_type': {'key': 'loadBalancerType', 'type': 'str'}, + 'load_balancer_subnet': {'key': 'loadBalancerSubnet', 'type': 'str'}, } - def __init__(self, *, cluster_fqdn: str=None, agent_count: int=None, agent_vm_size: str=None, ssl_configuration=None, aks_networking_configuration=None, **kwargs) -> None: + def __init__(self, *, cluster_fqdn: str=None, agent_count: int=None, agent_vm_size: str=None, cluster_purpose="FastProd", ssl_configuration=None, aks_networking_configuration=None, load_balancer_type="PublicIp", load_balancer_subnet: str=None, **kwargs) -> None: super(AKSProperties, self).__init__(**kwargs) self.cluster_fqdn = cluster_fqdn self.system_services = None self.agent_count = agent_count self.agent_vm_size = agent_vm_size + self.cluster_purpose = cluster_purpose self.ssl_configuration = ssl_configuration self.aks_networking_configuration = aks_networking_configuration + self.load_balancer_type = load_balancer_type + self.load_balancer_subnet = load_balancer_subnet + + +class AKSReplicaStatus(Model): + """AKSReplicaStatus. + + :param desired_replicas: The desired number of replicas. + :type desired_replicas: int + :param updated_replicas: The number of updated replicas. + :type updated_replicas: int + :param available_replicas: The number of available replicas. + :type available_replicas: int + :param error: The error details. + :type error: + ~azure.mgmt.machinelearningservices.models.AKSReplicaStatusError + """ + + _attribute_map = { + 'desired_replicas': {'key': 'desiredReplicas', 'type': 'int'}, + 'updated_replicas': {'key': 'updatedReplicas', 'type': 'int'}, + 'available_replicas': {'key': 'availableReplicas', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'AKSReplicaStatusError'}, + } + def __init__(self, *, desired_replicas: int=None, updated_replicas: int=None, available_replicas: int=None, error=None, **kwargs) -> None: + super(AKSReplicaStatus, self).__init__(**kwargs) + self.desired_replicas = desired_replicas + self.updated_replicas = updated_replicas + self.available_replicas = available_replicas + self.error = error -class AmlCompute(Compute): - """An Azure Machine Learning compute. + +class MachineLearningServiceError(Model): + """Wrapper for error response to follow ARM guidelines. 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: AML Compute properties - :type properties: - ~azure.mgmt.machinelearningservices.models.AmlComputeProperties + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse """ _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}, + 'error': {'readonly': 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': 'AmlComputeProperties'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) - self.properties = properties - self.compute_type = 'AmlCompute' + def __init__(self, **kwargs) -> None: + super(MachineLearningServiceError, self).__init__(**kwargs) + self.error = None -class AmlComputeNodeInformation(Model): - """Compute node information related to a AmlCompute. +class MachineLearningServiceErrorException(HttpOperationError): + """Server responsed with exception of type: 'MachineLearningServiceError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + + +class AKSReplicaStatusError(MachineLearningServiceError): + """The error details. Variables are only populated by the server, and will be ignored when sending a request. - :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 port: Port. SSH port number of the node. - :vartype port: float + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse """ _validation = { - 'node_id': {'readonly': True}, - 'ip_address': {'readonly': True}, - 'port': {'readonly': True}, + 'error': {'readonly': True}, } _attribute_map = { - 'node_id': {'key': 'nodeId', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'float'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } def __init__(self, **kwargs) -> None: - super(AmlComputeNodeInformation, self).__init__(**kwargs) - self.node_id = None - self.ip_address = None - self.port = None + super(AKSReplicaStatusError, self).__init__(**kwargs) -class ComputeNodesInformation(Model): - """Compute nodes information related to a Machine Learning compute. Might - differ for every type of compute. +class CreateEndpointVariantRequest(CreateServiceRequest): + """The Variant properties. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AmlComputeNodesInformation - - Variables are only populated by the server, and will be ignored when - sending a request. + sub-classes are: AKSServiceCreateRequest All required parameters must be populated in order to send to Azure. - :ivar next_link: The continuation token. - :vartype next_link: str + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str :param compute_type: Required. Constant filled by server. :type compute_type: str + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType """ _validation = { - 'next_link': {'readonly': True}, 'compute_type': {'required': True}, } _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, } _subtype_map = { - 'compute_type': {'AmlCompute': 'AmlComputeNodesInformation'} + 'compute_type': {'AKS': 'AKSServiceCreateRequest'} } - def __init__(self, **kwargs) -> None: - super(ComputeNodesInformation, self).__init__(**kwargs) - self.next_link = None - self.compute_type = None - + def __init__(self, *, description: str=None, kv_tags=None, properties=None, keys=None, environment_image_request=None, location: str=None, is_default: bool=None, traffic_percentile: float=None, type=None, **kwargs) -> None: + super(CreateEndpointVariantRequest, self).__init__(description=description, kv_tags=kv_tags, properties=properties, keys=keys, environment_image_request=environment_image_request, location=location, **kwargs) + self.is_default = is_default + self.traffic_percentile = traffic_percentile + self.type = type + self.compute_type = 'Custom' -class AmlComputeNodesInformation(ComputeNodesInformation): - """Compute node information related to a AmlCompute. - Variables are only populated by the server, and will be ignored when - sending a request. +class AKSServiceCreateRequest(CreateEndpointVariantRequest): + """The request to create an AKS service. All required parameters must be populated in order to send to Azure. - :ivar next_link: The continuation token. - :vartype next_link: str + :param description: The description of the service. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service properties dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param keys: The authentication keys. + :type keys: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestKeys + :param environment_image_request: The Environment, models and assets + needed for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequestEnvironmentImageRequest + :param location: The name of the Azure location/region. + :type location: str :param compute_type: Required. Constant filled by server. :type compute_type: str - :ivar nodes: The collection of returned AmlCompute nodes details. - :vartype nodes: - list[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType + :param num_replicas: The number of replicas on the cluster. + :type num_replicas: int + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestDataCollection + :param compute_name: The name of the compute resource. + :type compute_name: str + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param auto_scaler: The auto scaler properties. + :type auto_scaler: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestAutoScaler + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param max_concurrent_requests_per_container: The maximum number of + concurrent requests per container. + :type max_concurrent_requests_per_container: int + :param max_queue_wait_ms: Maximum time a request will wait in the queue + (in milliseconds). After this time, the service will return 503 (Service + Unavailable) + :type max_queue_wait_ms: int + :param namespace: Kubernetes namespace for the service. + :type namespace: str + :param scoring_timeout_ms: The scoring timeout in milliseconds. + :type scoring_timeout_ms: int + :param auth_enabled: Whether or not authentication is enabled. + :type auth_enabled: bool + :param liveness_probe_requirements: The liveness probe requirements. + :type liveness_probe_requirements: + ~azure.mgmt.machinelearningservices.models.AKSServiceCreateRequestLivenessProbeRequirements + :param aad_auth_enabled: Whether or not AAD authentication is enabled. + :type aad_auth_enabled: bool """ _validation = { - 'next_link': {'readonly': True}, 'compute_type': {'required': True}, - 'nodes': {'readonly': True}, } _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'keys': {'key': 'keys', 'type': 'CreateServiceRequestKeys'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'CreateServiceRequestEnvironmentImageRequest'}, + 'location': {'key': 'location', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'nodes': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, + 'type': {'key': 'type', 'type': 'str'}, + 'num_replicas': {'key': 'numReplicas', 'type': 'int'}, + 'data_collection': {'key': 'dataCollection', 'type': 'AKSServiceCreateRequestDataCollection'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'auto_scaler': {'key': 'autoScaler', 'type': 'AKSServiceCreateRequestAutoScaler'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'max_concurrent_requests_per_container': {'key': 'maxConcurrentRequestsPerContainer', 'type': 'int'}, + 'max_queue_wait_ms': {'key': 'maxQueueWaitMs', 'type': 'int'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'scoring_timeout_ms': {'key': 'scoringTimeoutMs', 'type': 'int'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'liveness_probe_requirements': {'key': 'livenessProbeRequirements', 'type': 'AKSServiceCreateRequestLivenessProbeRequirements'}, + 'aad_auth_enabled': {'key': 'aadAuthEnabled', 'type': 'bool'}, } - def __init__(self, **kwargs) -> None: - super(AmlComputeNodesInformation, self).__init__(**kwargs) - self.nodes = None - self.compute_type = 'AmlCompute' - - -class AmlComputeProperties(Model): - """AML Compute properties. + def __init__(self, *, description: str=None, kv_tags=None, properties=None, keys=None, environment_image_request=None, location: str=None, is_default: bool=None, traffic_percentile: float=None, type=None, num_replicas: int=None, data_collection=None, compute_name: str=None, app_insights_enabled: bool=None, auto_scaler=None, container_resource_requirements=None, max_concurrent_requests_per_container: int=None, max_queue_wait_ms: int=None, namespace: str=None, scoring_timeout_ms: int=None, auth_enabled: bool=None, liveness_probe_requirements=None, aad_auth_enabled: bool=None, **kwargs) -> None: + super(AKSServiceCreateRequest, self).__init__(description=description, kv_tags=kv_tags, properties=properties, keys=keys, environment_image_request=environment_image_request, location=location, is_default=is_default, traffic_percentile=traffic_percentile, type=type, **kwargs) + self.num_replicas = num_replicas + self.data_collection = data_collection + self.compute_name = compute_name + self.app_insights_enabled = app_insights_enabled + self.auto_scaler = auto_scaler + self.container_resource_requirements = container_resource_requirements + self.max_concurrent_requests_per_container = max_concurrent_requests_per_container + self.max_queue_wait_ms = max_queue_wait_ms + self.namespace = namespace + self.scoring_timeout_ms = scoring_timeout_ms + self.auth_enabled = auth_enabled + self.liveness_probe_requirements = liveness_probe_requirements + self.aad_auth_enabled = aad_auth_enabled + self.compute_type = 'AKS' - 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 vm_priority: Virtual Machine priority. Possible values include: - 'Dedicated', 'LowPriority' - :type vm_priority: str or - ~azure.mgmt.machinelearningservices.models.VmPriority - :param scale_settings: Scale settings for AML Compute - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings - :param user_account_credentials: User account credentials. Credentials for - an administrator user account that will be created on each compute node. - :type user_account_credentials: - ~azure.mgmt.machinelearningservices.models.UserAccountCredentials - :param subnet: Subnet. Virtual network subnet resource ID the compute - nodes belong to. - :type subnet: ~azure.mgmt.machinelearningservices.models.ResourceId - :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 - progress. A compute enters this state when it is created and when no - operations are being performed on the compute to change the number of - compute nodes. resizing - Indicates that the compute is resizing; that is, - compute nodes are being added to or removed from the compute. Possible - values include: 'Steady', 'Resizing' - :vartype allocation_state: str or - ~azure.mgmt.machinelearningservices.models.AllocationState - :ivar allocation_state_transition_time: Allocation state transition time. - The time at which the compute entered its current allocation state. - :vartype allocation_state_transition_time: datetime - :ivar errors: Errors. Collection of errors encountered by various compute - nodes during node setup. - :vartype errors: - list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] - :ivar current_node_count: Current node count. The number of compute nodes - currently assigned to the compute. - :vartype current_node_count: int - :ivar target_node_count: Target node count. The target number of compute - nodes for the compute. If the allocationState is resizing, this property - denotes the target node count for the ongoing resize operation. If the - allocationState is steady, this property denotes the target node count for - the previous resize operation. - :vartype target_node_count: int - :ivar node_state_counts: Node state counts. Counts of various node states - on the compute. - :vartype node_state_counts: - ~azure.mgmt.machinelearningservices.models.NodeStateCounts +class AutoScaler(Model): + """The Auto Scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int """ - _validation = { - 'allocation_state': {'readonly': True}, - 'allocation_state_transition_time': {'readonly': True}, - 'errors': {'readonly': True}, - 'current_node_count': {'readonly': True}, - 'target_node_count': {'readonly': True}, - 'node_state_counts': {'readonly': True}, + _attribute_map = { + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } + def __init__(self, *, autoscale_enabled: bool=None, min_replicas: int=None, max_replicas: int=None, target_utilization: int=None, refresh_period_in_seconds: int=None, **kwargs) -> None: + super(AutoScaler, self).__init__(**kwargs) + self.autoscale_enabled = autoscale_enabled + self.min_replicas = min_replicas + self.max_replicas = max_replicas + self.target_utilization = target_utilization + self.refresh_period_in_seconds = refresh_period_in_seconds + + +class AKSServiceCreateRequestAutoScaler(AutoScaler): + """The auto scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int + """ + _attribute_map = { - 'vm_size': {'key': 'vmSize', 'type': 'str'}, - 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, - 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, - 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, - 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, - 'allocation_state': {'key': 'allocationState', 'type': 'str'}, - 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, - 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, - 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, - 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, - 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } - def __init__(self, *, vm_size: str=None, vm_priority=None, scale_settings=None, user_account_credentials=None, subnet=None, **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.allocation_state = None - self.allocation_state_transition_time = None - self.errors = None - self.current_node_count = None - self.target_node_count = None - self.node_state_counts = None + def __init__(self, *, autoscale_enabled: bool=None, min_replicas: int=None, max_replicas: int=None, target_utilization: int=None, refresh_period_in_seconds: int=None, **kwargs) -> None: + super(AKSServiceCreateRequestAutoScaler, self).__init__(autoscale_enabled=autoscale_enabled, min_replicas=min_replicas, max_replicas=max_replicas, target_utilization=target_utilization, refresh_period_in_seconds=refresh_period_in_seconds, **kwargs) -class CloudError(Model): - """CloudError. +class AKSServiceCreateRequestDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool """ _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, } + def __init__(self, *, event_hub_enabled: bool=None, storage_enabled: bool=None, **kwargs) -> None: + super(AKSServiceCreateRequestDataCollection, self).__init__(event_hub_enabled=event_hub_enabled, storage_enabled=storage_enabled, **kwargs) + + +class LivenessProbeRequirements(Model): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int + """ -class ClusterUpdateParameters(Model): - """AmlCompute update parameters. + _attribute_map = { + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + } - :param scale_settings: Scale settings. Desired scale settings for the - amlCompute. - :type scale_settings: - ~azure.mgmt.machinelearningservices.models.ScaleSettings + def __init__(self, *, failure_threshold: int=None, success_threshold: int=None, timeout_seconds: int=None, period_seconds: int=None, initial_delay_seconds: int=None, **kwargs) -> None: + super(LivenessProbeRequirements, self).__init__(**kwargs) + self.failure_threshold = failure_threshold + self.success_threshold = success_threshold + self.timeout_seconds = timeout_seconds + self.period_seconds = period_seconds + self.initial_delay_seconds = initial_delay_seconds + + +class AKSServiceCreateRequestLivenessProbeRequirements(LivenessProbeRequirements): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int """ _attribute_map = { - 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, } - def __init__(self, *, scale_settings=None, **kwargs) -> None: - super(ClusterUpdateParameters, self).__init__(**kwargs) - self.scale_settings = scale_settings + def __init__(self, *, failure_threshold: int=None, success_threshold: int=None, timeout_seconds: int=None, period_seconds: int=None, initial_delay_seconds: int=None, **kwargs) -> None: + super(AKSServiceCreateRequestLivenessProbeRequirements, self).__init__(failure_threshold=failure_threshold, success_threshold=success_threshold, timeout_seconds=timeout_seconds, period_seconds=period_seconds, initial_delay_seconds=initial_delay_seconds, **kwargs) -class Resource(Model): - """Azure Resource Manager resource envelope. +class AKSVariantResponse(ServiceResponseBase): + """The response for an AKS variant. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AKSServiceResponse 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 - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. - :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] + All required parameters must be populated in order to send to Azure. + + :param description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'identity': {'readonly': True}, - 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.identity = None - self.location = location - self.type = None - self.tags = tags + _subtype_map = { + 'compute_type': {'AKS': 'AKSServiceResponse'} + } + def __init__(self, *, description: str=None, kv_tags=None, properties=None, deployment_type=None, is_default: bool=None, traffic_percentile: float=None, type=None, **kwargs) -> None: + super(AKSVariantResponse, self).__init__(description=description, kv_tags=kv_tags, properties=properties, deployment_type=deployment_type, **kwargs) + self.is_default = is_default + self.traffic_percentile = traffic_percentile + self.type = type + self.compute_type = 'Custom' -class ComputeResource(Resource): - """Machine Learning compute object wrapped into ARM resource envelope. + +class AKSServiceResponse(AKSVariantResponse): + """The response for an AKS service. 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 - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.machinelearningservices.models.Identity - :param location: Specifies the location of the resource. - :type location: str - :ivar type: Specifies the type of the resource. - :vartype type: str - :param tags: Contains resource tags defined as key/value pairs. - :type tags: dict[str, str] - :param properties: Compute properties - :type properties: ~azure.mgmt.machinelearningservices.models.Compute + All required parameters must be populated in order to send to Azure. + + :param description: The service description. + :type description: str + :param kv_tags: The service tag dictionary. Tags are mutable. + :type kv_tags: dict[str, str] + :param properties: The service property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :ivar state: The current state of the service. Possible values include: + 'Transitioning', 'Healthy', 'Unhealthy', 'Failed', 'Unschedulable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.WebServiceState + :ivar error: The error details. + :vartype error: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBaseError + :param deployment_type: The deployment type for the service. Possible + values include: 'GRPCRealtimeEndpoint', 'HttpRealtimeEndpoint', 'Batch' + :type deployment_type: str or + ~azure.mgmt.machinelearningservices.models.DeploymentType + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param is_default: Is this the default variant. + :type is_default: bool + :param traffic_percentile: The amount of traffic variant receives. + :type traffic_percentile: float + :param type: The type of the variant. Possible values include: 'Control', + 'Treatment' + :type type: str or ~azure.mgmt.machinelearningservices.models.VariantType + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param container_resource_requirements: The container resource + requirements. + :type container_resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + :param max_concurrent_requests_per_container: The maximum number of + concurrent requests per container. + :type max_concurrent_requests_per_container: int + :param max_queue_wait_ms: Maximum time a request will wait in the queue + (in milliseconds). After this time, the service will return 503 (Service + Unavailable) + :type max_queue_wait_ms: int + :param compute_name: The name of the compute resource. + :type compute_name: str + :param namespace: The Kubernetes namespace of the deployment. + :type namespace: str + :param num_replicas: The number of replicas on the cluster. + :type num_replicas: int + :param data_collection: Details of the data collection options specified. + :type data_collection: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseDataCollection + :param app_insights_enabled: Whether or not Application Insights is + enabled. + :type app_insights_enabled: bool + :param auto_scaler: The auto scaler properties. + :type auto_scaler: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseAutoScaler + :ivar scoring_uri: The Uri for sending scoring requests. + :vartype scoring_uri: str + :ivar deployment_status: The deployment status. + :vartype deployment_status: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseDeploymentStatus + :param scoring_timeout_ms: The scoring timeout in milliseconds. + :type scoring_timeout_ms: int + :param liveness_probe_requirements: The liveness probe requirements. + :type liveness_probe_requirements: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseLivenessProbeRequirements + :param auth_enabled: Whether or not authentication is enabled. + :type auth_enabled: bool + :param aad_auth_enabled: Whether or not AAD authentication is enabled. + :type aad_auth_enabled: bool + :ivar swagger_uri: The Uri for sending swagger requests. + :vartype swagger_uri: str + :ivar model_config_map: Details on the models and configurations. + :vartype model_config_map: dict[str, object] + :param environment_image_request: The Environment, models and assets used + for inferencing. + :type environment_image_request: + ~azure.mgmt.machinelearningservices.models.AKSServiceResponseEnvironmentImageRequest """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'identity': {'readonly': True}, - 'type': {'readonly': True}, + 'state': {'readonly': True}, + 'error': {'readonly': True}, + 'compute_type': {'required': True}, + 'scoring_uri': {'readonly': True}, + 'deployment_status': {'readonly': True}, + 'swagger_uri': {'readonly': True}, + 'model_config_map': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'location': {'key': 'location', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'state': {'key': 'state', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ServiceResponseBaseError'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'traffic_percentile': {'key': 'trafficPercentile', 'type': 'float'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'Compute'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'container_resource_requirements': {'key': 'containerResourceRequirements', 'type': 'ContainerResourceRequirements'}, + 'max_concurrent_requests_per_container': {'key': 'maxConcurrentRequestsPerContainer', 'type': 'int'}, + 'max_queue_wait_ms': {'key': 'maxQueueWaitMs', 'type': 'int'}, + 'compute_name': {'key': 'computeName', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'num_replicas': {'key': 'numReplicas', 'type': 'int'}, + 'data_collection': {'key': 'dataCollection', 'type': 'AKSServiceResponseDataCollection'}, + 'app_insights_enabled': {'key': 'appInsightsEnabled', 'type': 'bool'}, + 'auto_scaler': {'key': 'autoScaler', 'type': 'AKSServiceResponseAutoScaler'}, + 'scoring_uri': {'key': 'scoringUri', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'AKSServiceResponseDeploymentStatus'}, + 'scoring_timeout_ms': {'key': 'scoringTimeoutMs', 'type': 'int'}, + 'liveness_probe_requirements': {'key': 'livenessProbeRequirements', 'type': 'AKSServiceResponseLivenessProbeRequirements'}, + 'auth_enabled': {'key': 'authEnabled', 'type': 'bool'}, + 'aad_auth_enabled': {'key': 'aadAuthEnabled', 'type': 'bool'}, + 'swagger_uri': {'key': 'swaggerUri', 'type': 'str'}, + 'model_config_map': {'key': 'modelConfigMap', 'type': '{object}'}, + 'environment_image_request': {'key': 'environmentImageRequest', 'type': 'AKSServiceResponseEnvironmentImageRequest'}, } - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: - super(ComputeResource, self).__init__(location=location, tags=tags, **kwargs) - self.properties = properties + def __init__(self, *, description: str=None, kv_tags=None, properties=None, deployment_type=None, is_default: bool=None, traffic_percentile: float=None, type=None, models_property=None, container_resource_requirements=None, max_concurrent_requests_per_container: int=None, max_queue_wait_ms: int=None, compute_name: str=None, namespace: str=None, num_replicas: int=None, data_collection=None, app_insights_enabled: bool=None, auto_scaler=None, scoring_timeout_ms: int=None, liveness_probe_requirements=None, auth_enabled: bool=None, aad_auth_enabled: bool=None, environment_image_request=None, **kwargs) -> None: + super(AKSServiceResponse, self).__init__(description=description, kv_tags=kv_tags, properties=properties, deployment_type=deployment_type, is_default=is_default, traffic_percentile=traffic_percentile, type=type, **kwargs) + self.models_property = models_property + self.container_resource_requirements = container_resource_requirements + self.max_concurrent_requests_per_container = max_concurrent_requests_per_container + self.max_queue_wait_ms = max_queue_wait_ms + self.compute_name = compute_name + self.namespace = namespace + self.num_replicas = num_replicas + self.data_collection = data_collection + self.app_insights_enabled = app_insights_enabled + self.auto_scaler = auto_scaler + self.scoring_uri = None + self.deployment_status = None + self.scoring_timeout_ms = scoring_timeout_ms + self.liveness_probe_requirements = liveness_probe_requirements + self.auth_enabled = auth_enabled + self.aad_auth_enabled = aad_auth_enabled + self.swagger_uri = None + self.model_config_map = None + self.environment_image_request = environment_image_request + self.compute_type = 'AKS' -class Databricks(Compute): - """A DataFactory compute. +class AKSServiceResponseAutoScaler(AutoScaler): + """The auto scaler properties. + + :param autoscale_enabled: Option to enable/disable auto scaling. + :type autoscale_enabled: bool + :param min_replicas: The minimum number of replicas to scale down to. + :type min_replicas: int + :param max_replicas: The maximum number of replicas in the cluster. + :type max_replicas: int + :param target_utilization: The target utilization percentage to use for + determining whether to scale the cluster. + :type target_utilization: int + :param refresh_period_in_seconds: The amount of seconds to wait between + auto scale updates. + :type refresh_period_in_seconds: int + """ + + _attribute_map = { + 'autoscale_enabled': {'key': 'autoscaleEnabled', 'type': 'bool'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'int'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, + } + + def __init__(self, *, autoscale_enabled: bool=None, min_replicas: int=None, max_replicas: int=None, target_utilization: int=None, refresh_period_in_seconds: int=None, **kwargs) -> None: + super(AKSServiceResponseAutoScaler, self).__init__(autoscale_enabled=autoscale_enabled, min_replicas=min_replicas, max_replicas=max_replicas, target_utilization=target_utilization, refresh_period_in_seconds=refresh_period_in_seconds, **kwargs) + + +class AKSServiceResponseDataCollection(ModelDataCollection): + """Details of the data collection options specified. + + :param event_hub_enabled: Option for enabling/disabling Event Hub. + :type event_hub_enabled: bool + :param storage_enabled: Option for enabling/disabling storage. + :type storage_enabled: bool + """ + + _attribute_map = { + 'event_hub_enabled': {'key': 'eventHubEnabled', 'type': 'bool'}, + 'storage_enabled': {'key': 'storageEnabled', 'type': 'bool'}, + } + + def __init__(self, *, event_hub_enabled: bool=None, storage_enabled: bool=None, **kwargs) -> None: + super(AKSServiceResponseDataCollection, self).__init__(event_hub_enabled=event_hub_enabled, storage_enabled=storage_enabled, **kwargs) + + +class AKSServiceResponseDeploymentStatus(AKSReplicaStatus): + """The deployment status. + + :param desired_replicas: The desired number of replicas. + :type desired_replicas: int + :param updated_replicas: The number of updated replicas. + :type updated_replicas: int + :param available_replicas: The number of available replicas. + :type available_replicas: int + :param error: The error details. + :type error: + ~azure.mgmt.machinelearningservices.models.AKSReplicaStatusError + """ + + _attribute_map = { + 'desired_replicas': {'key': 'desiredReplicas', 'type': 'int'}, + 'updated_replicas': {'key': 'updatedReplicas', 'type': 'int'}, + 'available_replicas': {'key': 'availableReplicas', 'type': 'int'}, + 'error': {'key': 'error', 'type': 'AKSReplicaStatusError'}, + } + + def __init__(self, *, desired_replicas: int=None, updated_replicas: int=None, available_replicas: int=None, error=None, **kwargs) -> None: + super(AKSServiceResponseDeploymentStatus, self).__init__(desired_replicas=desired_replicas, updated_replicas=updated_replicas, available_replicas=available_replicas, error=error, **kwargs) + + +class AKSServiceResponseEnvironmentImageRequest(EnvironmentImageResponse): + """The Environment, models and assets used for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageResponseEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageResponseEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageResponseEnvironmentReference'}, + } + + def __init__(self, *, driver_program: str=None, assets=None, model_ids=None, models_property=None, environment=None, environment_reference=None, **kwargs) -> None: + super(AKSServiceResponseEnvironmentImageRequest, self).__init__(driver_program=driver_program, assets=assets, model_ids=model_ids, models_property=models_property, environment=environment, environment_reference=environment_reference, **kwargs) + + +class AKSServiceResponseLivenessProbeRequirements(LivenessProbeRequirements): + """The liveness probe requirements. + + :param failure_threshold: The number of failures to allow before returning + an unhealthy status. + :type failure_threshold: int + :param success_threshold: The number of successful probes before returning + a healthy status. + :type success_threshold: int + :param timeout_seconds: The probe timeout in seconds. + :type timeout_seconds: int + :param period_seconds: The length of time between probes in seconds. + :type period_seconds: int + :param initial_delay_seconds: The delay before the first probe in seconds. + :type initial_delay_seconds: int + """ + + _attribute_map = { + 'failure_threshold': {'key': 'failureThreshold', 'type': 'int'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'int'}, + 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, + 'period_seconds': {'key': 'periodSeconds', 'type': 'int'}, + 'initial_delay_seconds': {'key': 'initialDelaySeconds', 'type': 'int'}, + } + + def __init__(self, *, failure_threshold: int=None, success_threshold: int=None, timeout_seconds: int=None, period_seconds: int=None, initial_delay_seconds: int=None, **kwargs) -> None: + super(AKSServiceResponseLivenessProbeRequirements, self).__init__(failure_threshold=failure_threshold, success_threshold=success_threshold, timeout_seconds=timeout_seconds, period_seconds=period_seconds, initial_delay_seconds=initial_delay_seconds, **kwargs) + + +class AmlCompute(Compute): + """An Azure Machine Learning compute. Variables are only populated by the server, and will be ignored when sending a request. @@ -707,9 +1752,9 @@ class Databricks(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -720,11 +1765,14 @@ class Databricks(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: + :param properties: AML Compute properties :type properties: - ~azure.mgmt.machinelearningservices.models.DatabricksProperties + ~azure.mgmt.machinelearningservices.models.AmlComputeProperties """ _validation = { @@ -745,60 +1793,342 @@ class Databricks(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + 'properties': {'key': 'properties', 'type': 'AmlComputeProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(AmlCompute, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties - self.compute_type = 'Databricks' + self.compute_type = 'AmlCompute' -class DatabricksComputeSecrets(ComputeSecrets): - """Secrets related to a Machine Learning compute based on Databricks. +class AmlComputeNodeInformation(Model): + """Compute node information related to a AmlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar node_id: Node ID. ID of the compute node. + :vartype node_id: 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}, + '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'}, + '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.private_ip_address = None + self.public_ip_address = None + self.port = None + self.node_state = None + self.run_id = None + + +class AmlComputeProperties(Model): + """AML Compute properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param os_type: Compute OS Type. Possible values include: 'Linux', + 'Windows'. Default value: "Linux" . + :type os_type: str or ~azure.mgmt.machinelearningservices.models.OsType + :param vm_size: Virtual Machine Size + :type vm_size: str + :param vm_priority: Virtual Machine priority. Possible values include: + 'Dedicated', 'LowPriority' + :type vm_priority: str or + ~azure.mgmt.machinelearningservices.models.VmPriority + :param virtual_machine_image: Virtual Machine image for AML Compute - + windows only + :type virtual_machine_image: + ~azure.mgmt.machinelearningservices.models.VirtualMachineImage + :param isolated_network: Network is isolated or not + :type isolated_network: bool + :param scale_settings: Scale settings for AML Compute + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + :param user_account_credentials: User account credentials. Credentials for + an administrator user account that will be created on each compute node. + :type user_account_credentials: + ~azure.mgmt.machinelearningservices.models.UserAccountCredentials + :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 + progress. A compute enters this state when it is created and when no + operations are being performed on the compute to change the number of + compute nodes. resizing - Indicates that the compute is resizing; that is, + compute nodes are being added to or removed from the compute. Possible + values include: 'Steady', 'Resizing' + :vartype allocation_state: str or + ~azure.mgmt.machinelearningservices.models.AllocationState + :ivar allocation_state_transition_time: Allocation state transition time. + The time at which the compute entered its current allocation state. + :vartype allocation_state_transition_time: datetime + :ivar errors: Errors. Collection of errors encountered by various compute + nodes during node setup. + :vartype errors: + list[~azure.mgmt.machinelearningservices.models.MachineLearningServiceError] + :ivar current_node_count: Current node count. The number of compute nodes + currently assigned to the compute. + :vartype current_node_count: int + :ivar target_node_count: Target node count. The target number of compute + nodes for the compute. If the allocationState is resizing, this property + denotes the target node count for the ongoing resize operation. If the + allocationState is steady, this property denotes the target node count for + the previous resize operation. + :vartype target_node_count: int + :ivar node_state_counts: Node state counts. Counts of various node states + on the compute. + :vartype node_state_counts: + ~azure.mgmt.machinelearningservices.models.NodeStateCounts + :param enable_node_public_ip: Enable node public IP. Enable or disable + node public IP address provisioning. Possible values are: Possible values + are: true - Indicates that the compute nodes will have public IPs + provisioned. false - Indicates that the compute nodes will have a private + endpoint and no public IPs. Default value: True . + :type enable_node_public_ip: bool + """ + + _validation = { + 'allocation_state': {'readonly': True}, + 'allocation_state_transition_time': {'readonly': True}, + 'errors': {'readonly': True}, + 'current_node_count': {'readonly': True}, + 'target_node_count': {'readonly': True}, + 'node_state_counts': {'readonly': True}, + } + + _attribute_map = { + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'vm_priority': {'key': 'vmPriority', 'type': 'str'}, + 'virtual_machine_image': {'key': 'virtualMachineImage', 'type': 'VirtualMachineImage'}, + 'isolated_network': {'key': 'isolatedNetwork', 'type': 'bool'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'ScaleSettings'}, + 'user_account_credentials': {'key': 'userAccountCredentials', 'type': 'UserAccountCredentials'}, + 'subnet': {'key': 'subnet', 'type': 'ResourceId'}, + 'remote_login_port_public_access': {'key': 'remoteLoginPortPublicAccess', 'type': 'str'}, + 'allocation_state': {'key': 'allocationState', 'type': 'str'}, + 'allocation_state_transition_time': {'key': 'allocationStateTransitionTime', 'type': 'iso-8601'}, + 'errors': {'key': 'errors', 'type': '[MachineLearningServiceError]'}, + 'current_node_count': {'key': 'currentNodeCount', 'type': 'int'}, + 'target_node_count': {'key': 'targetNodeCount', 'type': 'int'}, + 'node_state_counts': {'key': 'nodeStateCounts', 'type': 'NodeStateCounts'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIp', 'type': 'bool'}, + } + + def __init__(self, *, os_type="Linux", vm_size: str=None, vm_priority=None, virtual_machine_image=None, isolated_network: bool=None, scale_settings=None, user_account_credentials=None, subnet=None, remote_login_port_public_access="NotSpecified", enable_node_public_ip: bool=True, **kwargs) -> None: + super(AmlComputeProperties, self).__init__(**kwargs) + self.os_type = os_type + self.vm_size = vm_size + self.vm_priority = vm_priority + self.virtual_machine_image = virtual_machine_image + self.isolated_network = isolated_network + self.scale_settings = scale_settings + self.user_account_credentials = user_account_credentials + self.subnet = subnet + self.remote_login_port_public_access = remote_login_port_public_access + self.allocation_state = None + self.allocation_state_transition_time = None + self.errors = None + self.current_node_count = None + self.target_node_count = None + self.node_state_counts = None + self.enable_node_public_ip = enable_node_public_ip + + +class 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 AssignedUser(Model): + """A user that can be assigned to a compute instance. All required parameters must be populated in order to send to Azure. - :param compute_type: Required. Constant filled by server. - :type compute_type: str - :param databricks_access_token: access token for databricks account. - :type databricks_access_token: str + :param object_id: Required. User’s AAD Object Id. + :type object_id: str + :param tenant_id: Required. User’s AAD Tenant Id. + :type tenant_id: str """ _validation = { - 'compute_type': {'required': True}, + 'object_id': {'required': True}, + 'tenant_id': {'required': True}, } _attribute_map = { - 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, } - def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: - super(DatabricksComputeSecrets, self).__init__(**kwargs) - self.databricks_access_token = databricks_access_token - self.compute_type = 'Databricks' + def __init__(self, *, object_id: str, tenant_id: str, **kwargs) -> None: + super(AssignedUser, self).__init__(**kwargs) + self.object_id = object_id + self.tenant_id = tenant_id -class DatabricksProperties(Model): - """DatabricksProperties. +class AuthKeys(Model): + """AuthKeys. - :param databricks_access_token: Databricks access token - :type databricks_access_token: str + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str """ _attribute_map = { - 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, } - def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: - super(DatabricksProperties, self).__init__(**kwargs) - self.databricks_access_token = databricks_access_token + def __init__(self, *, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + super(AuthKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key -class DataFactory(Compute): - """A DataFactory compute. +class AutoPauseProperties(Model): + """Auto pause properties. + + :param delay_in_minutes: + :type delay_in_minutes: int + :param enabled: + :type enabled: bool + """ + + _attribute_map = { + 'delay_in_minutes': {'key': 'delayInMinutes', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__(self, *, delay_in_minutes: int=None, enabled: bool=None, **kwargs) -> None: + super(AutoPauseProperties, self).__init__(**kwargs) + self.delay_in_minutes = delay_in_minutes + self.enabled = enabled + + +class AutoScaleProperties(Model): + """Auto scale properties. + + :param min_node_count: + :type min_node_count: int + :param enabled: + :type enabled: bool + :param max_node_count: + :type max_node_count: int + """ + + _attribute_map = { + 'min_node_count': {'key': 'minNodeCount', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'max_node_count': {'key': 'maxNodeCount', 'type': 'int'}, + } + + def __init__(self, *, min_node_count: int=None, enabled: bool=None, max_node_count: int=None, **kwargs) -> None: + super(AutoScaleProperties, self).__init__(**kwargs) + self.min_node_count = min_node_count + self.enabled = enabled + self.max_node_count = max_node_count + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ClusterUpdateParameters(Model): + """AmlCompute update parameters. + + :param scale_settings: Scale settings. Desired scale settings for the + amlCompute. + :type scale_settings: + ~azure.mgmt.machinelearningservices.models.ScaleSettings + """ + + _attribute_map = { + 'scale_settings': {'key': 'properties.scaleSettings', 'type': 'ScaleSettings'}, + } + + def __init__(self, *, scale_settings=None, **kwargs) -> None: + super(ClusterUpdateParameters, self).__init__(**kwargs) + 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. @@ -815,9 +2145,9 @@ class DataFactory(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -828,8 +2158,14 @@ class DataFactory(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str + :param properties: Compute Instance properties + :type properties: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceProperties """ _validation = { @@ -850,541 +2186,3024 @@ class DataFactory(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', '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, **kwargs) -> None: - super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) - self.compute_type = 'DataFactory' + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(ComputeInstance, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'ComputeInstance' -class DataLakeAnalytics(Compute): - """A DataLakeAnalytics compute. +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 an ComputeInstance. 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: - :type properties: - ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + :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 = { - '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}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': 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': 'DataLakeAnalyticsProperties'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) - self.properties = properties - self.compute_type = 'DataLakeAnalytics' + def __init__(self, **kwargs) -> None: + super(ComputeInstanceConnectivityEndpoints, self).__init__(**kwargs) + self.public_ip_address = None + self.private_ip_address = None -class DataLakeAnalyticsProperties(Model): - """DataLakeAnalyticsProperties. +class ComputeInstanceCreatedBy(Model): + """Describes information on user who created this ComputeInstance. - :param data_lake_store_account_name: DataLake Store Account Name - :type data_lake_store_account_name: str + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_name: Name of the user. + :vartype user_name: str + :ivar user_org_id: Uniquely identifies user' Azure Active Directory + organization. + :vartype user_org_id: str + :ivar user_id: Uniquely identifies the user within his/her organization. + :vartype user_id: str """ + _validation = { + 'user_name': {'readonly': True}, + 'user_org_id': {'readonly': True}, + 'user_id': {'readonly': True}, + } + _attribute_map = { - 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'user_org_id': {'key': 'userOrgId', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'}, } - def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: - super(DataLakeAnalyticsProperties, self).__init__(**kwargs) - self.data_lake_store_account_name = data_lake_store_account_name + def __init__(self, **kwargs) -> None: + super(ComputeInstanceCreatedBy, self).__init__(**kwargs) + self.user_name = None + self.user_org_id = None + self.user_id = None + + +class ComputeInstanceLastOperation(Model): + """The last operation on ComputeInstance. + + :param operation_name: Name of the last operation. Possible values + include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' + :type operation_name: str or + ~azure.mgmt.machinelearningservices.models.OperationName + :param operation_time: Time of the last operation. + :type operation_time: datetime + :param operation_status: Operation status. Possible values include: + 'InProgress', 'Succeeded', 'CreateFailed', 'StartFailed', 'StopFailed', + 'RestartFailed', 'ReimageFailed', 'DeleteFailed' + :type operation_status: str or + ~azure.mgmt.machinelearningservices.models.OperationStatus + """ + + _attribute_map = { + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'operation_time': {'key': 'operationTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'str'}, + } + def __init__(self, *, operation_name=None, operation_time=None, operation_status=None, **kwargs) -> None: + super(ComputeInstanceLastOperation, self).__init__(**kwargs) + self.operation_name = operation_name + self.operation_time = operation_time + self.operation_status = operation_status -class ErrorDetail(Model): - """Error detail information. - All required parameters must be populated in order to send to Azure. +class ComputeInstanceProperties(Model): + """Compute Instance properties. - :param code: Required. Error code. - :type code: str - :param message: Required. Error message. - :type message: str + 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', + 'JobRunning', 'SettingUp', 'SetupFailed', 'Starting', 'Stopped', + 'Stopping', 'UserSettingUp', 'UserSetupFailed', 'Unknown', 'Unusable' + :vartype state: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceState + :param compute_instance_authorization_type: Compute Instance Authorization + type. The Compute Instance Authorization type. Available values are + personal (default). Possible values include: 'personal'. Default value: + "personal" . + :type compute_instance_authorization_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeInstanceAuthorizationType + :param personal_compute_instance_settings: Personal Compute Instance + settings. Settings for a personal compute instance. + :type personal_compute_instance_settings: + ~azure.mgmt.machinelearningservices.models.PersonalComputeInstanceSettings + :param setup_scripts: Details of customized scripts to execute for setting + up the cluster. + :type setup_scripts: + ~azure.mgmt.machinelearningservices.models.SetupScripts + :ivar last_operation: The last operation on ComputeInstance. + :vartype last_operation: + ~azure.mgmt.machinelearningservices.models.ComputeInstanceLastOperation """ _validation = { - 'code': {'required': True}, - 'message': {'required': True}, + 'connectivity_endpoints': {'readonly': True}, + 'applications': {'readonly': True}, + 'created_by': {'readonly': True}, + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'last_operation': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + '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'}, + 'compute_instance_authorization_type': {'key': 'computeInstanceAuthorizationType', 'type': 'str'}, + 'personal_compute_instance_settings': {'key': 'personalComputeInstanceSettings', 'type': 'PersonalComputeInstanceSettings'}, + 'setup_scripts': {'key': 'setupScripts', 'type': 'SetupScripts'}, + 'last_operation': {'key': 'lastOperation', 'type': 'ComputeInstanceLastOperation'}, } - def __init__(self, *, code: str, message: str, **kwargs) -> None: - super(ErrorDetail, self).__init__(**kwargs) - self.code = code - self.message = message + def __init__(self, *, vm_size: str=None, subnet=None, application_sharing_policy="Shared", ssh_settings=None, compute_instance_authorization_type="personal", personal_compute_instance_settings=None, setup_scripts=None, **kwargs) -> None: + super(ComputeInstanceProperties, self).__init__(**kwargs) + self.vm_size = vm_size + self.subnet = subnet + self.application_sharing_policy = application_sharing_policy + self.ssh_settings = ssh_settings + self.connectivity_endpoints = None + self.applications = None + self.created_by = None + self.errors = None + self.state = None + self.compute_instance_authorization_type = compute_instance_authorization_type + self.personal_compute_instance_settings = personal_compute_instance_settings + self.setup_scripts = setup_scripts + self.last_operation = None -class ErrorResponse(Model): - """Error response information. +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. - :ivar code: Error code. - :vartype code: str - :ivar message: Error message. - :vartype message: str - :ivar details: An array of error detail objects. - :vartype details: - list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + :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 = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'admin_user_name': {'readonly': True}, + 'ssh_port': {'readonly': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + '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) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + 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 HDInsight(Compute): - """A HDInsight compute. +class ComputeNodesInformation(Model): + """Compute nodes information related to a Machine Learning compute. Might + differ for every type of compute. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :param compute_location: Location for the underlying compute - :type compute_location: str - :ivar provisioning_state: The provision state of the cluster. Valid values - are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible - values include: 'Unknown', 'Updating', 'Creating', 'Deleting', - 'Succeeded', 'Failed', 'Canceled' - :vartype provisioning_state: str or - ~azure.mgmt.machinelearningservices.models.ProvisioningState - :param description: The description of the Machine Learning compute. - :type description: str - :ivar created_on: The 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 + :ivar next_link: The continuation token. + :vartype next_link: str :param compute_type: Required. Constant filled by server. :type compute_type: str - :param properties: - :type properties: - ~azure.mgmt.machinelearningservices.models.HDInsightProperties """ _validation = { - 'provisioning_state': {'readonly': True}, - 'created_on': {'readonly': True}, - 'modified_on': {'readonly': True}, - 'provisioning_errors': {'readonly': True}, - 'is_attached_compute': {'readonly': True}, + 'next_link': {'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'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, - } - - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) - self.properties = properties - self.compute_type = 'HDInsight' - - -class HDInsightProperties(Model): - """HDInsightProperties. - - :param ssh_port: Port open for ssh connections on the master node of the - cluster. - :type ssh_port: int - :param address: Public IP address of the master node of the cluster. - :type address: str - :param administrator_account: Admin credentials for master node of the - cluster - :type administrator_account: - ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials - """ - - _attribute_map = { - 'ssh_port': {'key': 'sshPort', 'type': 'int'}, - 'address': {'key': 'address', 'type': 'str'}, - 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, } - def __init__(self, *, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: - super(HDInsightProperties, self).__init__(**kwargs) - self.ssh_port = ssh_port - self.address = address - self.administrator_account = administrator_account + def __init__(self, **kwargs) -> None: + super(ComputeNodesInformation, self).__init__(**kwargs) + self.next_link = None + self.compute_type = None -class Identity(Model): - """Identity for the resource. +class Resource(Model): + """Azure Resource Manager resource envelope. Variables are only populated by the server, and will be ignored when sending a request. - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: The identity type. Possible values include: 'SystemAssigned' - :type type: str or - ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData """ _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + '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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, type=None, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type - - -class ListWorkspaceKeysResult(Model): + 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 = identity + self.location = location + self.type = None + self.tags = tags + self.sku = sku + self.system_data = None + + +class ComputeResource(Resource): + """Machine Learning compute object wrapped into ARM resource envelope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :param properties: Compute properties + :type properties: ~azure.mgmt.machinelearningservices.models.Compute + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'Compute'}, + } + + 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 + + +class ContainerRegistry(Model): + """ContainerRegistry. + + :param address: + :type address: str + :param username: + :type username: str + :param password: + :type password: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, username: str=None, password: str=None, **kwargs) -> None: + super(ContainerRegistry, self).__init__(**kwargs) + self.address = address + self.username = username + self.password = password + + +class ContainerRegistryResponse(Model): + """ContainerRegistryResponse. + + :param address: + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, **kwargs) -> None: + super(ContainerRegistryResponse, self).__init__(**kwargs) + self.address = address + + +class ContainerResourceRequirements(Model): + """The resource requirements for the container (cpu and memory). + + :param cpu: The minimum amount of CPU cores to be used by the container. + More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu: float + :param cpu_limit: The maximum amount of CPU cores allowed to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type cpu_limit: float + :param memory_in_gb: The minimum amount of memory (in GB) to be used by + the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb: float + :param memory_in_gb_limit: The maximum amount of memory (in GB) allowed to + be used by the container. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + :type memory_in_gb_limit: float + :param gpu: The number of GPU cores in the container. + :type gpu: int + :param fpga: The number of FPGA PCIE devices exposed to the container. + Must be multiple of 2. + :type fpga: int + """ + + _attribute_map = { + 'cpu': {'key': 'cpu', 'type': 'float'}, + 'cpu_limit': {'key': 'cpuLimit', 'type': 'float'}, + 'memory_in_gb': {'key': 'memoryInGB', 'type': 'float'}, + 'memory_in_gb_limit': {'key': 'memoryInGBLimit', 'type': 'float'}, + 'gpu': {'key': 'gpu', 'type': 'int'}, + 'fpga': {'key': 'fpga', 'type': 'int'}, + } + + def __init__(self, *, cpu: float=None, cpu_limit: float=None, memory_in_gb: float=None, memory_in_gb_limit: float=None, gpu: int=None, fpga: int=None, **kwargs) -> None: + super(ContainerResourceRequirements, self).__init__(**kwargs) + self.cpu = cpu + self.cpu_limit = cpu_limit + self.memory_in_gb = memory_in_gb + self.memory_in_gb_limit = memory_in_gb_limit + self.gpu = gpu + self.fpga = fpga + + +class CosmosDbSettings(Model): + """CosmosDbSettings. + + :param collections_throughput: The throughput of the collections in + cosmosdb database + :type collections_throughput: int + """ + + _attribute_map = { + 'collections_throughput': {'key': 'collectionsThroughput', 'type': 'int'}, + } + + def __init__(self, *, collections_throughput: int=None, **kwargs) -> None: + super(CosmosDbSettings, self).__init__(**kwargs) + self.collections_throughput = collections_throughput + + +class EnvironmentImageRequest(Model): + """Request to create a Docker image based on Environment. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageRequestEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageRequestEnvironmentReference'}, + } + + def __init__(self, *, driver_program: str=None, assets=None, model_ids=None, models_property=None, environment=None, environment_reference=None, **kwargs) -> None: + super(EnvironmentImageRequest, self).__init__(**kwargs) + self.driver_program = driver_program + self.assets = assets + self.model_ids = model_ids + self.models_property = models_property + self.environment = environment + self.environment_reference = environment_reference + + +class CreateServiceRequestEnvironmentImageRequest(EnvironmentImageRequest): + """The Environment, models and assets needed for inferencing. + + :param driver_program: The name of the driver file. + :type driver_program: str + :param assets: The list of assets. + :type assets: list[~azure.mgmt.machinelearningservices.models.ImageAsset] + :param model_ids: The list of model Ids. + :type model_ids: list[str] + :param models_property: The list of models. + :type models_property: + list[~azure.mgmt.machinelearningservices.models.Model] + :param environment: The details of the AZURE ML environment. + :type environment: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironment + :param environment_reference: The unique identifying details of the AZURE + ML environment. + :type environment_reference: + ~azure.mgmt.machinelearningservices.models.EnvironmentImageRequestEnvironmentReference + """ + + _attribute_map = { + 'driver_program': {'key': 'driverProgram', 'type': 'str'}, + 'assets': {'key': 'assets', 'type': '[ImageAsset]'}, + 'model_ids': {'key': 'modelIds', 'type': '[str]'}, + 'models_property': {'key': 'models', 'type': '[Model]'}, + 'environment': {'key': 'environment', 'type': 'EnvironmentImageRequestEnvironment'}, + 'environment_reference': {'key': 'environmentReference', 'type': 'EnvironmentImageRequestEnvironmentReference'}, + } + + def __init__(self, *, driver_program: str=None, assets=None, model_ids=None, models_property=None, environment=None, environment_reference=None, **kwargs) -> None: + super(CreateServiceRequestEnvironmentImageRequest, self).__init__(driver_program=driver_program, assets=assets, model_ids=model_ids, models_property=models_property, environment=environment, environment_reference=environment_reference, **kwargs) + + +class CreateServiceRequestKeys(AuthKeys): + """The authentication keys. + + :param primary_key: The primary key. + :type primary_key: str + :param secondary_key: The secondary key. + :type secondary_key: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, *, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + super(CreateServiceRequestKeys, self).__init__(primary_key=primary_key, secondary_key=secondary_key, **kwargs) + + +class Databricks(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DatabricksProperties + """ + + _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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DatabricksProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(Databricks, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'Databricks' + + +class DatabricksComputeSecrets(ComputeSecrets): + """Secrets related to a Machine Learning compute based on Databricks. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param databricks_access_token: access token for databricks account. + :type databricks_access_token: str + """ + + _validation = { + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + } + + def __init__(self, *, databricks_access_token: str=None, **kwargs) -> None: + super(DatabricksComputeSecrets, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + self.compute_type = 'Databricks' + + +class DatabricksProperties(Model): + """DatabricksProperties. + + :param databricks_access_token: Databricks access token + :type databricks_access_token: str + :param workspace_url: Workspace Url + :type workspace_url: str + """ + + _attribute_map = { + 'databricks_access_token': {'key': 'databricksAccessToken', 'type': 'str'}, + 'workspace_url': {'key': 'workspaceUrl', 'type': 'str'}, + } + + def __init__(self, *, databricks_access_token: str=None, workspace_url: str=None, **kwargs) -> None: + super(DatabricksProperties, self).__init__(**kwargs) + self.databricks_access_token = databricks_access_token + self.workspace_url = workspace_url + + +class DataFactory(Compute): + """A DataFactory compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + """ + + _validation = { + '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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, **kwargs) -> None: + super(DataFactory, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.compute_type = 'DataFactory' + + +class DataLakeAnalytics(Compute): + """A DataLakeAnalytics compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.DataLakeAnalyticsProperties + """ + + _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'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataLakeAnalyticsProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(DataLakeAnalytics, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'DataLakeAnalytics' + + +class DataLakeAnalyticsProperties(Model): + """DataLakeAnalyticsProperties. + + :param data_lake_store_account_name: DataLake Store Account Name + :type data_lake_store_account_name: str + """ + + _attribute_map = { + 'data_lake_store_account_name': {'key': 'dataLakeStoreAccountName', 'type': 'str'}, + } + + def __init__(self, *, data_lake_store_account_name: str=None, **kwargs) -> None: + super(DataLakeAnalyticsProperties, self).__init__(**kwargs) + self.data_lake_store_account_name = data_lake_store_account_name + + +class DatasetReference(Model): + """The dataset reference object. + + :param name: The name of the dataset reference. + :type name: str + :param id: The id of the dataset reference. + :type id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, id: str=None, **kwargs) -> None: + super(DatasetReference, self).__init__(**kwargs) + self.name = name + self.id = id + + +class EncryptionProperty(Model): + """EncryptionProperty. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Indicates whether or not the encryption is + enabled for the workspace. Possible values include: 'Enabled', 'Disabled' + :type status: str or + ~azure.mgmt.machinelearningservices.models.EncryptionStatus + :param identity: The identity that will be used to access the key vault + for encryption at rest. + :type identity: ~azure.mgmt.machinelearningservices.models.IdentityForCmk + :param key_vault_properties: Required. Customer Key vault properties. + :type key_vault_properties: + ~azure.mgmt.machinelearningservices.models.KeyVaultProperties + """ + + _validation = { + 'status': {'required': True}, + 'key_vault_properties': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityForCmk'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__(self, *, status, key_vault_properties, identity=None, **kwargs) -> None: + super(EncryptionProperty, self).__init__(**kwargs) + self.status = status + self.identity = identity + self.key_vault_properties = key_vault_properties + + +class ModelEnvironmentDefinition(Model): + """ModelEnvironmentDefinition. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionPython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionPython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, python=None, environment_variables=None, docker=None, spark=None, r=None, inferencing_stack_version: str=None, **kwargs) -> None: + super(ModelEnvironmentDefinition, self).__init__(**kwargs) + self.name = name + self.version = version + self.python = python + self.environment_variables = environment_variables + self.docker = docker + self.spark = spark + self.r = r + self.inferencing_stack_version = inferencing_stack_version + + +class EnvironmentImageRequestEnvironment(ModelEnvironmentDefinition): + """The details of the AZURE ML environment. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionPython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionPython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, python=None, environment_variables=None, docker=None, spark=None, r=None, inferencing_stack_version: str=None, **kwargs) -> None: + super(EnvironmentImageRequestEnvironment, self).__init__(name=name, version=version, python=python, environment_variables=environment_variables, docker=docker, spark=spark, r=r, inferencing_stack_version=inferencing_stack_version, **kwargs) + + +class EnvironmentReference(Model): + """EnvironmentReference. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, **kwargs) -> None: + super(EnvironmentReference, self).__init__(**kwargs) + self.name = name + self.version = version + + +class EnvironmentImageRequestEnvironmentReference(EnvironmentReference): + """The unique identifying details of the AZURE ML environment. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, **kwargs) -> None: + super(EnvironmentImageRequestEnvironmentReference, self).__init__(name=name, version=version, **kwargs) + + +class ModelEnvironmentDefinitionResponse(Model): + """ModelEnvironmentDefinitionResponse. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponsePython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionResponsePython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionResponseDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionResponseSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionResponseR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, python=None, environment_variables=None, docker=None, spark=None, r=None, inferencing_stack_version: str=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionResponse, self).__init__(**kwargs) + self.name = name + self.version = version + self.python = python + self.environment_variables = environment_variables + self.docker = docker + self.spark = spark + self.r = r + self.inferencing_stack_version = inferencing_stack_version + + +class EnvironmentImageResponseEnvironment(ModelEnvironmentDefinitionResponse): + """The details of the AZURE ML environment. + + :param name: The name of the environment. + :type name: str + :param version: The environment version. + :type version: str + :param python: Settings for a Python environment. + :type python: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponsePython + :param environment_variables: Definition of environment variables to be + defined in the environment. + :type environment_variables: dict[str, str] + :param docker: The definition of a Docker container. + :type docker: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseDocker + :param spark: The configuration for a Spark environment. + :type spark: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseSpark + :param r: Settings for a R environment. + :type r: + ~azure.mgmt.machinelearningservices.models.ModelEnvironmentDefinitionResponseR + :param inferencing_stack_version: The inferencing stack version added to + the image. To avoid adding an inferencing stack, do not set this value. + Valid values: "latest". + :type inferencing_stack_version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'python': {'key': 'python', 'type': 'ModelEnvironmentDefinitionResponsePython'}, + 'environment_variables': {'key': 'environmentVariables', 'type': '{str}'}, + 'docker': {'key': 'docker', 'type': 'ModelEnvironmentDefinitionResponseDocker'}, + 'spark': {'key': 'spark', 'type': 'ModelEnvironmentDefinitionResponseSpark'}, + 'r': {'key': 'r', 'type': 'ModelEnvironmentDefinitionResponseR'}, + 'inferencing_stack_version': {'key': 'inferencingStackVersion', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, python=None, environment_variables=None, docker=None, spark=None, r=None, inferencing_stack_version: str=None, **kwargs) -> None: + super(EnvironmentImageResponseEnvironment, self).__init__(name=name, version=version, python=python, environment_variables=environment_variables, docker=docker, spark=spark, r=r, inferencing_stack_version=inferencing_stack_version, **kwargs) + + +class EnvironmentImageResponseEnvironmentReference(EnvironmentReference): + """The unique identifying details of the AZURE ML environment. + + :param name: Name of the environment. + :type name: str + :param version: Version of the environment. + :type version: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, version: str=None, **kwargs) -> None: + super(EnvironmentImageResponseEnvironmentReference, self).__init__(name=name, version=version, **kwargs) + + +class ErrorDetail(Model): + """Error detail information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponse(Model): + """Error response information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar target: The target of the particular error + :vartype target: str + :ivar details: An array of error detail objects. + :vartype details: + list[~azure.mgmt.machinelearningservices.models.ErrorDetail] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + + +class EstimatedVMPrice(Model): + """The estimated price info for using a VM of a particular OS type, tier, etc. + + All required parameters must be populated in order to send to Azure. + + :param retail_price: Required. Retail price. The price charged for using + the VM. + :type retail_price: float + :param os_type: Required. OS type. Operating system type used by the VM. + Possible values include: 'Linux', 'Windows' + :type os_type: str or + ~azure.mgmt.machinelearningservices.models.VMPriceOSType + :param vm_tier: Required. VM tier. The type of the VM. Possible values + include: 'Standard', 'LowPriority', 'Spot' + :type vm_tier: str or ~azure.mgmt.machinelearningservices.models.VMTier + """ + + _validation = { + 'retail_price': {'required': True}, + 'os_type': {'required': True}, + 'vm_tier': {'required': True}, + } + + _attribute_map = { + 'retail_price': {'key': 'retailPrice', 'type': 'float'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'vm_tier': {'key': 'vmTier', 'type': 'str'}, + } + + def __init__(self, *, retail_price: float, os_type, vm_tier, **kwargs) -> None: + super(EstimatedVMPrice, self).__init__(**kwargs) + self.retail_price = retail_price + self.os_type = os_type + self.vm_tier = vm_tier + + +class EstimatedVMPrices(Model): + """The estimated price info for using a VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar billing_currency: Required. Billing currency. Three lettered code + specifying the currency of the VM price. Example: USD. Default value: + "USD" . + :vartype billing_currency: str + :ivar unit_of_measure: Required. Unit of time measure. The unit of time + measurement for the specified VM price. Example: OneHour. Default value: + "OneHour" . + :vartype unit_of_measure: str + :param values: Required. List of estimated VM prices. The list of + estimated prices for using a VM of a particular OS type, tier, etc. + :type values: + list[~azure.mgmt.machinelearningservices.models.EstimatedVMPrice] + """ + + _validation = { + 'billing_currency': {'required': True, 'constant': True}, + 'unit_of_measure': {'required': True, 'constant': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'billing_currency': {'key': 'billingCurrency', 'type': 'str'}, + 'unit_of_measure': {'key': 'unitOfMeasure', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[EstimatedVMPrice]'}, + } + + billing_currency = "USD" + + unit_of_measure = "OneHour" + + def __init__(self, *, values, **kwargs) -> None: + super(EstimatedVMPrices, self).__init__(**kwargs) + self.values = values + + +class HDInsight(Compute): + """A HDInsight compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param compute_type: Required. Constant filled by server. + :type compute_type: str + :param properties: + :type properties: + ~azure.mgmt.machinelearningservices.models.HDInsightProperties + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + 'compute_type': {'required': True}, + } + + _attribute_map = { + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'HDInsightProperties'}, + } + + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(HDInsight, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) + self.properties = properties + self.compute_type = 'HDInsight' + + +class HDInsightProperties(Model): + """HDInsightProperties. + + :param ssh_port: Port open for ssh connections on the master node of the + cluster. + :type ssh_port: int + :param address: Public IP address of the master node of the cluster. + :type address: str + :param administrator_account: Admin credentials for master node of the + cluster + :type administrator_account: + ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + """ + + _attribute_map = { + 'ssh_port': {'key': 'sshPort', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + } + + def __init__(self, *, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: + super(HDInsightProperties, self).__init__(**kwargs) + self.ssh_port = ssh_port + self.address = address + self.administrator_account = administrator_account + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: 'SystemAssigned', + 'SystemAssigned,UserAssigned', 'UserAssigned', 'None' + :type type: str or + ~azure.mgmt.machinelearningservices.models.ResourceIdentityType + :param user_assigned_identities: The user assigned identities associated + with the resource. + :type user_assigned_identities: dict[str, + ~azure.mgmt.machinelearningservices.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class IdentityForCmk(Model): + """Identity that will be used to access key vault for encryption at rest. + + :param user_assigned_identity: The ArmId of the user assigned identity + that will be used to access the customer managed key vault + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__(self, *, user_assigned_identity: str=None, **kwargs) -> None: + super(IdentityForCmk, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity + + +class ImageAsset(Model): + """An Image asset. + + :param id: The Asset Id. + :type id: str + :param mime_type: The mime type. + :type mime_type: str + :param url: The Url of the Asset. + :type url: str + :param unpack: Whether the Asset is unpacked. + :type unpack: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + } + + def __init__(self, *, id: str=None, mime_type: str=None, url: str=None, unpack: bool=None, **kwargs) -> None: + super(ImageAsset, self).__init__(**kwargs) + self.id = id + self.mime_type = mime_type + self.url = url + self.unpack = unpack + + +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 ListNotebookKeysResult(Model): + """ListNotebookKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_access_key: + :vartype primary_access_key: str + :ivar secondary_access_key: + :vartype secondary_access_key: str + """ + + _validation = { + 'primary_access_key': {'readonly': True}, + 'secondary_access_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_access_key': {'key': 'primaryAccessKey', 'type': 'str'}, + 'secondary_access_key': {'key': 'secondaryAccessKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListNotebookKeysResult, self).__init__(**kwargs) + self.primary_access_key = None + self.secondary_access_key = None + + +class ListStorageAccountKeysResult(Model): + """ListStorageAccountKeysResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar user_storage_key: + :vartype user_storage_key: str + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ListStorageAccountKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + + +class ListWorkspaceKeysResult(Model): """ListWorkspaceKeysResult. Variables are only populated by the server, and will be ignored when sending a request. - :ivar user_storage_key: - :vartype user_storage_key: str - :ivar user_storage_resource_id: - :vartype user_storage_resource_id: str - :ivar app_insights_instrumentation_key: - :vartype app_insights_instrumentation_key: str - :ivar container_registry_credentials: - :vartype container_registry_credentials: - ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar user_storage_key: + :vartype user_storage_key: str + :ivar user_storage_resource_id: + :vartype user_storage_resource_id: str + :ivar app_insights_instrumentation_key: + :vartype app_insights_instrumentation_key: str + :ivar container_registry_credentials: + :vartype container_registry_credentials: + ~azure.mgmt.machinelearningservices.models.RegistryListCredentialsResult + :ivar notebook_access_keys: + :vartype notebook_access_keys: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult + """ + + _validation = { + 'user_storage_key': {'readonly': True}, + 'user_storage_resource_id': {'readonly': True}, + 'app_insights_instrumentation_key': {'readonly': True}, + 'container_registry_credentials': {'readonly': True}, + 'notebook_access_keys': {'readonly': True}, + } + + _attribute_map = { + 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, + 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, + 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, + 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + 'notebook_access_keys': {'key': 'notebookAccessKeys', 'type': 'ListNotebookKeysResult'}, + } + + def __init__(self, **kwargs) -> None: + super(ListWorkspaceKeysResult, self).__init__(**kwargs) + self.user_storage_key = None + self.user_storage_resource_id = None + self.app_insights_instrumentation_key = None + self.container_registry_credentials = None + self.notebook_access_keys = None + + +class Model(Model): + """An Azure Machine Learning Model. + + All required parameters must be populated in order to send to Azure. + + :param id: The Model Id. + :type id: str + :param name: Required. The Model name. + :type name: str + :param framework: The Model framework. + :type framework: str + :param framework_version: The Model framework version. + :type framework_version: str + :param version: The Model version assigned by Model Management Service. + :type version: long + :param datasets: The list of datasets associated with the model. + :type datasets: + list[~azure.mgmt.machinelearningservices.models.DatasetReference] + :param url: Required. The URL of the Model. Usually a SAS URL. + :type url: str + :param mime_type: Required. The MIME type of Model content. For more + details about MIME type, please open + https://www.iana.org/assignments/media-types/media-types.xhtml + :type mime_type: str + :param description: The Model description text. + :type description: str + :param created_time: The Model creation time (UTC). + :type created_time: datetime + :param modified_time: The Model last modified time (UTC). + :type modified_time: datetime + :param unpack: Indicates whether we need to unpack the Model during docker + Image creation. + :type unpack: bool + :param parent_model_id: The Parent Model Id. + :type parent_model_id: str + :param run_id: The RunId that created this model. + :type run_id: str + :param experiment_name: The name of the experiment where this model was + created. + :type experiment_name: str + :param kv_tags: The Model tag dictionary. Items are mutable. + :type kv_tags: dict[str, str] + :param properties: The Model property dictionary. Properties are + immutable. + :type properties: dict[str, str] + :param derived_model_ids: Models derived from this model + :type derived_model_ids: list[str] + :param sample_input_data: Sample Input Data for the Model. A reference to + a dataset in the workspace in the format aml://dataset/{datasetId} + :type sample_input_data: str + :param sample_output_data: Sample Output Data for the Model. A reference + to a dataset in the workspace in the format aml://dataset/{datasetId} + :type sample_output_data: str + :param resource_requirements: Resource requirements for the model + :type resource_requirements: + ~azure.mgmt.machinelearningservices.models.ContainerResourceRequirements + """ + + _validation = { + 'name': {'required': True}, + 'url': {'required': True}, + 'mime_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'framework': {'key': 'framework', 'type': 'str'}, + 'framework_version': {'key': 'frameworkVersion', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'long'}, + 'datasets': {'key': 'datasets', 'type': '[DatasetReference]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'mime_type': {'key': 'mimeType', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'modified_time': {'key': 'modifiedTime', 'type': 'iso-8601'}, + 'unpack': {'key': 'unpack', 'type': 'bool'}, + 'parent_model_id': {'key': 'parentModelId', 'type': 'str'}, + 'run_id': {'key': 'runId', 'type': 'str'}, + 'experiment_name': {'key': 'experimentName', 'type': 'str'}, + 'kv_tags': {'key': 'kvTags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'derived_model_ids': {'key': 'derivedModelIds', 'type': '[str]'}, + 'sample_input_data': {'key': 'sampleInputData', 'type': 'str'}, + 'sample_output_data': {'key': 'sampleOutputData', 'type': 'str'}, + 'resource_requirements': {'key': 'resourceRequirements', 'type': 'ContainerResourceRequirements'}, + } + + def __init__(self, *, name: str, url: str, mime_type: str, id: str=None, framework: str=None, framework_version: str=None, version: int=None, datasets=None, description: str=None, created_time=None, modified_time=None, unpack: bool=None, parent_model_id: str=None, run_id: str=None, experiment_name: str=None, kv_tags=None, properties=None, derived_model_ids=None, sample_input_data: str=None, sample_output_data: str=None, resource_requirements=None, **kwargs) -> None: + super(Model, self).__init__(**kwargs) + self.id = id + self.name = name + self.framework = framework + self.framework_version = framework_version + self.version = version + self.datasets = datasets + self.url = url + self.mime_type = mime_type + self.description = description + self.created_time = created_time + self.modified_time = modified_time + self.unpack = unpack + self.parent_model_id = parent_model_id + self.run_id = run_id + self.experiment_name = experiment_name + self.kv_tags = kv_tags + self.properties = properties + self.derived_model_ids = derived_model_ids + self.sample_input_data = sample_input_data + self.sample_output_data = sample_output_data + self.resource_requirements = resource_requirements + + +class ModelDockerSection(Model): + """ModelDockerSection. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionBaseImageRegistry'}, + } + + def __init__(self, *, base_image: str=None, base_dockerfile: str=None, base_image_registry=None, **kwargs) -> None: + super(ModelDockerSection, self).__init__(**kwargs) + self.base_image = base_image + self.base_dockerfile = base_dockerfile + self.base_image_registry = base_image_registry + + +class ModelDockerSectionBaseImageRegistry(ContainerRegistry): + """Image registry that contains the base image. + + :param address: + :type address: str + :param username: + :type username: str + :param password: + :type password: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, username: str=None, password: str=None, **kwargs) -> None: + super(ModelDockerSectionBaseImageRegistry, self).__init__(address=address, username=username, password=password, **kwargs) + + +class ModelDockerSectionResponse(Model): + """ModelDockerSectionResponse. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionResponseBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionResponseBaseImageRegistry'}, + } + + def __init__(self, *, base_image: str=None, base_dockerfile: str=None, base_image_registry=None, **kwargs) -> None: + super(ModelDockerSectionResponse, self).__init__(**kwargs) + self.base_image = base_image + self.base_dockerfile = base_dockerfile + self.base_image_registry = base_image_registry + + +class ModelDockerSectionResponseBaseImageRegistry(ContainerRegistryResponse): + """Image registry that contains the base image. + + :param address: + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__(self, *, address: str=None, **kwargs) -> None: + super(ModelDockerSectionResponseBaseImageRegistry, self).__init__(address=address, **kwargs) + + +class ModelEnvironmentDefinitionDocker(ModelDockerSection): + """The definition of a Docker container. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionBaseImageRegistry'}, + } + + def __init__(self, *, base_image: str=None, base_dockerfile: str=None, base_image_registry=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionDocker, self).__init__(base_image=base_image, base_dockerfile=base_dockerfile, base_image_registry=base_image_registry, **kwargs) + + +class ModelPythonSection(Model): + """ModelPythonSection. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, *, interpreter_path: str=None, user_managed_dependencies: bool=None, conda_dependencies=None, base_conda_environment: str=None, **kwargs) -> None: + super(ModelPythonSection, self).__init__(**kwargs) + self.interpreter_path = interpreter_path + self.user_managed_dependencies = user_managed_dependencies + self.conda_dependencies = conda_dependencies + self.base_conda_environment = base_conda_environment + + +class ModelEnvironmentDefinitionPython(ModelPythonSection): + """Settings for a Python environment. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, *, interpreter_path: str=None, user_managed_dependencies: bool=None, conda_dependencies=None, base_conda_environment: str=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionPython, self).__init__(interpreter_path=interpreter_path, user_managed_dependencies=user_managed_dependencies, conda_dependencies=conda_dependencies, base_conda_environment=base_conda_environment, **kwargs) + + +class RSection(Model): + """RSection. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackage] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackage]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, *, r_version: str=None, user_managed: bool=None, rscript_path: str=None, snapshot_date: str=None, cran_packages=None, git_hub_packages=None, custom_url_packages=None, bio_conductor_packages=None, **kwargs) -> None: + super(RSection, self).__init__(**kwargs) + self.r_version = r_version + self.user_managed = user_managed + self.rscript_path = rscript_path + self.snapshot_date = snapshot_date + self.cran_packages = cran_packages + self.git_hub_packages = git_hub_packages + self.custom_url_packages = custom_url_packages + self.bio_conductor_packages = bio_conductor_packages + + +class ModelEnvironmentDefinitionR(RSection): + """Settings for a R environment. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackage] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackage]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, *, r_version: str=None, user_managed: bool=None, rscript_path: str=None, snapshot_date: str=None, cran_packages=None, git_hub_packages=None, custom_url_packages=None, bio_conductor_packages=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionR, self).__init__(r_version=r_version, user_managed=user_managed, rscript_path=rscript_path, snapshot_date=snapshot_date, cran_packages=cran_packages, git_hub_packages=git_hub_packages, custom_url_packages=custom_url_packages, bio_conductor_packages=bio_conductor_packages, **kwargs) + + +class ModelEnvironmentDefinitionResponseDocker(ModelDockerSectionResponse): + """The definition of a Docker container. + + :param base_image: Base image used for Docker-based runs. Mutually + exclusive with BaseDockerfile. + :type base_image: str + :param base_dockerfile: Base Dockerfile used for Docker-based runs. + Mutually exclusive with BaseImage. + :type base_dockerfile: str + :param base_image_registry: Image registry that contains the base image. + :type base_image_registry: + ~azure.mgmt.machinelearningservices.models.ModelDockerSectionResponseBaseImageRegistry + """ + + _attribute_map = { + 'base_image': {'key': 'baseImage', 'type': 'str'}, + 'base_dockerfile': {'key': 'baseDockerfile', 'type': 'str'}, + 'base_image_registry': {'key': 'baseImageRegistry', 'type': 'ModelDockerSectionResponseBaseImageRegistry'}, + } + + def __init__(self, *, base_image: str=None, base_dockerfile: str=None, base_image_registry=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionResponseDocker, self).__init__(base_image=base_image, base_dockerfile=base_dockerfile, base_image_registry=base_image_registry, **kwargs) + + +class ModelEnvironmentDefinitionResponsePython(ModelPythonSection): + """Settings for a Python environment. + + :param interpreter_path: The python interpreter path to use if an + environment build is not required. The path specified gets used to call + the user script. + :type interpreter_path: str + :param user_managed_dependencies: True means that AzureML reuses an + existing python environment; False means that AzureML will create a python + environment based on the Conda dependencies specification. + :type user_managed_dependencies: bool + :param conda_dependencies: A JObject containing Conda dependencies. + :type conda_dependencies: object + :param base_conda_environment: + :type base_conda_environment: str + """ + + _attribute_map = { + 'interpreter_path': {'key': 'interpreterPath', 'type': 'str'}, + 'user_managed_dependencies': {'key': 'userManagedDependencies', 'type': 'bool'}, + 'conda_dependencies': {'key': 'condaDependencies', 'type': 'object'}, + 'base_conda_environment': {'key': 'baseCondaEnvironment', 'type': 'str'}, + } + + def __init__(self, *, interpreter_path: str=None, user_managed_dependencies: bool=None, conda_dependencies=None, base_conda_environment: str=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionResponsePython, self).__init__(interpreter_path=interpreter_path, user_managed_dependencies=user_managed_dependencies, conda_dependencies=conda_dependencies, base_conda_environment=base_conda_environment, **kwargs) + + +class RSectionResponse(Model): + """RSectionResponse. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackageResponse] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackageResponse]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, *, r_version: str=None, user_managed: bool=None, rscript_path: str=None, snapshot_date: str=None, cran_packages=None, git_hub_packages=None, custom_url_packages=None, bio_conductor_packages=None, **kwargs) -> None: + super(RSectionResponse, self).__init__(**kwargs) + self.r_version = r_version + self.user_managed = user_managed + self.rscript_path = rscript_path + self.snapshot_date = snapshot_date + self.cran_packages = cran_packages + self.git_hub_packages = git_hub_packages + self.custom_url_packages = custom_url_packages + self.bio_conductor_packages = bio_conductor_packages + + +class ModelEnvironmentDefinitionResponseR(RSectionResponse): + """Settings for a R environment. + + :param r_version: The version of R to be installed + :type r_version: str + :param user_managed: Indicates whether the environment is managed by user + or by AzureML. + :type user_managed: bool + :param rscript_path: The Rscript path to use if an environment build is + not required. + The path specified gets used to call the user script. + :type rscript_path: str + :param snapshot_date: Date of MRAN snapshot to use in YYYY-MM-DD format, + e.g. "2019-04-17" + :type snapshot_date: str + :param cran_packages: The CRAN packages to use. + :type cran_packages: + list[~azure.mgmt.machinelearningservices.models.RCranPackage] + :param git_hub_packages: The packages directly from GitHub. + :type git_hub_packages: + list[~azure.mgmt.machinelearningservices.models.RGitHubPackageResponse] + :param custom_url_packages: The packages from custom urls. + :type custom_url_packages: list[str] + :param bio_conductor_packages: The packages from Bioconductor. + :type bio_conductor_packages: list[str] + """ + + _attribute_map = { + 'r_version': {'key': 'rVersion', 'type': 'str'}, + 'user_managed': {'key': 'userManaged', 'type': 'bool'}, + 'rscript_path': {'key': 'rscriptPath', 'type': 'str'}, + 'snapshot_date': {'key': 'snapshotDate', 'type': 'str'}, + 'cran_packages': {'key': 'cranPackages', 'type': '[RCranPackage]'}, + 'git_hub_packages': {'key': 'gitHubPackages', 'type': '[RGitHubPackageResponse]'}, + 'custom_url_packages': {'key': 'customUrlPackages', 'type': '[str]'}, + 'bio_conductor_packages': {'key': 'bioConductorPackages', 'type': '[str]'}, + } + + def __init__(self, *, r_version: str=None, user_managed: bool=None, rscript_path: str=None, snapshot_date: str=None, cran_packages=None, git_hub_packages=None, custom_url_packages=None, bio_conductor_packages=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionResponseR, self).__init__(r_version=r_version, user_managed=user_managed, rscript_path=rscript_path, snapshot_date=snapshot_date, cran_packages=cran_packages, git_hub_packages=git_hub_packages, custom_url_packages=custom_url_packages, bio_conductor_packages=bio_conductor_packages, **kwargs) + + +class ModelSparkSection(Model): + """ModelSparkSection. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, *, repositories=None, packages=None, precache_packages: bool=None, **kwargs) -> None: + super(ModelSparkSection, self).__init__(**kwargs) + self.repositories = repositories + self.packages = packages + self.precache_packages = precache_packages + + +class ModelEnvironmentDefinitionResponseSpark(ModelSparkSection): + """The configuration for a Spark environment. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, *, repositories=None, packages=None, precache_packages: bool=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionResponseSpark, self).__init__(repositories=repositories, packages=packages, precache_packages=precache_packages, **kwargs) + + +class ModelEnvironmentDefinitionSpark(ModelSparkSection): + """The configuration for a Spark environment. + + :param repositories: The list of spark repositories. + :type repositories: list[str] + :param packages: The Spark packages to use. + :type packages: + list[~azure.mgmt.machinelearningservices.models.SparkMavenPackage] + :param precache_packages: Whether to precache the packages. + :type precache_packages: bool + """ + + _attribute_map = { + 'repositories': {'key': 'repositories', 'type': '[str]'}, + 'packages': {'key': 'packages', 'type': '[SparkMavenPackage]'}, + 'precache_packages': {'key': 'precachePackages', 'type': 'bool'}, + } + + def __init__(self, *, repositories=None, packages=None, precache_packages: bool=None, **kwargs) -> None: + super(ModelEnvironmentDefinitionSpark, self).__init__(repositories=repositories, packages=packages, precache_packages=precache_packages, **kwargs) + + +class NodeStateCounts(Model): + """Counts of various compute node states on the amlCompute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar idle_node_count: Idle node count. Number of compute nodes in idle + state. + :vartype idle_node_count: int + :ivar running_node_count: Running node count. Number of compute nodes + which are running jobs. + :vartype running_node_count: int + :ivar preparing_node_count: Preparing node count. Number of compute nodes + which are being prepared. + :vartype preparing_node_count: int + :ivar unusable_node_count: Unusable node count. Number of compute nodes + which are in unusable state. + :vartype unusable_node_count: int + :ivar leaving_node_count: Leaving node count. Number of compute nodes + which are leaving the amlCompute. + :vartype leaving_node_count: int + :ivar preempted_node_count: Preempted node count. Number of compute nodes + which are in preempted state. + :vartype preempted_node_count: int + """ + + _validation = { + 'idle_node_count': {'readonly': True}, + 'running_node_count': {'readonly': True}, + 'preparing_node_count': {'readonly': True}, + 'unusable_node_count': {'readonly': True}, + 'leaving_node_count': {'readonly': True}, + 'preempted_node_count': {'readonly': True}, + } + + _attribute_map = { + 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, + 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, + 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, + 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, + 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, + 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(NodeStateCounts, self).__init__(**kwargs) + self.idle_node_count = None + self.running_node_count = None + self.preparing_node_count = None + self.unusable_node_count = None + self.leaving_node_count = None + self.preempted_node_count = None + + +class NotebookAccessTokenResult(Model): + """NotebookAccessTokenResult. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar notebook_resource_id: + :vartype notebook_resource_id: str + :ivar host_name: + :vartype host_name: str + :ivar public_dns: + :vartype public_dns: str + :ivar access_token: + :vartype access_token: str + :ivar token_type: + :vartype token_type: str + :ivar expires_in: + :vartype expires_in: int + :ivar refresh_token: + :vartype refresh_token: str + :ivar scope: + :vartype scope: str + """ + + _validation = { + 'notebook_resource_id': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_dns': {'readonly': True}, + 'access_token': {'readonly': True}, + 'token_type': {'readonly': True}, + 'expires_in': {'readonly': True}, + 'refresh_token': {'readonly': True}, + 'scope': {'readonly': True}, + } + + _attribute_map = { + 'notebook_resource_id': {'key': 'notebookResourceId', 'type': 'str'}, + 'host_name': {'key': 'hostName', 'type': 'str'}, + 'public_dns': {'key': 'publicDns', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'token_type': {'key': 'tokenType', 'type': 'str'}, + 'expires_in': {'key': 'expiresIn', 'type': 'int'}, + 'refresh_token': {'key': 'refreshToken', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NotebookAccessTokenResult, self).__init__(**kwargs) + self.notebook_resource_id = None + self.host_name = None + self.public_dns = None + self.access_token = None + self.token_type = None + self.expires_in = None + self.refresh_token = None + self.scope = None + + +class NotebookPreparationError(Model): + """NotebookPreparationError. + + :param error_message: + :type error_message: str + :param status_code: + :type status_code: int + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'int'}, + } + + def __init__(self, *, error_message: str=None, status_code: int=None, **kwargs) -> None: + super(NotebookPreparationError, self).__init__(**kwargs) + self.error_message = error_message + self.status_code = status_code + + +class NotebookResourceInfo(Model): + """NotebookResourceInfo. + + :param fqdn: + :type fqdn: str + :param resource_id: the data plane resourceId that used to initialize + notebook component + :type resource_id: str + :param notebook_preparation_error: The error that occurs when preparing + notebook. + :type notebook_preparation_error: + ~azure.mgmt.machinelearningservices.models.NotebookPreparationError + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'notebook_preparation_error': {'key': 'notebookPreparationError', 'type': 'NotebookPreparationError'}, + } + + def __init__(self, *, fqdn: str=None, resource_id: str=None, notebook_preparation_error=None, **kwargs) -> None: + super(NotebookResourceInfo, self).__init__(**kwargs) + self.fqdn = fqdn + self.resource_id = resource_id + self.notebook_preparation_error = notebook_preparation_error + + +class Operation(Model): + """Azure Machine Learning workspace REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: Display name of operation + :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """Display name of operation. + + :param provider: The resource provider name: + Microsoft.MachineLearningExperimentation + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class Password(Model): + """Password. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: + :vartype name: str + :ivar value: + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Password, self).__init__(**kwargs) + self.name = None + self.value = None + + +class PersonalComputeInstanceSettings(Model): + """Settings for a personal compute instance. + + :param assigned_user: Assigned User. A user explicitly assigned to a + personal compute instance. + :type assigned_user: + ~azure.mgmt.machinelearningservices.models.AssignedUser + """ + + _attribute_map = { + 'assigned_user': {'key': 'assignedUser', 'type': 'AssignedUser'}, + } + + def __init__(self, *, assigned_user=None, **kwargs) -> None: + super(PersonalComputeInstanceSettings, self).__init__(**kwargs) + self.assigned_user = assigned_user + + +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + :ivar subnet_arm_id: The ARM identifier for Subnet resource that private + endpoint links to + :vartype subnet_arm_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'subnet_arm_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet_arm_id': {'key': 'subnetArmId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + self.subnet_arm_id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :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 = { - 'user_storage_key': {'readonly': True}, - 'user_storage_resource_id': {'readonly': True}, - 'app_insights_instrumentation_key': {'readonly': True}, - 'container_registry_credentials': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'private_link_service_connection_state': {'required': True}, } _attribute_map = { - 'user_storage_key': {'key': 'userStorageKey', 'type': 'str'}, - 'user_storage_resource_id': {'key': 'userStorageResourceId', 'type': 'str'}, - 'app_insights_instrumentation_key': {'key': 'appInsightsInstrumentationKey', 'type': 'str'}, - 'container_registry_credentials': {'key': 'containerRegistryCredentials', 'type': 'RegistryListCredentialsResult'}, + '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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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) -> 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 + 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 MachineLearningServiceError(Model): - """Wrapper for error response to follow ARM guidelines. +class PrivateLinkResource(Resource): + """A private link resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar error: The error response. - :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + :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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :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 = { - 'error': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + '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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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) -> None: - super(MachineLearningServiceError, self).__init__(**kwargs) - self.error = None + 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 MachineLearningServiceErrorException(HttpOperationError): - """Server responsed with exception of type: 'MachineLearningServiceError'. +class PrivateLinkResourceListResult(Model): + """A list of private link resources. - :param deserialize: A deserializer - :param response: Server response to be deserialized. + :param value: Array of private link resources + :type value: + list[~azure.mgmt.machinelearningservices.models.PrivateLinkResource] """ - def __init__(self, deserialize, response, *args): + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } - super(MachineLearningServiceErrorException, self).__init__(deserialize, response, 'MachineLearningServiceError', *args) + def __init__(self, *, value=None, **kwargs) -> None: + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value -class NodeStateCounts(Model): - """Counts of various compute node states on the amlCompute. +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] + :param location: Region of workspace quota to be updated. + :type location: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[QuotaBaseProperties]'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, value=None, location: str=None, **kwargs) -> None: + super(QuotaUpdateParameters, self).__init__(**kwargs) + self.value = value + self.location = location + + +class RCranPackage(Model): + """RCranPackage. + + :param name: The package name. + :type name: str + :param repository: The repository name. + :type repository: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, repository: str=None, **kwargs) -> None: + super(RCranPackage, self).__init__(**kwargs) + self.name = name + self.repository = repository + + +class RegistryListCredentialsResult(Model): + """RegistryListCredentialsResult. Variables are only populated by the server, and will be ignored when sending a request. - :ivar idle_node_count: Idle node count. Number of compute nodes in idle - state. - :vartype idle_node_count: int - :ivar running_node_count: Running node count. Number of compute nodes - which are running jobs. - :vartype running_node_count: int - :ivar preparing_node_count: Preparing node count. Number of compute nodes - which are being prepared. - :vartype preparing_node_count: int - :ivar unusable_node_count: Unusable node count. Number of compute nodes - which are in unusable state. - :vartype unusable_node_count: int - :ivar leaving_node_count: Leaving node count. Number of compute nodes - which are leaving the amlCompute. - :vartype leaving_node_count: int - :ivar preempted_node_count: Preempted node count. Number of compute nodes - which are in preempted state. - :vartype preempted_node_count: int + :ivar location: + :vartype location: str + :ivar username: + :vartype username: str + :param passwords: + :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] """ _validation = { - 'idle_node_count': {'readonly': True}, - 'running_node_count': {'readonly': True}, - 'preparing_node_count': {'readonly': True}, - 'unusable_node_count': {'readonly': True}, - 'leaving_node_count': {'readonly': True}, - 'preempted_node_count': {'readonly': True}, + 'location': {'readonly': True}, + 'username': {'readonly': True}, } _attribute_map = { - 'idle_node_count': {'key': 'idleNodeCount', 'type': 'int'}, - 'running_node_count': {'key': 'runningNodeCount', 'type': 'int'}, - 'preparing_node_count': {'key': 'preparingNodeCount', 'type': 'int'}, - 'unusable_node_count': {'key': 'unusableNodeCount', 'type': 'int'}, - 'leaving_node_count': {'key': 'leavingNodeCount', 'type': 'int'}, - 'preempted_node_count': {'key': 'preemptedNodeCount', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[Password]'}, + } + + def __init__(self, *, passwords=None, **kwargs) -> None: + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.location = None + self.username = None + self.passwords = passwords + + +class ResourceId(Model): + """Represents a resource ID. For example, for a subnet, it is the resource URL + for the subnet. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ResourceId, self).__init__(**kwargs) + self.id = id + + +class ResourceName(Model): + """The Resource Name. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The name of the resource. + :vartype value: str + :ivar localized_value: The localized name of the resource. + :vartype localized_value: str + """ + + _validation = { + 'value': {'readonly': True}, + 'localized_value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, } def __init__(self, **kwargs) -> None: - super(NodeStateCounts, self).__init__(**kwargs) - self.idle_node_count = None - self.running_node_count = None - self.preparing_node_count = None - self.unusable_node_count = None - self.leaving_node_count = None - self.preempted_node_count = None + super(ResourceName, self).__init__(**kwargs) + self.value = None + self.localized_value = None -class Operation(Model): - """Azure Machine Learning workspace REST API operation. +class ResourceQuota(Model): + """The quota assigned to a resource. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display name of operation - :type display: ~azure.mgmt.machinelearningservices.models.OperationDisplay + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str + :ivar type: Specifies the resource type. + :vartype type: str + :ivar name: Name of the resource. + :vartype name: ~azure.mgmt.machinelearningservices.models.ResourceName + :ivar limit: Limit. The maximum permitted quota of the resource. + :vartype limit: long + :ivar unit: An enum describing the unit of quota measurement. Possible + values include: 'Count' + :vartype unit: str or ~azure.mgmt.machinelearningservices.models.QuotaUnit """ + _validation = { + 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, + 'type': {'readonly': True}, + 'name': {'readonly': True}, + 'limit': {'readonly': True}, + 'unit': {'readonly': True}, + } + _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'ResourceName'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, } - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display + def __init__(self, **kwargs) -> None: + super(ResourceQuota, self).__init__(**kwargs) + self.id = None + self.aml_workspace_location = None + self.type = None + self.name = None + self.limit = None + self.unit = None -class OperationDisplay(Model): - """Display name of operation. +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. - :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 + 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 = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, } - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None -class Password(Model): - """Password. +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: - :vartype name: str - :ivar value: - :vartype value: str + :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}, - 'value': {'readonly': True}, + 'capabilities': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, } def __init__(self, **kwargs) -> None: - super(Password, self).__init__(**kwargs) + super(ResourceSkuZoneDetails, self).__init__(**kwargs) self.name = None - self.value = None + self.capabilities = None -class RegistryListCredentialsResult(Model): - """RegistryListCredentialsResult. +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 location: - :vartype location: str - :ivar username: - :vartype username: str - :param passwords: - :type passwords: list[~azure.mgmt.machinelearningservices.models.Password] + :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 = { - 'location': {'readonly': True}, - 'username': {'readonly': True}, + 'type': {'readonly': True}, + 'values': {'readonly': True}, } _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'username': {'key': 'username', 'type': 'str'}, - 'passwords': {'key': 'passwords', 'type': '[Password]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, } - def __init__(self, *, passwords=None, **kwargs) -> None: - super(RegistryListCredentialsResult, self).__init__(**kwargs) - self.location = None - self.username = None - self.passwords = passwords - + 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 ResourceId(Model): - """Represents a resource ID. For example, for a subnet, it is the resource URL - for the subnet. - All required parameters must be populated in order to send to Azure. +class RGitHubPackage(Model): + """RGitHubPackage. - :param id: Required. The ID of the resource - :type id: str + :param repository: Repository address in the format + username/repo[/subdir][@ref|#pull]. + :type repository: str + :param auth_token: Personal access token to install from a private repo + :type auth_token: str """ - _validation = { - 'id': {'required': True}, + _attribute_map = { + 'repository': {'key': 'repository', 'type': 'str'}, + 'auth_token': {'key': 'authToken', 'type': 'str'}, } + def __init__(self, *, repository: str=None, auth_token: str=None, **kwargs) -> None: + super(RGitHubPackage, self).__init__(**kwargs) + self.repository = repository + self.auth_token = auth_token + + +class RGitHubPackageResponse(Model): + """RGitHubPackageResponse. + + :param repository: Repository address in the format + username/repo[/subdir][@ref|#pull]. + :type repository: str + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'str'}, } - def __init__(self, *, id: str, **kwargs) -> None: - super(ResourceId, self).__init__(**kwargs) - self.id = id + def __init__(self, *, repository: str=None, **kwargs) -> None: + super(RGitHubPackageResponse, self).__init__(**kwargs) + self.repository = repository class ScaleSettings(Model): @@ -1397,7 +5216,7 @@ class ScaleSettings(Model): :param min_node_count: Min number of nodes to use. Default value: 0 . :type min_node_count: int :param node_idle_time_before_scale_down: Node Idle Time before scaling - down amlCompute + down amlCompute. This string needs to be in the RFC Format. :type node_idle_time_before_scale_down: timedelta """ @@ -1418,6 +5237,75 @@ def __init__(self, *, max_node_count: int, min_node_count: int=0, node_idle_time self.node_idle_time_before_scale_down = node_idle_time_before_scale_down +class ScriptReference(Model): + """Script reference. + + :param script_source: The storage source of the script: inline, workspace. + :type script_source: str + :param script_data: The location of scripts in the mounted volume. + :type script_data: str + :param script_arguments: Optional command line arguments passed to the + script to run. + :type script_arguments: str + :param timeout: Optional time period passed to timeout command. + :type timeout: str + """ + + _attribute_map = { + 'script_source': {'key': 'scriptSource', 'type': 'str'}, + 'script_data': {'key': 'scriptData', 'type': 'str'}, + 'script_arguments': {'key': 'scriptArguments', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'str'}, + } + + def __init__(self, *, script_source: str=None, script_data: str=None, script_arguments: str=None, timeout: str=None, **kwargs) -> None: + super(ScriptReference, self).__init__(**kwargs) + self.script_source = script_source + self.script_data = script_data + self.script_arguments = script_arguments + self.timeout = timeout + + +class ScriptsToExecute(Model): + """Customized setup scripts. + + :param startup_script: Script that's run every time the machine starts. + :type startup_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + :param creation_script: Script that's run only once during provision of + the compute. + :type creation_script: + ~azure.mgmt.machinelearningservices.models.ScriptReference + """ + + _attribute_map = { + 'startup_script': {'key': 'startupScript', 'type': 'ScriptReference'}, + 'creation_script': {'key': 'creationScript', 'type': 'ScriptReference'}, + } + + def __init__(self, *, startup_script=None, creation_script=None, **kwargs) -> None: + super(ScriptsToExecute, self).__init__(**kwargs) + self.startup_script = startup_script + self.creation_script = creation_script + + +class ServiceManagedResourcesSettings(Model): + """ServiceManagedResourcesSettings. + + :param cosmos_db: The settings for the service managed cosmosdb account. + :type cosmos_db: + ~azure.mgmt.machinelearningservices.models.CosmosDbSettings + """ + + _attribute_map = { + 'cosmos_db': {'key': 'cosmosDb', 'type': 'CosmosDbSettings'}, + } + + def __init__(self, *, cosmos_db=None, **kwargs) -> None: + super(ServiceManagedResourcesSettings, self).__init__(**kwargs) + self.cosmos_db = cosmos_db + + class ServicePrincipalCredentials(Model): """Service principal credentials. @@ -1429,27 +5317,217 @@ class ServicePrincipalCredentials(Model): :type client_secret: str """ - _validation = { - 'client_id': {'required': True}, - 'client_secret': {'required': True}, - } + _validation = { + 'client_id': {'required': True}, + 'client_secret': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str, client_secret: str, **kwargs) -> None: + super(ServicePrincipalCredentials, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + + +class ServiceResource(Resource): + """Machine Learning service object wrapped into ARM resource envelope. + + 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData + :param properties: Service properties + :type properties: + ~azure.mgmt.machinelearningservices.models.ServiceResponseBase + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'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'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ServiceResponseBase'}, + } + + def __init__(self, *, identity=None, location: str=None, tags=None, sku=None, properties=None, **kwargs) -> None: + super(ServiceResource, self).__init__(identity=identity, location=location, tags=tags, sku=sku, **kwargs) + self.properties = properties + + +class ServiceResponseBaseError(MachineLearningServiceError): + """The error details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: The error response. + :vartype error: ~azure.mgmt.machinelearningservices.models.ErrorResponse + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceResponseBaseError, self).__init__(**kwargs) + + +class SetupScripts(Model): + """Details of customized scripts to execute for setting up the cluster. + + :param scripts: Customized setup scripts + :type scripts: ~azure.mgmt.machinelearningservices.models.ScriptsToExecute + """ + + _attribute_map = { + 'scripts': {'key': 'scripts', 'type': 'ScriptsToExecute'}, + } + + def __init__(self, *, scripts=None, **kwargs) -> None: + super(SetupScripts, self).__init__(**kwargs) + self.scripts = scripts + + +class SharedPrivateLinkResource(Model): + """SharedPrivateLinkResource. + + :param name: Unique name of the private link. + :type name: str + :param private_link_resource_id: The resource id that private link links + to. + :type private_link_resource_id: str + :param group_id: The private link resource group id. + :type group_id: str + :param request_message: Request message. + :type request_message: str + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + :type status: str or + ~azure.mgmt.machinelearningservices.models.PrivateEndpointServiceConnectionStatus + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, private_link_resource_id: str=None, group_id: str=None, request_message: str=None, status=None, **kwargs) -> None: + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.name = name + self.private_link_resource_id = private_link_resource_id + self.group_id = group_id + self.request_message = request_message + self.status = status + + +class Sku(Model): + """Sku of the resource. + + :param name: Name of the sku + :type name: str + :param tier: Tier of the sku like Basic or Enterprise + :type tier: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, tier: str=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class SKUCapability(Model): + """Features/user capabilities associated with the sku. + + :param name: Capability/Feature ID + :type name: str + :param value: Details about the feature/capability + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(SKUCapability, self).__init__(**kwargs) + self.name = name + self.value = value + + +class SparkMavenPackage(Model): + """SparkMavenPackage. + + :param group: + :type group: str + :param artifact: + :type artifact: str + :param version: + :type version: str + """ _attribute_map = { - 'client_id': {'key': 'clientId', 'type': 'str'}, - 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'group': {'key': 'group', 'type': 'str'}, + 'artifact': {'key': 'artifact', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, *, client_id: str, client_secret: str, **kwargs) -> None: - super(ServicePrincipalCredentials, self).__init__(**kwargs) - self.client_id = client_id - self.client_secret = client_secret + def __init__(self, *, group: str=None, artifact: str=None, version: str=None, **kwargs) -> None: + super(SparkMavenPackage, self).__init__(**kwargs) + self.group = group + self.artifact = artifact + self.version = version class SslConfiguration(Model): """The ssl configuration for scoring. :param status: Enable or disable ssl for scoring. Possible values include: - 'Disabled', 'Enabled' + 'Disabled', 'Enabled', 'Auto' :type status: str or ~azure.mgmt.machinelearningservices.models.enum :param cert: Cert data :type cert: str @@ -1457,6 +5535,11 @@ class SslConfiguration(Model): :type key: str :param cname: CNAME of the cert :type cname: str + :param leaf_domain_label: Leaf domain label of public endpoint + :type leaf_domain_label: str + :param overwrite_existing_domain: Indicates whether to overwrite existing + domain label. + :type overwrite_existing_domain: bool """ _attribute_map = { @@ -1464,14 +5547,217 @@ class SslConfiguration(Model): 'cert': {'key': 'cert', 'type': 'str'}, 'key': {'key': 'key', 'type': 'str'}, 'cname': {'key': 'cname', 'type': 'str'}, + 'leaf_domain_label': {'key': 'leafDomainLabel', 'type': 'str'}, + 'overwrite_existing_domain': {'key': 'overwriteExistingDomain', 'type': 'bool'}, } - def __init__(self, *, status=None, cert: str=None, key: str=None, cname: str=None, **kwargs) -> None: + def __init__(self, *, status=None, cert: str=None, key: str=None, cname: str=None, leaf_domain_label: str=None, overwrite_existing_domain: bool=None, **kwargs) -> None: super(SslConfiguration, self).__init__(**kwargs) self.status = status self.cert = cert self.key = key self.cname = cname + self.leaf_domain_label = leaf_domain_label + self.overwrite_existing_domain = overwrite_existing_domain + + +class SynapseSpark(Model): + """A SynapseSpark compute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param compute_type: Required. The type of compute. Possible values + include: 'AKS', 'AmlCompute', 'ComputeInstance', 'DataFactory', + 'VirtualMachine', 'HDInsight', 'Databricks', 'DataLakeAnalytics', + 'SynapseSpark' + :type compute_type: str or + ~azure.mgmt.machinelearningservices.models.ComputeType + :param compute_location: Location for the underlying compute + :type compute_location: str + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningservices.models.ProvisioningState + :param description: The description of the Machine Learning compute. + :type description: str + :ivar created_on: The time at which the compute was created. + :vartype created_on: datetime + :ivar modified_on: The time at which the compute was last modified. + :vartype modified_on: datetime + :param resource_id: ARM resource id of the underlying compute + :type resource_id: str + :ivar provisioning_errors: Errors during provisioning + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningservices.models.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 disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool + :param properties: AKS properties + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _validation = { + 'compute_type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'is_attached_compute': {'readonly': True}, + } + + _attribute_map = { + 'compute_type': {'key': 'computeType', 'type': 'str'}, + 'compute_location': {'key': 'computeLocation', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, + 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__(self, *, compute_type, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(SynapseSpark, self).__init__(**kwargs) + self.compute_type = compute_type + self.compute_location = compute_location + self.provisioning_state = None + self.description = description + self.created_on = None + self.modified_on = None + self.resource_id = resource_id + self.provisioning_errors = None + self.is_attached_compute = None + self.disable_local_auth = disable_local_auth + self.properties = properties + + +class SynapseSparkPoolProperties(Model): + """Properties specific to Synapse Spark pools. + + :param properties: AKS properties + :type properties: + ~azure.mgmt.machinelearningservices.models.SynapseSparkProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'SynapseSparkProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SynapseSparkPoolProperties, self).__init__(**kwargs) + self.properties = properties + + +class SynapseSparkProperties(Model): + """AKS properties. + + :param auto_scale_properties: Auto scale properties. + :type auto_scale_properties: + ~azure.mgmt.machinelearningservices.models.AutoScaleProperties + :param auto_pause_properties: Auto pause properties. + :type auto_pause_properties: + ~azure.mgmt.machinelearningservices.models.AutoPauseProperties + :param spark_version: Spark version. + :type spark_version: str + :param node_count: The number of compute nodes currently assigned to the + compute. + :type node_count: int + :param node_size: Node size. + :type node_size: str + :param node_size_family: Node size family. + :type node_size_family: str + :param subscription_id: Azure subscription identifier. + :type subscription_id: str + :param resource_group: Name of the resource group in which workspace is + located. + :type resource_group: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param pool_name: Pool name. + :type pool_name: str + """ + + _attribute_map = { + 'auto_scale_properties': {'key': 'autoScaleProperties', 'type': 'AutoScaleProperties'}, + 'auto_pause_properties': {'key': 'autoPauseProperties', 'type': 'AutoPauseProperties'}, + 'spark_version': {'key': 'sparkVersion', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'node_size': {'key': 'nodeSize', 'type': 'str'}, + 'node_size_family': {'key': 'nodeSizeFamily', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, + 'workspace_name': {'key': 'workspaceName', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, + } + + def __init__(self, *, auto_scale_properties=None, auto_pause_properties=None, spark_version: str=None, node_count: int=None, node_size: str=None, node_size_family: str=None, subscription_id: str=None, resource_group: str=None, workspace_name: str=None, pool_name: str=None, **kwargs) -> None: + super(SynapseSparkProperties, self).__init__(**kwargs) + self.auto_scale_properties = auto_scale_properties + self.auto_pause_properties = auto_pause_properties + self.spark_version = spark_version + self.node_count = node_count + self.node_size = node_size + self.node_size_family = node_size_family + self.subscription_id = subscription_id + self.resource_group = resource_group + self.workspace_name = workspace_name + self.pool_name = pool_name + + +class SystemData(Model): + """Read only system data. + + :param created_by: An identifier for the identity that created the + resource + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityType + :param created_at: The timestamp of resource creation (UTC) + :type created_at: datetime + :param last_modified_by: An identifier for the identity that last modified + the resource + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.machinelearningservices.models.IdentityType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at class SystemService(Model): @@ -1507,6 +5793,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. @@ -1515,6 +5878,8 @@ class Usage(Model): :ivar id: Specifies the resource ID. :vartype id: str + :ivar aml_workspace_location: Region of the AML workspace in the id. + :vartype aml_workspace_location: str :ivar type: Specifies the resource type. :vartype type: str :ivar unit: An enum describing the unit of usage measurement. Possible @@ -1530,6 +5895,7 @@ class Usage(Model): _validation = { 'id': {'readonly': True}, + 'aml_workspace_location': {'readonly': True}, 'type': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -1539,6 +5905,7 @@ class Usage(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'aml_workspace_location': {'key': 'amlWorkspaceLocation', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'current_value': {'key': 'currentValue', 'type': 'long'}, @@ -1549,6 +5916,7 @@ class Usage(Model): def __init__(self, **kwargs) -> None: super(Usage, self).__init__(**kwargs) self.id = None + self.aml_workspace_location = None self.type = None self.unit = None self.current_value = None @@ -1618,6 +5986,39 @@ def __init__(self, *, admin_user_name: str, admin_user_ssh_public_key: str=None, self.admin_user_password = admin_user_password +class UserAssignedIdentity(Model): + """User Assigned Identity. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal ID of the user assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the user assigned identity. + :vartype tenant_id: str + :ivar client_id: The clientId(aka appId) of the user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.client_id = None + + class VirtualMachine(Compute): """A Machine Learning compute based on Azure Virtual Machines. @@ -1636,9 +6037,9 @@ class VirtualMachine(Compute): ~azure.mgmt.machinelearningservices.models.ProvisioningState :param description: The description of the Machine Learning compute. :type description: str - :ivar created_on: The date and time when the compute was created. + :ivar created_on: The time at which the compute was created. :vartype created_on: datetime - :ivar modified_on: The date and time when the compute was last modified. + :ivar modified_on: The time at which the compute was last modified. :vartype modified_on: datetime :param resource_id: ARM resource id of the underlying compute :type resource_id: str @@ -1649,6 +6050,9 @@ class VirtualMachine(Compute): by user and brought from outside if true, or machine learning service provisioned it if false. :vartype is_attached_compute: bool + :param disable_local_auth: Opt-out of local authentication and ensure + customers can use only MSI and AAD exclusively for authentication. + :type disable_local_auth: bool :param compute_type: Required. Constant filled by server. :type compute_type: str :param properties: @@ -1674,16 +6078,39 @@ class VirtualMachine(Compute): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'provisioning_errors': {'key': 'provisioningErrors', 'type': '[MachineLearningServiceError]'}, 'is_attached_compute': {'key': 'isAttachedCompute', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'compute_type': {'key': 'computeType', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'VirtualMachineProperties'}, } - def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, properties=None, **kwargs) -> None: - super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, **kwargs) + def __init__(self, *, compute_location: str=None, description: str=None, resource_id: str=None, disable_local_auth: bool=None, properties=None, **kwargs) -> None: + super(VirtualMachine, self).__init__(compute_location=compute_location, description=description, resource_id=resource_id, disable_local_auth=disable_local_auth, **kwargs) self.properties = properties self.compute_type = 'VirtualMachine' +class VirtualMachineImage(Model): + """Virtual Machine image for Windows AML Compute. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Virtual Machine image path + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(VirtualMachineImage, self).__init__(**kwargs) + self.id = id + + class VirtualMachineProperties(Model): """VirtualMachineProperties. @@ -1696,6 +6123,9 @@ class VirtualMachineProperties(Model): :param administrator_account: Admin credentials for virtual machine :type administrator_account: ~azure.mgmt.machinelearningservices.models.VirtualMachineSshCredentials + :param is_notebook_instance_compute: Indicates whether this compute will + be used for running notebooks. + :type is_notebook_instance_compute: bool """ _attribute_map = { @@ -1703,14 +6133,16 @@ class VirtualMachineProperties(Model): 'ssh_port': {'key': 'sshPort', 'type': 'int'}, 'address': {'key': 'address', 'type': 'str'}, 'administrator_account': {'key': 'administratorAccount', 'type': 'VirtualMachineSshCredentials'}, + 'is_notebook_instance_compute': {'key': 'isNotebookInstanceCompute', 'type': 'bool'}, } - def __init__(self, *, virtual_machine_size: str=None, ssh_port: int=None, address: str=None, administrator_account=None, **kwargs) -> None: + def __init__(self, *, virtual_machine_size: str=None, ssh_port: int=None, address: str=None, administrator_account=None, is_notebook_instance_compute: bool=None, **kwargs) -> None: super(VirtualMachineProperties, self).__init__(**kwargs) self.virtual_machine_size = virtual_machine_size self.ssh_port = ssh_port self.address = address self.administrator_account = administrator_account + self.is_notebook_instance_compute = is_notebook_instance_compute class VirtualMachineSecrets(ComputeSecrets): @@ -1755,6 +6187,9 @@ class VirtualMachineSize(Model): :ivar v_cp_us: Number of vPUs. The number of vCPUs supported by the virtual machine size. :vartype v_cp_us: int + :ivar gpus: Number of gPUs. The number of gPUs supported by the virtual + machine size. + :vartype gpus: int :ivar os_vhd_size_mb: OS VHD Disk size. The OS VHD disk size, in MB, allowed by the virtual machine size. :vartype os_vhd_size_mb: int @@ -1770,12 +6205,17 @@ class VirtualMachineSize(Model): :ivar premium_io: Premium IO supported. Specifies if the virtual machine size supports premium IO. :vartype premium_io: bool + :param estimated_vm_prices: Estimated VM prices. The estimated price + information for using a VM. + :type estimated_vm_prices: + ~azure.mgmt.machinelearningservices.models.EstimatedVMPrices """ _validation = { 'name': {'readonly': True}, 'family': {'readonly': True}, 'v_cp_us': {'readonly': True}, + 'gpus': {'readonly': True}, 'os_vhd_size_mb': {'readonly': True}, 'max_resource_volume_mb': {'readonly': True}, 'memory_gb': {'readonly': True}, @@ -1787,23 +6227,27 @@ class VirtualMachineSize(Model): 'name': {'key': 'name', 'type': 'str'}, 'family': {'key': 'family', 'type': 'str'}, 'v_cp_us': {'key': 'vCPUs', 'type': 'int'}, + 'gpus': {'key': 'gpus', 'type': 'int'}, 'os_vhd_size_mb': {'key': 'osVhdSizeMB', 'type': 'int'}, 'max_resource_volume_mb': {'key': 'maxResourceVolumeMB', 'type': 'int'}, 'memory_gb': {'key': 'memoryGB', 'type': 'float'}, 'low_priority_capable': {'key': 'lowPriorityCapable', 'type': 'bool'}, 'premium_io': {'key': 'premiumIO', 'type': 'bool'}, + 'estimated_vm_prices': {'key': 'estimatedVMPrices', 'type': 'EstimatedVMPrices'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, estimated_vm_prices=None, **kwargs) -> None: super(VirtualMachineSize, self).__init__(**kwargs) self.name = None self.family = None self.v_cp_us = None + self.gpus = None self.os_vhd_size_mb = None self.max_resource_volume_mb = None self.memory_gb = None self.low_priority_capable = None self.premium_io = None + self.estimated_vm_prices = estimated_vm_prices class VirtualMachineSizeListResult(Model): @@ -1862,14 +6306,19 @@ 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 system_data: + :vartype system_data: + ~azure.mgmt.machinelearningservices.models.SystemData :ivar workspace_id: The immutable id associated with this workspace. :vartype workspace_id: str :param description: The description of this workspace. @@ -1877,9 +6326,6 @@ class Workspace(Resource): :param friendly_name: The friendly name for this workspace. This name in mutable :type friendly_name: str - :ivar creation_time: The creation time of the machine learning workspace - in ISO8601 format. - :vartype creation_time: datetime :param key_vault: ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created :type key_vault: str @@ -1903,16 +6349,57 @@ 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 + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str + :ivar tenant_id: The tenant id associated with this workspace. + :vartype tenant_id: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'identity': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'workspace_id': {'readonly': True}, - 'creation_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'service_provisioned_resource_group': {'readonly': True}, + 'private_link_count': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'notebook_info': {'readonly': True}, + 'tenant_id': {'readonly': True}, } _attribute_map = { @@ -1922,30 +6409,207 @@ class Workspace(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 'key_vault': {'key': 'properties.keyVault', 'type': 'str'}, 'application_insights': {'key': 'properties.applicationInsights', 'type': 'str'}, 'container_registry': {'key': 'properties.containerRegistry', 'type': 'str'}, 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'discovery_url': {'key': 'properties.discoveryUrl', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'hbi_workspace': {'key': 'properties.hbiWorkspace', 'type': 'bool'}, + 'service_provisioned_resource_group': {'key': 'properties.serviceProvisionedResourceGroup', 'type': 'str'}, + 'private_link_count': {'key': 'properties.privateLinkCount', 'type': 'int'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'allow_public_access_when_behind_vnet': {'key': 'properties.allowPublicAccessWhenBehindVnet', 'type': 'bool'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'notebook_info': {'key': 'properties.notebookInfo', 'type': 'NotebookResourceInfo'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, + 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, description: str=None, friendly_name: str=None, key_vault: str=None, application_insights: str=None, container_registry: str=None, storage_account: str=None, discovery_url: str=None, **kwargs) -> None: - super(Workspace, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, 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, service_managed_resources_settings=None, primary_user_assigned_identity: str=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 - self.creation_time = None self.key_vault = key_vault self.application_insights = application_insights self.container_registry = container_registry self.storage_account = storage_account self.discovery_url = discovery_url self.provisioning_state = None + self.encryption = encryption + self.hbi_workspace = hbi_workspace + self.service_provisioned_resource_group = None + self.private_link_count = None + self.image_build_compute = image_build_compute + self.allow_public_access_when_behind_vnet = allow_public_access_when_behind_vnet + self.private_endpoint_connections = None + self.shared_private_link_resources = shared_private_link_resources + self.notebook_info = None + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity + self.tenant_id = None + + +class WorkspaceConnection(Model): + """Workspace connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: ResourceId of the workspace connection. + :vartype id: str + :ivar name: Friendly name of the workspace connection. + :vartype name: str + :ivar type: Resource type of workspace connection. + :vartype type: str + :param category: Category of the workspace connection. + :type category: str + :param target: Target of the workspace connection. + :type target: str + :param auth_type: Authorization type of the workspace connection. + :type auth_type: str + :param value: Value details of the workspace connection. + :type value: str + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'auth_type': {'key': 'properties.authType', 'type': 'str'}, + 'value': {'key': 'properties.value', 'type': 'str'}, + 'value_format': {'key': 'properties.valueFormat', 'type': 'str'}, + } + + def __init__(self, *, category: str=None, target: str=None, auth_type: str=None, value: str=None, value_format=None, **kwargs) -> None: + super(WorkspaceConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.category = category + self.target = target + self.auth_type = auth_type + self.value = value + self.value_format = value_format + + +class 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 + :param value_format: format for the workspace connection value. Possible + values include: 'JSON' + :type value_format: str or + ~azure.mgmt.machinelearningservices.models.ValueFormat + """ + + _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'}, + 'value_format': {'key': 'properties.valueFormat', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, category: str=None, target: str=None, auth_type: str=None, value: str=None, value_format=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 + self.value_format = value_format + + +class WorkspaceSku(Model): + """Describes Workspace Sku details and features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: The set of locations that the SKU is available. This will + be supported and registered Azure Geo Regions (e.g. West US, East US, + Southeast Asia, etc.). + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.machinelearningservices.models.ResourceSkuLocationInfo] + :ivar tier: Sku Tier like Basic or Enterprise + :vartype tier: str + :ivar resource_type: + :vartype resource_type: str + :ivar name: + :vartype name: str + :ivar capabilities: List of features/user capabilities associated with the + sku + :vartype capabilities: + list[~azure.mgmt.machinelearningservices.models.SKUCapability] + :param restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :type restrictions: + list[~azure.mgmt.machinelearningservices.models.Restriction] + """ + + _validation = { + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'tier': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'}, + 'restrictions': {'key': 'restrictions', 'type': '[Restriction]'}, + } + + def __init__(self, *, restrictions=None, **kwargs) -> None: + super(WorkspaceSku, self).__init__(**kwargs) + self.locations = None + self.location_info = None + self.tier = None + self.resource_type = None + self.name = None + self.capabilities = None + self.restrictions = restrictions class WorkspaceUpdateParameters(Model): @@ -1953,20 +6617,43 @@ class WorkspaceUpdateParameters(Model): :param tags: The resource tags for the machine learning workspace. :type tags: dict[str, str] + :param sku: The sku of the workspace. + :type sku: ~azure.mgmt.machinelearningservices.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.machinelearningservices.models.Identity :param description: The description of this workspace. :type description: str :param friendly_name: The friendly name for this workspace. :type friendly_name: str + :param image_build_compute: The compute name for image build + :type image_build_compute: str + :param service_managed_resources_settings: The service managed resource + settings. + :type service_managed_resources_settings: + ~azure.mgmt.machinelearningservices.models.ServiceManagedResourcesSettings + :param primary_user_assigned_identity: The user assigned identity resource + id that represents the workspace identity. + :type primary_user_assigned_identity: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'image_build_compute': {'key': 'properties.imageBuildCompute', 'type': 'str'}, + 'service_managed_resources_settings': {'key': 'properties.serviceManagedResourcesSettings', 'type': 'ServiceManagedResourcesSettings'}, + 'primary_user_assigned_identity': {'key': 'properties.primaryUserAssignedIdentity', 'type': 'str'}, } - def __init__(self, *, tags=None, description: str=None, friendly_name: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, sku=None, identity=None, description: str=None, friendly_name: str=None, image_build_compute: str=None, service_managed_resources_settings=None, primary_user_assigned_identity: str=None, **kwargs) -> None: super(WorkspaceUpdateParameters, self).__init__(**kwargs) self.tags = tags + self.sku = sku + self.identity = identity self.description = description self.friendly_name = friendly_name + self.image_build_compute = image_build_compute + self.service_managed_resources_settings = service_managed_resources_settings + self.primary_user_assigned_identity = primary_user_assigned_identity diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/models/_paged_models.py index 9bc3567bbf905..658d72e998ca8 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,19 @@ class UsagePaged(Paged): def __init__(self, *args, **kwargs): super(UsagePaged, self).__init__(*args, **kwargs) +class ResourceQuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceQuota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceQuota]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceQuotaPaged, self).__init__(*args, **kwargs) class ComputeResourcePaged(Paged): """ A paging container for iterating over a list of :class:`ComputeResource ` object @@ -64,3 +90,55 @@ class ComputeResourcePaged(Paged): def __init__(self, *args, **kwargs): super(ComputeResourcePaged, self).__init__(*args, **kwargs) +class AmlComputeNodeInformationPaged(Paged): + """ + A paging container for iterating over a list of :class:`AmlComputeNodeInformation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'nodes', 'type': '[AmlComputeNodeInformation]'} + } + + def __init__(self, *args, **kwargs): + + super(AmlComputeNodeInformationPaged, self).__init__(*args, **kwargs) +class 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) +class ServiceResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceResource]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceResourcePaged, 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) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/__init__.py index 4daae17a67dd1..112532bfccde6 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,32 @@ from ._operations import Operations from ._workspaces_operations import WorkspacesOperations +from ._workspace_features_operations import WorkspaceFeaturesOperations from ._usages_operations import UsagesOperations from ._virtual_machine_sizes_operations import VirtualMachineSizesOperations +from ._quotas_operations import QuotasOperations from ._machine_learning_compute_operations import MachineLearningComputeOperations +from ._workspace_operations import WorkspaceOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._machine_learning_service_operations import MachineLearningServiceOperations +from ._notebooks_operations import NotebooksOperations +from ._storage_account_operations import StorageAccountOperations +from ._workspace_connections_operations import WorkspaceConnectionsOperations __all__ = [ 'Operations', 'WorkspacesOperations', + 'WorkspaceFeaturesOperations', 'UsagesOperations', 'VirtualMachineSizesOperations', + 'QuotasOperations', 'MachineLearningComputeOperations', + 'WorkspaceOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'MachineLearningServiceOperations', + 'NotebooksOperations', + 'StorageAccountOperations', + 'WorkspaceConnectionsOperations', ] 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 203b86e19b286..408cd2d2d2378 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: "2021-04-01". """ models = models @@ -36,12 +36,12 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-04-01" self.config = config def list_by_workspace( - self, resource_group_name, workspace_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, workspace_name, skip=None, custom_headers=None, raw=False, **operation_config): """Gets computes in specified workspace. :param resource_group_name: Name of the resource group in which @@ -49,8 +49,8 @@ def list_by_workspace( :type resource_group_name: str :param workspace_name: Name of Azure Machine Learning workspace. :type workspace_name: str - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -76,8 +76,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -528,15 +528,90 @@ def list_nodes( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AmlComputeNodesInformation or ClientRawResponse if raw=true + :return: An iterator like instance of AmlComputeNodeInformation :rtype: - ~azure.mgmt.machinelearningservices.models.AmlComputeNodesInformation - or ~msrest.pipeline.ClientRawResponse + ~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformationPaged[~azure.mgmt.machinelearningservices.models.AmlComputeNodeInformation] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_nodes.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AmlComputeNodeInformationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} + + def list_keys( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + """Gets secrets related to Machine Learning compute (storage keys, service + credentials, etc). + + :param resource_group_name: 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: ComputeSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets or + ~msrest.pipeline.ClientRawResponse :raises: :class:`MachineLearningServiceErrorException` """ # Construct URL - url = self.list_nodes.metadata['url'] + url = self.list_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -568,19 +643,184 @@ def list_nodes( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AmlComputeNodesInformation', response) + deserialized = self._deserialize('ComputeSecrets', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_nodes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes'} + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} - def list_keys( + + def _start_initial( self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): - """Gets secrets related to Machine Learning compute (storage keys, service - credentials, etc). + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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 [202]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Posts a start action to a compute instance. + + :param resource_group_name: 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: 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._start_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start'} + + + def _stop_initial( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.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 [202]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, resource_group_name, workspace_name, compute_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Posts a stop action to a compute instance. + + :param resource_group_name: 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: 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._stop_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + compute_name=compute_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop'} + + def restart( + 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. @@ -594,14 +834,13 @@ def list_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ComputeSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.machinelearningservices.models.ComputeSecrets or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`MachineLearningServiceErrorException` """ # Construct URL - url = self.list_keys.metadata['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'), @@ -616,7 +855,6 @@ def list_keys( # 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: @@ -631,13 +869,7 @@ def list_keys( if response.status_code not in [200]: raise models.MachineLearningServiceErrorException(self._deserialize, response) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ComputeSecrets', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - - return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'} + 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/_machine_learning_service_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_service_operations.py new file mode 100644 index 0000000000000..548af68855dd7 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_machine_learning_service_operations.py @@ -0,0 +1,398 @@ +# 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 MachineLearningServiceOperations(object): + """MachineLearningServiceOperations 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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-01" + + self.config = config + + def list_by_workspace( + self, resource_group_name, workspace_name, skip=None, model_id=None, model_name=None, tag=None, tags=None, properties=None, run_id=None, expand=None, orderby="UpdatedAtDesc", custom_headers=None, raw=False, **operation_config): + """Gets services in specified 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 skip: Continuation token for pagination. + :type skip: str + :param model_id: The Model Id. + :type model_id: str + :param model_name: The Model name. + :type model_name: str + :param tag: The object tag. + :type tag: str + :param tags: A set of tags with which to filter the returned services. + It is a comma separated string of tags key or tags key=value Example: + tagKey1,tagKey2,tagKey3=value3 . + :type tags: str + :param properties: A set of properties with which to filter the + returned services. It is a comma separated string of properties key + and/or properties key=value Example: propKey1,propKey2,propKey3=value3 + . + :type properties: str + :param run_id: runId for model associated with service. + :type run_id: str + :param expand: Set to True to include Model details. + :type expand: bool + :param orderby: The option to order the response. Possible values + include: 'CreatedAtDesc', 'CreatedAtAsc', 'UpdatedAtDesc', + 'UpdatedAtAsc' + :type orderby: str or + ~azure.mgmt.machinelearningservices.models.OrderString + :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 ServiceResource + :rtype: + ~azure.mgmt.machinelearningservices.models.ServiceResourcePaged[~azure.mgmt.machinelearningservices.models.ServiceResource] + :raises: + :class:`MachineLearningServiceErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # 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') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') + if model_id is not None: + query_parameters['modelId'] = self._serialize.query("model_id", model_id, 'str') + if model_name is not None: + query_parameters['modelName'] = self._serialize.query("model_name", model_name, 'str') + if tag is not None: + query_parameters['tag'] = self._serialize.query("tag", tag, 'str') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, 'str') + if properties is not None: + query_parameters['properties'] = self._serialize.query("properties", properties, 'str') + if run_id is not None: + query_parameters['runId'] = self._serialize.query("run_id", run_id, 'str') + if expand is not None: + query_parameters['expand'] = self._serialize.query("expand", expand, 'bool') + if orderby is not None: + query_parameters['orderby'] = self._serialize.query("orderby", orderby, '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.ServiceResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/services'} + + def get( + self, resource_group_name, workspace_name, service_name, expand=False, custom_headers=None, raw=False, **operation_config): + """Get a Service by name. + + :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 service_name: Name of the Azure Machine Learning service. + :type service_name: str + :param expand: Set to True to include Model details. + :type expand: bool + :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: ServiceResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.machinelearningservices.models.ServiceResource 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'), + 'serviceName': self._serialize.url("service_name", service_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 expand is not None: + query_parameters['expand'] = self._serialize.query("expand", expand, 'bool') + + # 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('ServiceResource', 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}/services/{serviceName}'} + + def delete( + self, resource_group_name, workspace_name, service_name, custom_headers=None, raw=False, **operation_config): + """Delete a specific Service.. + + :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 service_name: Name of the Azure Machine Learning service. + :type service_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'), + 'serviceName': self._serialize.url("service_name", service_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}/services/{serviceName}'} + + + def _create_or_update_initial( + self, resource_group_name, workspace_name, service_name, properties, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_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, 'CreateServiceRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('ServiceResource', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, workspace_name, service_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates service. This call will update a service if it + exists. This is a nonrecoverable operation. If your intent is to create + a new service, do a GET first to verify that it does not exist yet. + + :param resource_group_name: Name of the resource group in which + workspace is located. + :type resource_group_name: str + :param workspace_name: Name of Azure Machine Learning workspace. + :type workspace_name: str + :param service_name: Name of the Azure Machine Learning service. + :type service_name: str + :param properties: The payload that is used to create or update the + Service. + :type properties: + ~azure.mgmt.machinelearningservices.models.CreateServiceRequest + :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 ServiceResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningservices.models.ServiceResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningservices.models.ServiceResource]] + :raises: + :class:`MachineLearningServiceErrorException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + service_name=service_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + } + deserialized = self._deserialize('ServiceResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **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}/services/{serviceName}'} 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 0000000000000..501d389e2e009 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_notebooks_operations.py @@ -0,0 +1,196 @@ +# 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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-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'} + + def list_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **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: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListNotebookKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ListNotebookKeysResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ListNotebookKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_operations.py index 7b558ec9d6457..e077827ed1432 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: "2021-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-04-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 0000000000000..0e3c7004e830f --- /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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-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:`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'), + '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.MachineLearningServiceErrorException(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:`MachineLearningServiceErrorException` + """ + # 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.MachineLearningServiceErrorException(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:`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'), + '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.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}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_private_link_resources_operations.py new file mode 100644 index 0000000000000..1cd993edf7a65 --- /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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-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 0000000000000..c021fccdc8e97 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_quotas_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class QuotasOperations(object): + """QuotasOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure Machine Learning resource provider API. Constant value: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-01" + + self.config = config + + def update( + self, location, value=None, location1=None, custom_headers=None, raw=False, **operation_config): + """Update quota for each VM family in workspace. + + :param location: The location for update quota is queried. + :type location: str + :param value: The list for update quota. + :type value: + list[~azure.mgmt.machinelearningservices.models.QuotaBaseProperties] + :param location1: Region of workspace quota to be updated. + :type location1: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UpdateWorkspaceQuotasResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.UpdateWorkspaceQuotasResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + parameters = models.QuotaUpdateParameters(value=value, location=location1) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + 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:`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'), + '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]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ResourceQuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_storage_account_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_storage_account_operations.py new file mode 100644 index 0000000000000..68b25dbfb55cd --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_storage_account_operations.py @@ -0,0 +1,101 @@ +# 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 StorageAccountOperations(object): + """StorageAccountOperations 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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-01" + + self.config = config + + def list_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **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: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ListStorageAccountKeysResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.ListStorageAccountKeysResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.list_keys.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ListStorageAccountKeysResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py index 212fbc700f274..0a96de759c6b8 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: "2021-04-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-04-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 afbf3b4fc0b4a..055fc70501003 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: "2021-04-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-04-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 0000000000000..16247b68f6448 --- /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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-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 0000000000000..72d8f55c72df3 --- /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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-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/_workspace_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_operations.py new file mode 100644 index 0000000000000..736f965455258 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspace_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class WorkspaceOperations(object): + """WorkspaceOperations 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: "2021-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-04-01" + + self.config = config + + 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/_workspaces_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_workspaces_operations.py index 27bff19114d87..2c4fb02308b3e 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: "2021-04-01". """ models = models @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-05-01" + self.api_version = "2021-04-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( @@ -292,15 +353,15 @@ def update( update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}'} def list_by_resource_group( - self, resource_group_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all the available machine learning workspaces under the specified resource group. :param resource_group_name: Name of the resource group in which workspace is located. :type resource_group_name: str - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -325,8 +386,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -429,27 +490,9 @@ def list_keys( return deserialized list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys'} - def resync_keys( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Resync all the keys associated with this workspace. This includes keys - for the storage account, app insights and password for container - registry. - :param resource_group_name: Name of the resource group in which - workspace is located. - :type resource_group_name: str - :param workspace_name: Name of Azure Machine Learning workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`MachineLearningServiceErrorException` - """ + def _resync_keys_initial( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.resync_keys.metadata['url'] path_format_arguments = { @@ -476,21 +519,65 @@ def resync_keys( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.MachineLearningServiceErrorException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def resync_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Resync all the keys associated with this workspace. This includes keys + for the storage account, app insights and password for container + registry. + + :param resource_group_name: 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._resync_keys_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) resync_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys'} def list_by_subscription( - self, skiptoken=None, custom_headers=None, raw=False, **operation_config): + self, skip=None, custom_headers=None, raw=False, **operation_config): """Lists all the available machine learning workspaces under the specified subscription. - :param skiptoken: Continuation token for pagination. - :type skiptoken: str + :param skip: Continuation token for pagination. + :type skip: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -514,8 +601,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skiptoken is not None: - query_parameters['$skiptoken'] = self._serialize.query("skiptoken", skiptoken, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'str') else: url = next_link @@ -553,3 +640,65 @@ def internal_paging(next_link=None): return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces'} + + def list_notebook_access_token( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """return notebook access token and refresh token. + + :param resource_group_name: 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: NotebookAccessTokenResult or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.machinelearningservices.models.NotebookAccessTokenResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MachineLearningServiceErrorException` + """ + # Construct URL + url = self.list_notebook_access_token.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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]: + raise models.MachineLearningServiceErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookAccessTokenResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_notebook_access_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken'}