From b9893aa52a6214f1639f0463498dbe254ee9583c Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 20 Aug 2020 18:19:26 +0000 Subject: [PATCH] Generated from 1531f0e6d9a37ddcb42515435db7ae115dae6d02 Merge pull request #3 from ninghu/ninhu/azureml-api-2020-08-01 Add missing definition of last operaton for compute instance --- .../azureMachineLearningWorkspacesContext.ts | 4 + .../src/models/index.ts | 138 ++++++++++++++-- .../models/machineLearningComputeMappers.ts | 1 + .../src/models/mappers.ts | 156 ++++++++++++++++-- .../src/models/parameters.ts | 21 +++ .../privateEndpointConnectionsMappers.ts | 1 + .../src/models/privateLinkResourcesMappers.ts | 1 + .../src/models/virtualMachineSizesMappers.ts | 2 + .../src/models/workspaceConnectionsMappers.ts | 1 + .../src/models/workspacesMappers.ts | 1 + .../src/operations/virtualMachineSizes.ts | 10 +- 11 files changed, 303 insertions(+), 33 deletions(-) diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts index 3a5361eeffc1..2967734cdc2f 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts @@ -19,6 +19,7 @@ export class AzureMachineLearningWorkspacesContext extends msRestAzure.AzureServ credentials: msRest.ServiceClientCredentials; subscriptionId: string; apiVersion?: string; + recommended?: boolean; /** * Initializes a new instance of the AzureMachineLearningWorkspaces class. @@ -52,6 +53,9 @@ export class AzureMachineLearningWorkspacesContext extends msRestAzure.AzureServ this.credentials = credentials; this.subscriptionId = subscriptionId; + if(options.recommended !== null && options.recommended !== undefined) { + this.recommended = options.recommended; + } if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts index 0676cf211482..fd3ee231eca9 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts @@ -430,6 +430,35 @@ export interface Usage { readonly name?: UsageName; } +/** + * The estimated price info for using a VM of a particular OS type, tier, etc. + */ +export interface EstimatedVMPrice { + /** + * Retail price. The price charged for using the VM. + */ + retailPrice: number; + /** + * OS type. Operating system type used by the VM. Possible values include: 'Linux', 'Windows' + */ + osType: VMPriceOSType; + /** + * VM tier. The type of the VM. Possible values include: 'Standard', 'LowPriority', 'Spot' + */ + vmTier: VMTier; +} + +/** + * The estimated price info for using a VM. + */ +export interface EstimatedVMPrices { + /** + * List of estimated VM prices. The list of estimated prices for using a VM of a particular OS + * type, tier, etc. + */ + values: EstimatedVMPrice[]; +} + /** * Describes the properties of a VM size. */ @@ -479,16 +508,14 @@ export interface VirtualMachineSize { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly premiumIO?: boolean; -} - -/** - * The List Virtual Machine size operation response. - */ -export interface VirtualMachineSizeListResult { /** - * The list of virtual machine sizes supported by AmlCompute. + * Estimated VM prices. The estimated price information for using a VM. */ - amlCompute?: VirtualMachineSize[]; + estimatedVMPrices?: EstimatedVMPrices; + /** + * Supported Compute Types. Specifies the compute types supported by the virtual machine size. + */ + supportedComputeTypes?: string[]; } /** @@ -1270,6 +1297,26 @@ export interface ComputeInstanceCreatedBy { readonly userId?: string; } +/** + * The last operation on ComputeInstance. + */ +export interface ComputeInstanceLastOperation { + /** + * Name of the last operation. Possible values include: 'Create', 'Start', 'Stop', 'Restart', + * 'Reimage', 'Delete' + */ + operationName?: OperationName; + /** + * Time of the last operation. + */ + operationTime?: Date; + /** + * Operation status. Possible values include: 'InProgress', 'Succeeded', 'CreateFailed', + * 'StartFailed', 'StopFailed', 'RestartFailed', 'ReimageFailed', 'DeleteFailed' + */ + operationStatus?: OperationStatus; +} + /** * Compute Instance properties */ @@ -1316,12 +1363,16 @@ export interface ComputeInstanceProperties { readonly errors?: MachineLearningServiceError[]; /** * The current state of this ComputeInstance. Possible values include: 'Creating', - * 'CreateFailed', 'Deleting', 'Running', 'Restarting', 'RestartFailed', 'JobRunning', - * 'SettingUp', 'Starting', 'StartFailed', 'StopFailed', 'Stopped', 'Stopping', 'UserSettingUp', - * 'Unknown', 'Unusable' + * 'CreateFailed', 'Deleting', 'Running', 'Restarting', 'JobRunning', 'SettingUp', 'SetupFailed', + * 'Starting', 'Stopped', 'Stopping', 'UserSettingUp', 'UserSetupFailed', 'Unknown', 'Unusable' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly state?: ComputeInstanceState; + /** + * The last operation on ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastOperation?: ComputeInstanceLastOperation; } /** @@ -2108,6 +2159,16 @@ export interface WorkspacesListBySubscriptionOptionalParams extends msRest.Reque skiptoken?: string; } +/** + * Optional Parameters. + */ +export interface VirtualMachineSizesListOptionalParams extends msRest.RequestOptionsBase { + /** + * Type of compute to filter by. + */ + computeType?: string; +} + /** * Optional Parameters. */ @@ -2136,6 +2197,10 @@ export interface MachineLearningComputeListByWorkspaceOptionalParams extends msR * An interface representing AzureMachineLearningWorkspacesOptions. */ export interface AzureMachineLearningWorkspacesOptions extends AzureServiceClientOptions { + /** + * Specifies whether to return recommended vm sizes or all vm sizes + */ + recommended?: boolean; baseUri?: string; } @@ -2211,6 +2276,18 @@ export interface ListUsagesResult extends Array { readonly nextLink?: string; } +/** + * @interface + * The List Virtual Machine size operation response. + * @extends Array + */ +export interface VirtualMachineSizeListResult extends Array { + /** + * The list of virtual machine sizes supported by AmlCompute. + */ + amlCompute?: VirtualMachineSize[]; +} + /** * @interface * The List WorkspaceQuotasByVMFamily operation response. @@ -2303,6 +2380,22 @@ export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating */ export type UsageUnit = 'Count'; +/** + * Defines values for VMPriceOSType. + * Possible values include: 'Linux', 'Windows' + * @readonly + * @enum {string} + */ +export type VMPriceOSType = 'Linux' | 'Windows'; + +/** + * Defines values for VMTier. + * Possible values include: 'Standard', 'LowPriority', 'Spot' + * @readonly + * @enum {string} + */ +export type VMTier = 'Standard' | 'LowPriority' | 'Spot'; + /** * Defines values for QuotaUnit. * Possible values include: 'Count' @@ -2373,12 +2466,29 @@ export type SshPublicAccess = 'Enabled' | 'Disabled'; /** * Defines values for ComputeInstanceState. * Possible values include: 'Creating', 'CreateFailed', 'Deleting', 'Running', 'Restarting', - * 'RestartFailed', 'JobRunning', 'SettingUp', 'Starting', 'StartFailed', 'StopFailed', 'Stopped', - * 'Stopping', 'UserSettingUp', 'Unknown', 'Unusable' + * 'JobRunning', 'SettingUp', 'SetupFailed', 'Starting', 'Stopped', 'Stopping', 'UserSettingUp', + * 'UserSetupFailed', 'Unknown', 'Unusable' + * @readonly + * @enum {string} + */ +export type ComputeInstanceState = 'Creating' | 'CreateFailed' | 'Deleting' | 'Running' | 'Restarting' | 'JobRunning' | 'SettingUp' | 'SetupFailed' | 'Starting' | 'Stopped' | 'Stopping' | 'UserSettingUp' | 'UserSetupFailed' | 'Unknown' | 'Unusable'; + +/** + * Defines values for OperationName. + * Possible values include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' + * @readonly + * @enum {string} + */ +export type OperationName = 'Create' | 'Start' | 'Stop' | 'Restart' | 'Reimage' | 'Delete'; + +/** + * Defines values for OperationStatus. + * Possible values include: 'InProgress', 'Succeeded', 'CreateFailed', 'StartFailed', 'StopFailed', + * 'RestartFailed', 'ReimageFailed', 'DeleteFailed' * @readonly * @enum {string} */ -export type ComputeInstanceState = 'Creating' | 'CreateFailed' | 'Deleting' | 'Running' | 'Restarting' | 'RestartFailed' | 'JobRunning' | 'SettingUp' | 'Starting' | 'StartFailed' | 'StopFailed' | 'Stopped' | 'Stopping' | 'UserSettingUp' | 'Unknown' | 'Unusable'; +export type OperationStatus = 'InProgress' | 'Succeeded' | 'CreateFailed' | 'StartFailed' | 'StopFailed' | 'RestartFailed' | 'ReimageFailed' | 'DeleteFailed'; /** * Defines values for NodeState. diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts index 3958c8c9a940..3bcf8fd514d9 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts @@ -23,6 +23,7 @@ export { ComputeInstanceApplication, ComputeInstanceConnectivityEndpoints, ComputeInstanceCreatedBy, + ComputeInstanceLastOperation, ComputeInstanceProperties, ComputeInstanceSshSettings, ComputeNodesInformation, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts index c49fd9fb0842..b1ea5a6a75fa 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts @@ -691,6 +691,78 @@ export const Usage: msRest.CompositeMapper = { } }; +export const EstimatedVMPrice: msRest.CompositeMapper = { + serializedName: "EstimatedVMPrice", + type: { + name: "Composite", + className: "EstimatedVMPrice", + modelProperties: { + retailPrice: { + required: true, + serializedName: "retailPrice", + type: { + name: "Number" + } + }, + osType: { + required: true, + serializedName: "osType", + type: { + name: "String" + } + }, + vmTier: { + required: true, + serializedName: "vmTier", + type: { + name: "String" + } + } + } + } +}; + +export const EstimatedVMPrices: msRest.CompositeMapper = { + serializedName: "EstimatedVMPrices", + type: { + name: "Composite", + className: "EstimatedVMPrices", + modelProperties: { + billingCurrency: { + required: true, + isConstant: true, + serializedName: "billingCurrency", + defaultValue: 'USD', + type: { + name: "String" + } + }, + unitOfMeasure: { + required: true, + isConstant: true, + serializedName: "unitOfMeasure", + defaultValue: 'OneHour', + type: { + name: "String" + } + }, + values: { + required: true, + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EstimatedVMPrice" + } + } + } + } + } + } +}; + export const VirtualMachineSize: msRest.CompositeMapper = { serializedName: "VirtualMachineSize", type: { @@ -759,25 +831,21 @@ export const VirtualMachineSize: msRest.CompositeMapper = { type: { name: "Boolean" } - } - } - } -}; - -export const VirtualMachineSizeListResult: msRest.CompositeMapper = { - serializedName: "VirtualMachineSizeListResult", - type: { - name: "Composite", - className: "VirtualMachineSizeListResult", - modelProperties: { - amlCompute: { - serializedName: "amlCompute", + }, + estimatedVMPrices: { + serializedName: "estimatedVMPrices", + type: { + name: "Composite", + className: "EstimatedVMPrices" + } + }, + supportedComputeTypes: { + serializedName: "supportedComputeTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "VirtualMachineSize" + name: "String" } } } @@ -1889,6 +1957,34 @@ export const ComputeInstanceCreatedBy: msRest.CompositeMapper = { } }; +export const ComputeInstanceLastOperation: msRest.CompositeMapper = { + serializedName: "ComputeInstanceLastOperation", + type: { + name: "Composite", + className: "ComputeInstanceLastOperation", + modelProperties: { + operationName: { + serializedName: "operationName", + type: { + name: "String" + } + }, + operationTime: { + serializedName: "operationTime", + type: { + name: "DateTime" + } + }, + operationStatus: { + serializedName: "operationStatus", + type: { + name: "String" + } + } + } + } +}; + export const ComputeInstanceProperties: msRest.CompositeMapper = { serializedName: "ComputeInstance_properties", type: { @@ -1970,6 +2066,14 @@ export const ComputeInstanceProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + lastOperation: { + readOnly: true, + serializedName: "lastOperation", + type: { + name: "Composite", + className: "ComputeInstanceLastOperation" + } } } } @@ -2979,6 +3083,28 @@ export const ListUsagesResult: msRest.CompositeMapper = { } }; +export const VirtualMachineSizeListResult: msRest.CompositeMapper = { + serializedName: "VirtualMachineSizeListResult", + type: { + name: "Composite", + className: "VirtualMachineSizeListResult", + modelProperties: { + amlCompute: { + serializedName: "amlCompute", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualMachineSize" + } + } + } + } + } + } +}; + export const ListWorkspaceQuotas: msRest.CompositeMapper = { serializedName: "ListWorkspaceQuotas", type: { diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts index 4ff232b43a09..6e4f9beea364 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts @@ -52,6 +52,18 @@ export const computeName: msRest.OperationURLParameter = { } } }; +export const computeType: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "computeType" + ], + mapper: { + serializedName: "compute-type", + type: { + name: "String" + } + } +}; export const connectionName: msRest.OperationURLParameter = { parameterPath: "connectionName", mapper: { @@ -96,6 +108,15 @@ export const privateEndpointConnectionName: msRest.OperationURLParameter = { } } }; +export const recommended: msRest.OperationQueryParameter = { + parameterPath: "recommended", + mapper: { + serializedName: "recommended", + type: { + name: "Boolean" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts index 112b17da302d..e1b2c38700b0 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts @@ -19,6 +19,7 @@ export { ComputeInstanceApplication, ComputeInstanceConnectivityEndpoints, ComputeInstanceCreatedBy, + ComputeInstanceLastOperation, ComputeInstanceProperties, ComputeInstanceSshSettings, ComputeResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts index 38ff763e1311..f6e773e72e3f 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts @@ -20,6 +20,7 @@ export { ComputeInstanceApplication, ComputeInstanceConnectivityEndpoints, ComputeInstanceCreatedBy, + ComputeInstanceLastOperation, ComputeInstanceProperties, ComputeInstanceSshSettings, ComputeResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/virtualMachineSizesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/virtualMachineSizesMappers.ts index 615f58d4604f..c2f2294b31e8 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/virtualMachineSizesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/virtualMachineSizesMappers.ts @@ -9,6 +9,8 @@ export { discriminators, CloudError, + EstimatedVMPrice, + EstimatedVMPrices, VirtualMachineSize, VirtualMachineSizeListResult } from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts index ea6506d8f769..dec7cd33e818 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts @@ -19,6 +19,7 @@ export { ComputeInstanceApplication, ComputeInstanceConnectivityEndpoints, ComputeInstanceCreatedBy, + ComputeInstanceLastOperation, ComputeInstanceProperties, ComputeInstanceSshSettings, ComputeResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts index 2698dee516bb..2345a45d0d45 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts @@ -19,6 +19,7 @@ export { ComputeInstanceApplication, ComputeInstanceConnectivityEndpoints, ComputeInstanceCreatedBy, + ComputeInstanceLastOperation, ComputeInstanceProperties, ComputeInstanceSshSettings, ComputeResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/virtualMachineSizes.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/virtualMachineSizes.ts index 5b2ddc6d7e39..cca06ac147ed 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/virtualMachineSizes.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/virtualMachineSizes.ts @@ -32,7 +32,7 @@ export class VirtualMachineSizes { * @param [options] The optional parameters * @returns Promise */ - list(location: string, options?: msRest.RequestOptionsBase): Promise; + list(location: string, options?: Models.VirtualMachineSizesListOptionalParams): Promise; /** * @param location The location upon which virtual-machine-sizes is queried. * @param callback The callback @@ -43,8 +43,8 @@ export class VirtualMachineSizes { * @param options The optional parameters * @param callback The callback */ - list(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(location: string, options: Models.VirtualMachineSizesListOptionalParams, callback: msRest.ServiceCallback): void; + list(location: string, options?: Models.VirtualMachineSizesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { location, @@ -65,7 +65,9 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.computeType, + Parameters.recommended ], headerParameters: [ Parameters.acceptLanguage