@azure/arm-devopsinfrastructure 1.0.0-alpha.20240531.3
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 +15 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +3582 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/imageVersionsListByImageSample.d.ts +2 -0
- package/dist-esm/samples-dev/imageVersionsListByImageSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/imageVersionsListByImageSample.js +55 -0
- package/dist-esm/samples-dev/imageVersionsListByImageSample.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 +53 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsCreateOrUpdateSample.js +61 -0
- package/dist-esm/samples-dev/poolsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsDeleteSample.js +39 -0
- package/dist-esm/samples-dev/poolsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsGetSample.js +39 -0
- package/dist-esm/samples-dev/poolsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsListByResourceGroupSample.js +54 -0
- package/dist-esm/samples-dev/poolsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsListBySubscriptionSample.js +53 -0
- package/dist-esm/samples-dev/poolsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/poolsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/poolsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/poolsUpdateSample.js +40 -0
- package/dist-esm/samples-dev/poolsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceDetailsListByPoolSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceDetailsListByPoolSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceDetailsListByPoolSample.js +55 -0
- package/dist-esm/samples-dev/resourceDetailsListByPoolSample.js.map +1 -0
- package/dist-esm/samples-dev/skuListByLocationSample.d.ts +2 -0
- package/dist-esm/samples-dev/skuListByLocationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/skuListByLocationSample.js +54 -0
- package/dist-esm/samples-dev/skuListByLocationSample.js.map +1 -0
- package/dist-esm/samples-dev/subscriptionUsagesListByLocationSample.d.ts +2 -0
- package/dist-esm/samples-dev/subscriptionUsagesListByLocationSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/subscriptionUsagesListByLocationSample.js +54 -0
- package/dist-esm/samples-dev/subscriptionUsagesListByLocationSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/managedDevOpsInfrastructure.d.ts +25 -0
- package/dist-esm/src/managedDevOpsInfrastructure.d.ts.map +1 -0
- package/dist-esm/src/managedDevOpsInfrastructure.js +105 -0
- package/dist-esm/src/managedDevOpsInfrastructure.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +1044 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +182 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +86 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1766 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +14 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +135 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/imageVersions.d.ts +38 -0
- package/dist-esm/src/operations/imageVersions.d.ts.map +1 -0
- package/dist-esm/src/operations/imageVersions.js +150 -0
- package/dist-esm/src/operations/imageVersions.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +7 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +14 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +133 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/pools.d.ts +107 -0
- package/dist-esm/src/operations/pools.d.ts.map +1 -0
- package/dist-esm/src/operations/pools.js +554 -0
- package/dist-esm/src/operations/pools.js.map +1 -0
- package/dist-esm/src/operations/resourceDetails.d.ts +38 -0
- package/dist-esm/src/operations/resourceDetails.d.ts.map +1 -0
- package/dist-esm/src/operations/resourceDetails.js +150 -0
- package/dist-esm/src/operations/resourceDetails.js.map +1 -0
- package/dist-esm/src/operations/sku.d.ts +35 -0
- package/dist-esm/src/operations/sku.d.ts.map +1 -0
- package/dist-esm/src/operations/sku.js +145 -0
- package/dist-esm/src/operations/sku.js.map +1 -0
- package/dist-esm/src/operations/subscriptionUsages.d.ts +35 -0
- package/dist-esm/src/operations/subscriptionUsages.d.ts.map +1 -0
- package/dist-esm/src/operations/subscriptionUsages.js +145 -0
- package/dist-esm/src/operations/subscriptionUsages.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/imageVersions.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/imageVersions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/imageVersions.js +9 -0
- package/dist-esm/src/operationsInterfaces/imageVersions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/pools.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/pools.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/pools.js +9 -0
- package/dist-esm/src/operationsInterfaces/pools.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceDetails.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/resourceDetails.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceDetails.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceDetails.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sku.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/sku.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sku.js +9 -0
- package/dist-esm/src/operationsInterfaces/sku.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscriptionUsages.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/subscriptionUsages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscriptionUsages.js +9 -0
- package/dist-esm/src/operationsInterfaces/subscriptionUsages.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/devopsinfrastructure_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/devopsinfrastructure_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/devopsinfrastructure_operations_test.spec.js +74 -0
- package/dist-esm/test/devopsinfrastructure_operations_test.spec.js.map +1 -0
- package/package.json +118 -0
- package/review/arm-devopsinfrastructure.api.md +828 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/managedDevOpsInfrastructure.ts +165 -0
- package/src/models/index.ts +1197 -0
- package/src/models/mappers.ts +1899 -0
- package/src/models/parameters.ts +155 -0
- package/src/operations/imageVersions.ts +197 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/pools.ts +718 -0
- package/src/operations/resourceDetails.ts +193 -0
- package/src/operations/sku.ts +176 -0
- package/src/operations/subscriptionUsages.ts +176 -0
- package/src/operationsInterfaces/imageVersions.ts +29 -0
- package/src/operationsInterfaces/index.ts +14 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/pools.ts +139 -0
- package/src/operationsInterfaces/resourceDetails.ts +29 -0
- package/src/operationsInterfaces/sku.ts +24 -0
- package/src/operationsInterfaces/subscriptionUsages.ts +27 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-devopsinfrastructure.d.ts +1336 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsCreateOrUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { ManagedDevOpsInfrastructure, } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Create a Pool
|
|
17
|
+
*
|
|
18
|
+
* @summary Create a Pool
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/CreateOrUpdatePool.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsCreateOrUpdate() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
25
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "rg";
|
|
26
|
+
const poolName = "pool";
|
|
27
|
+
const resource = {
|
|
28
|
+
location: "eastus",
|
|
29
|
+
properties: {
|
|
30
|
+
agentProfile: { kind: "Stateless" },
|
|
31
|
+
devCenterProjectResourceId: "/subscriptions/222e81d0-cf38-4dab-baa5-289bf16baaa4/resourceGroups/rg-1es-devcenter/providers/Microsoft.DevCenter/projects/1ES",
|
|
32
|
+
fabricProfile: {
|
|
33
|
+
images: [
|
|
34
|
+
{
|
|
35
|
+
resourceId: "/MicrosoftWindowsServer/WindowsServer/2019-Datacenter/latest",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
kind: "Vmss",
|
|
39
|
+
sku: { name: "Standard_D4ads_v5" },
|
|
40
|
+
},
|
|
41
|
+
maximumConcurrency: 10,
|
|
42
|
+
organizationProfile: {
|
|
43
|
+
kind: "AzureDevOps",
|
|
44
|
+
organizations: [{ url: "https://mseng.visualstudio.com" }],
|
|
45
|
+
},
|
|
46
|
+
provisioningState: "Succeeded",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const credential = new DefaultAzureCredential();
|
|
50
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
51
|
+
const result = yield client.pools.beginCreateOrUpdateAndWait(resourceGroupName, poolName, resource);
|
|
52
|
+
console.log(result);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function main() {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
poolsCreateOrUpdate();
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
main().catch(console.error);
|
|
61
|
+
//# sourceMappingURL=poolsCreateOrUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/poolsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mBAAmB;;QAChC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,IAAI,CAAC;QAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC;QACxB,MAAM,QAAQ,GAAS;YACrB,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE;gBACV,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;gBACnC,0BAA0B,EACxB,gIAAgI;gBAClI,aAAa,EAAE;oBACb,MAAM,EAAE;wBACN;4BACE,UAAU,EACR,8DAA8D;yBACjE;qBACF;oBACD,IAAI,EAAE,MAAM;oBACZ,GAAG,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE;iBACnC;gBACD,kBAAkB,EAAE,EAAE;gBACtB,mBAAmB,EAAE;oBACnB,IAAI,EAAE,aAAa;oBACnB,aAAa,EAAE,CAAC,EAAE,GAAG,EAAE,gCAAgC,EAAE,CAAC;iBAC3D;gBACD,iBAAiB,EAAE,WAAW;aAC/B;SACF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAC1D,iBAAiB,EACjB,QAAQ,EACR,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,mBAAmB,EAAE,CAAC;IACxB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsDeleteSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Delete a Pool
|
|
17
|
+
*
|
|
18
|
+
* @summary Delete a Pool
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/DeletePool.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsDelete() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
25
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "rg";
|
|
26
|
+
const poolName = "pool";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
29
|
+
const result = yield client.pools.beginDeleteAndWait(resourceGroupName, poolName);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function main() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
poolsDelete();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
main().catch(console.error);
|
|
39
|
+
//# sourceMappingURL=poolsDeleteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/poolsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,WAAW;;QACxB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,IAAI,CAAC;QAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC;QACxB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAClD,iBAAiB,EACjB,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,WAAW,EAAE,CAAC;IAChB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Get a Pool
|
|
17
|
+
*
|
|
18
|
+
* @summary Get a Pool
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/GetPool.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsGet() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
25
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "rg";
|
|
26
|
+
const poolName = "pool";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
29
|
+
const result = yield client.pools.get(resourceGroupName, poolName);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function main() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
poolsGet();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
main().catch(console.error);
|
|
39
|
+
//# sourceMappingURL=poolsGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsGetSample.js","sourceRoot":"","sources":["../../samples-dev/poolsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,IAAI,CAAC;QAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC;QACxB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;QACnE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,QAAQ,EAAE,CAAC;IACb,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsListByResourceGroupSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsListByResourceGroupSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to List Pool resources by resource group
|
|
17
|
+
*
|
|
18
|
+
* @summary List Pool resources by resource group
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscriptionAndResourceGroup.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsListByResourceGroup() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, e_1, _b, _c;
|
|
24
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
26
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "rg";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
29
|
+
const resArray = new Array();
|
|
30
|
+
try {
|
|
31
|
+
for (var _d = true, _e = __asyncValues(client.pools.listByResourceGroup(resourceGroupName)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
32
|
+
_c = _f.value;
|
|
33
|
+
_d = false;
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39
|
+
finally {
|
|
40
|
+
try {
|
|
41
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
42
|
+
}
|
|
43
|
+
finally { if (e_1) throw e_1.error; }
|
|
44
|
+
}
|
|
45
|
+
console.log(resArray);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function main() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
poolsListByResourceGroup();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
main().catch(console.error);
|
|
54
|
+
//# sourceMappingURL=poolsListByResourceGroupSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/poolsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,wBAAwB;;;QACrC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,IAAI,CAAC;QAC7D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAA,IAAA,sDAAE,CAAC;gBAAtD,cAAmD;gBAAnD,WAAmD;gBAA/D,IAAI,IAAI,KAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,wBAAwB,EAAE,CAAC;IAC7B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsListBySubscriptionSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsListBySubscriptionSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to List Pool resources by subscription ID
|
|
17
|
+
*
|
|
18
|
+
* @summary List Pool resources by subscription ID
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ListPoolsBySubscription.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsListBySubscription() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, e_1, _b, _c;
|
|
24
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
28
|
+
const resArray = new Array();
|
|
29
|
+
try {
|
|
30
|
+
for (var _d = true, _e = __asyncValues(client.pools.listBySubscription()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
31
|
+
_c = _f.value;
|
|
32
|
+
_d = false;
|
|
33
|
+
let item = _c;
|
|
34
|
+
resArray.push(item);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38
|
+
finally {
|
|
39
|
+
try {
|
|
40
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
41
|
+
}
|
|
42
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
|
+
}
|
|
44
|
+
console.log(resArray);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function main() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
poolsListBySubscription();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
main().catch(console.error);
|
|
53
|
+
//# sourceMappingURL=poolsListBySubscriptionSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/poolsListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,uBAAuB;;;QACpC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAA,IAAA,sDAAE,CAAC;gBAApC,cAAiC;gBAAjC,WAAiC;gBAA7C,IAAI,IAAI,KAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,uBAAuB,EAAE,CAAC;IAC5B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/poolsUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 { ManagedDevOpsInfrastructure, } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Update a Pool
|
|
17
|
+
*
|
|
18
|
+
* @summary Update a Pool
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/UpdatePool.json
|
|
20
|
+
*/
|
|
21
|
+
function poolsUpdate() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
25
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "rg";
|
|
26
|
+
const poolName = "pool";
|
|
27
|
+
const properties = {};
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
30
|
+
const result = yield client.pools.beginUpdateAndWait(resourceGroupName, poolName, properties);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
poolsUpdate();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# sourceMappingURL=poolsUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poolsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/poolsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,2BAA2B,GAC5B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,WAAW;;QACxB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,IAAI,CAAC;QAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC;QACxB,MAAM,UAAU,GAAe,EAAE,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAClD,iBAAiB,EACjB,QAAQ,EACR,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,WAAW,EAAE,CAAC;IAChB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceDetailsListByPoolSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceDetailsListByPoolSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to List ResourceDetailsObject resources by Pool
|
|
17
|
+
*
|
|
18
|
+
* @summary List ResourceDetailsObject resources by Pool
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/ResourceDetails_ListByPool.json
|
|
20
|
+
*/
|
|
21
|
+
function resourceDetailsListByPool() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, e_1, _b, _c;
|
|
24
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
26
|
+
const resourceGroupName = process.env["DEVOPSINFRASTRUCTURE_RESOURCE_GROUP"] || "my-resource-group";
|
|
27
|
+
const poolName = "my-dev-ops-pool";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
30
|
+
const resArray = new Array();
|
|
31
|
+
try {
|
|
32
|
+
for (var _d = true, _e = __asyncValues(client.resourceDetails.listByPool(resourceGroupName, poolName)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
33
|
+
_c = _f.value;
|
|
34
|
+
_d = false;
|
|
35
|
+
let item = _c;
|
|
36
|
+
resArray.push(item);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
40
|
+
finally {
|
|
41
|
+
try {
|
|
42
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
43
|
+
}
|
|
44
|
+
finally { if (e_1) throw e_1.error; }
|
|
45
|
+
}
|
|
46
|
+
console.log(resArray);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function main() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
resourceDetailsListByPool();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
main().catch(console.error);
|
|
55
|
+
//# sourceMappingURL=resourceDetailsListByPoolSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceDetailsListByPoolSample.js","sourceRoot":"","sources":["../../samples-dev/resourceDetailsListByPoolSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,yBAAyB;;;QACtC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,IAAI,mBAAmB,CAAC;QAC5E,MAAM,QAAQ,GAAG,iBAAiB,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,UAAU,CACtD,iBAAiB,EACjB,QAAQ,CACT,CAAA,IAAA,sDAAE,CAAC;gBAHmB,cAGtB;gBAHsB,WAGtB;gBAHU,IAAI,IAAI,KAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,yBAAyB,EAAE,CAAC;IAC9B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skuListByLocationSample.d.ts","sourceRoot":"","sources":["../../samples-dev/skuListByLocationSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to List ResourceSku resources by subscription ID
|
|
17
|
+
*
|
|
18
|
+
* @summary List ResourceSku resources by subscription ID
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/Sku_ListByLocation.json
|
|
20
|
+
*/
|
|
21
|
+
function skuListByLocation() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, e_1, _b, _c;
|
|
24
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
26
|
+
const locationName = "eastus";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
29
|
+
const resArray = new Array();
|
|
30
|
+
try {
|
|
31
|
+
for (var _d = true, _e = __asyncValues(client.sku.listByLocation(locationName)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
32
|
+
_c = _f.value;
|
|
33
|
+
_d = false;
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39
|
+
finally {
|
|
40
|
+
try {
|
|
41
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
42
|
+
}
|
|
43
|
+
finally { if (e_1) throw e_1.error; }
|
|
44
|
+
}
|
|
45
|
+
console.log(resArray);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function main() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
skuListByLocation();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
main().catch(console.error);
|
|
54
|
+
//# sourceMappingURL=skuListByLocationSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skuListByLocationSample.js","sourceRoot":"","sources":["../../samples-dev/skuListByLocationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,YAAY,GAAG,QAAQ,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA,IAAA,sDAAE,CAAC;gBAA1C,cAAuC;gBAAvC,WAAuC;gBAAnD,IAAI,IAAI,KAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionUsagesListByLocationSample.d.ts","sourceRoot":"","sources":["../../samples-dev/subscriptionUsagesListByLocationSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 { ManagedDevOpsInfrastructure } from "@azure/arm-devopsinfrastructure";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to List Quota resources by subscription ID
|
|
17
|
+
*
|
|
18
|
+
* @summary List Quota resources by subscription ID
|
|
19
|
+
* x-ms-original-file: specification/devopsinfrastructure/resource-manager/Microsoft.DevOpsInfrastructure/preview/2024-04-04-preview/examples/SubscriptionUsages_ListByLocation.json
|
|
20
|
+
*/
|
|
21
|
+
function subscriptionUsagesListByLocation() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, e_1, _b, _c;
|
|
24
|
+
const subscriptionId = process.env["DEVOPSINFRASTRUCTURE_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"a2e95d27-c161-4b61-bda4-11512c14c2c2";
|
|
26
|
+
const locationName = "eastus";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new ManagedDevOpsInfrastructure(credential, subscriptionId);
|
|
29
|
+
const resArray = new Array();
|
|
30
|
+
try {
|
|
31
|
+
for (var _d = true, _e = __asyncValues(client.subscriptionUsages.listByLocation(locationName)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
32
|
+
_c = _f.value;
|
|
33
|
+
_d = false;
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39
|
+
finally {
|
|
40
|
+
try {
|
|
41
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
42
|
+
}
|
|
43
|
+
finally { if (e_1) throw e_1.error; }
|
|
44
|
+
}
|
|
45
|
+
console.log(resArray);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function main() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
subscriptionUsagesListByLocation();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
main().catch(console.error);
|
|
54
|
+
//# sourceMappingURL=subscriptionUsagesListByLocationSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptionUsagesListByLocationSample.js","sourceRoot":"","sources":["../../samples-dev/subscriptionUsagesListByLocationSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,gCAAgC;;;QAC7C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;YACnD,sCAAsC,CAAC;QACzC,MAAM,YAAY,GAAG,QAAQ,CAAC;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAC7D,YAAY,CACb,CAAA,IAAA,sDAAE,CAAC;gBAFmB,cAEtB;gBAFsB,WAEtB;gBAFU,IAAI,IAAI,KAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,gCAAgC,EAAE,CAAC;IACrC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference lib="esnext.asynciterable" />
|
|
2
|
+
export { getContinuationToken } from "./pagingHelper";
|
|
3
|
+
export * from "./models";
|
|
4
|
+
export { ManagedDevOpsInfrastructure } from "./managedDevOpsInfrastructure";
|
|
5
|
+
export * from "./operationsInterfaces";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
/// <reference lib="esnext.asynciterable" />
|
|
9
|
+
export { getContinuationToken } from "./pagingHelper";
|
|
10
|
+
export * from "./models";
|
|
11
|
+
export { ManagedDevOpsInfrastructure } from "./managedDevOpsInfrastructure";
|
|
12
|
+
export * from "./operationsInterfaces";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
2
|
+
export declare function createLroSpec<T>(inputs: {
|
|
3
|
+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
|
|
4
|
+
args: Record<string, unknown>;
|
|
5
|
+
spec: {
|
|
6
|
+
readonly requestBody?: unknown;
|
|
7
|
+
readonly path?: string;
|
|
8
|
+
readonly httpMethod: string;
|
|
9
|
+
} & Record<string, any>;
|
|
10
|
+
}): LongRunningOperation<T>;
|
|
11
|
+
//# sourceMappingURL=lroImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE;QACJ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACzB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAmB1B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { __rest } from "tslib";
|
|
9
|
+
export function createLroSpec(inputs) {
|
|
10
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
11
|
+
return {
|
|
12
|
+
requestMethod: spec.httpMethod,
|
|
13
|
+
requestPath: spec.path,
|
|
14
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
15
|
+
sendPollRequest: (path, options) => {
|
|
16
|
+
const { requestBody } = spec, restSpec = __rest(spec, ["requestBody"]);
|
|
17
|
+
return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=lroImpl.js.map
|