From 2a08e817b157052c2a86776238206913fbc3af73 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 27 Jan 2021 01:19:54 +0000 Subject: [PATCH] CodeGen from PR 12662 in Azure/azure-rest-api-specs Merge 92ae07bf0bff830ea81aaac587495ba969f4df1a into 05b638ddd0e8d125075c72086c81cd9e700f1fbd --- .../arm-machinelearningservices/LICENSE.txt | 2 +- .../src/models/index.ts | 133 ++++++++++++++---- .../models/machineLearningComputeMappers.ts | 2 + .../src/models/mappers.ts | 121 ++++++++++++---- .../privateEndpointConnectionsMappers.ts | 2 + .../src/models/privateLinkResourcesMappers.ts | 2 + .../src/models/workspaceConnectionsMappers.ts | 2 + .../src/models/workspacesMappers.ts | 2 + .../src/operations/machineLearningCompute.ts | 52 +++++++ 9 files changed, 258 insertions(+), 60 deletions(-) diff --git a/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt b/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt +++ b/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 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 diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts index 77ada3593b7f..58295ba2c09e 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts @@ -702,8 +702,8 @@ export interface Identity { */ readonly tenantId?: string; /** - * The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', - * 'SystemAssigned,UserAssigned', 'None' + * The identity type. Possible values include: 'SystemAssigned', 'SystemAssigned,UserAssigned', + * 'UserAssigned', 'None' */ type: ResourceIdentityType; /** @@ -913,7 +913,7 @@ export interface SystemService { */ export interface SslConfiguration { /** - * Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled' + * Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled', 'Auto' */ status?: Status1; /** @@ -975,7 +975,7 @@ export interface AKSProperties { /** * Agent virtual machine size */ - agentVMSize?: string; + agentVmSize?: string; /** * SSL configuration */ @@ -1053,7 +1053,7 @@ export interface ScaleSettings { */ minNodeCount?: number; /** - * Node Idle Time before scaling down amlCompute + * Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. */ nodeIdleTimeBeforeScaleDown?: string; } @@ -1116,6 +1116,10 @@ export interface NodeStateCounts { * AML Compute properties */ export interface AmlComputeProperties { + /** + * Compute OS Type. Possible values include: 'Linux', 'Windows'. Default value: 'Linux'. + */ + osType?: OsType; /** * Virtual Machine Size */ @@ -1322,6 +1326,30 @@ export interface ComputeInstanceCreatedBy { readonly userId?: string; } +/** + * A user that can be assigned to a compute instance. + */ +export interface AssignedUser { + /** + * User’s AAD Object Id. + */ + objectId: string; + /** + * User’s AAD Tenant Id. + */ + tenantId: string; +} + +/** + * Settings for a personal compute instance. + */ +export interface PersonalComputeInstanceSettings { + /** + * Assigned User. A user explicitly assigned to a personal compute instance. + */ + assignedUser?: AssignedUser; +} + /** * The last operation on ComputeInstance. */ @@ -1393,6 +1421,15 @@ export interface ComputeInstanceProperties { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly state?: ComputeInstanceState; + /** + * Compute Instance Authorization type. The Compute Instance Authorization type. Available values + * are personal (default). Possible values include: 'personal'. Default value: 'personal'. + */ + computeInstanceAuthorizationType?: ComputeInstanceAuthorizationType; + /** + * Personal Compute Instance settings. Settings for a personal compute instance. + */ + personalComputeInstanceSettings?: PersonalComputeInstanceSettings; /** * The last operation on ComputeInstance. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1873,26 +1910,6 @@ export interface AmlComputeNodeInformation { readonly runId?: string; } -/** - * Compute node information related to a AmlCompute. - */ -export interface AmlComputeNodesInformation { - /** - * Polymorphic Discriminator - */ - computeType: "AmlCompute"; - /** - * The continuation token. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nextLink?: string; - /** - * The collection of returned AmlCompute nodes details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly nodes?: AmlComputeNodeInformation[]; -} - /** * Contains the possible cases for ComputeSecrets. */ @@ -2384,6 +2401,28 @@ export interface PaginatedComputeResourcesList extends Array { nextLink?: string; } +/** + * @interface + * Compute node information related to a AmlCompute. + * @extends Array + */ +export interface AmlComputeNodesInformation extends Array { + /** + * Polymorphic Discriminator + */ + computeType: "AmlCompute"; + /** + * The continuation token. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; + /** + * The collection of returned AmlCompute nodes details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nodes?: AmlComputeNodeInformation[]; +} + /** * @interface * List of skus with features @@ -2474,11 +2513,19 @@ export type Status = 'Undefined' | 'Success' | 'Failure' | 'InvalidQuotaBelowClu /** * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned', 'None' + * Possible values include: 'SystemAssigned', 'SystemAssigned,UserAssigned', 'UserAssigned', 'None' * @readonly * @enum {string} */ -export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned,UserAssigned' | 'None'; +export type ResourceIdentityType = 'SystemAssigned' | 'SystemAssigned,UserAssigned' | 'UserAssigned' | 'None'; + +/** + * Defines values for OsType. + * Possible values include: 'Linux', 'Windows' + * @readonly + * @enum {string} + */ +export type OsType = 'Linux' | 'Windows'; /** * Defines values for VmPriority. @@ -2530,6 +2577,14 @@ export type SshPublicAccess = 'Enabled' | 'Disabled'; */ export type ComputeInstanceState = 'Creating' | 'CreateFailed' | 'Deleting' | 'Running' | 'Restarting' | 'JobRunning' | 'SettingUp' | 'SetupFailed' | 'Starting' | 'Stopped' | 'Stopping' | 'UserSettingUp' | 'UserSetupFailed' | 'Unknown' | 'Unusable'; +/** + * Defines values for ComputeInstanceAuthorizationType. + * Possible values include: 'personal' + * @readonly + * @enum {string} + */ +export type ComputeInstanceAuthorizationType = 'personal'; + /** * Defines values for OperationName. * Possible values include: 'Create', 'Start', 'Stop', 'Restart', 'Reimage', 'Delete' @@ -2582,11 +2637,11 @@ export type UnderlyingResourceAction = 'Delete' | 'Detach'; /** * Defines values for Status1. - * Possible values include: 'Disabled', 'Enabled' + * Possible values include: 'Disabled', 'Enabled', 'Auto' * @readonly * @enum {string} */ -export type Status1 = 'Disabled' | 'Enabled'; +export type Status1 = 'Disabled' | 'Enabled' | 'Auto'; /** * Contains response data for the list operation. @@ -3228,6 +3283,26 @@ export type MachineLearningComputeListByWorkspaceNextResponse = PaginatedCompute }; }; +/** + * Contains response data for the listNodesNext operation. + */ +export type MachineLearningComputeListNodesNextResponse = AmlComputeNodesInformation & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AmlComputeNodesInformation; + }; +}; + /** * Contains response data for the listSkus operation. */ diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts index 456a73c75208..9db85d508977 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts @@ -16,6 +16,7 @@ export { AmlComputeNodeInformation, AmlComputeNodesInformation, AmlComputeProperties, + AssignedUser, BaseResource, ClusterUpdateParameters, Compute, @@ -50,6 +51,7 @@ export { NotebookPreparationError, NotebookResourceInfo, PaginatedComputeResourcesList, + PersonalComputeInstanceSettings, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts index 122cb25e5b8b..2add4eace5a1 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts @@ -1146,8 +1146,8 @@ export const Identity: msRest.CompositeMapper = { name: "Enum", allowedValues: [ "SystemAssigned", - "UserAssigned", "SystemAssigned,UserAssigned", + "UserAssigned", "None" ] } @@ -1611,8 +1611,8 @@ export const AKSProperties: msRest.CompositeMapper = { name: "Number" } }, - agentVMSize: { - serializedName: "agentVMSize", + agentVmSize: { + serializedName: "agentVmSize", type: { name: "String" } @@ -1772,6 +1772,13 @@ export const AmlComputeProperties: msRest.CompositeMapper = { name: "Composite", className: "AmlComputeProperties", modelProperties: { + osType: { + serializedName: "osType", + defaultValue: 'Linux', + type: { + name: "String" + } + }, vmSize: { serializedName: "vmSize", type: { @@ -1999,6 +2006,47 @@ export const ComputeInstanceCreatedBy: msRest.CompositeMapper = { } }; +export const AssignedUser: msRest.CompositeMapper = { + serializedName: "AssignedUser", + type: { + name: "Composite", + className: "AssignedUser", + modelProperties: { + objectId: { + required: true, + serializedName: "objectId", + type: { + name: "String" + } + }, + tenantId: { + required: true, + serializedName: "tenantId", + type: { + name: "String" + } + } + } + } +}; + +export const PersonalComputeInstanceSettings: msRest.CompositeMapper = { + serializedName: "PersonalComputeInstanceSettings", + type: { + name: "Composite", + className: "PersonalComputeInstanceSettings", + modelProperties: { + assignedUser: { + serializedName: "assignedUser", + type: { + name: "Composite", + className: "AssignedUser" + } + } + } + } +}; + export const ComputeInstanceLastOperation: msRest.CompositeMapper = { serializedName: "ComputeInstanceLastOperation", type: { @@ -2109,6 +2157,20 @@ export const ComputeInstanceProperties: msRest.CompositeMapper = { name: "String" } }, + computeInstanceAuthorizationType: { + serializedName: "computeInstanceAuthorizationType", + defaultValue: 'personal', + type: { + name: "String" + } + }, + personalComputeInstanceSettings: { + serializedName: "personalComputeInstanceSettings", + type: { + name: "Composite", + className: "PersonalComputeInstanceSettings" + } + }, lastOperation: { readOnly: true, serializedName: "lastOperation", @@ -2486,32 +2548,6 @@ export const AmlComputeNodeInformation: msRest.CompositeMapper = { } }; -export const AmlComputeNodesInformation: msRest.CompositeMapper = { - serializedName: "AmlCompute", - type: { - name: "Composite", - polymorphicDiscriminator: ComputeNodesInformation.type.polymorphicDiscriminator, - uberParent: "ComputeNodesInformation", - className: "AmlComputeNodesInformation", - modelProperties: { - ...ComputeNodesInformation.type.modelProperties, - nodes: { - readOnly: true, - serializedName: "nodes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AmlComputeNodeInformation" - } - } - } - } - } - } -}; - export const ComputeSecrets: msRest.CompositeMapper = { serializedName: "ComputeSecrets", type: { @@ -3235,6 +3271,32 @@ export const PaginatedComputeResourcesList: msRest.CompositeMapper = { } }; +export const AmlComputeNodesInformation: msRest.CompositeMapper = { + serializedName: "AmlCompute", + type: { + name: "Composite", + polymorphicDiscriminator: ComputeNodesInformation.type.polymorphicDiscriminator, + uberParent: "ComputeNodesInformation", + className: "AmlComputeNodesInformation", + modelProperties: { + ...ComputeNodesInformation.type.modelProperties, + nodes: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AmlComputeNodeInformation" + } + } + } + } + } + } +}; + export const SkuListResult: msRest.CompositeMapper = { serializedName: "SkuListResult", type: { @@ -3274,7 +3336,6 @@ export const discriminators = { 'Compute.Databricks' : Databricks, 'Compute.DataLakeAnalytics' : DataLakeAnalytics, 'ComputeNodesInformation' : ComputeNodesInformation, - 'ComputeNodesInformation.AmlCompute' : AmlComputeNodesInformation, 'ComputeSecrets' : ComputeSecrets, 'ComputeSecrets.AKS' : AksComputeSecrets, 'ComputeSecrets.VirtualMachine' : VirtualMachineSecrets, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts index e21b80f26ac8..320ac38c7a35 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts @@ -13,6 +13,7 @@ export { AKSProperties, AmlCompute, AmlComputeProperties, + AssignedUser, BaseResource, Compute, ComputeInstance, @@ -40,6 +41,7 @@ export { NodeStateCounts, NotebookPreparationError, NotebookResourceInfo, + PersonalComputeInstanceSettings, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts index 07a5f2631978..ebd26892e4fc 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts @@ -13,6 +13,7 @@ export { AKSProperties, AmlCompute, AmlComputeProperties, + AssignedUser, BaseResource, CloudError, Compute, @@ -41,6 +42,7 @@ export { NodeStateCounts, NotebookPreparationError, NotebookResourceInfo, + PersonalComputeInstanceSettings, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts index 448b8d85198f..c621c4e64ccd 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts @@ -13,6 +13,7 @@ export { AKSProperties, AmlCompute, AmlComputeProperties, + AssignedUser, BaseResource, Compute, ComputeInstance, @@ -41,6 +42,7 @@ export { NotebookPreparationError, NotebookResourceInfo, PaginatedWorkspaceConnectionsList, + PersonalComputeInstanceSettings, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts index d8e1137cd946..79852269166c 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts @@ -13,6 +13,7 @@ export { AKSProperties, AmlCompute, AmlComputeProperties, + AssignedUser, BaseResource, Compute, ComputeInstance, @@ -43,6 +44,7 @@ export { NotebookPreparationError, NotebookResourceInfo, Password, + PersonalComputeInstanceSettings, PrivateEndpoint, PrivateEndpointConnection, PrivateLinkResource, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts index 1fc94951a321..cf4af91a3c3e 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts @@ -418,6 +418,34 @@ export class MachineLearningCompute { listByWorkspaceNextOperationSpec, callback) as Promise; } + + /** + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNodesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNodesNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNodesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNodesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNodesNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -725,3 +753,27 @@ const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listNodesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AmlComputeNodesInformation + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +};