From 1c71f2c45f5eca257a8cb336687fce6ed0601792 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 17 Aug 2020 04:50:22 +0000 Subject: [PATCH] Generated from 618ba3abff3f62cd2acc17851b2b509efccf638a make status readonly and add required --- .../arm-machinelearningservices/LICENSE.txt | 2 +- .../arm-machinelearningservices/README.md | 5 +- .../arm-machinelearningservices/package.json | 14 +- .../rollup.config.js | 2 +- .../src/azureMachineLearningWorkspaces.ts | 109 + .../azureMachineLearningWorkspacesContext.ts | 2 +- .../src/models/index.ts | 1425 ++++++++++++- .../models/machineLearningComputeMappers.ts | 20 +- .../src/models/mappers.ts | 1809 +++++++++++++++-- .../src/models/notebooksMappers.ts | 16 + .../src/models/parameters.ts | 44 + .../privateEndpointConnectionsMappers.ts | 59 + .../src/models/privateLinkResourcesMappers.ts | 61 + .../src/models/quotasMappers.ts | 22 + .../src/models/workspaceConnectionsMappers.ts | 61 + .../src/models/workspaceFeaturesMappers.ts | 16 + .../src/models/workspacesMappers.ts | 19 + .../src/operations/index.ts | 6 + .../src/operations/machineLearningCompute.ts | 186 +- .../src/operations/notebooks.ts | 85 + .../operations/privateEndpointConnections.ts | 235 +++ .../src/operations/privateLinkResources.ts | 87 + .../src/operations/quotas.ts | 194 ++ .../src/operations/workspaceConnections.ts | 285 +++ .../src/operations/workspaceFeatures.ts | 136 ++ .../src/operations/workspaces.ts | 206 +- .../arm-machinelearningservices/tsconfig.json | 2 +- 27 files changed, 4695 insertions(+), 413 deletions(-) create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/notebooksMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/quotasMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceFeaturesMappers.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/notebooks.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateEndpointConnections.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateLinkResources.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/quotas.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceConnections.ts create mode 100644 sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceFeatures.ts diff --git a/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt b/sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt index b73b4a1293c3..ea8fb1516028 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) 2019 Microsoft +Copyright (c) 2020 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/README.md b/sdk/machinelearningservices/arm-machinelearningservices/README.md index a8f0b875f3da..8f56ae3f327e 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/README.md +++ b/sdk/machinelearningservices/arm-machinelearningservices/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-machinelearningservices ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -95,4 +96,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmachinelearningservices%2Farm-machinelearningservices%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/machinelearningservices/arm-machinelearningservices/README.png) diff --git a/sdk/machinelearningservices/arm-machinelearningservices/package.json b/sdk/machinelearningservices/arm-machinelearningservices/package.json index 29592ca0a1d2..e55132c6922e 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/package.json +++ b/sdk/machinelearningservices/arm-machinelearningservices/package.json @@ -4,9 +4,9 @@ "description": "AzureMachineLearningWorkspaces Library with typescript type definitions for node.js and browser.", "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,11 +20,11 @@ "module": "./esm/azureMachineLearningWorkspaces.js", "types": "./esm/azureMachineLearningWorkspaces.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/machinelearningservices/arm-machinelearningservices", "repository": { diff --git a/sdk/machinelearningservices/arm-machinelearningservices/rollup.config.js b/sdk/machinelearningservices/arm-machinelearningservices/rollup.config.js index 1a9e76332601..69a537c86ea0 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/rollup.config.js +++ b/sdk/machinelearningservices/arm-machinelearningservices/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts index c8b88568754d..7036017062a1 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts @@ -11,6 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { AzureMachineLearningWorkspacesContext } from "./azureMachineLearningWorkspacesContext"; @@ -19,9 +20,15 @@ class AzureMachineLearningWorkspaces extends AzureMachineLearningWorkspacesConte // Operation groups operations: operations.Operations; workspaces: operations.Workspaces; + workspaceFeatures: operations.WorkspaceFeatures; + notebooks: operations.Notebooks; usages: operations.Usages; virtualMachineSizes: operations.VirtualMachineSizes; + quotas: operations.Quotas; + workspaceConnections: operations.WorkspaceConnections; machineLearningCompute: operations.MachineLearningCompute; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; /** * Initializes a new instance of the AzureMachineLearningWorkspaces class. @@ -33,13 +40,115 @@ class AzureMachineLearningWorkspaces extends AzureMachineLearningWorkspacesConte super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.workspaces = new operations.Workspaces(this); + this.workspaceFeatures = new operations.WorkspaceFeatures(this); + this.notebooks = new operations.Notebooks(this); this.usages = new operations.Usages(this); this.virtualMachineSizes = new operations.VirtualMachineSizes(this); + this.quotas = new operations.Quotas(this); + this.workspaceConnections = new operations.WorkspaceConnections(this); this.machineLearningCompute = new operations.MachineLearningCompute(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + } + + /** + * Lists all skus with associated features + * @param [options] The optional parameters + * @returns Promise + */ + listSkus(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listSkus(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listSkus(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkus(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + options + }, + listSkusOperationSpec, + callback) as Promise; + } + + /** + * Lists all skus with associated features + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listSkusNext(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 + */ + listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + nextPageLink, + options + }, + listSkusNextOperationSpec, + callback) as Promise; } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listSkusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SkuListResult + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const listSkusNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SkuListResult + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; export { AzureMachineLearningWorkspaces, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts index 9a1cb99cc2a5..3a5361eeffc1 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts @@ -44,7 +44,7 @@ export class AzureMachineLearningWorkspacesContext extends msRestAzure.AzureServ super(credentials, options); - this.apiVersion = '2019-05-01'; + this.apiVersion = '2020-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts index 652dcfba3a34..0676cf211482 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/index.ts @@ -47,6 +47,101 @@ export interface Operation { display?: OperationDisplay; } +/** + * An interface representing NotebookListCredentialsResult. + */ +export interface NotebookListCredentialsResult { + primaryAccessKey?: string; + secondaryAccessKey?: string; +} + +/** + * An interface representing NotebookPreparationError. + */ +export interface NotebookPreparationError { + errorMessage?: string; + statusCode?: number; +} + +/** + * An interface representing NotebookResourceInfo. + */ +export interface NotebookResourceInfo { + fqdn?: string; + /** + * the data plane resourceId that used to initialize notebook component + */ + resourceId?: string; + /** + * The error that occurs when preparing notebook. + */ + notebookPreparationError?: NotebookPreparationError; +} + +/** + * An interface representing KeyVaultProperties. + */ +export interface KeyVaultProperties { + /** + * The ArmId of the keyVault where the customer owned encryption key is present. + */ + keyVaultArmId: string; + /** + * Key vault uri to access the encryption key. + */ + keyIdentifier: string; + /** + * For future use - The client id of the identity which will be used to access key vault. + */ + identityClientId?: string; +} + +/** + * An interface representing EncryptionProperty. + */ +export interface EncryptionProperty { + /** + * Indicates whether or not the encryption is enabled for the workspace. Possible values include: + * 'Enabled', 'Disabled' + */ + status: EncryptionStatus; + /** + * Customer Key vault properties. + */ + keyVaultProperties: KeyVaultProperties; +} + +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * A collection of information about the state of the connection between service consumer and + * provider. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionsRequired?: string; +} + /** * Azure Resource Manager resource envelope. */ @@ -63,9 +158,8 @@ export interface Resource extends BaseResource { readonly name?: string; /** * The identity of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly identity?: Identity; + identity?: Identity; /** * Specifies the location of the resource. */ @@ -79,6 +173,57 @@ export interface Resource extends BaseResource { * Contains resource tags defined as key/value pairs. */ tags?: { [propertyName: string]: string }; + /** + * The sku of the workspace. + */ + sku?: Sku; +} + +/** + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * The resource of private end point. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. Possible values include: + * 'Succeeded', 'Creating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** + * An interface representing SharedPrivateLinkResource. + */ +export interface SharedPrivateLinkResource { + /** + * Unique name of the private link. + */ + name?: string; + /** + * The resource id that private link links to. + */ + privateLinkResourceId?: string; + /** + * The private link resource group id. + */ + groupId?: string; + /** + * Request message. + */ + requestMessage?: string; + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + */ + status?: PrivateEndpointServiceConnectionStatus; } /** @@ -135,6 +280,62 @@ export interface Workspace extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; + /** + * The encryption settings of Azure ML workspace. + */ + encryption?: EncryptionProperty; + /** + * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the + * service. Default value: false. + */ + hbiWorkspace?: boolean; + /** + * The name of the managed resource group created by workspace RP in customer subscription if the + * workspace is CMK workspace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceProvisionedResourceGroup?: string; + /** + * Count of private connections in the workspace + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateLinkCount?: number; + /** + * The compute name for image build + */ + imageBuildCompute?: string; + /** + * The flag to indicate whether to allow public access when behind VNet. Default value: false. + */ + allowPublicAccessWhenBehindVnet?: boolean; + /** + * The list of private endpoint connections in the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** + * The list of shared private link resources in this workspace. + */ + sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + /** + * The notebook info of Azure ML workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly notebookInfo?: NotebookResourceInfo; +} + +/** + * Sku of the resource + */ +export interface Sku { + /** + * Name of the sku + */ + name?: string; + /** + * Tier of the sku like Basic or Enterprise + */ + tier?: string; } /** @@ -145,6 +346,10 @@ export interface WorkspaceUpdateParameters { * The resource tags for the machine learning workspace. */ tags?: { [propertyName: string]: string }; + /** + * The sku of the workspace. + */ + sku?: Sku; /** * The description of this workspace. */ @@ -155,6 +360,24 @@ export interface WorkspaceUpdateParameters { friendlyName?: string; } +/** + * Features enabled for a workspace + */ +export interface AmlUserFeature { + /** + * Specifies the feature ID + */ + id?: string; + /** + * Specifies the feature name + */ + displayName?: string; + /** + * Describes the feature for user experience + */ + description?: string; +} + /** * The Usage Names. */ @@ -226,6 +449,11 @@ export interface VirtualMachineSize { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly vCPUs?: number; + /** + * Number of gPUs. The number of gPUs supported by the virtual machine size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly gpus?: number; /** * OS VHD Disk size. The OS VHD disk size, in MB, allowed by the virtual machine size. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -263,6 +491,150 @@ export interface VirtualMachineSizeListResult { amlCompute?: VirtualMachineSize[]; } +/** + * The properties for Quota update or retrieval. + */ +export interface QuotaBaseProperties { + /** + * Specifies the resource ID. + */ + id?: string; + /** + * Specifies the resource type. + */ + type?: string; + /** + * Limit. The maximum permitted quota of the resource. + */ + limit?: number; + /** + * An enum describing the unit of quota measurement. Possible values include: 'Count' + */ + unit?: QuotaUnit; +} + +/** + * Quota update parameters. + */ +export interface QuotaUpdateParameters { + /** + * The list for update quota. + */ + value?: QuotaBaseProperties[]; +} + +/** + * The properties for update Quota response. + */ +export interface UpdateWorkspaceQuotas { + /** + * Specifies the resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Specifies the resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Limit. The maximum permitted quota of the resource. + */ + limit?: number; + /** + * An enum describing the unit of quota measurement. Possible values include: 'Count' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unit?: QuotaUnit; + /** + * Update Workspace Quota Status. Status of update workspace quota. Possible values include: + * 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', + * 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName', 'OperationNotSupportedForSku', + * 'OperationNotEnabledForRegion' + */ + status?: Status; +} + +/** + * The result of update workspace quota. + */ +export interface UpdateWorkspaceQuotasResult { + /** + * The list of workspace quota update result. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: UpdateWorkspaceQuotas[]; + /** + * The URI to fetch the next page of workspace quota update result. Call ListNext() with this to + * fetch the next page of Workspace Quota update result. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * The Resource Name. + */ +export interface ResourceName { + /** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: string; + /** + * The localized name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly localizedValue?: string; +} + +/** + * The quota assigned to a resource. + */ +export interface ResourceQuota { + /** + * Specifies the resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Specifies the resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: ResourceName; + /** + * Limit. The maximum permitted quota of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly limit?: number; + /** + * An enum describing the unit of quota measurement. Possible values include: 'Count' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unit?: QuotaUnit; +} + +/** + * An interface representing IdentityUserAssignedIdentitiesValue. + */ +export interface IdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clientId?: string; +} + /** * Identity for the resource. */ @@ -278,9 +650,16 @@ export interface Identity { */ readonly tenantId?: string; /** - * The identity type. Possible values include: 'SystemAssigned' + * The identity type. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + * UserAssigned', 'None' + */ + type: ResourceIdentityType; + /** + * The list of user identities associated with resource. The user identity dictionary key + * references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - type?: ResourceIdentityType; + userAssignedIdentities?: { [propertyName: string]: IdentityUserAssignedIdentitiesValue }; } /** @@ -342,6 +721,7 @@ export interface ListWorkspaceKeysResult { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly containerRegistryCredentials?: RegistryListCredentialsResult; + notebookAccessKeys?: NotebookListCredentialsResult; } /** @@ -393,7 +773,7 @@ export interface MachineLearningServiceError { /** * Contains the possible cases for Compute. */ -export type ComputeUnion = Compute | AKS | AmlCompute | VirtualMachine | HDInsight | DataFactory | Databricks | DataLakeAnalytics; +export type ComputeUnion = Compute | AKS | AmlCompute | ComputeInstance | VirtualMachine | HDInsight | DataFactory | Databricks | DataLakeAnalytics; /** * Machine Learning compute object. @@ -483,7 +863,7 @@ export interface SslConfiguration { /** * Enable or disable ssl for scoring. Possible values include: 'Disabled', 'Enabled' */ - status?: Status; + status?: Status1; /** * Cert data */ @@ -705,6 +1085,16 @@ export interface AmlComputeProperties { * Subnet. Virtual network subnet resource ID the compute nodes belong to. */ subnet?: ResourceId; + /** + * Close remote Login Access Port. State of the public SSH port. Possible values are: Disabled - + * Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates + * that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that + * the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all + * public nodes. It can be default only during cluster creation time, after creation it will be + * either enabled or disabled. Possible values include: 'Enabled', 'Disabled', 'NotSpecified'. + * Default value: 'NotSpecified'. + */ + remoteLoginPortPublicAccess?: RemoteLoginPortPublicAccess; /** * Allocation state. Allocation state of the compute. Possible values are: steady - Indicates * that the compute is not resizing. There are no changes to the number of compute nodes in the @@ -801,37 +1191,225 @@ export interface AmlCompute { } /** - * Admin credentials for virtual machine + * Specifies policy and settings for SSH access. */ -export interface VirtualMachineSshCredentials { +export interface ComputeInstanceSshSettings { /** - * Username of admin account + * Access policy for SSH. State of the public SSH port. Possible values are: Disabled - Indicates + * that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh + * port is open and accessible according to the VNet/subnet policy if applicable. Possible values + * include: 'Enabled', 'Disabled'. Default value: 'Disabled'. */ - username?: string; + sshPublicAccess?: SshPublicAccess; /** - * Password of admin account + * Describes the admin user name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - password?: string; + readonly adminUserName?: string; /** - * Public key data + * Describes the port for connecting through SSH. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - publicKeyData?: string; + readonly sshPort?: number; /** - * Private key data + * Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate + * your SSH key pairs. */ - privateKeyData?: string; + adminPublicKey?: string; } /** - * An interface representing VirtualMachineProperties. + * Defines all connectivity endpoints and properties for a ComputeInstance. */ -export interface VirtualMachineProperties { +export interface ComputeInstanceConnectivityEndpoints { /** - * Virtual Machine size + * Public IP Address of this ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - virtualMachineSize?: string; + readonly publicIpAddress?: string; /** - * Port open for ssh connections. + * Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is + * deployed). + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateIpAddress?: string; +} + +/** + * Defines an Aml Instance application and its connectivity endpoint URI. + */ +export interface ComputeInstanceApplication { + /** + * Name of the ComputeInstance application. + */ + displayName?: string; + /** + * Application' endpoint URI. + */ + endpointUri?: string; +} + +/** + * Describes information on user who created this ComputeInstance. + */ +export interface ComputeInstanceCreatedBy { + /** + * Name of the user. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userName?: string; + /** + * Uniquely identifies user' Azure Active Directory organization. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userOrgId?: string; + /** + * Uniquely identifies the user within his/her organization. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly userId?: string; +} + +/** + * Compute Instance properties + */ +export interface ComputeInstanceProperties { + /** + * Virtual Machine Size + */ + vmSize?: string; + /** + * Subnet. Virtual network subnet resource ID the compute nodes belong to. + */ + subnet?: ResourceId; + /** + * Sharing policy for applications on this compute instance. Policy for sharing applications on + * this compute instance among users of parent workspace. If Personal, only the creator can + * access applications on this compute instance. When Shared, any workspace user can access + * applications on this instance depending on his/her assigned role. Possible values include: + * 'Personal', 'Shared'. Default value: 'Shared'. + */ + applicationSharingPolicy?: ApplicationSharingPolicy; + /** + * Specifies policy and settings for SSH access. + */ + sshSettings?: ComputeInstanceSshSettings; + /** + * Describes all connectivity endpoints available for this ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly connectivityEndpoints?: ComputeInstanceConnectivityEndpoints; + /** + * Describes available applications and their endpoints on this ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly applications?: ComputeInstanceApplication[]; + /** + * Describes information on user who created this ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdBy?: ComputeInstanceCreatedBy; + /** + * Errors. Collection of errors encountered on this ComputeInstance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + 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' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly state?: ComputeInstanceState; +} + +/** + * An Azure Machine Learning compute instance. + */ +export interface ComputeInstance { + /** + * Polymorphic Discriminator + */ + computeType: "ComputeInstance"; + /** + * Location for the underlying compute + */ + computeLocation?: string; + /** + * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, + * Succeeded, and Failed. Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + * 'Succeeded', 'Failed', 'Canceled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; + /** + * The description of the Machine Learning compute. + */ + description?: string; + /** + * The date and time when the compute was created. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly createdOn?: Date; + /** + * The date and time when the compute was last modified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly modifiedOn?: Date; + /** + * ARM resource id of the underlying compute + */ + resourceId?: string; + /** + * Errors during provisioning + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningErrors?: MachineLearningServiceError[]; + /** + * Indicating whether the compute was provisioned by user and brought from outside if true, or + * machine learning service provisioned it if false. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isAttachedCompute?: boolean; + /** + * Compute Instance properties + */ + properties?: ComputeInstanceProperties; +} + +/** + * Admin credentials for virtual machine + */ +export interface VirtualMachineSshCredentials { + /** + * Username of admin account + */ + username?: string; + /** + * Password of admin account + */ + password?: string; + /** + * Public key data + */ + publicKeyData?: string; + /** + * Private key data + */ + privateKeyData?: string; +} + +/** + * An interface representing VirtualMachineProperties. + */ +export interface VirtualMachineProperties { + /** + * Virtual Machine size + */ + virtualMachineSize?: string; + /** + * Port open for ssh connections. */ sshPort?: number; /** @@ -1191,15 +1769,32 @@ export interface AmlComputeNodeInformation { */ readonly nodeId?: string; /** - * IP address. Public IP address of the compute node. + * Private IP address. Private IP address of the compute node. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateIpAddress?: string; + /** + * Public IP address. Public IP address of the compute node. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly ipAddress?: string; + readonly publicIpAddress?: string; /** * Port. SSH port number of the node. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly port?: number; + /** + * State of the compute node. Values are idle, running, preparing, unusable, leaving and + * preempted. Possible values include: 'idle', 'running', 'preparing', 'unusable', 'leaving', + * 'preempted' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nodeState?: NodeState; + /** + * Run ID. ID of the Experiment running on the node, if any else null. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly runId?: string; } /** @@ -1288,100 +1883,360 @@ export interface DatabricksComputeSecrets { } /** - * Optional Parameters. + * Features/user capabilities associated with the sku */ -export interface WorkspacesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { +export interface SKUCapability { /** - * Continuation token for pagination. + * Capability/Feature ID */ - skiptoken?: string; + name?: string; + /** + * Details about the feature/capability + */ + value?: string; } /** - * Optional Parameters. + * Describes The zonal capabilities of a SKU. */ -export interface WorkspacesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { +export interface ResourceSkuZoneDetails { /** - * Continuation token for pagination. + * The set of zones that the SKU is available in with the specified capabilities. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly name?: string[]; + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capabilities?: SKUCapability[]; } /** - * Optional Parameters. + * An interface representing ResourceSkuLocationInfo. */ -export interface MachineLearningComputeListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { +export interface ResourceSkuLocationInfo { /** - * Continuation token for pagination. + * Location of the SKU + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly location?: string; + /** + * List of availability zones where the SKU is supported. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly zones?: string[]; + /** + * Details of capabilities available to a SKU in specific zones. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly zoneDetails?: ResourceSkuZoneDetails[]; } /** - * An interface representing AzureMachineLearningWorkspacesOptions. + * The restriction because of which SKU cannot be used. */ -export interface AzureMachineLearningWorkspacesOptions extends AzureServiceClientOptions { - baseUri?: string; +export interface Restriction { + /** + * The type of restrictions. As of now only possible value for this is location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The value of restrictions. If the restriction type is set to location. This would be different + * locations where the SKU is restricted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly values?: string[]; + /** + * The reason for the restriction. Possible values include: 'NotSpecified', + * 'NotAvailableForRegion', 'NotAvailableForSubscription' + */ + reasonCode?: ReasonCode; } /** - * Defines headers for CreateOrUpdate operation. + * Describes Workspace Sku details and features */ -export interface MachineLearningComputeCreateOrUpdateHeaders { +export interface WorkspaceSku { /** - * URI to poll for asynchronous operation status. + * The set of locations that the SKU is available. This will be supported and registered Azure + * Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - azureAsyncOperation: string; + readonly locations?: string[]; + /** + * A list of locations and availability zones in those locations where the SKU is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly locationInfo?: ResourceSkuLocationInfo[]; + /** + * Sku Tier like Basic or Enterprise + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tier?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceType?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * List of features/user capabilities associated with the sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capabilities?: SKUCapability[]; + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no + * restrictions. + */ + restrictions?: Restriction[]; } /** - * Defines headers for Delete operation. + * A private link resource */ -export interface MachineLearningComputeDeleteHeaders { +export interface PrivateLinkResource extends Resource { /** - * URI to poll for asynchronous operation status. + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - azureAsyncOperation: string; + readonly groupId?: string; /** - * URI to poll for asynchronous operation result. + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - location: string; + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; } /** - * @interface - * An array of operations supported by the resource provider. - * @extends Array + * A list of private link resources */ -export interface OperationListResult extends Array { +export interface PrivateLinkResourceListResult { + /** + * Array of private link resources + */ + value?: PrivateLinkResource[]; } /** - * @interface - * The result of a request to list machine learning workspaces. - * @extends Array + * Workspace connection. */ -export interface WorkspaceListResult extends Array { +export interface WorkspaceConnection extends BaseResource { /** - * The URI that can be used to request the next list of machine learning workspaces. + * ResourceId of the workspace connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly id?: string; + /** + * Friendly name of the workspace connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type of workspace connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Category of the workspace connection. + */ + category?: string; + /** + * Target of the workspace connection. + */ + target?: string; + /** + * Authorization type of the workspace connection. + */ + authType?: string; + /** + * Value details of the workspace connection. + */ + value?: string; } /** - * @interface - * The List Usages operation response. - * @extends Array + * object used for creating workspace connection. */ -export interface ListUsagesResult extends Array { +export interface WorkspaceConnectionDto { /** - * The URI to fetch the next page of AML resource usage information. Call ListNext() with this to - * fetch the next page of AML resource usage information. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Friendly name of the workspace connection + */ + name?: string; + /** + * Category of the workspace connection. + */ + category?: string; + /** + * Target of the workspace connection. + */ + target?: string; + /** + * Authorization type of the workspace connection. + */ + authType?: string; + /** + * Value details of the workspace connection. + */ + value?: string; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesListByResourceGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Continuation token for pagination. + */ + skiptoken?: string; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesListBySubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Continuation token for pagination. + */ + skiptoken?: string; +} + +/** + * Optional Parameters. + */ +export interface WorkspaceConnectionsListOptionalParams extends msRest.RequestOptionsBase { + /** + * Target of the workspace connection. + */ + target?: string; + /** + * Category of the workspace connection. + */ + category?: string; +} + +/** + * Optional Parameters. + */ +export interface MachineLearningComputeListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { + /** + * Continuation token for pagination. + */ + skiptoken?: string; +} + +/** + * An interface representing AzureMachineLearningWorkspacesOptions. + */ +export interface AzureMachineLearningWorkspacesOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface MachineLearningComputeCreateOrUpdateHeaders { + /** + * URI to poll for asynchronous operation status. + */ + azureAsyncOperation: string; +} + +/** + * Defines headers for Delete operation. + */ +export interface MachineLearningComputeDeleteHeaders { + /** + * URI to poll for asynchronous operation status. + */ + azureAsyncOperation: string; + /** + * URI to poll for asynchronous operation result. + */ + location: string; +} + +/** + * @interface + * An array of operations supported by the resource provider. + * @extends Array + */ +export interface OperationListResult extends Array { +} + +/** + * @interface + * The result of a request to list machine learning workspaces. + * @extends Array + */ +export interface WorkspaceListResult extends Array { + /** + * The URI that can be used to request the next list of machine learning workspaces. + */ + nextLink?: string; +} + +/** + * @interface + * The List Aml user feature operation response. + * @extends Array + */ +export interface ListAmlUserFeatureResult extends Array { + /** + * The URI to fetch the next page of AML user features information. Call ListNext() with this to + * fetch the next page of AML user features information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The List Usages operation response. + * @extends Array + */ +export interface ListUsagesResult extends Array { + /** + * The URI to fetch the next page of AML resource usage information. Call ListNext() with this to + * fetch the next page of AML resource usage information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The List WorkspaceQuotasByVMFamily operation response. + * @extends Array + */ +export interface ListWorkspaceQuotas extends Array { + /** + * The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() + * with this to fetch the next page of Workspace Quota information. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } +/** + * @interface + * Paginated list of Workspace connection objects. + * @extends Array + */ +export interface PaginatedWorkspaceConnectionsList extends Array { + /** + * A continuation link (absolute URI) to the next page of results in the list. + */ + nextLink?: string; +} + /** * @interface * Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. @@ -1394,6 +2249,19 @@ export interface PaginatedComputeResourcesList extends Array { nextLink?: string; } +/** + * @interface + * List of skus with features + * @extends Array + */ +export interface SkuListResult extends Array { + /** + * The URI to fetch the next page of Workspace Skus. Call ListNext() with this URI to fetch the + * next page of Workspace Skus + */ + nextLink?: string; +} + /** * Defines values for ProvisioningState. * Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', @@ -1403,6 +2271,30 @@ export interface PaginatedComputeResourcesList extends Array { */ export type ProvisioningState = 'Unknown' | 'Updating' | 'Creating' | 'Deleting' | 'Succeeded' | 'Failed' | 'Canceled'; +/** + * Defines values for EncryptionStatus. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type EncryptionStatus = 'Enabled' | 'Disabled'; + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected' | 'Disconnected' | 'Timeout'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Deleting' | 'Failed'; + /** * Defines values for UsageUnit. * Possible values include: 'Count' @@ -1411,13 +2303,32 @@ export type ProvisioningState = 'Unknown' | 'Updating' | 'Creating' | 'Deleting' */ export type UsageUnit = 'Count'; +/** + * Defines values for QuotaUnit. + * Possible values include: 'Count' + * @readonly + * @enum {string} + */ +export type QuotaUnit = 'Count'; + +/** + * Defines values for Status. + * Possible values include: 'Undefined', 'Success', 'Failure', 'InvalidQuotaBelowClusterMinimum', + * 'InvalidQuotaExceedsSubscriptionLimit', 'InvalidVMFamilyName', 'OperationNotSupportedForSku', + * 'OperationNotEnabledForRegion' + * @readonly + * @enum {string} + */ +export type Status = 'Undefined' | 'Success' | 'Failure' | 'InvalidQuotaBelowClusterMinimum' | 'InvalidQuotaExceedsSubscriptionLimit' | 'InvalidVMFamilyName' | 'OperationNotSupportedForSku' | 'OperationNotEnabledForRegion'; + /** * Defines values for ResourceIdentityType. - * Possible values include: 'SystemAssigned' + * Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', + * 'None' * @readonly * @enum {string} */ -export type ResourceIdentityType = 'SystemAssigned'; +export type ResourceIdentityType = 'SystemAssigned' | 'UserAssigned' | 'SystemAssigned, UserAssigned' | 'None'; /** * Defines values for VmPriority. @@ -1427,6 +2338,14 @@ export type ResourceIdentityType = 'SystemAssigned'; */ export type VmPriority = 'Dedicated' | 'LowPriority'; +/** + * Defines values for RemoteLoginPortPublicAccess. + * Possible values include: 'Enabled', 'Disabled', 'NotSpecified' + * @readonly + * @enum {string} + */ +export type RemoteLoginPortPublicAccess = 'Enabled' | 'Disabled' | 'NotSpecified'; + /** * Defines values for AllocationState. * Possible values include: 'Steady', 'Resizing' @@ -1435,14 +2354,56 @@ export type VmPriority = 'Dedicated' | 'LowPriority'; */ export type AllocationState = 'Steady' | 'Resizing'; +/** + * Defines values for ApplicationSharingPolicy. + * Possible values include: 'Personal', 'Shared' + * @readonly + * @enum {string} + */ +export type ApplicationSharingPolicy = 'Personal' | 'Shared'; + +/** + * Defines values for SshPublicAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +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' + * @readonly + * @enum {string} + */ +export type ComputeInstanceState = 'Creating' | 'CreateFailed' | 'Deleting' | 'Running' | 'Restarting' | 'RestartFailed' | 'JobRunning' | 'SettingUp' | 'Starting' | 'StartFailed' | 'StopFailed' | 'Stopped' | 'Stopping' | 'UserSettingUp' | 'Unknown' | 'Unusable'; + +/** + * Defines values for NodeState. + * Possible values include: 'idle', 'running', 'preparing', 'unusable', 'leaving', 'preempted' + * @readonly + * @enum {string} + */ +export type NodeState = 'idle' | 'running' | 'preparing' | 'unusable' | 'leaving' | 'preempted'; + /** * Defines values for ComputeType. - * Possible values include: 'AKS', 'AmlCompute', 'DataFactory', 'VirtualMachine', 'HDInsight', - * 'Databricks', 'DataLakeAnalytics' + * Possible values include: 'AKS', 'AmlCompute', 'ComputeInstance', 'DataFactory', + * 'VirtualMachine', 'HDInsight', 'Databricks', 'DataLakeAnalytics' * @readonly * @enum {string} */ -export type ComputeType = 'AKS' | 'AmlCompute' | 'DataFactory' | 'VirtualMachine' | 'HDInsight' | 'Databricks' | 'DataLakeAnalytics'; +export type ComputeType = 'AKS' | 'AmlCompute' | 'ComputeInstance' | 'DataFactory' | 'VirtualMachine' | 'HDInsight' | 'Databricks' | 'DataLakeAnalytics'; + +/** + * Defines values for ReasonCode. + * Possible values include: 'NotSpecified', 'NotAvailableForRegion', 'NotAvailableForSubscription' + * @readonly + * @enum {string} + */ +export type ReasonCode = 'NotSpecified' | 'NotAvailableForRegion' | 'NotAvailableForSubscription'; /** * Defines values for UnderlyingResourceAction. @@ -1453,12 +2414,12 @@ export type ComputeType = 'AKS' | 'AmlCompute' | 'DataFactory' | 'VirtualMachine export type UnderlyingResourceAction = 'Delete' | 'Detach'; /** - * Defines values for Status. + * Defines values for Status1. * Possible values include: 'Disabled', 'Enabled' * @readonly * @enum {string} */ -export type Status = 'Disabled' | 'Enabled'; +export type Status1 = 'Disabled' | 'Enabled'; /** * Contains response data for the list operation. @@ -1600,6 +2561,26 @@ export type WorkspacesListBySubscriptionResponse = WorkspaceListResult & { }; }; +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { + /** + * 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: Workspace; + }; +}; + /** * Contains response data for the listByResourceGroupNext operation. */ @@ -1640,6 +2621,86 @@ export type WorkspacesListBySubscriptionNextResponse = WorkspaceListResult & { }; }; +/** + * Contains response data for the list operation. + */ +export type WorkspaceFeaturesListResponse = ListAmlUserFeatureResult & { + /** + * 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: ListAmlUserFeatureResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type WorkspaceFeaturesListNextResponse = ListAmlUserFeatureResult & { + /** + * 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: ListAmlUserFeatureResult; + }; +}; + +/** + * Contains response data for the prepare operation. + */ +export type NotebooksPrepareResponse = NotebookResourceInfo & { + /** + * 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: NotebookResourceInfo; + }; +}; + +/** + * Contains response data for the beginPrepare operation. + */ +export type NotebooksBeginPrepareResponse = NotebookResourceInfo & { + /** + * 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: NotebookResourceInfo; + }; +}; + /** * Contains response data for the list operation. */ @@ -1700,6 +2761,126 @@ export type VirtualMachineSizesListResponse = VirtualMachineSizeListResult & { }; }; +/** + * Contains response data for the update operation. + */ +export type QuotasUpdateResponse = UpdateWorkspaceQuotasResult & { + /** + * 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: UpdateWorkspaceQuotasResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type QuotasListResponse = ListWorkspaceQuotas & { + /** + * 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: ListWorkspaceQuotas; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type QuotasListNextResponse = ListWorkspaceQuotas & { + /** + * 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: ListWorkspaceQuotas; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WorkspaceConnectionsListResponse = PaginatedWorkspaceConnectionsList & { + /** + * 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: PaginatedWorkspaceConnectionsList; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type WorkspaceConnectionsCreateResponse = WorkspaceConnection & { + /** + * 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: WorkspaceConnection; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type WorkspaceConnectionsGetResponse = WorkspaceConnection & { + /** + * 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: WorkspaceConnection; + }; +}; + /** * Contains response data for the listByWorkspace operation. */ @@ -1879,3 +3060,103 @@ export type MachineLearningComputeListByWorkspaceNextResponse = PaginatedCompute parsedBody: PaginatedComputeResourcesList; }; }; + +/** + * Contains response data for the listSkus operation. + */ +export type ListSkusResponse = SkuListResult & { + /** + * 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: SkuListResult; + }; +}; + +/** + * Contains response data for the listSkusNext operation. + */ +export type ListSkusNextResponse = SkuListResult & { + /** + * 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: SkuListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type PrivateLinkResourcesListByWorkspaceResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts index 6c8334e0a3ba..3958c8c9a940 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/machineLearningComputeMappers.ts @@ -19,6 +19,12 @@ export { BaseResource, ClusterUpdateParameters, Compute, + ComputeInstance, + ComputeInstanceApplication, + ComputeInstanceConnectivityEndpoints, + ComputeInstanceCreatedBy, + ComputeInstanceProperties, + ComputeInstanceSshSettings, ComputeNodesInformation, ComputeResource, ComputeSecrets, @@ -28,19 +34,30 @@ export { DataFactory, DataLakeAnalytics, DataLakeAnalyticsProperties, + EncryptionProperty, ErrorDetail, ErrorResponse, HDInsight, HDInsightProperties, Identity, + IdentityUserAssignedIdentitiesValue, + KeyVaultProperties, MachineLearningComputeCreateOrUpdateHeaders, MachineLearningComputeDeleteHeaders, MachineLearningServiceError, NodeStateCounts, + NotebookPreparationError, + NotebookResourceInfo, PaginatedComputeResourcesList, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, Resource, ResourceId, ScaleSettings, + SharedPrivateLinkResource, + Sku, SslConfiguration, SystemService, UserAccountCredentials, @@ -48,5 +65,6 @@ export { VirtualMachineProperties, VirtualMachineSecrets, VirtualMachineSshCredentials, - Workspace + Workspace, + WorkspaceConnection } from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts index 639d21015222..c49fd9fb0842 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/mappers.ts @@ -69,6 +69,179 @@ export const Operation: msRest.CompositeMapper = { } }; +export const NotebookListCredentialsResult: msRest.CompositeMapper = { + serializedName: "NotebookListCredentialsResult", + type: { + name: "Composite", + className: "NotebookListCredentialsResult", + modelProperties: { + primaryAccessKey: { + serializedName: "primaryAccessKey", + type: { + name: "String" + } + }, + secondaryAccessKey: { + serializedName: "secondaryAccessKey", + type: { + name: "String" + } + } + } + } +}; + +export const NotebookPreparationError: msRest.CompositeMapper = { + serializedName: "NotebookPreparationError", + type: { + name: "Composite", + className: "NotebookPreparationError", + modelProperties: { + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + }, + statusCode: { + serializedName: "statusCode", + type: { + name: "Number" + } + } + } + } +}; + +export const NotebookResourceInfo: msRest.CompositeMapper = { + serializedName: "NotebookResourceInfo", + type: { + name: "Composite", + className: "NotebookResourceInfo", + modelProperties: { + fqdn: { + serializedName: "fqdn", + type: { + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + notebookPreparationError: { + serializedName: "notebookPreparationError", + type: { + name: "Composite", + className: "NotebookPreparationError" + } + } + } + } +}; + +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "KeyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyVaultArmId: { + required: true, + serializedName: "keyVaultArmId", + type: { + name: "String" + } + }, + keyIdentifier: { + required: true, + serializedName: "keyIdentifier", + type: { + name: "String" + } + }, + identityClientId: { + serializedName: "identityClientId", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionProperty: msRest.CompositeMapper = { + serializedName: "EncryptionProperty", + type: { + name: "Composite", + className: "EncryptionProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + keyVaultProperties: { + required: true, + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + } +}; + +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -90,7 +263,6 @@ export const Resource: msRest.CompositeMapper = { } }, identity: { - readOnly: true, serializedName: "identity", type: { name: "Composite", @@ -120,6 +292,85 @@ export const Resource: msRest.CompositeMapper = { } } } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const SharedPrivateLinkResource: msRest.CompositeMapper = { + serializedName: "SharedPrivateLinkResource", + type: { + name: "Composite", + className: "SharedPrivateLinkResource", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + privateLinkResourceId: { + serializedName: "properties.privateLinkResourceId", + type: { + name: "String" + } + }, + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requestMessage: { + serializedName: "properties.requestMessage", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } } } } @@ -194,93 +445,224 @@ export const Workspace: msRest.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const WorkspaceUpdateParameters: msRest.CompositeMapper = { - serializedName: "WorkspaceUpdateParameters", - type: { - name: "Composite", - className: "WorkspaceUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } }, - description: { - serializedName: "properties.description", + encryption: { + serializedName: "properties.encryption", type: { - name: "String" + name: "Composite", + className: "EncryptionProperty" } }, - friendlyName: { - serializedName: "properties.friendlyName", + hbiWorkspace: { + serializedName: "properties.hbiWorkspace", + defaultValue: false, type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const UsageName: msRest.CompositeMapper = { - serializedName: "UsageName", - type: { - name: "Composite", - className: "UsageName", - modelProperties: { - value: { + }, + serviceProvisionedResourceGroup: { readOnly: true, - serializedName: "value", + serializedName: "properties.serviceProvisionedResourceGroup", type: { name: "String" } }, - localizedValue: { + privateLinkCount: { readOnly: true, - serializedName: "localizedValue", + serializedName: "properties.privateLinkCount", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const Usage: msRest.CompositeMapper = { - serializedName: "Usage", - type: { - name: "Composite", - className: "Usage", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", + }, + imageBuildCompute: { + serializedName: "properties.imageBuildCompute", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + allowPublicAccessWhenBehindVnet: { + serializedName: "properties.allowPublicAccessWhenBehindVnet", + defaultValue: false, type: { - name: "String" + name: "Boolean" } }, - unit: { + privateEndpointConnections: { readOnly: true, - serializedName: "unit", + serializedName: "properties.privateEndpointConnections", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + sharedPrivateLinkResources: { + serializedName: "properties.sharedPrivateLinkResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SharedPrivateLinkResource" + } + } + } + }, + notebookInfo: { + readOnly: true, + serializedName: "properties.notebookInfo", + type: { + name: "Composite", + className: "NotebookResourceInfo" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceUpdateParameters: msRest.CompositeMapper = { + serializedName: "WorkspaceUpdateParameters", + type: { + name: "Composite", + className: "WorkspaceUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + friendlyName: { + serializedName: "properties.friendlyName", + type: { + name: "String" + } + } + } + } +}; + +export const AmlUserFeature: msRest.CompositeMapper = { + serializedName: "AmlUserFeature", + type: { + name: "Composite", + className: "AmlUserFeature", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const UsageName: msRest.CompositeMapper = { + serializedName: "UsageName", + type: { + name: "Composite", + className: "UsageName", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + readOnly: true, + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const Usage: msRest.CompositeMapper = { + serializedName: "Usage", + type: { + name: "Composite", + className: "Usage", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" } }, currentValue: { @@ -336,6 +718,13 @@ export const VirtualMachineSize: msRest.CompositeMapper = { name: "Number" } }, + gpus: { + readOnly: true, + serializedName: "gpus", + type: { + name: "Number" + } + }, osVhdSizeMB: { readOnly: true, serializedName: "osVhdSizeMB", @@ -397,130 +786,369 @@ export const VirtualMachineSizeListResult: msRest.CompositeMapper = { } }; -export const Identity: msRest.CompositeMapper = { - serializedName: "Identity", +export const QuotaBaseProperties: msRest.CompositeMapper = { + serializedName: "QuotaBaseProperties", type: { name: "Composite", - className: "Identity", + className: "QuotaBaseProperties", modelProperties: { - principalId: { - readOnly: true, - serializedName: "principalId", + id: { + serializedName: "id", type: { name: "String" } }, - tenantId: { - readOnly: true, - serializedName: "tenantId", + type: { + serializedName: "type", type: { name: "String" } }, - type: { - serializedName: "type", + limit: { + serializedName: "limit", type: { - name: "Enum", - allowedValues: [ - "SystemAssigned" - ] + name: "Number" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" } } } } }; -export const ResourceId: msRest.CompositeMapper = { - serializedName: "ResourceId", +export const QuotaUpdateParameters: msRest.CompositeMapper = { + serializedName: "QuotaUpdateParameters", type: { name: "Composite", - className: "ResourceId", + className: "QuotaUpdateParameters", modelProperties: { - id: { - required: true, - serializedName: "id", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QuotaBaseProperties" + } + } } } } } }; -export const Password: msRest.CompositeMapper = { - serializedName: "Password", +export const UpdateWorkspaceQuotas: msRest.CompositeMapper = { + serializedName: "UpdateWorkspaceQuotas", type: { name: "Composite", - className: "Password", + className: "UpdateWorkspaceQuotas", modelProperties: { - name: { + id: { readOnly: true, - serializedName: "name", + serializedName: "id", type: { name: "String" } }, - value: { + type: { readOnly: true, - serializedName: "value", + serializedName: "type", type: { name: "String" } - } - } - } -}; - -export const RegistryListCredentialsResult: msRest.CompositeMapper = { - serializedName: "RegistryListCredentialsResult", - type: { - name: "Composite", - className: "RegistryListCredentialsResult", - modelProperties: { - location: { - readOnly: true, - serializedName: "location", + }, + limit: { + serializedName: "limit", type: { - name: "String" + name: "Number" } }, - username: { + unit: { readOnly: true, - serializedName: "username", + serializedName: "unit", type: { name: "String" } }, - passwords: { - serializedName: "passwords", + status: { + serializedName: "status", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Password" - } - } + name: "String" } } } } }; -export const ListWorkspaceKeysResult: msRest.CompositeMapper = { - serializedName: "ListWorkspaceKeysResult", +export const UpdateWorkspaceQuotasResult: msRest.CompositeMapper = { + serializedName: "UpdateWorkspaceQuotasResult", type: { name: "Composite", - className: "ListWorkspaceKeysResult", + className: "UpdateWorkspaceQuotasResult", modelProperties: { - userStorageKey: { + value: { readOnly: true, - serializedName: "userStorageKey", + serializedName: "value", type: { - name: "String" - } - }, - userStorageResourceId: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "UpdateWorkspaceQuotas" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceName: msRest.CompositeMapper = { + serializedName: "ResourceName", + type: { + name: "Composite", + className: "ResourceName", + modelProperties: { + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + readOnly: true, + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceQuota: msRest.CompositeMapper = { + serializedName: "ResourceQuota", + type: { + name: "Composite", + className: "ResourceQuota", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "Composite", + className: "ResourceName" + } + }, + limit: { + readOnly: true, + serializedName: "limit", + type: { + name: "Number" + } + }, + unit: { + readOnly: true, + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const IdentityUserAssignedIdentitiesValue: msRest.CompositeMapper = { + serializedName: "Identity_userAssignedIdentitiesValue", + type: { + name: "Composite", + className: "IdentityUserAssignedIdentitiesValue", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + clientId: { + readOnly: true, + serializedName: "clientId", + type: { + name: "String" + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "IdentityUserAssignedIdentitiesValue" + } + } + } + } + } + } +}; + +export const ResourceId: msRest.CompositeMapper = { + serializedName: "ResourceId", + type: { + name: "Composite", + className: "ResourceId", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const Password: msRest.CompositeMapper = { + serializedName: "Password", + type: { + name: "Composite", + className: "Password", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const RegistryListCredentialsResult: msRest.CompositeMapper = { + serializedName: "RegistryListCredentialsResult", + type: { + name: "Composite", + className: "RegistryListCredentialsResult", + modelProperties: { + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + username: { + readOnly: true, + serializedName: "username", + type: { + name: "String" + } + }, + passwords: { + serializedName: "passwords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Password" + } + } + } + } + } + } +}; + +export const ListWorkspaceKeysResult: msRest.CompositeMapper = { + serializedName: "ListWorkspaceKeysResult", + type: { + name: "Composite", + className: "ListWorkspaceKeysResult", + modelProperties: { + userStorageKey: { + readOnly: true, + serializedName: "userStorageKey", + type: { + name: "String" + } + }, + userStorageResourceId: { readOnly: true, serializedName: "userStorageResourceId", type: { @@ -541,6 +1169,13 @@ export const ListWorkspaceKeysResult: msRest.CompositeMapper = { name: "Composite", className: "RegistryListCredentialsResult" } + }, + notebookAccessKeys: { + serializedName: "notebookAccessKeys", + type: { + name: "Composite", + className: "NotebookListCredentialsResult" + } } } } @@ -1060,6 +1695,13 @@ export const AmlComputeProperties: msRest.CompositeMapper = { className: "ResourceId" } }, + remoteLoginPortPublicAccess: { + serializedName: "remoteLoginPortPublicAccess", + defaultValue: 'NotSpecified', + type: { + name: "String" + } + }, allocationState: { readOnly: true, serializedName: "allocationState", @@ -1133,26 +1775,246 @@ export const AmlCompute: msRest.CompositeMapper = { } }; -export const VirtualMachineSshCredentials: msRest.CompositeMapper = { - serializedName: "VirtualMachineSshCredentials", +export const ComputeInstanceSshSettings: msRest.CompositeMapper = { + serializedName: "ComputeInstanceSshSettings", type: { name: "Composite", - className: "VirtualMachineSshCredentials", + className: "ComputeInstanceSshSettings", modelProperties: { - username: { - serializedName: "username", + sshPublicAccess: { + serializedName: "sshPublicAccess", + defaultValue: 'Disabled', type: { name: "String" } }, - password: { - serializedName: "password", + adminUserName: { + readOnly: true, + serializedName: "adminUserName", type: { name: "String" } }, - publicKeyData: { - serializedName: "publicKeyData", + sshPort: { + readOnly: true, + serializedName: "sshPort", + type: { + name: "Number" + } + }, + adminPublicKey: { + serializedName: "adminPublicKey", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeInstanceConnectivityEndpoints: msRest.CompositeMapper = { + serializedName: "ComputeInstanceConnectivityEndpoints", + type: { + name: "Composite", + className: "ComputeInstanceConnectivityEndpoints", + modelProperties: { + publicIpAddress: { + readOnly: true, + serializedName: "publicIpAddress", + type: { + name: "String" + } + }, + privateIpAddress: { + readOnly: true, + serializedName: "privateIpAddress", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeInstanceApplication: msRest.CompositeMapper = { + serializedName: "ComputeInstanceApplication", + type: { + name: "Composite", + className: "ComputeInstanceApplication", + modelProperties: { + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + endpointUri: { + serializedName: "endpointUri", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeInstanceCreatedBy: msRest.CompositeMapper = { + serializedName: "ComputeInstanceCreatedBy", + type: { + name: "Composite", + className: "ComputeInstanceCreatedBy", + modelProperties: { + userName: { + readOnly: true, + serializedName: "userName", + type: { + name: "String" + } + }, + userOrgId: { + readOnly: true, + serializedName: "userOrgId", + type: { + name: "String" + } + }, + userId: { + readOnly: true, + serializedName: "userId", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeInstanceProperties: msRest.CompositeMapper = { + serializedName: "ComputeInstance_properties", + type: { + name: "Composite", + className: "ComputeInstanceProperties", + modelProperties: { + vmSize: { + serializedName: "vmSize", + type: { + name: "String" + } + }, + subnet: { + serializedName: "subnet", + type: { + name: "Composite", + className: "ResourceId" + } + }, + applicationSharingPolicy: { + serializedName: "applicationSharingPolicy", + defaultValue: 'Shared', + type: { + name: "String" + } + }, + sshSettings: { + serializedName: "sshSettings", + type: { + name: "Composite", + className: "ComputeInstanceSshSettings" + } + }, + connectivityEndpoints: { + readOnly: true, + serializedName: "connectivityEndpoints", + type: { + name: "Composite", + className: "ComputeInstanceConnectivityEndpoints" + } + }, + applications: { + readOnly: true, + serializedName: "applications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ComputeInstanceApplication" + } + } + } + }, + createdBy: { + readOnly: true, + serializedName: "createdBy", + type: { + name: "Composite", + className: "ComputeInstanceCreatedBy" + } + }, + errors: { + readOnly: true, + serializedName: "errors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MachineLearningServiceError" + } + } + } + }, + state: { + readOnly: true, + serializedName: "state", + type: { + name: "String" + } + } + } + } +}; + +export const ComputeInstance: msRest.CompositeMapper = { + serializedName: "ComputeInstance", + type: { + name: "Composite", + polymorphicDiscriminator: Compute.type.polymorphicDiscriminator, + uberParent: "Compute", + className: "ComputeInstance", + modelProperties: { + ...Compute.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ComputeInstanceProperties" + } + } + } + } +}; + +export const VirtualMachineSshCredentials: msRest.CompositeMapper = { + serializedName: "VirtualMachineSshCredentials", + type: { + name: "Composite", + className: "VirtualMachineSshCredentials", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + publicKeyData: { + serializedName: "publicKeyData", type: { name: "String" } @@ -1410,71 +2272,462 @@ export const ComputeNodesInformation: msRest.CompositeMapper = { modelProperties: { nextLink: { readOnly: true, - serializedName: "nextLink", + serializedName: "nextLink", + type: { + name: "String" + } + }, + computeType: { + required: true, + serializedName: "computeType", + type: { + name: "String" + } + } + } + } +}; + +export const AmlComputeNodeInformation: msRest.CompositeMapper = { + serializedName: "AmlCompute", + type: { + name: "Composite", + className: "AmlComputeNodeInformation", + modelProperties: { + nodeId: { + readOnly: true, + serializedName: "nodeId", + type: { + name: "String" + } + }, + privateIpAddress: { + readOnly: true, + serializedName: "privateIpAddress", + type: { + name: "String" + } + }, + publicIpAddress: { + readOnly: true, + serializedName: "publicIpAddress", + type: { + name: "String" + } + }, + port: { + readOnly: true, + serializedName: "port", + type: { + name: "Number" + } + }, + nodeState: { + readOnly: true, + serializedName: "nodeState", + type: { + name: "String" + } + }, + runId: { + readOnly: true, + serializedName: "runId", + type: { + name: "String" + } + } + } + } +}; + +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: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "computeType", + clientName: "computeType" + }, + uberParent: "ComputeSecrets", + className: "ComputeSecrets", + modelProperties: { + computeType: { + required: true, + serializedName: "computeType", + type: { + name: "String" + } + } + } + } +}; + +export const AksComputeSecrets: msRest.CompositeMapper = { + serializedName: "AKS", + type: { + name: "Composite", + polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, + uberParent: "ComputeSecrets", + className: "AksComputeSecrets", + modelProperties: { + ...ComputeSecrets.type.modelProperties, + userKubeConfig: { + serializedName: "userKubeConfig", + type: { + name: "String" + } + }, + adminKubeConfig: { + serializedName: "adminKubeConfig", + type: { + name: "String" + } + }, + imagePullSecretName: { + serializedName: "imagePullSecretName", + type: { + name: "String" + } + } + } + } +}; + +export const VirtualMachineSecrets: msRest.CompositeMapper = { + serializedName: "VirtualMachine", + type: { + name: "Composite", + polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, + uberParent: "ComputeSecrets", + className: "VirtualMachineSecrets", + modelProperties: { + ...ComputeSecrets.type.modelProperties, + administratorAccount: { + serializedName: "administratorAccount", + type: { + name: "Composite", + className: "VirtualMachineSshCredentials" + } + } + } + } +}; + +export const DatabricksComputeSecrets: msRest.CompositeMapper = { + serializedName: "Databricks", + type: { + name: "Composite", + polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, + uberParent: "ComputeSecrets", + className: "DatabricksComputeSecrets", + modelProperties: { + ...ComputeSecrets.type.modelProperties, + databricksAccessToken: { + serializedName: "databricksAccessToken", + type: { + name: "String" + } + } + } + } +}; + +export const SKUCapability: msRest.CompositeMapper = { + serializedName: "SKUCapability", + type: { + name: "Composite", + className: "SKUCapability", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceSkuZoneDetails: msRest.CompositeMapper = { + serializedName: "ResourceSkuZoneDetails", + type: { + name: "Composite", + className: "ResourceSkuZoneDetails", + modelProperties: { + name: { + readOnly: true, + serializedName: "name", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + capabilities: { + readOnly: true, + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SKUCapability" + } + } + } + } + } + } +}; + +export const ResourceSkuLocationInfo: msRest.CompositeMapper = { + serializedName: "ResourceSkuLocationInfo", + type: { + name: "Composite", + className: "ResourceSkuLocationInfo", + modelProperties: { + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + zones: { + readOnly: true, + serializedName: "zones", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + zoneDetails: { + readOnly: true, + serializedName: "zoneDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuZoneDetails" + } + } + } + } + } + } +}; + +export const Restriction: msRest.CompositeMapper = { + serializedName: "Restriction", + type: { + name: "Composite", + className: "Restriction", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + values: { + readOnly: true, + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + reasonCode: { + serializedName: "reasonCode", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceSku: msRest.CompositeMapper = { + serializedName: "WorkspaceSku", + type: { + name: "Composite", + className: "WorkspaceSku", + modelProperties: { + locations: { + readOnly: true, + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + locationInfo: { + readOnly: true, + serializedName: "locationInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceSkuLocationInfo" + } + } + } + }, + tier: { + readOnly: true, + serializedName: "tier", + type: { + name: "String" + } + }, + resourceType: { + readOnly: true, + serializedName: "resourceType", type: { name: "String" } }, - computeType: { - required: true, - serializedName: "computeType", + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } + }, + capabilities: { + readOnly: true, + serializedName: "capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SKUCapability" + } + } + } + }, + restrictions: { + serializedName: "restrictions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Restriction" + } + } + } } } } }; -export const AmlComputeNodeInformation: msRest.CompositeMapper = { - serializedName: "AmlCompute", +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", type: { name: "Composite", - className: "AmlComputeNodeInformation", + className: "PrivateLinkResource", modelProperties: { - nodeId: { + ...Resource.type.modelProperties, + groupId: { readOnly: true, - serializedName: "nodeId", + serializedName: "properties.groupId", type: { name: "String" } }, - ipAddress: { + requiredMembers: { readOnly: true, - serializedName: "ipAddress", + serializedName: "properties.requiredMembers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - port: { - readOnly: true, - serializedName: "port", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const AmlComputeNodesInformation: msRest.CompositeMapper = { - serializedName: "AmlCompute", +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", type: { name: "Composite", - polymorphicDiscriminator: ComputeNodesInformation.type.polymorphicDiscriminator, - uberParent: "ComputeNodesInformation", - className: "AmlComputeNodesInformation", + className: "PrivateLinkResourceListResult", modelProperties: { - ...ComputeNodesInformation.type.modelProperties, - nodes: { - readOnly: true, - serializedName: "nodes", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AmlComputeNodeInformation" + className: "PrivateLinkResource" } } } @@ -1483,90 +2736,93 @@ export const AmlComputeNodesInformation: msRest.CompositeMapper = { } }; -export const ComputeSecrets: msRest.CompositeMapper = { - serializedName: "ComputeSecrets", +export const WorkspaceConnection: msRest.CompositeMapper = { + serializedName: "WorkspaceConnection", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "computeType", - clientName: "computeType" - }, - uberParent: "ComputeSecrets", - className: "ComputeSecrets", + className: "WorkspaceConnection", modelProperties: { - computeType: { - required: true, - serializedName: "computeType", + id: { + readOnly: true, + serializedName: "id", type: { name: "String" } - } - } - } -}; - -export const AksComputeSecrets: msRest.CompositeMapper = { - serializedName: "AKS", - type: { - name: "Composite", - polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, - uberParent: "ComputeSecrets", - className: "AksComputeSecrets", - modelProperties: { - ...ComputeSecrets.type.modelProperties, - userKubeConfig: { - serializedName: "userKubeConfig", + }, + name: { + readOnly: true, + serializedName: "name", type: { name: "String" } }, - adminKubeConfig: { - serializedName: "adminKubeConfig", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } }, - imagePullSecretName: { - serializedName: "imagePullSecretName", + category: { + serializedName: "properties.category", type: { name: "String" } - } - } - } -}; - -export const VirtualMachineSecrets: msRest.CompositeMapper = { - serializedName: "VirtualMachine", - type: { - name: "Composite", - polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, - uberParent: "ComputeSecrets", - className: "VirtualMachineSecrets", - modelProperties: { - ...ComputeSecrets.type.modelProperties, - administratorAccount: { - serializedName: "administratorAccount", + }, + target: { + serializedName: "properties.target", type: { - name: "Composite", - className: "VirtualMachineSshCredentials" + name: "String" + } + }, + authType: { + serializedName: "properties.authType", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.value", + type: { + name: "String" } } } } }; -export const DatabricksComputeSecrets: msRest.CompositeMapper = { - serializedName: "Databricks", +export const WorkspaceConnectionDto: msRest.CompositeMapper = { + serializedName: "WorkspaceConnectionDto", type: { name: "Composite", - polymorphicDiscriminator: ComputeSecrets.type.polymorphicDiscriminator, - uberParent: "ComputeSecrets", - className: "DatabricksComputeSecrets", + className: "WorkspaceConnectionDto", modelProperties: { - ...ComputeSecrets.type.modelProperties, - databricksAccessToken: { - serializedName: "databricksAccessToken", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + category: { + serializedName: "properties.category", + type: { + name: "String" + } + }, + target: { + serializedName: "properties.target", + type: { + name: "String" + } + }, + authType: { + serializedName: "properties.authType", + type: { + name: "String" + } + }, + value: { + serializedName: "properties.value", type: { name: "String" } @@ -1663,6 +2919,36 @@ export const WorkspaceListResult: msRest.CompositeMapper = { } }; +export const ListAmlUserFeatureResult: msRest.CompositeMapper = { + serializedName: "ListAmlUserFeatureResult", + type: { + name: "Composite", + className: "ListAmlUserFeatureResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AmlUserFeature" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const ListUsagesResult: msRest.CompositeMapper = { serializedName: "ListUsagesResult", type: { @@ -1693,6 +2979,58 @@ export const ListUsagesResult: msRest.CompositeMapper = { } }; +export const ListWorkspaceQuotas: msRest.CompositeMapper = { + serializedName: "ListWorkspaceQuotas", + type: { + name: "Composite", + className: "ListWorkspaceQuotas", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ResourceQuota" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PaginatedWorkspaceConnectionsList: msRest.CompositeMapper = { + serializedName: "PaginatedWorkspaceConnectionsList", + type: { + name: "Composite", + className: "PaginatedWorkspaceConnectionsList", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceConnection" + } + } + } + } + } + } +}; + export const PaginatedComputeResourcesList: msRest.CompositeMapper = { serializedName: "PaginatedComputeResourcesList", type: { @@ -1721,10 +3059,39 @@ export const PaginatedComputeResourcesList: msRest.CompositeMapper = { } }; +export const SkuListResult: msRest.CompositeMapper = { + serializedName: "SkuListResult", + type: { + name: "Composite", + className: "SkuListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspaceSku" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'Compute' : Compute, 'Compute.AKS' : AKS, 'Compute.AmlCompute' : AmlCompute, + 'Compute.ComputeInstance' : ComputeInstance, 'Compute.VirtualMachine' : VirtualMachine, 'Compute.HDInsight' : HDInsight, 'Compute.DataFactory' : DataFactory, diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/notebooksMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/notebooksMappers.ts new file mode 100644 index 000000000000..6eee7cd96eba --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/notebooksMappers.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +export { + discriminators, + ErrorDetail, + ErrorResponse, + MachineLearningServiceError, + NotebookPreparationError, + NotebookResourceInfo +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts index 705365dcbf19..4ff232b43a09 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/parameters.ts @@ -30,6 +30,18 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const category: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "category" + ], + mapper: { + serializedName: "category", + type: { + name: "String" + } + } +}; export const computeName: msRest.OperationURLParameter = { parameterPath: "computeName", mapper: { @@ -40,6 +52,16 @@ export const computeName: msRest.OperationURLParameter = { } } }; +export const connectionName: msRest.OperationURLParameter = { + parameterPath: "connectionName", + mapper: { + required: true, + serializedName: "connectionName", + type: { + name: "String" + } + } +}; export const location: msRest.OperationURLParameter = { parameterPath: "location", mapper: { @@ -64,6 +86,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -96,6 +128,18 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const target: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "target" + ], + mapper: { + serializedName: "target", + type: { + name: "String" + } + } +}; export const underlyingResourceAction: msRest.OperationQueryParameter = { parameterPath: "underlyingResourceAction", mapper: { diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..112b17da302d --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,59 @@ +/* + * 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. + */ + +export { + discriminators, + AKS, + AksNetworkingConfiguration, + AKSProperties, + AmlCompute, + AmlComputeProperties, + BaseResource, + Compute, + ComputeInstance, + ComputeInstanceApplication, + ComputeInstanceConnectivityEndpoints, + ComputeInstanceCreatedBy, + ComputeInstanceProperties, + ComputeInstanceSshSettings, + ComputeResource, + Databricks, + DatabricksProperties, + DataFactory, + DataLakeAnalytics, + DataLakeAnalyticsProperties, + EncryptionProperty, + ErrorDetail, + ErrorResponse, + HDInsight, + HDInsightProperties, + Identity, + IdentityUserAssignedIdentitiesValue, + KeyVaultProperties, + MachineLearningServiceError, + NodeStateCounts, + NotebookPreparationError, + NotebookResourceInfo, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + ResourceId, + ScaleSettings, + SharedPrivateLinkResource, + Sku, + SslConfiguration, + SystemService, + UserAccountCredentials, + VirtualMachine, + VirtualMachineProperties, + VirtualMachineSshCredentials, + Workspace, + WorkspaceConnection +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..38ff763e1311 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,61 @@ +/* + * 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. + */ + +export { + discriminators, + AKS, + AksNetworkingConfiguration, + AKSProperties, + AmlCompute, + AmlComputeProperties, + BaseResource, + CloudError, + Compute, + ComputeInstance, + ComputeInstanceApplication, + ComputeInstanceConnectivityEndpoints, + ComputeInstanceCreatedBy, + ComputeInstanceProperties, + ComputeInstanceSshSettings, + ComputeResource, + Databricks, + DatabricksProperties, + DataFactory, + DataLakeAnalytics, + DataLakeAnalyticsProperties, + EncryptionProperty, + ErrorDetail, + ErrorResponse, + HDInsight, + HDInsightProperties, + Identity, + IdentityUserAssignedIdentitiesValue, + KeyVaultProperties, + MachineLearningServiceError, + NodeStateCounts, + NotebookPreparationError, + NotebookResourceInfo, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + Resource, + ResourceId, + ScaleSettings, + SharedPrivateLinkResource, + Sku, + SslConfiguration, + SystemService, + UserAccountCredentials, + VirtualMachine, + VirtualMachineProperties, + VirtualMachineSshCredentials, + Workspace, + WorkspaceConnection +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/quotasMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/quotasMappers.ts new file mode 100644 index 000000000000..2598859dbe90 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/quotasMappers.ts @@ -0,0 +1,22 @@ +/* + * 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. + */ + +export { + discriminators, + CloudError, + ErrorDetail, + ErrorResponse, + ListWorkspaceQuotas, + MachineLearningServiceError, + QuotaBaseProperties, + QuotaUpdateParameters, + ResourceName, + ResourceQuota, + UpdateWorkspaceQuotas, + UpdateWorkspaceQuotasResult +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts new file mode 100644 index 000000000000..ea6506d8f769 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceConnectionsMappers.ts @@ -0,0 +1,61 @@ +/* + * 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. + */ + +export { + discriminators, + AKS, + AksNetworkingConfiguration, + AKSProperties, + AmlCompute, + AmlComputeProperties, + BaseResource, + Compute, + ComputeInstance, + ComputeInstanceApplication, + ComputeInstanceConnectivityEndpoints, + ComputeInstanceCreatedBy, + ComputeInstanceProperties, + ComputeInstanceSshSettings, + ComputeResource, + Databricks, + DatabricksProperties, + DataFactory, + DataLakeAnalytics, + DataLakeAnalyticsProperties, + EncryptionProperty, + ErrorDetail, + ErrorResponse, + HDInsight, + HDInsightProperties, + Identity, + IdentityUserAssignedIdentitiesValue, + KeyVaultProperties, + MachineLearningServiceError, + NodeStateCounts, + NotebookPreparationError, + NotebookResourceInfo, + PaginatedWorkspaceConnectionsList, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + Resource, + ResourceId, + ScaleSettings, + SharedPrivateLinkResource, + Sku, + SslConfiguration, + SystemService, + UserAccountCredentials, + VirtualMachine, + VirtualMachineProperties, + VirtualMachineSshCredentials, + Workspace, + WorkspaceConnection, + WorkspaceConnectionDto +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceFeaturesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceFeaturesMappers.ts new file mode 100644 index 000000000000..ea9f1ebd9ffb --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspaceFeaturesMappers.ts @@ -0,0 +1,16 @@ +/* + * 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. + */ + +export { + discriminators, + AmlUserFeature, + ErrorDetail, + ErrorResponse, + ListAmlUserFeatureResult, + MachineLearningServiceError +} from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts index 147ed31e4a00..2698dee516bb 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/models/workspacesMappers.ts @@ -15,25 +15,43 @@ export { AmlComputeProperties, BaseResource, Compute, + ComputeInstance, + ComputeInstanceApplication, + ComputeInstanceConnectivityEndpoints, + ComputeInstanceCreatedBy, + ComputeInstanceProperties, + ComputeInstanceSshSettings, ComputeResource, Databricks, DatabricksProperties, DataFactory, DataLakeAnalytics, DataLakeAnalyticsProperties, + EncryptionProperty, ErrorDetail, ErrorResponse, HDInsight, HDInsightProperties, Identity, + IdentityUserAssignedIdentitiesValue, + KeyVaultProperties, ListWorkspaceKeysResult, MachineLearningServiceError, NodeStateCounts, + NotebookListCredentialsResult, + NotebookPreparationError, + NotebookResourceInfo, Password, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, RegistryListCredentialsResult, Resource, ResourceId, ScaleSettings, + SharedPrivateLinkResource, + Sku, SslConfiguration, SystemService, UserAccountCredentials, @@ -41,6 +59,7 @@ export { VirtualMachineProperties, VirtualMachineSshCredentials, Workspace, + WorkspaceConnection, WorkspaceListResult, WorkspaceUpdateParameters } from "../models/mappers"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/index.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/index.ts index eb4867fd5155..d56f3480b068 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/index.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/index.ts @@ -10,6 +10,12 @@ export * from "./operations"; export * from "./workspaces"; +export * from "./workspaceFeatures"; +export * from "./notebooks"; export * from "./usages"; export * from "./virtualMachineSizes"; +export * from "./quotas"; +export * from "./workspaceConnections"; export * from "./machineLearningCompute"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts index b15b0735087f..40daf0d4315b 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/machineLearningCompute.ts @@ -214,6 +214,114 @@ export class MachineLearningCompute { callback) as Promise; } + /** + * Posts a start action to a compute instance + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param [options] The optional parameters + * @returns Promise + */ + start(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param callback The callback + */ + start(resourceGroupName: string, workspaceName: string, computeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param options The optional parameters + * @param callback The callback + */ + start(resourceGroupName: string, workspaceName: string, computeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + start(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + computeName, + options + }, + startOperationSpec, + callback); + } + + /** + * Posts a stop action to a compute instance + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param [options] The optional parameters + * @returns Promise + */ + stop(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param callback The callback + */ + stop(resourceGroupName: string, workspaceName: string, computeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param options The optional parameters + * @param callback The callback + */ + stop(resourceGroupName: string, workspaceName: string, computeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + stop(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + computeName, + options + }, + stopOperationSpec, + callback); + } + + /** + * Posts a restart action to a compute instance + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param [options] The optional parameters + * @returns Promise + */ + restart(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param callback The callback + */ + restart(resourceGroupName: string, workspaceName: string, computeName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param options The optional parameters + * @param callback The callback + */ + restart(resourceGroupName: string, workspaceName: string, computeName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + restart(resourceGroupName: string, workspaceName: string, computeName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + computeName, + options + }, + restartOperationSpec, + callback); + } + /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a * nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify @@ -419,6 +527,78 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; +const startOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.computeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const stopOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.computeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const restartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.computeName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", @@ -451,7 +631,8 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.MachineLearningComputeCreateOrUpdateHeaders }, default: { - bodyMapper: Mappers.MachineLearningServiceError + bodyMapper: Mappers.MachineLearningServiceError, + headersMapper: Mappers.MachineLearningComputeCreateOrUpdateHeaders } }, serializer @@ -514,7 +695,8 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.MachineLearningComputeDeleteHeaders }, default: { - bodyMapper: Mappers.MachineLearningServiceError + bodyMapper: Mappers.MachineLearningServiceError, + headersMapper: Mappers.MachineLearningComputeDeleteHeaders } }, serializer diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/notebooks.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/notebooks.ts new file mode 100644 index 000000000000..3b7544ab94a4 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/notebooks.ts @@ -0,0 +1,85 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/notebooksMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a Notebooks. */ +export class Notebooks { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a Notebooks. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + prepare(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginPrepare(resourceGroupName,workspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginPrepare(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + options + }, + beginPrepareOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const beginPrepareOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.NotebookResourceInfo + }, + 202: {}, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateEndpointConnections.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..d2d003897a96 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateEndpointConnections.ts @@ -0,0 +1,235 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a PrivateEndpointConnections. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * Gets the specified private endpoint connection associated with the workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param properties The private endpoint connection properties. + * @param callback The callback + */ + put(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param properties The private endpoint connection properties. + * @param options The optional parameters + * @param callback The callback + */ + put(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + properties, + options + }, + putOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the workspace + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateLinkResources.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..b2f679e33662 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/privateLinkResources.ts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a PrivateLinkResources. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/quotas.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/quotas.ts new file mode 100644 index 000000000000..b38d59b29325 --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/quotas.ts @@ -0,0 +1,194 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/quotasMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a Quotas. */ +export class Quotas { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a Quotas. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * Update quota for each VM family in workspace. + * @param location The location for update quota is queried. + * @param parameters Quota update parameters. + * @param [options] The optional parameters + * @returns Promise + */ + update(location: string, parameters: Models.QuotaUpdateParameters, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The location for update quota is queried. + * @param parameters Quota update parameters. + * @param callback The callback + */ + update(location: string, parameters: Models.QuotaUpdateParameters, callback: msRest.ServiceCallback): void; + /** + * @param location The location for update quota is queried. + * @param parameters Quota update parameters. + * @param options The optional parameters + * @param callback The callback + */ + update(location: string, parameters: Models.QuotaUpdateParameters, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(location: string, parameters: Models.QuotaUpdateParameters, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Gets the currently assigned Workspace Quotas based on VMFamily. + * @param location The location for which resource usage is queried. + * @param [options] The optional parameters + * @returns Promise + */ + list(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The location for which resource usage is queried. + * @param callback The callback + */ + list(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The location for which resource usage is queried. + * @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 { + return this.client.sendOperationRequest( + { + location, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the currently assigned Workspace Quotas based on VMFamily. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas", + urlParameters: [ + Parameters.location, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.QuotaUpdateParameters, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.UpdateWorkspaceQuotasResult + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/Quotas", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListWorkspaceQuotas + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListWorkspaceQuotas + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceConnections.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceConnections.ts new file mode 100644 index 000000000000..7cd525a1f23c --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceConnections.ts @@ -0,0 +1,285 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/workspaceConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a WorkspaceConnections. */ +export class WorkspaceConnections { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a WorkspaceConnections. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * List all connections under a AML workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: Models.WorkspaceConnectionsListOptionalParams): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: Models.WorkspaceConnectionsListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: Models.WorkspaceConnectionsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Add a new workspace connection. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param parameters The object for creating or updating a new workspace connection + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, workspaceName: string, connectionName: string, parameters: Models.WorkspaceConnectionDto, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param parameters The object for creating or updating a new workspace connection + * @param callback The callback + */ + create(resourceGroupName: string, workspaceName: string, connectionName: string, parameters: Models.WorkspaceConnectionDto, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param parameters The object for creating or updating a new workspace connection + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, workspaceName: string, connectionName: string, parameters: Models.WorkspaceConnectionDto, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, workspaceName: string, connectionName: string, parameters: Models.WorkspaceConnectionDto, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + connectionName, + parameters, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Get the detail of a workspace connection. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, connectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, connectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, connectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, connectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + connectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Delete a workspace connection. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, connectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, connectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param connectionName Friendly name of the workspace connection + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, connectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, connectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + connectionName, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.target, + Parameters.category + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PaginatedWorkspaceConnectionsList + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.connectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WorkspaceConnectionDto, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.WorkspaceConnection + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.connectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceConnection + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.connectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceFeatures.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceFeatures.ts new file mode 100644 index 000000000000..e227cca9ecaf --- /dev/null +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaceFeatures.ts @@ -0,0 +1,136 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/workspaceFeaturesMappers"; +import * as Parameters from "../models/parameters"; +import { AzureMachineLearningWorkspacesContext } from "../azureMachineLearningWorkspacesContext"; + +/** Class representing a WorkspaceFeatures. */ +export class WorkspaceFeatures { + private readonly client: AzureMachineLearningWorkspacesContext; + + /** + * Create a WorkspaceFeatures. + * @param {AzureMachineLearningWorkspacesContext} client Reference to the service client. + */ + constructor(client: AzureMachineLearningWorkspacesContext) { + this.client = client; + } + + /** + * Lists all enabled features for a workspace + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all enabled features for a workspace + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListAmlUserFeatureResult + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListAmlUserFeatureResult + }, + default: { + bodyMapper: Mappers.MachineLearningServiceError + } + }, + serializer +}; diff --git a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaces.ts b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaces.ts index 4f9cbb878a71..db330ccaea7c 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaces.ts +++ b/sdk/machinelearningservices/arm-machinelearningservices/src/operations/workspaces.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/workspacesMappers"; import * as Parameters from "../models/parameters"; @@ -66,32 +67,9 @@ export class Workspaces { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + createOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** @@ -101,29 +79,9 @@ export class Workspaces { * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Name of the resource group in which workspace is located. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** @@ -280,6 +238,44 @@ export class Workspaces { callback) as Promise; } + /** + * Creates or updates a workspace with the specified parameters. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param parameters The parameters for creating or updating a machine learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a machine learning workspace. + * @param resourceGroupName Name of the resource group in which workspace is located. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + /** * Lists all the available machine learning workspaces under the specified resource group. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -364,8 +360,8 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", urlParameters: [ Parameters.subscriptionId, @@ -381,7 +377,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.Workspace, + ...Mappers.WorkspaceUpdateParameters, required: true } }, @@ -389,9 +385,6 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, - 201: { - bodyMapper: Mappers.Workspace - }, default: { bodyMapper: Mappers.MachineLearningServiceError } @@ -399,23 +392,24 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName + Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skiptoken ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.WorkspaceListResult + }, default: { bodyMapper: Mappers.MachineLearningServiceError } @@ -423,9 +417,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -437,16 +431,9 @@ const updateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.WorkspaceUpdateParameters, - required: true - } - }, responses: { 200: { - bodyMapper: Mappers.Workspace + bodyMapper: Mappers.ListWorkspaceKeysResult }, default: { bodyMapper: Mappers.MachineLearningServiceError @@ -455,24 +442,22 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const listByResourceGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", +const resyncKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.workspaceName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skiptoken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.WorkspaceListResult - }, + 200: {}, default: { bodyMapper: Mappers.MachineLearningServiceError } @@ -480,23 +465,22 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys", +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName + Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.skiptoken ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.ListWorkspaceKeysResult + bodyMapper: Mappers.WorkspaceListResult }, default: { bodyMapper: Mappers.MachineLearningServiceError @@ -505,9 +489,9 @@ const listKeysOperationSpec: msRest.OperationSpec = { serializer }; -const resyncKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -519,8 +503,21 @@ const resyncKeysOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Workspace, + required: true + } + }, responses: { - 200: {}, + 200: { + bodyMapper: Mappers.Workspace + }, + 201: { + bodyMapper: Mappers.Workspace + }, + 202: {}, default: { bodyMapper: Mappers.MachineLearningServiceError } @@ -528,23 +525,24 @@ const resyncKeysOperationSpec: msRest.OperationSpec = { serializer }; -const listBySubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", urlParameters: [ - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName ], queryParameters: [ - Parameters.apiVersion, - Parameters.skiptoken + Parameters.apiVersion ], headerParameters: [ Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: Mappers.WorkspaceListResult - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.MachineLearningServiceError } diff --git a/sdk/machinelearningservices/arm-machinelearningservices/tsconfig.json b/sdk/machinelearningservices/arm-machinelearningservices/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/machinelearningservices/arm-machinelearningservices/tsconfig.json +++ b/sdk/machinelearningservices/arm-machinelearningservices/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true