Regenerate azure-arm-machinelearningservices

This commit is contained in:
Dan Schulte 2018-11-06 13:18:42 -08:00
Родитель 441043ea43
Коммит 0254c1c2d7
15 изменённых файлов: 931 добавлений и 16 удалений

Просмотреть файл

@ -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,

Просмотреть файл

@ -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,

Просмотреть файл

@ -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,

Просмотреть файл

@ -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',

Просмотреть файл

@ -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,

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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',
@ -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.

Просмотреть файл

@ -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,

Просмотреть файл

@ -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,

Просмотреть файл

@ -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',

Просмотреть файл

@ -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',

Просмотреть файл

@ -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>): 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<null>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
systemUpdateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<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
*
* @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<void>;
systemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback<void>): void;
systemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): 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<HttpOperationResponse<models.ComputeSecrets>>;
listKeysWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ComputeSecrets>>;
/**
* 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<models.ComputeSecrets>;
getKeys(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback<models.ComputeSecrets>): void;
getKeys(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ComputeSecrets>): void;
listKeys(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ComputeSecrets>;
listKeys(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback<models.ComputeSecrets>): void;
listKeys(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ComputeSecrets>): 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>): 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<null>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
beginSystemUpdateWithHttpOperationResponse(resourceGroupName: string, workspaceName: string, computeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<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
*
* @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<void>;
beginSystemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, callback: ServiceCallback<void>): void;
beginSystemUpdate(resourceGroupName: string, workspaceName: string, computeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<void>): void;
/**
* Gets computes in specified workspace.
*

Просмотреть файл

@ -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<null>} - 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<null>} - 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.
*

Просмотреть файл

@ -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