@azure/arm-defendereasm 1.0.0-beta.1
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 +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +2047 -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/labelsCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js +40 -0
- package/dist-esm/samples-dev/labelsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/labelsGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js +60 -0
- package/dist-esm/samples-dev/labelsListByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/labelsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/labelsUpdateSample.js +40 -0
- package/dist-esm/samples-dev/labelsUpdateSample.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 +58 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts +2 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js +40 -0
- package/dist-esm/samples-dev/tasksGetByWorkspaceSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js +43 -0
- package/dist-esm/samples-dev/workspacesCreateAndUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesGetSample.js +39 -0
- package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +59 -0
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +58 -0
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js +39 -0
- package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -0
- package/dist-esm/src/easmMgmtClient.d.ts +23 -0
- package/dist-esm/src/easmMgmtClient.d.ts.map +1 -0
- package/dist-esm/src/easmMgmtClient.js +103 -0
- package/dist-esm/src/easmMgmtClient.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/models/index.d.ts +492 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +66 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +23 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +574 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +16 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +137 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +5 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +12 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/labels.d.ts +87 -0
- package/dist-esm/src/operations/labels.d.ts.map +1 -0
- package/dist-esm/src/operations/labels.js +395 -0
- package/dist-esm/src/operations/labels.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 +138 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/tasks.d.ts +21 -0
- package/dist-esm/src/operations/tasks.d.ts.map +1 -0
- package/dist-esm/src/operations/tasks.js +55 -0
- package/dist-esm/src/operations/tasks.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +96 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +496 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/labels.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/labels.js +9 -0
- package/dist-esm/src/operationsInterfaces/labels.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/tasks.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/tasks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/tasks.js +9 -0
- package/dist-esm/src/operationsInterfaces/tasks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +60 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.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/defendereasm_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/defendereasm_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js +120 -0
- package/dist-esm/test/defendereasm_operations_test.spec.js.map +1 -0
- package/package.json +123 -0
- package/review/arm-defendereasm.api.md +400 -0
- package/rollup.config.js +122 -0
- package/src/easmMgmtClient.ts +151 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +562 -0
- package/src/models/mappers.ts +639 -0
- package/src/models/parameters.ts +161 -0
- package/src/operations/index.ts +12 -0
- package/src/operations/labels.ts +543 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/tasks.ts +75 -0
- package/src/operations/workspaces.ts +625 -0
- package/src/operationsInterfaces/index.ts +12 -0
- package/src/operationsInterfaces/labels.ts +120 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/tasks.ts +29 -0
- package/src/operationsInterfaces/workspaces.ts +114 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +33 -0
- package/types/arm-defendereasm.d.ts +724 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/labelsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,MAAM;;QACnB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,SAAS,GAAG,cAAc,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,kBAAkB,CACnD,iBAAiB,EACjB,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,MAAM,EAAE,CAAC;IACX,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsGetByWorkspaceSample.d.ts","sourceRoot":"","sources":["../../samples-dev/labelsGetByWorkspaceSample.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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a label in the given workspace.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a label in the given workspace.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Labels_GetByWorkspace.json
|
|
20
|
+
*/
|
|
21
|
+
function labels() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const labelName = "ThisisaLabel";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
30
|
+
const result = yield client.labels.getByWorkspace(resourceGroupName, workspaceName, labelName);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
labels();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# sourceMappingURL=labelsGetByWorkspaceSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsGetByWorkspaceSample.js","sourceRoot":"","sources":["../../samples-dev/labelsGetByWorkspaceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,MAAM;;QACnB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,SAAS,GAAG,cAAc,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,cAAc,CAC/C,iBAAiB,EACjB,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,MAAM,EAAE,CAAC;IACX,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsListByWorkspaceSample.d.ts","sourceRoot":"","sources":["../../samples-dev/labelsListByWorkspaceSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a list of labels in the given workspace.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a list of labels in the given workspace.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Labels_ListByWorkspace.json
|
|
20
|
+
*/
|
|
21
|
+
function labels() {
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
|
26
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
27
|
+
const workspaceName = "ThisisaWorkspace";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
30
|
+
const resArray = new Array();
|
|
31
|
+
try {
|
|
32
|
+
for (var _d = true, _e = __asyncValues(client.labels.listByWorkspace(resourceGroupName, workspaceName)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
33
|
+
_c = _f.value;
|
|
34
|
+
_d = false;
|
|
35
|
+
try {
|
|
36
|
+
let item = _c;
|
|
37
|
+
resArray.push(item);
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
_d = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
45
|
+
finally {
|
|
46
|
+
try {
|
|
47
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
48
|
+
}
|
|
49
|
+
finally { if (e_1) throw e_1.error; }
|
|
50
|
+
}
|
|
51
|
+
console.log(resArray);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function main() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
labels();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
main().catch(console.error);
|
|
60
|
+
//# sourceMappingURL=labelsListByWorkspaceSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsListByWorkspaceSample.js","sourceRoot":"","sources":["../../samples-dev/labelsListByWorkspaceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,MAAM;;;QACnB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,MAAM,CAAC,eAAe,CAClD,iBAAiB,EACjB,aAAa,CACd,CAAA,IAAA;gBAHsB,cAGtB;gBAHsB,WAGtB;;oBAHU,IAAI,IAAI,KAAA,CAAA;oBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,MAAM,EAAE,CAAC;IACX,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/labelsUpdateSample.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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Update a Label.
|
|
17
|
+
*
|
|
18
|
+
* @summary Update a Label.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Labels_Update.json
|
|
20
|
+
*/
|
|
21
|
+
function labels() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const labelName = "ThisisaLabel";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
30
|
+
const result = yield client.labels.update(resourceGroupName, workspaceName, labelName);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
labels();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# sourceMappingURL=labelsUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/labelsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,MAAM;;QACnB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,SAAS,GAAG,cAAc,CAAC;QACjC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CACvC,iBAAiB,EACjB,aAAa,EACb,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,MAAM,EAAE,CAAC;IACX,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationsListSample.d.ts","sourceRoot":"","sources":["../../samples-dev/operationsListSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns list of operations.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns list of operations.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Operations_List.json
|
|
20
|
+
*/
|
|
21
|
+
function operations() {
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
28
|
+
const resArray = new Array();
|
|
29
|
+
try {
|
|
30
|
+
for (var _d = true, _e = __asyncValues(client.operations.list()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
31
|
+
_c = _f.value;
|
|
32
|
+
_d = false;
|
|
33
|
+
try {
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
_d = true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
43
|
+
finally {
|
|
44
|
+
try {
|
|
45
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
46
|
+
}
|
|
47
|
+
finally { if (e_1) throw e_1.error; }
|
|
48
|
+
}
|
|
49
|
+
console.log(resArray);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function main() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
operations();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
main().catch(console.error);
|
|
58
|
+
//# sourceMappingURL=operationsListSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operationsListSample.js","sourceRoot":"","sources":["../../samples-dev/operationsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA,IAAA;gBAAxB,cAAwB;gBAAxB,WAAwB;;oBAApC,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasksGetByWorkspaceSample.d.ts","sourceRoot":"","sources":["../../samples-dev/tasksGetByWorkspaceSample.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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a task in the given workspace.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a task in the given workspace.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Tasks_GetByWorkspace.json
|
|
20
|
+
*/
|
|
21
|
+
function tasks() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const taskId = "ThisisaTaskId";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
30
|
+
const result = yield client.tasks.getByWorkspace(resourceGroupName, workspaceName, taskId);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
tasks();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# sourceMappingURL=tasksGetByWorkspaceSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasksGetByWorkspaceSample.js","sourceRoot":"","sources":["../../samples-dev/tasksGetByWorkspaceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,KAAK;;QAClB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,MAAM,GAAG,eAAe,CAAC;QAC/B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAC9C,iBAAiB,EACjB,aAAa,EACb,MAAM,CACP,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,KAAK,EAAE,CAAC;IACV,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesCreateAndUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesCreateAndUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Create or update a Workspace.
|
|
17
|
+
*
|
|
18
|
+
* @summary Create or update a Workspace.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Workspaces_CreateAndUpdate.json
|
|
20
|
+
*/
|
|
21
|
+
function workspaces() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const workspaceResource = { location: "West US" };
|
|
28
|
+
const options = {
|
|
29
|
+
workspaceResource
|
|
30
|
+
};
|
|
31
|
+
const credential = new DefaultAzureCredential();
|
|
32
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
33
|
+
const result = yield client.workspaces.beginCreateAndUpdateAndWait(resourceGroupName, workspaceName, options);
|
|
34
|
+
console.log(result);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function main() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
workspaces();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
main().catch(console.error);
|
|
43
|
+
//# sourceMappingURL=workspacesCreateAndUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesCreateAndUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/workspacesCreateAndUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAGL,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,iBAAiB,GAAsB,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;QACrE,MAAM,OAAO,GAA4C;YACvD,iBAAiB;SAClB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,2BAA2B,CAChE,iBAAiB,EACjB,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesDeleteSample.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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Delete a Workspace.
|
|
17
|
+
*
|
|
18
|
+
* @summary Delete a Workspace.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Workspaces_Delete.json
|
|
20
|
+
*/
|
|
21
|
+
function workspaces() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
29
|
+
const result = yield client.workspaces.beginDeleteAndWait(resourceGroupName, workspaceName);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function main() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
workspaces();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
main().catch(console.error);
|
|
39
|
+
//# sourceMappingURL=workspacesDeleteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/workspacesDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,kBAAkB,CACvD,iBAAiB,EACjB,aAAa,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesGetSample.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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a workspace with the given name.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a workspace with the given name.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Workspaces_Get.json
|
|
20
|
+
*/
|
|
21
|
+
function workspaces() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"00000000-0000-0000-0000-000000000000";
|
|
25
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
26
|
+
const workspaceName = "ThisisaWorkspace";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
29
|
+
const result = yield client.workspaces.get(resourceGroupName, workspaceName);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function main() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
workspaces();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
main().catch(console.error);
|
|
39
|
+
//# sourceMappingURL=workspacesGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesGetSample.js","sourceRoot":"","sources":["../../samples-dev/workspacesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,aAAa,GAAG,kBAAkB,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesListByResourceGroupSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesListByResourceGroupSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a list of workspaces in the given resource group.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a list of workspaces in the given resource group.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Workspaces_ListByResourceGroup.json
|
|
20
|
+
*/
|
|
21
|
+
function workspaces() {
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
|
26
|
+
const resourceGroupName = process.env["DEFENDEREASM_RESOURCE_GROUP"] || "dummyrg";
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
29
|
+
const resArray = new Array();
|
|
30
|
+
try {
|
|
31
|
+
for (var _d = true, _e = __asyncValues(client.workspaces.listByResourceGroup(resourceGroupName)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
32
|
+
_c = _f.value;
|
|
33
|
+
_d = false;
|
|
34
|
+
try {
|
|
35
|
+
let item = _c;
|
|
36
|
+
resArray.push(item);
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
_d = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
44
|
+
finally {
|
|
45
|
+
try {
|
|
46
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
47
|
+
}
|
|
48
|
+
finally { if (e_1) throw e_1.error; }
|
|
49
|
+
}
|
|
50
|
+
console.log(resArray);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function main() {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
workspaces();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
main().catch(console.error);
|
|
59
|
+
//# sourceMappingURL=workspacesListByResourceGroupSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/workspacesListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,IAAI,SAAS,CAAC;QAC1D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAC1D,iBAAiB,CAClB,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesListBySubscriptionSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesListBySubscriptionSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { EasmMgmtClient } from "@azure/arm-defendereasm";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Returns a list of workspaces under the given subscription.
|
|
17
|
+
*
|
|
18
|
+
* @summary Returns a list of workspaces under the given subscription.
|
|
19
|
+
* x-ms-original-file: specification/riskiq/resource-manager/Microsoft.Easm/preview/2023-04-01-preview/examples/Workspaces_ListBySubscription.json
|
|
20
|
+
*/
|
|
21
|
+
function workspaces() {
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["DEFENDEREASM_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new EasmMgmtClient(credential, subscriptionId);
|
|
28
|
+
const resArray = new Array();
|
|
29
|
+
try {
|
|
30
|
+
for (var _d = true, _e = __asyncValues(client.workspaces.listBySubscription()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
31
|
+
_c = _f.value;
|
|
32
|
+
_d = false;
|
|
33
|
+
try {
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
_d = true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
43
|
+
finally {
|
|
44
|
+
try {
|
|
45
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
46
|
+
}
|
|
47
|
+
finally { if (e_1) throw e_1.error; }
|
|
48
|
+
}
|
|
49
|
+
console.log(resArray);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function main() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
workspaces();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
main().catch(console.error);
|
|
58
|
+
//# sourceMappingURL=workspacesListBySubscriptionSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/workspacesListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,UAAU;;;QACvB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;YAC3C,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,IAAA;gBAAtC,cAAsC;gBAAtC,WAAsC;;oBAAlD,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,UAAU,EAAE,CAAC;IACf,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspacesUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/workspacesUpdateSample.ts"],"names":[],"mappings":""}
|