@azure/arm-labservices 3.0.0-alpha.20220414.1 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/README.md +11 -0
- package/dist/index.js +245 -152
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/imagesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/imagesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/imagesCreateOrUpdateSample.js +33 -0
- package/dist-esm/samples-dev/imagesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/imagesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/imagesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/imagesGetSample.js +32 -0
- package/dist-esm/samples-dev/imagesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/imagesListByLabPlanSample.d.ts +2 -0
- package/dist-esm/samples-dev/imagesListByLabPlanSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/imagesListByLabPlanSample.js +45 -0
- package/dist-esm/samples-dev/imagesListByLabPlanSample.js.map +1 -0
- package/dist-esm/samples-dev/imagesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/imagesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/imagesUpdateSample.js +33 -0
- package/dist-esm/samples-dev/imagesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansCreateOrUpdateSample.js +58 -0
- package/dist-esm/samples-dev/labPlansCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansDeleteSample.js +31 -0
- package/dist-esm/samples-dev/labPlansDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansGetSample.js +31 -0
- package/dist-esm/samples-dev/labPlansGetSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/labPlansListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/labPlansListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansSaveImageSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansSaveImageSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansSaveImageSample.js +35 -0
- package/dist-esm/samples-dev/labPlansSaveImageSample.js.map +1 -0
- package/dist-esm/samples-dev/labPlansUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labPlansUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labPlansUpdateSample.js +39 -0
- package/dist-esm/samples-dev/labPlansUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.js +70 -0
- package/dist-esm/samples-dev/labsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/labsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/labsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsGetSample.js +31 -0
- package/dist-esm/samples-dev/labsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/labsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/labsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/labsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/labsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/labsPublishSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsPublishSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsPublishSample.js +31 -0
- package/dist-esm/samples-dev/labsPublishSample.js.map +1 -0
- package/dist-esm/samples-dev/labsSyncGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsSyncGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsSyncGroupSample.js +31 -0
- package/dist-esm/samples-dev/labsSyncGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/labsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labsUpdateSample.js +32 -0
- package/dist-esm/samples-dev/labsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationResultsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationResultsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationResultsGetSample.js +30 -0
- package/dist-esm/samples-dev/operationResultsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.js +43 -0
- package/dist-esm/samples-dev/schedulesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/schedulesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesGetSample.js +32 -0
- package/dist-esm/samples-dev/schedulesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesListByLabSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesListByLabSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesListByLabSample.js +45 -0
- package/dist-esm/samples-dev/schedulesListByLabSample.js.map +1 -0
- package/dist-esm/samples-dev/schedulesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/schedulesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/schedulesUpdateSample.js +39 -0
- package/dist-esm/samples-dev/schedulesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/skusListSample.d.ts +2 -0
- package/dist-esm/samples-dev/skusListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/skusListSample.js +43 -0
- package/dist-esm/samples-dev/skusListSample.js.map +1 -0
- package/dist-esm/samples-dev/usagesListByLocationSample.d.ts +2 -0
- package/dist-esm/samples-dev/usagesListByLocationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usagesListByLocationSample.js +44 -0
- package/dist-esm/samples-dev/usagesListByLocationSample.js.map +1 -0
- package/dist-esm/samples-dev/usersCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersCreateOrUpdateSample.js +36 -0
- package/dist-esm/samples-dev/usersCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/usersDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersDeleteSample.js +32 -0
- package/dist-esm/samples-dev/usersDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/usersGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersGetSample.js +32 -0
- package/dist-esm/samples-dev/usersGetSample.js.map +1 -0
- package/dist-esm/samples-dev/usersInviteSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersInviteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersInviteSample.js +33 -0
- package/dist-esm/samples-dev/usersInviteSample.js.map +1 -0
- package/dist-esm/samples-dev/usersListByLabSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersListByLabSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersListByLabSample.js +45 -0
- package/dist-esm/samples-dev/usersListByLabSample.js.map +1 -0
- package/dist-esm/samples-dev/usersUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/usersUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/usersUpdateSample.js +33 -0
- package/dist-esm/samples-dev/usersUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesGetSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesListByLabSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesListByLabSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesListByLabSample.js +45 -0
- package/dist-esm/samples-dev/virtualMachinesListByLabSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesRedeploySample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesRedeploySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesRedeploySample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesRedeploySample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesReimageSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesReimageSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesReimageSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesReimageSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesResetPasswordSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesResetPasswordSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesResetPasswordSample.js +36 -0
- package/dist-esm/samples-dev/virtualMachinesResetPasswordSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesStartSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesStartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesStartSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesStartSample.js.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesStopSample.d.ts +2 -0
- package/dist-esm/samples-dev/virtualMachinesStopSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/virtualMachinesStopSample.js +32 -0
- package/dist-esm/samples-dev/virtualMachinesStopSample.js.map +1 -0
- package/dist-esm/src/labServicesClient.d.ts.map +1 -1
- package/dist-esm/src/labServicesClient.js +20 -2
- package/dist-esm/src/labServicesClient.js.map +1 -1
- package/dist-esm/src/operations/labPlans.d.ts.map +1 -1
- package/dist-esm/src/operations/labPlans.js +12 -4
- package/dist-esm/src/operations/labPlans.js.map +1 -1
- package/dist-esm/src/operations/labs.d.ts.map +1 -1
- package/dist-esm/src/operations/labs.js +15 -5
- package/dist-esm/src/operations/labs.js.map +1 -1
- package/dist-esm/src/operations/schedules.d.ts.map +1 -1
- package/dist-esm/src/operations/schedules.js +3 -1
- package/dist-esm/src/operations/schedules.js.map +1 -1
- package/dist-esm/src/operations/users.d.ts.map +1 -1
- package/dist-esm/src/operations/users.js +12 -4
- package/dist-esm/src/operations/users.js.map +1 -1
- package/dist-esm/src/operations/virtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualMachines.js +15 -5
- package/dist-esm/src/operations/virtualMachines.js.map +1 -1
- package/package.json +11 -11
- package/rollup.config.js +6 -72
- package/src/labServicesClient.ts +27 -2
- package/src/operations/labPlans.ts +12 -4
- package/src/operations/labs.ts +15 -5
- package/src/operations/schedules.ts +3 -1
- package/src/operations/users.ts +12 -4
- package/src/operations/virtualMachines.ts +15 -5
- package/tsconfig.json +18 -5
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Returns list of usage per SKU family for the specified subscription in the specified region.
|
|
15
|
+
*
|
|
16
|
+
* @summary Returns list of usage per SKU family for the specified subscription in the specified region.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Usages/getUsages.json
|
|
18
|
+
*/
|
|
19
|
+
function listUsages() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
23
|
+
const location = "westus2";
|
|
24
|
+
const credential = new DefaultAzureCredential();
|
|
25
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
26
|
+
const resArray = new Array();
|
|
27
|
+
try {
|
|
28
|
+
for (var _b = __asyncValues(client.usages.listByLocation(location)), _c; _c = yield _b.next(), !_c.done;) {
|
|
29
|
+
let item = _c.value;
|
|
30
|
+
resArray.push(item);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
34
|
+
finally {
|
|
35
|
+
try {
|
|
36
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
37
|
+
}
|
|
38
|
+
finally { if (e_1) throw e_1.error; }
|
|
39
|
+
}
|
|
40
|
+
console.log(resArray);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
listUsages().catch(console.error);
|
|
44
|
+
//# sourceMappingURL=usagesListByLocationSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usagesListByLocationSample.js","sourceRoot":"","sources":["../../samples-dev/usagesListByLocationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,UAAU;;;QACvB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,QAAQ,GAAG,SAAS,CAAC;QAC3B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA,IAAA;gBAAlD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersCreateOrUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Operation to create or update a lab user.
|
|
15
|
+
*
|
|
16
|
+
* @summary Operation to create or update a lab user.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/putUser.json
|
|
18
|
+
*/
|
|
19
|
+
function putUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const userName = "testuser";
|
|
25
|
+
const body = {
|
|
26
|
+
additionalUsageQuota: "20:00",
|
|
27
|
+
email: "testuser@contoso.com"
|
|
28
|
+
};
|
|
29
|
+
const credential = new DefaultAzureCredential();
|
|
30
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
31
|
+
const result = yield client.users.beginCreateOrUpdateAndWait(resourceGroupName, labName, userName, body);
|
|
32
|
+
console.log(result);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
putUser().catch(console.error);
|
|
36
|
+
//# sourceMappingURL=usersCreateOrUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/usersCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAQ,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,OAAO;;QACpB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,IAAI,GAAS;YACjB,oBAAoB,EAAE,OAAO;YAC7B,KAAK,EAAE,sBAAsB;SAC9B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAC1D,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersDeleteSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Operation to delete a user resource.
|
|
15
|
+
*
|
|
16
|
+
* @summary Operation to delete a user resource.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/deleteUser.json
|
|
18
|
+
*/
|
|
19
|
+
function deleteUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const userName = "testuser";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.users.beginDeleteAndWait(resourceGroupName, labName, userName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
deleteUser().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=usersDeleteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/usersDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,UAAU;;QACvB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAClD,iBAAiB,EACjB,OAAO,EACP,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Returns the properties of a lab user.
|
|
15
|
+
*
|
|
16
|
+
* @summary Returns the properties of a lab user.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/getUser.json
|
|
18
|
+
*/
|
|
19
|
+
function getUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const userName = "testuser";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.users.get(resourceGroupName, labName, userName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getUser().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=usersGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersGetSample.js","sourceRoot":"","sources":["../../samples-dev/usersGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,OAAO;;QACpB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersInviteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersInviteSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Operation to invite a user to a lab.
|
|
15
|
+
*
|
|
16
|
+
* @summary Operation to invite a user to a lab.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/inviteUser.json
|
|
18
|
+
*/
|
|
19
|
+
function inviteUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const userName = "testuser";
|
|
25
|
+
const body = { text: "Invitation to lab testlab" };
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
28
|
+
const result = yield client.users.beginInviteAndWait(resourceGroupName, labName, userName, body);
|
|
29
|
+
console.log(result);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
inviteUser().catch(console.error);
|
|
33
|
+
//# sourceMappingURL=usersInviteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersInviteSample.js","sourceRoot":"","sources":["../../samples-dev/usersInviteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,UAAU;;QACvB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,IAAI,GAAe,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;QAC/D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAClD,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersListByLabSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersListByLabSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Returns a list of all users for a lab.
|
|
15
|
+
*
|
|
16
|
+
* @summary Returns a list of all users for a lab.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/listUser.json
|
|
18
|
+
*/
|
|
19
|
+
function listUser() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
23
|
+
const resourceGroupName = "testrg123";
|
|
24
|
+
const labName = "testlab";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const resArray = new Array();
|
|
28
|
+
try {
|
|
29
|
+
for (var _b = __asyncValues(client.users.listByLab(resourceGroupName, labName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
30
|
+
let item = _c.value;
|
|
31
|
+
resArray.push(item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
}
|
|
41
|
+
console.log(resArray);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
listUser().catch(console.error);
|
|
45
|
+
//# sourceMappingURL=usersListByLabSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersListByLabSample.js","sourceRoot":"","sources":["../../samples-dev/usersListByLabSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,QAAQ;;;QACrB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA,IAAA;gBAA9D,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/usersUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Operation to update a lab user.
|
|
15
|
+
*
|
|
16
|
+
* @summary Operation to update a lab user.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Users/patchUser.json
|
|
18
|
+
*/
|
|
19
|
+
function patchUser() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const userName = "testuser";
|
|
25
|
+
const body = { additionalUsageQuota: "20:00" };
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
28
|
+
const result = yield client.users.beginUpdateAndWait(resourceGroupName, labName, userName, body);
|
|
29
|
+
console.log(result);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
patchUser().catch(console.error);
|
|
33
|
+
//# sourceMappingURL=usersUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usersUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/usersUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,SAAS;;QACtB,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,IAAI,GAAe,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC;QAC3D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAClD,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAS,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Returns the properties for a lab virtual machine.
|
|
15
|
+
*
|
|
16
|
+
* @summary Returns the properties for a lab virtual machine.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/getVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function getVirtualMachine() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const virtualMachineName = "template";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.virtualMachines.get(resourceGroupName, labName, virtualMachineName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getVirtualMachine().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=virtualMachinesGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesGetSample.js","sourceRoot":"","sources":["../../samples-dev/virtualMachinesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,GAAG,CAC7C,iBAAiB,EACjB,OAAO,EACP,kBAAkB,CACnB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesListByLabSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesListByLabSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Returns a list of all virtual machines for a lab.
|
|
15
|
+
*
|
|
16
|
+
* @summary Returns a list of all virtual machines for a lab.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/listVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function listVirtualMachine() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
23
|
+
const resourceGroupName = "testrg123";
|
|
24
|
+
const labName = "testlab";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const resArray = new Array();
|
|
28
|
+
try {
|
|
29
|
+
for (var _b = __asyncValues(client.virtualMachines.listByLab(resourceGroupName, labName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
30
|
+
let item = _c.value;
|
|
31
|
+
resArray.push(item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
}
|
|
41
|
+
console.log(resArray);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
listVirtualMachine().catch(console.error);
|
|
45
|
+
//# sourceMappingURL=virtualMachinesListByLabSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesListByLabSample.js","sourceRoot":"","sources":["../../samples-dev/virtualMachinesListByLabSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kBAAkB;;;QAC/B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,SAAS,CACrD,iBAAiB,EACjB,OAAO,CACR,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,kBAAkB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesRedeploySample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesRedeploySample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Action to redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity.
|
|
15
|
+
*
|
|
16
|
+
* @summary Action to redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/redeployVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function redeployVirtualMachine() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const virtualMachineName = "template";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.virtualMachines.beginRedeployAndWait(resourceGroupName, labName, virtualMachineName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
redeployVirtualMachine().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=virtualMachinesRedeploySample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesRedeploySample.js","sourceRoot":"","sources":["../../samples-dev/virtualMachinesRedeploySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,oBAAoB,CAC9D,iBAAiB,EACjB,OAAO,EACP,kBAAkB,CACnB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesReimageSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesReimageSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest published snapshot of the reference environment of the lab.
|
|
15
|
+
*
|
|
16
|
+
* @summary Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest published snapshot of the reference environment of the lab.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/reimageVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function reimageVirtualMachine() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const virtualMachineName = "template";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.virtualMachines.beginReimageAndWait(resourceGroupName, labName, virtualMachineName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
reimageVirtualMachine().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=virtualMachinesReimageSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesReimageSample.js","sourceRoot":"","sources":["../../samples-dev/virtualMachinesReimageSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;QACtC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAC7D,iBAAiB,EACjB,OAAO,EACP,kBAAkB,CACnB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesResetPasswordSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesResetPasswordSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Resets a lab virtual machine password.
|
|
15
|
+
*
|
|
16
|
+
* @summary Resets a lab virtual machine password.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/resetPasswordVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function resetPasswordVirtualMachine() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const virtualMachineName = "template";
|
|
25
|
+
const body = {
|
|
26
|
+
password: "example-password",
|
|
27
|
+
username: "example-username"
|
|
28
|
+
};
|
|
29
|
+
const credential = new DefaultAzureCredential();
|
|
30
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
31
|
+
const result = yield client.virtualMachines.beginResetPasswordAndWait(resourceGroupName, labName, virtualMachineName, body);
|
|
32
|
+
console.log(result);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
resetPasswordVirtualMachine().catch(console.error);
|
|
36
|
+
//# sourceMappingURL=virtualMachinesResetPasswordSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesResetPasswordSample.js","sourceRoot":"","sources":["../../samples-dev/virtualMachinesResetPasswordSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAqB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,2BAA2B;;QACxC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,WAAW,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC;QAC1B,MAAM,kBAAkB,GAAG,UAAU,CAAC;QACtC,MAAM,IAAI,GAAsB;YAC9B,QAAQ,EAAE,kBAAkB;YAC5B,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,yBAAyB,CACnE,iBAAiB,EACjB,OAAO,EACP,kBAAkB,EAClB,IAAI,CACL,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,2BAA2B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualMachinesStartSample.d.ts","sourceRoot":"","sources":["../../samples-dev/virtualMachinesStartSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { LabServicesClient } from "@azure/arm-labservices";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Action to start a lab virtual machine.
|
|
15
|
+
*
|
|
16
|
+
* @summary Action to start a lab virtual machine.
|
|
17
|
+
* x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/VirtualMachines/startVirtualMachine.json
|
|
18
|
+
*/
|
|
19
|
+
function startVirtualMachine() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
|
22
|
+
const resourceGroupName = "testrg123";
|
|
23
|
+
const labName = "testlab";
|
|
24
|
+
const virtualMachineName = "template";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new LabServicesClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.virtualMachines.beginStartAndWait(resourceGroupName, labName, virtualMachineName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
startVirtualMachine().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=virtualMachinesStartSample.js.map
|