Skip to content

Commit

Permalink
Generated from 7b799bc9eb254336fa1ab2252daa23907f14c18f
Browse files Browse the repository at this point in the history
Merge pull request #2 from ramagott/vm-sizes

Update vmSizes API
  • Loading branch information
SDK Automation committed Aug 20, 2020
1 parent 8802858 commit fca167c
Show file tree
Hide file tree
Showing 6 changed files with 215 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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[];
}

/**
Expand Down Expand Up @@ -2108,6 +2135,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.
*/
Expand Down Expand Up @@ -2136,6 +2173,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;
}

Expand Down Expand Up @@ -2211,6 +2252,18 @@ export interface ListUsagesResult extends Array<Usage> {
readonly nextLink?: string;
}

/**
* @interface
* The List Virtual Machine size operation response.
* @extends Array<VirtualMachineSize>
*/
export interface VirtualMachineSizeListResult extends Array<VirtualMachineSize> {
/**
* The list of virtual machine sizes supported by AmlCompute.
*/
amlCompute?: VirtualMachineSize[];
}

/**
* @interface
* The List WorkspaceQuotasByVMFamily operation response.
Expand Down Expand Up @@ -2303,6 +2356,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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -2979,6 +3047,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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
export {
discriminators,
CloudError,
EstimatedVMPrice,
EstimatedVMPrices,
VirtualMachineSize,
VirtualMachineSizeListResult
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class VirtualMachineSizes {
* @param [options] The optional parameters
* @returns Promise<Models.VirtualMachineSizesListResponse>
*/
list(location: string, options?: msRest.RequestOptionsBase): Promise<Models.VirtualMachineSizesListResponse>;
list(location: string, options?: Models.VirtualMachineSizesListOptionalParams): Promise<Models.VirtualMachineSizesListResponse>;
/**
* @param location The location upon which virtual-machine-sizes is queried.
* @param callback The callback
Expand All @@ -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<Models.VirtualMachineSizeListResult>): void;
list(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.VirtualMachineSizeListResult>, callback?: msRest.ServiceCallback<Models.VirtualMachineSizeListResult>): Promise<Models.VirtualMachineSizesListResponse> {
list(location: string, options: Models.VirtualMachineSizesListOptionalParams, callback: msRest.ServiceCallback<Models.VirtualMachineSizeListResult>): void;
list(location: string, options?: Models.VirtualMachineSizesListOptionalParams | msRest.ServiceCallback<Models.VirtualMachineSizeListResult>, callback?: msRest.ServiceCallback<Models.VirtualMachineSizeListResult>): Promise<Models.VirtualMachineSizesListResponse> {
return this.client.sendOperationRequest(
{
location,
Expand All @@ -65,7 +65,9 @@ const listOperationSpec: msRest.OperationSpec = {
Parameters.subscriptionId
],
queryParameters: [
Parameters.apiVersion
Parameters.apiVersion,
Parameters.computeType,
Parameters.recommended
],
headerParameters: [
Parameters.acceptLanguage
Expand Down

0 comments on commit fca167c

Please sign in to comment.