Skip to content

Commit 8d9fedb

Browse files
author
SDKAuto
committed
CodeGen from PR 15939 in Azure/azure-rest-api-specs
Merge cc7b1b960ad03f757329179eec5d48c78d588a4c into cbb456b8b823424ff498031a84e4892b0fa98480
1 parent eb24323 commit 8d9fedb

39 files changed

+5229
-6386
lines changed

sdk/labservices/arm-labservices/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) 2019 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/labservices/arm-labservices/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## Azure ManagedLabsClient SDK for JavaScript
1+
## Azure LabServicesClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagedLabsClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for LabServicesClient.
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-labservices @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,22 +36,20 @@ 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-
41-
#### nodejs - Authentication, client creation, and list providerOperations as an example written in JavaScript.
39+
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
4240

4341
##### Sample code
4442

4543
```javascript
4644
const { DefaultAzureCredential } = require("@azure/identity");
47-
const { ManagedLabsClient } = require("@azure/arm-labservices");
45+
const { LabServicesClient } = require("@azure/arm-labservices");
4846
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
4947

5048
// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
53-
const client = new ManagedLabsClient(creds, subscriptionId);
54-
55-
client.providerOperations.list().then((result) => {
51+
const client = new LabServicesClient(creds, subscriptionId);
52+
client.operations.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
5855
}).catch((err) => {
@@ -61,7 +58,7 @@ client.providerOperations.list().then((result) => {
6158
});
6259
```
6360

64-
#### browser - Authentication, client creation, and list providerOperations as an example written in JavaScript.
61+
#### browser - Authentication, client creation, and list operations as an example written in JavaScript.
6562

6663
In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
6764
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
@@ -86,10 +83,10 @@ 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
});
91-
const client = new Azure.ArmLabservices.ManagedLabsClient(creds, subscriptionId);
92-
client.providerOperations.list().then((result) => {
88+
const client = new Azure.ArmLabservices.LabServicesClient(creds, subscriptionId);
89+
client.operations.list().then((result) => {
9390
console.log("The result is:");
9491
console.log(result);
9592
}).catch((err) => {

sdk/labservices/arm-labservices/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@azure/arm-labservices",
33
"author": "Microsoft Corporation",
4-
"description": "ManagedLabsClient Library with typescript type definitions for node.js and browser.",
4+
"description": "LabServicesClient Library with typescript type definitions for node.js and browser.",
55
"version": "1.1.1",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.4.0",
8-
"@azure/ms-rest-js": "^1.11.0",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
99
"@azure/core-auth": "^1.1.4",
10-
"tslib": "^1.9.3"
10+
"tslib": "^1.10.0"
1111
},
1212
"keywords": [
1313
"node",
@@ -18,22 +18,22 @@
1818
],
1919
"license": "MIT",
2020
"main": "./dist/arm-labservices.js",
21-
"module": "./esm/managedLabsClient.js",
22-
"types": "./esm/managedLabsClient.d.ts",
21+
"module": "./esm/labServicesClient.js",
22+
"types": "./esm/labServicesClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
25-
"rollup": "^0.66.2",
26-
"rollup-plugin-node-resolve": "^3.4.0",
25+
"rollup": "^1.18.0",
26+
"rollup-plugin-node-resolve": "^5.2.0",
2727
"rollup-plugin-sourcemaps": "^0.4.2",
28-
"uglify-js": "^3.4.9"
28+
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/feature/v4/sdk/labservices/arm-labservices",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/labservices/arm-labservices",
3131
"repository": {
3232
"type": "git",
33-
"url": "https://github.com/azure/azure-sdk-for-js.git"
33+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3434
},
3535
"bugs": {
36-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
36+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3737
},
3838
"files": [
3939
"dist/**/*.js",

sdk/labservices/arm-labservices/rollup.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps";
66
* @type {rollup.RollupFileOptions}
77
*/
88
const config = {
9-
input: "./esm/managedLabsClient.js",
9+
input: "./esm/labServicesClient.js",
1010
external: [
1111
"@azure/ms-rest-js",
1212
"@azure/ms-rest-azure-js"
@@ -21,15 +21,15 @@ const config = {
2121
"@azure/ms-rest-azure-js": "msRestAzure"
2222
},
2323
banner: `/*
24-
* Copyright (c) Microsoft Corporation. All rights reserved.
25-
* Licensed under the MIT License. See License.txt in the project root for license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2626
*
2727
* Code generated by Microsoft (R) AutoRest Code Generator.
2828
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2929
*/`
3030
},
3131
plugins: [
32-
nodeResolve({ module: true }),
32+
nodeResolve({ mainFields: ['module', 'main'] }),
3333
sourcemaps()
3434
]
3535
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -13,52 +12,50 @@ import { TokenCredential } from "@azure/core-auth";
1312
import * as Models from "./models";
1413
import * as Mappers from "./models/mappers";
1514
import * as operations from "./operations";
16-
import { ManagedLabsClientContext } from "./managedLabsClientContext";
15+
import { LabServicesClientContext } from "./labServicesClientContext";
1716

1817

19-
class ManagedLabsClient extends ManagedLabsClientContext {
18+
class LabServicesClient extends LabServicesClientContext {
2019
// Operation groups
21-
providerOperations: operations.ProviderOperations;
22-
globalUsers: operations.GlobalUsers;
23-
labAccounts: operations.LabAccounts;
2420
operations: operations.Operations;
25-
galleryImages: operations.GalleryImages;
21+
operationResults: operations.OperationResults;
22+
labPlans: operations.LabPlans;
23+
images: operations.Images;
2624
labs: operations.Labs;
27-
environmentSettings: operations.EnvironmentSettings;
28-
environments: operations.Environments;
2925
users: operations.Users;
26+
virtualMachines: operations.VirtualMachines;
27+
schedules: operations.Schedules;
3028

3129
/**
32-
* Initializes a new instance of the ManagedLabsClient class.
30+
* Initializes a new instance of the LabServicesClient class.
3331
* @param credentials Credentials needed for the client to connect to Azure. Credentials
3432
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
3533
* more information about these credentials, see
3634
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3735
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3836
* @azure/ms-rest-browserauth are also supported.
39-
* @param subscriptionId The subscription ID.
37+
* @param subscriptionId The ID of the target subscription.
4038
* @param [options] The parameter options
4139
*/
42-
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) {
40+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LabServicesClientOptions) {
4341
super(credentials, subscriptionId, options);
44-
this.providerOperations = new operations.ProviderOperations(this);
45-
this.globalUsers = new operations.GlobalUsers(this);
46-
this.labAccounts = new operations.LabAccounts(this);
4742
this.operations = new operations.Operations(this);
48-
this.galleryImages = new operations.GalleryImages(this);
43+
this.operationResults = new operations.OperationResults(this);
44+
this.labPlans = new operations.LabPlans(this);
45+
this.images = new operations.Images(this);
4946
this.labs = new operations.Labs(this);
50-
this.environmentSettings = new operations.EnvironmentSettings(this);
51-
this.environments = new operations.Environments(this);
5247
this.users = new operations.Users(this);
48+
this.virtualMachines = new operations.VirtualMachines(this);
49+
this.schedules = new operations.Schedules(this);
5350
}
5451
}
5552

5653
// Operation Specifications
5754

5855
export {
59-
ManagedLabsClient,
60-
ManagedLabsClientContext,
61-
Models as ManagedLabsModels,
62-
Mappers as ManagedLabsMappers
56+
LabServicesClient,
57+
LabServicesClientContext,
58+
Models as LabServicesModels,
59+
Mappers as LabServicesMappers
6360
};
6461
export * from "./operations";

sdk/labservices/arm-labservices/src/managedLabsClientContext.ts renamed to sdk/labservices/arm-labservices/src/labServicesClientContext.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,29 +9,29 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-labservices";
1716
const packageVersion = "1.1.1";
1817

19-
export class ManagedLabsClientContext extends msRestAzure.AzureServiceClient {
18+
export class LabServicesClientContext extends msRestAzure.AzureServiceClient {
2019
credentials: msRest.ServiceClientCredentials | TokenCredential;
2120
apiVersion?: string;
2221
subscriptionId: string;
2322

2423
/**
25-
* Initializes a new instance of the ManagedLabsClient class.
24+
* Initializes a new instance of the LabServicesClient class.
2625
* @param credentials Credentials needed for the client to connect to Azure. Credentials
2726
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
2827
* more information about these credentials, see
2928
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
3029
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
3130
* @azure/ms-rest-browserauth are also supported.
32-
* @param subscriptionId The subscription ID.
31+
* @param subscriptionId The ID of the target subscription.
3332
* @param [options] The parameter options
3433
*/
35-
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.ManagedLabsClientOptions) {
34+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.LabServicesClientOptions) {
3635
if (credentials == undefined) {
3736
throw new Error('\'credentials\' cannot be null.');
3837
}
@@ -50,7 +49,7 @@ export class ManagedLabsClientContext extends msRestAzure.AzureServiceClient {
5049

5150
super(credentials, options);
5251

53-
this.apiVersion = '2018-10-15';
52+
this.apiVersion = '2021-10-01-preview';
5453
this.acceptLanguage = 'en-US';
5554
this.longRunningOperationRetryTimeout = 30;
5655
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";

sdk/labservices/arm-labservices/src/models/environmentSettingsMappers.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

sdk/labservices/arm-labservices/src/models/environmentsMappers.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)