Skip to content

Commit 1020df9

Browse files
author
SDKAuto
committed
CodeGen from PR 15098 in Azure/azure-rest-api-specs
Merge d2c24279dfdb648a6f55cabde447621e4a9b98c4 into a59747e42da9d74654106f16c5410620b5941fe0
1 parent b79e507 commit 1020df9

30 files changed

+7603
-1062
lines changed

sdk/machinelearningservices/arm-machinelearningservices/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/machinelearningservices/arm-machinelearningservices/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure AzureMachineLearningWorkspaces SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for AzureMachineLearningWorkspaces.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for AzureMachineLearningWorkspaces.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-machinelearningservices @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
4139
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
4240

4341
##### Sample code
@@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new AzureMachineLearningWorkspaces(creds, subscriptionId);
54-
5552
client.operations.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmMachinelearningservices.AzureMachineLearningWorkspaces(creds, subscriptionId);
9289
client.operations.list().then((result) => {

sdk/machinelearningservices/arm-machinelearningservices/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/machinelearningservices/arm-machinelearningservices",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/machinelearningservices/arm-machinelearningservices",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspaces.ts

Lines changed: 10 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import * as msRest from "@azure/ms-rest-js";
1111
import { TokenCredential } from "@azure/core-auth";
1212
import * as Models from "./models";
1313
import * as Mappers from "./models/mappers";
14-
import * as Parameters from "./models/parameters";
1514
import * as operations from "./operations";
1615
import { AzureMachineLearningWorkspacesContext } from "./azureMachineLearningWorkspacesContext";
1716

@@ -21,14 +20,17 @@ class AzureMachineLearningWorkspaces extends AzureMachineLearningWorkspacesConte
2120
operations: operations.Operations;
2221
workspaces: operations.Workspaces;
2322
workspaceFeatures: operations.WorkspaceFeatures;
24-
notebooks: operations.Notebooks;
2523
usages: operations.Usages;
2624
virtualMachineSizes: operations.VirtualMachineSizes;
2725
quotas: operations.Quotas;
28-
workspaceConnections: operations.WorkspaceConnections;
2926
machineLearningCompute: operations.MachineLearningCompute;
27+
workspace: operations.WorkspaceOperations;
3028
privateEndpointConnections: operations.PrivateEndpointConnections;
3129
privateLinkResources: operations.PrivateLinkResources;
30+
machineLearningService: operations.MachineLearningService;
31+
notebooks: operations.Notebooks;
32+
storageAccount: operations.StorageAccount;
33+
workspaceConnections: operations.WorkspaceConnections;
3234

3335
/**
3436
* Initializes a new instance of the AzureMachineLearningWorkspaces class.
@@ -46,117 +48,21 @@ class AzureMachineLearningWorkspaces extends AzureMachineLearningWorkspacesConte
4648
this.operations = new operations.Operations(this);
4749
this.workspaces = new operations.Workspaces(this);
4850
this.workspaceFeatures = new operations.WorkspaceFeatures(this);
49-
this.notebooks = new operations.Notebooks(this);
5051
this.usages = new operations.Usages(this);
5152
this.virtualMachineSizes = new operations.VirtualMachineSizes(this);
5253
this.quotas = new operations.Quotas(this);
53-
this.workspaceConnections = new operations.WorkspaceConnections(this);
5454
this.machineLearningCompute = new operations.MachineLearningCompute(this);
55+
this.workspace = new operations.WorkspaceOperations(this);
5556
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
5657
this.privateLinkResources = new operations.PrivateLinkResources(this);
57-
}
58-
59-
/**
60-
* Lists all skus with associated features
61-
* @param [options] The optional parameters
62-
* @returns Promise<Models.ListSkusResponse>
63-
*/
64-
listSkus(options?: msRest.RequestOptionsBase): Promise<Models.ListSkusResponse>;
65-
/**
66-
* @param callback The callback
67-
*/
68-
listSkus(callback: msRest.ServiceCallback<Models.SkuListResult>): void;
69-
/**
70-
* @param options The optional parameters
71-
* @param callback The callback
72-
*/
73-
listSkus(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SkuListResult>): void;
74-
listSkus(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SkuListResult>, callback?: msRest.ServiceCallback<Models.SkuListResult>): Promise<Models.ListSkusResponse> {
75-
return this.sendOperationRequest(
76-
{
77-
options
78-
},
79-
listSkusOperationSpec,
80-
callback) as Promise<Models.ListSkusResponse>;
81-
}
82-
83-
/**
84-
* Lists all skus with associated features
85-
* @param nextPageLink The NextLink from the previous successful call to List operation.
86-
* @param [options] The optional parameters
87-
* @returns Promise<Models.ListSkusNextResponse>
88-
*/
89-
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ListSkusNextResponse>;
90-
/**
91-
* @param nextPageLink The NextLink from the previous successful call to List operation.
92-
* @param callback The callback
93-
*/
94-
listSkusNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.SkuListResult>): void;
95-
/**
96-
* @param nextPageLink The NextLink from the previous successful call to List operation.
97-
* @param options The optional parameters
98-
* @param callback The callback
99-
*/
100-
listSkusNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SkuListResult>): void;
101-
listSkusNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SkuListResult>, callback?: msRest.ServiceCallback<Models.SkuListResult>): Promise<Models.ListSkusNextResponse> {
102-
return this.sendOperationRequest(
103-
{
104-
nextPageLink,
105-
options
106-
},
107-
listSkusNextOperationSpec,
108-
callback) as Promise<Models.ListSkusNextResponse>;
58+
this.machineLearningService = new operations.MachineLearningService(this);
59+
this.notebooks = new operations.Notebooks(this);
60+
this.storageAccount = new operations.StorageAccount(this);
61+
this.workspaceConnections = new operations.WorkspaceConnections(this);
10962
}
11063
}
11164

11265
// Operation Specifications
113-
const serializer = new msRest.Serializer(Mappers);
114-
const listSkusOperationSpec: msRest.OperationSpec = {
115-
httpMethod: "GET",
116-
path: "subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces/skus",
117-
urlParameters: [
118-
Parameters.subscriptionId
119-
],
120-
queryParameters: [
121-
Parameters.apiVersion
122-
],
123-
headerParameters: [
124-
Parameters.acceptLanguage
125-
],
126-
responses: {
127-
200: {
128-
bodyMapper: Mappers.SkuListResult
129-
},
130-
default: {
131-
bodyMapper: Mappers.MachineLearningServiceError
132-
}
133-
},
134-
serializer
135-
};
136-
137-
const listSkusNextOperationSpec: msRest.OperationSpec = {
138-
httpMethod: "GET",
139-
baseUrl: "https://management.azure.com",
140-
path: "{nextLink}",
141-
urlParameters: [
142-
Parameters.nextPageLink
143-
],
144-
queryParameters: [
145-
Parameters.apiVersion
146-
],
147-
headerParameters: [
148-
Parameters.acceptLanguage
149-
],
150-
responses: {
151-
200: {
152-
bodyMapper: Mappers.SkuListResult
153-
},
154-
default: {
155-
bodyMapper: Mappers.MachineLearningServiceError
156-
}
157-
},
158-
serializer
159-
};
16066

16167
export {
16268
AzureMachineLearningWorkspaces,

sdk/machinelearningservices/arm-machinelearningservices/src/azureMachineLearningWorkspacesContext.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import * as Models from "./models";
1111
import * as msRest from "@azure/ms-rest-js";
12-
import { TokenCredential } from "@azure/core-auth";
1312
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1414

1515
const packageName = "@azure/arm-machinelearningservices";
1616
const packageVersion = "4.1.0";
@@ -42,25 +42,25 @@ export class AzureMachineLearningWorkspacesContext extends msRestAzure.AzureServ
4242
if (!options) {
4343
options = {};
4444
}
45-
if(!options.userAgent) {
45+
if (!options.userAgent) {
4646
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4747
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4848
}
4949

5050
super(credentials, options);
5151

52-
this.apiVersion = '2020-08-01';
52+
this.apiVersion = '2021-04-01';
5353
this.acceptLanguage = 'en-US';
5454
this.longRunningOperationRetryTimeout = 30;
5555
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5656
this.requestContentType = "application/json; charset=utf-8";
5757
this.credentials = credentials;
5858
this.subscriptionId = subscriptionId;
5959

60-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6161
this.acceptLanguage = options.acceptLanguage;
6262
}
63-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
6464
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
6565
}
6666
}

0 commit comments

Comments
 (0)