diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json new file mode 100644 index 000000000000..c2ecdb84fa44 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "workspaceName": "workspaces123", + "computeName": "compute123", + "api-version": "2022-10-01", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "vmSize": "STANDARD_NC6", + "applicationSharingPolicy": "Personal", + "sshSettings": { + "sshPublicAccess": "Disabled" + }, + "computeInstanceAuthorizationType": "personal", + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "schedules": { + "computeStartStop": [ + { + "status": "Enabled", + "action": "Stop", + "triggerType": "Cron", + "cron": { + "expression": "0 18 * * *", + "startTime": "2021-04-23T01:30:00", + "timeZone": "Pacific Standard Time" + } + } + ] + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "name": "compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "name": "compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/machineLearningServices.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/machineLearningServices.json index 6bd1a0b74398..06c81fe54771 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/machineLearningServices.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/machineLearningServices.json @@ -822,6 +822,9 @@ "Create an ComputeInstance Compute": { "$ref": "./examples/Compute/createOrUpdate/ComputeInstance.json" }, + "Create an ComputeInstance Compute with Schedules": { + "$ref": "./examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json" + }, "Create an AKS Compute": { "$ref": "./examples/Compute/createOrUpdate/BasicAKSCompute.json" }, @@ -4839,11 +4842,13 @@ "description": "Compute start stop schedule properties", "properties": { "id": { - "description": "Schedule id.", - "readOnly": true, - "type": "string" + "description": "A system assigned id for the schedule.", + "type": "string", + "x-nullable": true, + "readOnly": true }, "provisioningStatus": { + "description": "The current deployment state of schedule.", "type": "string", "enum": [ "Completed", @@ -4852,15 +4857,42 @@ ], "x-ms-enum": { "name": "provisioningStatus", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "value": "Completed" + }, + { + "value": "Provisioning" + }, + { + "value": "Failed" + } + ] }, - "readOnly": true, - "description": "The current deployment state of schedule." + "readOnly": true + }, + "status": { + "$ref": "#/definitions/ScheduleStatus" }, "action": { + "description": "[Required] The compute power action.", "$ref": "#/definitions/ComputePowerAction" }, + "triggerType": { + "description": "[Required] The schedule trigger type.", + "$ref": "#/definitions/TriggerType" + }, + "recurrence": { + "description": "Required if triggerType is Recurrence.", + "$ref": "#/definitions/Recurrence" + }, + "cron": { + "description": "Required if triggerType is Cron.", + "$ref": "#/definitions/Cron" + }, "schedule": { + "description": "[Deprecated] Not used any more.", "$ref": "#/definitions/ScheduleBase" } } @@ -4869,6 +4901,7 @@ "type": "object", "properties": { "id": { + "description": "A system assigned id for the schedule.", "type": "string", "x-nullable": true }, @@ -4887,6 +4920,7 @@ "Provisioning", "Failed" ], + "description": "The current deployment state of schedule.", "type": "string", "x-ms-enum": { "name": "ScheduleProvisioningState", @@ -4910,6 +4944,7 @@ "Enabled", "Disabled" ], + "description": "Is the schedule enabled or disabled?", "type": "string", "x-ms-enum": { "name": "ScheduleStatus", @@ -4937,6 +4972,126 @@ "modelAsString": true } }, + "TriggerType": { + "type": "string", + "description": "The schedule trigger type.", + "enum": [ + "Recurrence", + "Cron" + ], + "x-ms-enum": { + "name": "TriggerType", + "modelAsString": true + } + }, + "Recurrence": { + "type": "object", + "description": "The workflow trigger recurrence for ComputeStartStop schedule type.", + "properties": { + "frequency": { + "description": "[Required] The frequency to trigger schedule.", + "$ref": "#/definitions/RecurrenceFrequency" + }, + "interval": { + "description": "[Required] Specifies schedule interval in conjunction with frequency", + "type": "integer", + "format": "int32" + }, + "startTime": { + "description": "The start time in yyyy-MM-ddTHH:mm:ss format.", + "type": "string", + "x-nullable": true + }, + "timeZone": { + "description": "Specifies time zone in which the schedule runs.\r\nTimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11", + "default": "UTC", + "type": "string" + }, + "schedule": { + "description": "[Required] The recurrence schedule.", + "$ref": "#/definitions/RecurrenceSchedule" + } + } + }, + "RecurrenceFrequency": { + "type": "string", + "description": "Enum to describe the frequency of a recurrence schedule", + "enum": [ + "Minute", + "Hour", + "Day", + "Week", + "Month" + ], + "x-ms-enum": { + "name": "RecurrenceFrequency", + "modelAsString": true + }, + "additionalProperties": false + }, + "RecurrenceSchedule": { + "type": "object", + "properties": { + "minutes": { + "description": "[Required] List of minutes for the schedule.", + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "hours": { + "description": "[Required] List of hours for the schedule.", + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "weekDays": { + "description": "List of days for the schedule.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "x-ms-enum": { + "name": "DaysOfWeek", + "modelAsString": false + } + }, + "x-nullable": true + } + }, + "additionalProperties": false + }, + "Cron": { + "type": "object", + "description": "The workflow trigger cron for ComputeStartStop schedule type.", + "properties": { + "startTime": { + "description": "The start time in yyyy-MM-ddTHH:mm:ss format.", + "type": "string", + "x-nullable": true + }, + "timeZone": { + "description": "Specifies time zone in which the schedule runs.\r\nTimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11", + "type": "string", + "default": "UTC" + }, + "expression": { + "description": "[Required] Specifies cron expression of schedule.\r\nThe expression should follow NCronTab format.", + "type": "string" + } + } + }, "ComputeInstanceDataMount": { "type": "object", "description": "Defines an Aml Instance DataMount.",