diff --git a/lib/services/machinelearningservicesManagement/LICENSE.txt b/lib/services/machinelearningservicesManagement/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/machinelearningservicesManagement/LICENSE.txt +++ b/lib/services/machinelearningservicesManagement/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/machinelearningservicesManagement/README.md b/lib/services/machinelearningservicesManagement/README.md index b9d5dc4ed2..4fd7efa27e 100644 --- a/lib/services/machinelearningservicesManagement/README.md +++ b/lib/services/machinelearningservicesManagement/README.md @@ -1,40 +1,40 @@ ---- -uid: azure-arm-machinelearningservices -summary: *content - ---- -# Microsoft Azure SDK for Node.js - AzureMachineLearningWorkspaces -This project provides a Node.js package for accessing Azure. Right now it supports: -- **Node.js version 6.x.x or higher** - -## Features - - -## How to Install - -```bash -npm install azure-arm-machinelearningservices -``` - -## How to use - -### Authentication, client creation and list operations as an example. - -```javascript -const msRestAzure = require("ms-rest-azure"); -const AzureMachineLearningWorkspaces = require("azure-arm-machinelearningservices"); -msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new AzureMachineLearningWorkspaces(creds, subscriptionId); - return client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.log('An error occurred:'); - console.dir(err, {depth: null, colors: true}); -}); - -## Related projects - -- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) +--- +uid: azure-arm-machinelearningservices +summary: *content + +--- +# Microsoft Azure SDK for Node.js - AzureMachineLearningWorkspaces +This project provides a Node.js package for accessing Azure. Right now it supports: +- **Node.js version 6.x.x or higher** + +## Features + + +## How to Install + +```bash +npm install azure-arm-machinelearningservices +``` + +## How to use + +### Authentication, client creation and list operations as an example. + +```javascript +const msRestAzure = require("ms-rest-azure"); +const AzureMachineLearningWorkspaces = require("azure-arm-machinelearningservices"); +msRestAzure.interactiveLogin().then((creds) => { + const subscriptionId = ""; + const client = new AzureMachineLearningWorkspaces(creds, subscriptionId); + return client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.log('An error occurred:'); + console.dir(err, {depth: null, colors: true}); +}); + +## Related projects + +- [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/machinelearningservicesManagement/lib/models/aKS.js b/lib/services/machinelearningservicesManagement/lib/models/aKS.js index bb0753728f..a1ea27658e 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/aKS.js +++ b/lib/services/machinelearningservicesManagement/lib/models/aKS.js @@ -28,7 +28,7 @@ class AKS extends models['Compute'] { * @member {string} [properties.agentVMSize] Agent virtual machine size * @member {object} [properties.sslConfiguration] SSL configuration * @member {string} [properties.sslConfiguration.status] Enable or disable - * ssl for scoring. Possible values include: 'Disabled', 'Enabled' + * SSL for scoring. Possible values include: 'Disabled', 'Enabled' * @member {string} [properties.sslConfiguration.cert] Cert data * @member {string} [properties.sslConfiguration.key] Key data * @member {string} [properties.sslConfiguration.cname] CNAME of the cert @@ -56,6 +56,13 @@ class AKS extends models['Compute'] { uberParent: 'Compute', className: 'AKS', modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/machinelearningservicesManagement/lib/models/aKSProperties.js b/lib/services/machinelearningservicesManagement/lib/models/aKSProperties.js index 43107f0fcb..93e6d187e9 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/aKSProperties.js +++ b/lib/services/machinelearningservicesManagement/lib/models/aKSProperties.js @@ -22,7 +22,7 @@ class AKSProperties { * @member {number} [agentCount] Number of agents * @member {string} [agentVMSize] Agent virtual machine size * @member {object} [sslConfiguration] SSL configuration - * @member {string} [sslConfiguration.status] Enable or disable ssl for + * @member {string} [sslConfiguration.status] Enable or disable SSL for * scoring. Possible values include: 'Disabled', 'Enabled' * @member {string} [sslConfiguration.cert] Cert data * @member {string} [sslConfiguration.key] Key data diff --git a/lib/services/machinelearningservicesManagement/lib/models/batchAI.js b/lib/services/machinelearningservicesManagement/lib/models/batchAI.js index b9d988869e..c7482c3dd6 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/batchAI.js +++ b/lib/services/machinelearningservicesManagement/lib/models/batchAI.js @@ -54,6 +54,13 @@ class BatchAI extends models['Compute'] { uberParent: 'Compute', className: 'BatchAI', modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/machinelearningservicesManagement/lib/models/compute.js b/lib/services/machinelearningservicesManagement/lib/models/compute.js index 62db7936ab..8865945526 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/compute.js +++ b/lib/services/machinelearningservicesManagement/lib/models/compute.js @@ -17,6 +17,7 @@ class Compute { /** * Create a Compute. + * @member {string} [computeLocation] Location for the underlying compute * @member {string} [provisioningState] The provision state of the cluster. * Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. * Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', @@ -52,6 +53,13 @@ class Compute { uberParent: 'Compute', className: 'Compute', modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/machinelearningservicesManagement/lib/models/computeResource.js b/lib/services/machinelearningservicesManagement/lib/models/computeResource.js index 2c46ad5c58..652fa79072 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/computeResource.js +++ b/lib/services/machinelearningservicesManagement/lib/models/computeResource.js @@ -21,6 +21,8 @@ class ComputeResource extends models['Resource'] { /** * Create a ComputeResource. * @member {object} [properties] Compute properties + * @member {string} [properties.computeLocation] Location for the underlying + * compute * @member {string} [properties.provisioningState] The provision state of the * cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and * Failed. Possible values include: 'Unknown', 'Updating', 'Creating', diff --git a/lib/services/machinelearningservicesManagement/lib/models/dataFactory.js b/lib/services/machinelearningservicesManagement/lib/models/dataFactory.js index cddf7ff07d..d072f22c98 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/dataFactory.js +++ b/lib/services/machinelearningservicesManagement/lib/models/dataFactory.js @@ -44,6 +44,13 @@ class DataFactory extends models['Compute'] { uberParent: 'Compute', className: 'DataFactory', modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/machinelearningservicesManagement/lib/models/hDInsight.js b/lib/services/machinelearningservicesManagement/lib/models/hDInsight.js new file mode 100644 index 0000000000..7501a2ce9d --- /dev/null +++ b/lib/services/machinelearningservicesManagement/lib/models/hDInsight.js @@ -0,0 +1,145 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A HDInsight compute. + * + * @extends models['Compute'] + */ +class HDInsight extends models['Compute'] { + /** + * Create a HDInsight. + * @member {object} [properties] + * @member {number} [properties.sshPort] Port open for ssh connections on the + * master node of the cluster. + * @member {string} [properties.address] Public IP address of the master node + * of the cluster. + * @member {object} [properties.administratorAccount] Admin credentials for + * master node of the cluster + * @member {string} [properties.administratorAccount.username] Username of + * admin account + * @member {string} [properties.administratorAccount.password] Password of + * admin account + * @member {string} [properties.administratorAccount.publicKeyData] Public + * key data + * @member {string} [properties.administratorAccount.privateKeyData] Private + * key data + */ + constructor() { + super(); + } + + /** + * Defines the metadata of HDInsight + * + * @returns {object} metadata of HDInsight + * + */ + mapper() { + return { + required: false, + serializedName: 'HDInsight', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'computeType', + clientName: 'computeType' + }, + uberParent: 'Compute', + className: 'HDInsight', + modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'provisioningState', + type: { + name: 'String' + } + }, + description: { + required: false, + serializedName: 'description', + type: { + name: 'String' + } + }, + createdOn: { + required: false, + readOnly: true, + serializedName: 'createdOn', + type: { + name: 'DateTime' + } + }, + modifiedOn: { + required: false, + readOnly: true, + serializedName: 'modifiedOn', + type: { + name: 'DateTime' + } + }, + resourceId: { + required: false, + serializedName: 'resourceId', + type: { + name: 'String' + } + }, + provisioningErrors: { + required: false, + readOnly: true, + serializedName: 'provisioningErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MachineLearningServiceErrorElementType', + type: { + name: 'Composite', + className: 'MachineLearningServiceError' + } + } + } + }, + computeType: { + required: true, + serializedName: 'computeType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'HDInsightProperties' + } + } + } + } + }; + } +} + +module.exports = HDInsight; diff --git a/lib/services/machinelearningservicesManagement/lib/models/hDInsightProperties.js b/lib/services/machinelearningservicesManagement/lib/models/hDInsightProperties.js new file mode 100644 index 0000000000..b73fc07179 --- /dev/null +++ b/lib/services/machinelearningservicesManagement/lib/models/hDInsightProperties.js @@ -0,0 +1,75 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Class representing a HDInsightProperties. + */ +class HDInsightProperties { + /** + * Create a HDInsightProperties. + * @member {number} [sshPort] Port open for ssh connections on the master + * node of the cluster. + * @member {string} [address] Public IP address of the master node of the + * cluster. + * @member {object} [administratorAccount] Admin credentials for master node + * of the cluster + * @member {string} [administratorAccount.username] Username of admin account + * @member {string} [administratorAccount.password] Password of admin account + * @member {string} [administratorAccount.publicKeyData] Public key data + * @member {string} [administratorAccount.privateKeyData] Private key data + */ + constructor() { + } + + /** + * Defines the metadata of HDInsightProperties + * + * @returns {object} metadata of HDInsightProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'HDInsight_properties', + type: { + name: 'Composite', + className: 'HDInsightProperties', + modelProperties: { + sshPort: { + required: false, + serializedName: 'sshPort', + type: { + name: 'Number' + } + }, + address: { + required: false, + serializedName: 'address', + type: { + name: 'String' + } + }, + administratorAccount: { + required: false, + serializedName: 'administratorAccount', + type: { + name: 'Composite', + className: 'VirtualMachineSshCredentials' + } + } + } + } + }; + } +} + +module.exports = HDInsightProperties; diff --git a/lib/services/machinelearningservicesManagement/lib/models/index.d.ts b/lib/services/machinelearningservicesManagement/lib/models/index.d.ts index b61ebda827..fac4a80406 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/index.d.ts +++ b/lib/services/machinelearningservicesManagement/lib/models/index.d.ts @@ -96,6 +96,9 @@ export interface Resource extends BaseResource { * name in mutable * @member {date} [creationTime] The creation time of the machine learning * workspace in ISO8601 format. + * @member {string} [batchaiWorkspace] ARM id of the Batch AI workspace + * associated with this workspace. This cannot be changed once the workspace + * has been created * @member {string} [keyVault] ARM id of the key vault associated with this * workspace. This cannot be changed once the workspace has been created * @member {string} [applicationInsights] ARM id of the application insights @@ -119,6 +122,7 @@ export interface Workspace extends Resource { description?: string; friendlyName?: string; readonly creationTime?: Date; + batchaiWorkspace?: string; keyVault?: string; applicationInsights?: string; containerRegistry?: string; @@ -257,6 +261,7 @@ export interface MachineLearningServiceError { * @constructor * Machine Learning compute object. * + * @member {string} [computeLocation] Location for the underlying compute * @member {string} [provisioningState] The provision state of the cluster. * Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. * Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', @@ -271,6 +276,7 @@ export interface MachineLearningServiceError { * @member {string} computeType Polymorphic Discriminator */ export interface Compute { + computeLocation?: string; readonly provisioningState?: string; description?: string; readonly createdOn?: Date; @@ -287,6 +293,8 @@ export interface Compute { * Machine Learning compute object wrapped into ARM resource envelope. * * @member {object} [properties] Compute properties + * @member {string} [properties.computeLocation] Location for the underlying + * compute * @member {string} [properties.provisioningState] The provision state of the * cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and * Failed. Possible values include: 'Unknown', 'Updating', 'Creating', @@ -325,9 +333,9 @@ export interface SystemService { * @class * Initializes a new instance of the SslConfiguration class. * @constructor - * The ssl configugation for scoring + * The SSL configuration for scoring * - * @member {string} [status] Enable or disable ssl for scoring. Possible values + * @member {string} [status] Enable or disable SSL for scoring. Possible values * include: 'Disabled', 'Enabled' * @member {string} [cert] Cert data * @member {string} [key] Key data @@ -351,7 +359,7 @@ export interface SslConfiguration { * @member {number} [agentCount] Number of agents * @member {string} [agentVMSize] Agent virtual machine size * @member {object} [sslConfiguration] SSL configuration - * @member {string} [sslConfiguration.status] Enable or disable ssl for + * @member {string} [sslConfiguration.status] Enable or disable SSL for * scoring. Possible values include: 'Disabled', 'Enabled' * @member {string} [sslConfiguration.cert] Cert data * @member {string} [sslConfiguration.key] Key data @@ -377,7 +385,7 @@ export interface AKSProperties { * @member {number} [properties.agentCount] Number of agents * @member {string} [properties.agentVMSize] Agent virtual machine size * @member {object} [properties.sslConfiguration] SSL configuration - * @member {string} [properties.sslConfiguration.status] Enable or disable ssl + * @member {string} [properties.sslConfiguration.status] Enable or disable SSL * for scoring. Possible values include: 'Disabled', 'Enabled' * @member {string} [properties.sslConfiguration.cert] Cert data * @member {string} [properties.sslConfiguration.key] Key data @@ -467,6 +475,8 @@ export interface VirtualMachineSshCredentials { * Initializes a new instance of the VirtualMachineProperties class. * @constructor * @member {string} [virtualMachineSize] Virtual Machine size + * @member {number} [sshPort] Port open for ssh connections. + * @member {string} [address] Public IP address of the virtual machine. * @member {object} [administratorAccount] Admin credentials for virtual * machine * @member {string} [administratorAccount.username] Username of admin account @@ -476,6 +486,8 @@ export interface VirtualMachineSshCredentials { */ export interface VirtualMachineProperties { virtualMachineSize?: string; + sshPort?: number; + address?: string; administratorAccount?: VirtualMachineSshCredentials; } @@ -487,6 +499,9 @@ export interface VirtualMachineProperties { * * @member {object} [properties] * @member {string} [properties.virtualMachineSize] Virtual Machine size + * @member {number} [properties.sshPort] Port open for ssh connections. + * @member {string} [properties.address] Public IP address of the virtual + * machine. * @member {object} [properties.administratorAccount] Admin credentials for * virtual machine * @member {string} [properties.administratorAccount.username] Username of @@ -502,6 +517,53 @@ export interface VirtualMachine extends Compute { properties?: VirtualMachineProperties; } +/** + * @class + * Initializes a new instance of the HDInsightProperties class. + * @constructor + * @member {number} [sshPort] Port open for ssh connections on the master node + * of the cluster. + * @member {string} [address] Public IP address of the master node of the + * cluster. + * @member {object} [administratorAccount] Admin credentials for master node of + * the cluster + * @member {string} [administratorAccount.username] Username of admin account + * @member {string} [administratorAccount.password] Password of admin account + * @member {string} [administratorAccount.publicKeyData] Public key data + * @member {string} [administratorAccount.privateKeyData] Private key data + */ +export interface HDInsightProperties { + sshPort?: number; + address?: string; + administratorAccount?: VirtualMachineSshCredentials; +} + +/** + * @class + * Initializes a new instance of the HDInsight class. + * @constructor + * A HDInsight compute. + * + * @member {object} [properties] + * @member {number} [properties.sshPort] Port open for ssh connections on the + * master node of the cluster. + * @member {string} [properties.address] Public IP address of the master node + * of the cluster. + * @member {object} [properties.administratorAccount] Admin credentials for + * master node of the cluster + * @member {string} [properties.administratorAccount.username] Username of + * admin account + * @member {string} [properties.administratorAccount.password] Password of + * admin account + * @member {string} [properties.administratorAccount.publicKeyData] Public key + * data + * @member {string} [properties.administratorAccount.privateKeyData] Private + * key data + */ +export interface HDInsight extends Compute { + properties?: HDInsightProperties; +} + /** * @class * Initializes a new instance of the DataFactory class. @@ -563,7 +625,7 @@ export interface AksComputeSecrets extends ComputeSecrets { * @constructor * Secrets related to a Machine Learning compute based on AKS. * - * @member {object} [administratorAccount] Admin creadentials for virtual + * @member {object} [administratorAccount] Admin credentials for virtual * machine. * @member {string} [administratorAccount.username] Username of admin account * @member {string} [administratorAccount.password] Password of admin account diff --git a/lib/services/machinelearningservicesManagement/lib/models/index.js b/lib/services/machinelearningservicesManagement/lib/models/index.js index 17a4a5b046..7daf015a2f 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/index.js +++ b/lib/services/machinelearningservicesManagement/lib/models/index.js @@ -42,6 +42,8 @@ exports.BatchAI = require('./batchAI'); exports.VirtualMachineSshCredentials = require('./virtualMachineSshCredentials'); exports.VirtualMachineProperties = require('./virtualMachineProperties'); exports.VirtualMachine = require('./virtualMachine'); +exports.HDInsightProperties = require('./hDInsightProperties'); +exports.HDInsight = require('./hDInsight'); exports.DataFactory = require('./dataFactory'); exports.ServicePrincipalCredentials = require('./servicePrincipalCredentials'); exports.ComputeSecrets = require('./computeSecrets'); @@ -55,6 +57,7 @@ exports.discriminators = { 'Compute.AKS' : exports.AKS, 'Compute.BatchAI' : exports.BatchAI, 'Compute.VirtualMachine' : exports.VirtualMachine, + 'Compute.HDInsight' : exports.HDInsight, 'Compute.DataFactory' : exports.DataFactory, 'ComputeSecrets' : exports.ComputeSecrets, 'ComputeSecrets.AKS' : exports.AksComputeSecrets, diff --git a/lib/services/machinelearningservicesManagement/lib/models/sslConfiguration.js b/lib/services/machinelearningservicesManagement/lib/models/sslConfiguration.js index 0dfecc4b8a..fbbf559a6c 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/sslConfiguration.js +++ b/lib/services/machinelearningservicesManagement/lib/models/sslConfiguration.js @@ -11,13 +11,13 @@ 'use strict'; /** - * The ssl configugation for scoring + * The SSL configuration for scoring * */ class SslConfiguration { /** * Create a SslConfiguration. - * @member {string} [status] Enable or disable ssl for scoring. Possible + * @member {string} [status] Enable or disable SSL for scoring. Possible * values include: 'Disabled', 'Enabled' * @member {string} [cert] Cert data * @member {string} [key] Key data diff --git a/lib/services/machinelearningservicesManagement/lib/models/virtualMachine.js b/lib/services/machinelearningservicesManagement/lib/models/virtualMachine.js index baa37a85b0..4f12884060 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/virtualMachine.js +++ b/lib/services/machinelearningservicesManagement/lib/models/virtualMachine.js @@ -22,6 +22,9 @@ class VirtualMachine extends models['Compute'] { * Create a VirtualMachine. * @member {object} [properties] * @member {string} [properties.virtualMachineSize] Virtual Machine size + * @member {number} [properties.sshPort] Port open for ssh connections. + * @member {string} [properties.address] Public IP address of the virtual + * machine. * @member {object} [properties.administratorAccount] Admin credentials for * virtual machine * @member {string} [properties.administratorAccount.username] Username of @@ -56,6 +59,13 @@ class VirtualMachine extends models['Compute'] { uberParent: 'Compute', className: 'VirtualMachine', modelProperties: { + computeLocation: { + required: false, + serializedName: 'computeLocation', + type: { + name: 'String' + } + }, provisioningState: { required: false, readOnly: true, diff --git a/lib/services/machinelearningservicesManagement/lib/models/virtualMachineProperties.js b/lib/services/machinelearningservicesManagement/lib/models/virtualMachineProperties.js index 77a5bb3c69..a9f0acb5d1 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/virtualMachineProperties.js +++ b/lib/services/machinelearningservicesManagement/lib/models/virtualMachineProperties.js @@ -17,6 +17,8 @@ class VirtualMachineProperties { /** * Create a VirtualMachineProperties. * @member {string} [virtualMachineSize] Virtual Machine size + * @member {number} [sshPort] Port open for ssh connections. + * @member {string} [address] Public IP address of the virtual machine. * @member {object} [administratorAccount] Admin credentials for virtual * machine * @member {string} [administratorAccount.username] Username of admin account @@ -48,6 +50,20 @@ class VirtualMachineProperties { name: 'String' } }, + sshPort: { + required: false, + serializedName: 'sshPort', + type: { + name: 'Number' + } + }, + address: { + required: false, + serializedName: 'address', + type: { + name: 'String' + } + }, administratorAccount: { required: false, serializedName: 'administratorAccount', diff --git a/lib/services/machinelearningservicesManagement/lib/models/virtualMachineSecrets.js b/lib/services/machinelearningservicesManagement/lib/models/virtualMachineSecrets.js index bf304791e3..48604a1dda 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/virtualMachineSecrets.js +++ b/lib/services/machinelearningservicesManagement/lib/models/virtualMachineSecrets.js @@ -20,7 +20,7 @@ const models = require('./index'); class VirtualMachineSecrets extends models['ComputeSecrets'] { /** * Create a VirtualMachineSecrets. - * @member {object} [administratorAccount] Admin creadentials for virtual + * @member {object} [administratorAccount] Admin credentials for virtual * machine. * @member {string} [administratorAccount.username] Username of admin account * @member {string} [administratorAccount.password] Password of admin account diff --git a/lib/services/machinelearningservicesManagement/lib/models/workspace.js b/lib/services/machinelearningservicesManagement/lib/models/workspace.js index 9a70acd959..31fb79708f 100644 --- a/lib/services/machinelearningservicesManagement/lib/models/workspace.js +++ b/lib/services/machinelearningservicesManagement/lib/models/workspace.js @@ -27,6 +27,9 @@ class Workspace extends models['Resource'] { * name in mutable * @member {date} [creationTime] The creation time of the machine learning * workspace in ISO8601 format. + * @member {string} [batchaiWorkspace] ARM id of the Batch AI workspace + * associated with this workspace. This cannot be changed once the workspace + * has been created * @member {string} [keyVault] ARM id of the key vault associated with this * workspace. This cannot be changed once the workspace has been created * @member {string} [applicationInsights] ARM id of the application insights @@ -147,6 +150,13 @@ class Workspace extends models['Resource'] { name: 'DateTime' } }, + batchaiWorkspace: { + required: false, + serializedName: 'properties.batchaiWorkspace', + type: { + name: 'String' + } + }, keyVault: { required: false, serializedName: 'properties.keyVault', diff --git a/lib/services/machinelearningservicesManagement/lib/operations/index.d.ts b/lib/services/machinelearningservicesManagement/lib/operations/index.d.ts index 1477888e9e..a9c57333da 100644 --- a/lib/services/machinelearningservicesManagement/lib/operations/index.d.ts +++ b/lib/services/machinelearningservicesManagement/lib/operations/index.d.ts @@ -160,6 +160,10 @@ export interface Workspaces { * @param {string} [parameters.friendlyName] The friendly name for this * workspace. This name in mutable * + * @param {string} [parameters.batchaiWorkspace] ARM id of the Batch AI + * workspace associated with this workspace. This cannot be changed once the + * workspace has been created + * * @param {string} [parameters.keyVault] ARM id of the key vault associated * with this workspace. This cannot be changed once the workspace has been * created @@ -214,6 +218,10 @@ export interface Workspaces { * @param {string} [parameters.friendlyName] The friendly name for this * workspace. This name in mutable * + * @param {string} [parameters.batchaiWorkspace] ARM id of the Batch AI + * workspace associated with this workspace. This cannot be changed once the + * workspace has been created + * * @param {string} [parameters.keyVault] ARM id of the key vault associated * with this workspace. This cannot be changed once the workspace has been * created @@ -936,6 +944,9 @@ export interface MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -979,6 +990,9 @@ export interface MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1089,6 +1103,70 @@ export interface MachineLearningCompute { deleteMethod(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + systemUpdateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + systemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + systemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback): void; + systemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets secrets related to Machine Learning compute (storage keys, service * credentials, etc). @@ -1111,7 +1189,7 @@ export interface MachineLearningCompute { * * @reject {Error|ServiceError} - The error object. */ - getKeysWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listKeysWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets secrets related to Machine Learning compute (storage keys, service @@ -1151,9 +1229,9 @@ export interface MachineLearningCompute { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getKeys(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getKeys(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback): void; - getKeys(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listKeys(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listKeys(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback): void; + listKeys(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -1172,6 +1250,9 @@ export interface MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1215,6 +1296,9 @@ export interface MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1325,6 +1409,70 @@ export interface MachineLearningCompute { beginDeleteMethod(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginSystemUpdateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginSystemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginSystemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback): void; + beginSystemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets computes in specified workspace. * diff --git a/lib/services/machinelearningservicesManagement/lib/operations/machineLearningCompute.js b/lib/services/machinelearningservicesManagement/lib/operations/machineLearningCompute.js index 36035a180b..8b590f9db7 100644 --- a/lib/services/machinelearningservicesManagement/lib/operations/machineLearningCompute.js +++ b/lib/services/machinelearningservicesManagement/lib/operations/machineLearningCompute.js @@ -80,7 +80,7 @@ function _listByWorkspace(resourceGroupName, workspaceName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); @@ -236,7 +236,7 @@ function _get(resourceGroupName, workspaceName, computeName, options, callback) // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); @@ -342,6 +342,9 @@ function _get(resourceGroupName, workspaceName, computeName, options, callback) * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -492,6 +495,72 @@ function _deleteMethod(resourceGroupName, workspaceName, computeName, options, c }); } + +/** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _systemUpdate(resourceGroupName, workspaceName, computeName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * Gets secrets related to Machine Learning compute (storage keys, service * credentials, etc). @@ -521,7 +590,7 @@ function _deleteMethod(resourceGroupName, workspaceName, computeName, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _getKeys(resourceGroupName, workspaceName, computeName, options, callback) { +function _listKeys(resourceGroupName, workspaceName, computeName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -557,7 +626,7 @@ function _getKeys(resourceGroupName, workspaceName, computeName, options, callba // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); @@ -662,6 +731,9 @@ function _getKeys(resourceGroupName, workspaceName, computeName, options, callba * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -733,7 +805,7 @@ function _beginCreateOrUpdate(resourceGroupName, workspaceName, computeName, par // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); @@ -916,7 +988,7 @@ function _beginDeleteMethod(resourceGroupName, workspaceName, computeName, optio // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); @@ -988,6 +1060,141 @@ function _beginDeleteMethod(resourceGroupName, workspaceName, computeName, optio }); } +/** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (workspaceName === null || workspaceName === undefined || typeof workspaceName.valueOf() !== 'string') { + throw new Error('workspaceName cannot be null or undefined and it must be of type string.'); + } + if (computeName === null || computeName === undefined || typeof computeName.valueOf() !== 'string') { + throw new Error('computeName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{workspaceName}', encodeURIComponent(workspaceName)); + requestUrl = requestUrl.replace('{computeName}', encodeURIComponent(computeName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['MachineLearningServiceError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Gets computes in specified workspace. * @@ -1129,9 +1336,11 @@ class MachineLearningCompute { this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; - this._getKeys = _getKeys; + this._systemUpdate = _systemUpdate; + this._listKeys = _listKeys; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; + this._beginSystemUpdate = _beginSystemUpdate; this._listByWorkspaceNext = _listByWorkspaceNext; } @@ -1338,6 +1547,9 @@ class MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1393,6 +1605,9 @@ class MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1545,6 +1760,97 @@ class MachineLearningCompute { } } + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + systemUpdateWithHttpOperationResponse(resourceGroupName, workspaceName, computeName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._systemUpdate(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + systemUpdate(resourceGroupName, workspaceName, computeName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._systemUpdate(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._systemUpdate(resourceGroupName, workspaceName, computeName, options, optionalCallback); + } + } + /** * Gets secrets related to Machine Learning compute (storage keys, service * credentials, etc). @@ -1567,11 +1873,11 @@ class MachineLearningCompute { * * @reject {Error} - The error object. */ - getKeysWithHttpOperationResponse(resourceGroupName, workspaceName, computeName, options) { + listKeysWithHttpOperationResponse(resourceGroupName, workspaceName, computeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getKeys(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + self._listKeys(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1619,7 +1925,7 @@ class MachineLearningCompute { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getKeys(resourceGroupName, workspaceName, computeName, options, optionalCallback) { + listKeys(resourceGroupName, workspaceName, computeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1628,14 +1934,14 @@ class MachineLearningCompute { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getKeys(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + self._listKeys(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getKeys(resourceGroupName, workspaceName, computeName, options, optionalCallback); + return self._listKeys(resourceGroupName, workspaceName, computeName, options, optionalCallback); } } @@ -1655,6 +1961,9 @@ class MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1710,6 +2019,9 @@ class MachineLearningCompute { * * @param {object} [parameters.properties] Compute properties * + * @param {string} [parameters.properties.computeLocation] Location for the + * underlying compute + * * @param {string} [parameters.properties.description] The description of the * Machine Learning compute. * @@ -1862,6 +2174,97 @@ class MachineLearningCompute { } } + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginSystemUpdateWithHttpOperationResponse(resourceGroupName, workspaceName, computeName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * System Update On Machine Learning compute. + * + * @param {string} resourceGroupName Name of the resource group in which + * workspace is located. + * + * @param {string} workspaceName Name of Azure Machine Learning workspace. + * + * @param {string} computeName Name of the Azure Machine Learning compute. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginSystemUpdate(resourceGroupName, workspaceName, computeName, options, optionalCallback); + } + } + /** * Gets computes in specified workspace. * diff --git a/lib/services/machinelearningservicesManagement/lib/operations/workspaces.js b/lib/services/machinelearningservicesManagement/lib/operations/workspaces.js index dc4a77396c..68fcce155d 100644 --- a/lib/services/machinelearningservicesManagement/lib/operations/workspaces.js +++ b/lib/services/machinelearningservicesManagement/lib/operations/workspaces.js @@ -177,6 +177,10 @@ function _get(resourceGroupName, workspaceName, options, callback) { * @param {string} [parameters.friendlyName] The friendly name for this * workspace. This name in mutable * + * @param {string} [parameters.batchaiWorkspace] ARM id of the Batch AI + * workspace associated with this workspace. This cannot be changed once the + * workspace has been created + * * @param {string} [parameters.keyVault] ARM id of the key vault associated * with this workspace. This cannot be changed once the workspace has been * created @@ -1635,6 +1639,10 @@ class Workspaces { * @param {string} [parameters.friendlyName] The friendly name for this * workspace. This name in mutable * + * @param {string} [parameters.batchaiWorkspace] ARM id of the Batch AI + * workspace associated with this workspace. This cannot be changed once the + * workspace has been created + * * @param {string} [parameters.keyVault] ARM id of the key vault associated * with this workspace. This cannot be changed once the workspace has been * created @@ -1701,6 +1709,10 @@ class Workspaces { * @param {string} [parameters.friendlyName] The friendly name for this * workspace. This name in mutable * + * @param {string} [parameters.batchaiWorkspace] ARM id of the Batch AI + * workspace associated with this workspace. This cannot be changed once the + * workspace has been created + * * @param {string} [parameters.keyVault] ARM id of the key vault associated * with this workspace. This cannot be changed once the workspace has been * created