From 7c043f3e1be6d8179359570c0987a6db840abb65 Mon Sep 17 00:00:00 2001 From: Josh Peterson <15050193+joshanator@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:34:04 -0800 Subject: [PATCH] Swagger Correctness Fixes MachineLearningServices (#12662) * Fix GetAmlCompute examples for isolatedNetwork * add computeInstanceAuthorizationType to 20200801 * add OsType to amlcompute 20200801 * give default ostype for amlcompute * Update nodeIdleTimeBeforeScaleDown description 20200801 * add "auto" to SslConfiguration enum * matching identiity.type enum order of future * agentvmsize typo fixed * add setupScripts to computeInstance 09-01 * add format to agentCount 20200801 * mark listnodes as pageable Co-authored-by: jopet@microsoft.com --- .../examples/getAmlCompute.json | 2 +- .../examples/getAmlCompute.json | 2 +- .../machineLearningServices.json | 65 ++++++++++++++- .../2020-08-01/machineLearningServices.json | 79 ++++++++++++++++++- 4 files changed, 140 insertions(+), 8 deletions(-) diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-05-15-preview/examples/getAmlCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-05-15-preview/examples/getAmlCompute.json index bcd93f48347a..ddecac95991d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-05-15-preview/examples/getAmlCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-05-15-preview/examples/getAmlCompute.json @@ -23,7 +23,7 @@ "vmPriority": "Dedicated", "osType": "Windows", "virtualMachineImage": null, - "isolatedNetwork": null, + "isolatedNetwork": false, "subnet": "test-subnet-resource-id", "scaleSettings": { "maxNodeCount": 1, diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getAmlCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getAmlCompute.json index bcd93f48347a..ddecac95991d 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getAmlCompute.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/examples/getAmlCompute.json @@ -23,7 +23,7 @@ "vmPriority": "Dedicated", "osType": "Windows", "virtualMachineImage": null, - "isolatedNetwork": null, + "isolatedNetwork": false, "subnet": "test-subnet-resource-id", "scaleSettings": { "maxNodeCount": 1, diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json index 067f48ddf6c9..f34029e01dd7 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2020-09-01-preview/machineLearningServices.json @@ -974,6 +974,10 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "nodes" + }, "x-ms-examples": { "Get compute nodes information for a compute": { "$ref": "./examples/amlComputeListNodes.json" @@ -3290,7 +3294,7 @@ "format": "int32", "minimum": 1 }, - "agentVMSize": { + "agentVmSize": { "description": "Agent virtual machine size", "type": "string" }, @@ -3325,6 +3329,7 @@ "osType": { "description": "Compute OS Type", "type": "string", + "default": "Linux", "enum": [ "Linux", "Windows" @@ -3540,6 +3545,10 @@ "description": "Settings for a personal compute instance.", "$ref": "#/definitions/PersonalComputeInstanceSettings" }, + "setupScripts": { + "description": "Details of customized scripts to execute for setting up the cluster.", + "$ref": "#/definitions/SetupScripts" + }, "lastOperation": { "description": "The last operation on ComputeInstance.", "$ref": "#/definitions/ComputeInstanceLastOperation", @@ -3723,7 +3732,8 @@ "type": "string", "enum": [ "Disabled", - "Enabled" + "Enabled", + "Auto" ] }, "cert": { @@ -3928,6 +3938,11 @@ "$ref": "#/definitions/AmlComputeNodeInformation" }, "description": "The collection of returned AmlCompute nodes details." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The continuation token." } } } @@ -6456,6 +6471,52 @@ "type": "string" } } + }, + "SetupScripts": { + "type": "object", + "description": "Details of customized scripts to execute for setting up the cluster.", + "properties": { + "scripts": { + "description": "Customized setup scripts", + "$ref": "#/definitions/ScriptsToExecute" + } + } + }, + "ScriptsToExecute": { + "type": "object", + "description": "Customized setup scripts", + "properties": { + "startupScript": { + "description": "Script that's run every time the machine starts.", + "$ref": "#/definitions/ScriptReference" + }, + "creationScript": { + "description": "Script that's run only once during provision of the compute.", + "$ref": "#/definitions/ScriptReference" + } + } + }, + "ScriptReference": { + "type": "object", + "description": "Script reference", + "properties": { + "scriptSource": { + "description": "The storage source of the script: inline, workspace.", + "type": "string" + }, + "scriptData": { + "description": "The location of scripts in the mounted volume.", + "type": "string" + }, + "scriptArguments": { + "description": "Optional command line arguments passed to the script to run.", + "type": "string" + }, + "timeout": { + "description": "Optional time period passed to timeout command.", + "type": "string" + } + } } } } diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2020-08-01/machineLearningServices.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2020-08-01/machineLearningServices.json index 8e05c90bac12..ce9d4424b7d3 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2020-08-01/machineLearningServices.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2020-08-01/machineLearningServices.json @@ -1219,6 +1219,10 @@ } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "nodes" + }, "x-ms-examples": { "Get compute nodes information for a compute": { "$ref": "./examples/amlComputeListNodes.json" @@ -2510,8 +2514,8 @@ "description": "The identity type.", "enum": [ "SystemAssigned", - "UserAssigned", "SystemAssigned,UserAssigned", + "UserAssigned", "None" ], "x-ms-enum": { @@ -2785,9 +2789,10 @@ "agentCount": { "description": "Number of agents", "type": "integer", + "format": "int32", "minimum": 1 }, - "agentVMSize": { + "agentVmSize": { "description": "Agent virtual machine size", "type": "string" }, @@ -2819,6 +2824,19 @@ "description": "AML Compute properties", "type": "object", "properties": { + "osType": { + "description": "Compute OS Type", + "type": "string", + "default": "Linux", + "enum": [ + "Linux", + "Windows" + ], + "x-ms-enum": { + "name": "OsType", + "modelAsString": true + } + }, "vmSize": { "description": "Virtual Machine Size", "type": "string" @@ -2993,6 +3011,24 @@ "$ref": "#/definitions/ComputeInstanceState", "readOnly": true }, + "computeInstanceAuthorizationType": { + "type": "string", + "title": "Compute Instance Authorization type.", + "description": "The Compute Instance Authorization type. Available values are personal (default).", + "default": "personal", + "enum": [ + "personal" + ], + "x-ms-enum": { + "name": "ComputeInstanceAuthorizationType", + "modelAsString": true + } + }, + "personalComputeInstanceSettings": { + "title": "Personal Compute Instance settings.", + "description": "Settings for a personal compute instance.", + "$ref": "#/definitions/PersonalComputeInstanceSettings" + }, "lastOperation": { "description": "The last operation on ComputeInstance.", "$ref": "#/definitions/ComputeInstanceLastOperation", @@ -3174,7 +3210,8 @@ "type": "string", "enum": [ "Disabled", - "Enabled" + "Enabled", + "Auto" ] }, "cert": { @@ -3255,7 +3292,7 @@ "nodeIdleTimeBeforeScaleDown": { "type": "string", "format": "duration", - "description": "Node Idle Time before scaling down amlCompute" + "description": "Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format." } }, "required": [ @@ -3364,6 +3401,11 @@ "$ref": "#/definitions/AmlComputeNodeInformation" }, "description": "The collection of returned AmlCompute nodes details." + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The continuation token." } } } @@ -4260,6 +4302,35 @@ "description": "Uniquely identifies the user within his/her organization." } } + }, + "PersonalComputeInstanceSettings": { + "type": "object", + "properties": { + "assignedUser": { + "$ref": "#/definitions/AssignedUser", + "title": "Assigned User.", + "description": "A user explicitly assigned to a personal compute instance." + } + }, + "description": "Settings for a personal compute instance." + }, + "AssignedUser": { + "type": "object", + "description": "A user that can be assigned to a compute instance.", + "properties": { + "objectId": { + "type": "string", + "description": "User’s AAD Object Id." + }, + "tenantId": { + "type": "string", + "description": "User’s AAD Tenant Id." + } + }, + "required": [ + "objectId", + "tenantId" + ] } } }