@azure/arm-locks 2.0.1-alpha.20220414.1 → 2.1.0-alpha.20220908.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 +15 -11
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +265 -8
- 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/authorizationOperationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/authorizationOperationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/authorizationOperationsListSample.js +43 -0
- package/dist-esm/samples-dev/authorizationOperationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceGroupLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceGroupLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceGroupLevelSample.js +32 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceGroupLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceLevelSample.js +36 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtResourceLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtSubscriptionLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtSubscriptionLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtSubscriptionLevelSample.js +31 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateAtSubscriptionLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateByScopeSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateByScopeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateByScopeSample.js +32 -0
- package/dist-esm/samples-dev/managementLocksCreateOrUpdateByScopeSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceGroupLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceGroupLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceGroupLevelSample.js +31 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceGroupLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceLevelSample.js +35 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtResourceLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtSubscriptionLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtSubscriptionLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtSubscriptionLevelSample.js +30 -0
- package/dist-esm/samples-dev/managementLocksDeleteAtSubscriptionLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteByScopeSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksDeleteByScopeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksDeleteByScopeSample.js +31 -0
- package/dist-esm/samples-dev/managementLocksDeleteByScopeSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceGroupLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceGroupLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceGroupLevelSample.js +31 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceGroupLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceLevelSample.js +35 -0
- package/dist-esm/samples-dev/managementLocksGetAtResourceLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtSubscriptionLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksGetAtSubscriptionLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetAtSubscriptionLevelSample.js +30 -0
- package/dist-esm/samples-dev/managementLocksGetAtSubscriptionLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetByScopeSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksGetByScopeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksGetByScopeSample.js +31 -0
- package/dist-esm/samples-dev/managementLocksGetByScopeSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceGroupLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceGroupLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceGroupLevelSample.js +44 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceGroupLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceLevelSample.js +48 -0
- package/dist-esm/samples-dev/managementLocksListAtResourceLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtSubscriptionLevelSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksListAtSubscriptionLevelSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksListAtSubscriptionLevelSample.js +43 -0
- package/dist-esm/samples-dev/managementLocksListAtSubscriptionLevelSample.js.map +1 -0
- package/dist-esm/samples-dev/managementLocksListByScopeSample.d.ts +2 -0
- package/dist-esm/samples-dev/managementLocksListByScopeSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/managementLocksListByScopeSample.js +44 -0
- package/dist-esm/samples-dev/managementLocksListByScopeSample.js.map +1 -0
- package/dist-esm/src/managementLockClient.d.ts.map +1 -1
- package/dist-esm/src/managementLockClient.js +21 -3
- package/dist-esm/src/managementLockClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +84 -0
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +8 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +4 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +144 -0
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/operations/authorizationOperations.js +6 -0
- package/dist-esm/src/operations/authorizationOperations.js.map +1 -1
- package/dist-esm/src/operations/managementLocks.js +80 -4
- package/dist-esm/src/operations/managementLocks.js.map +1 -1
- package/package.json +26 -10
- package/review/arm-locks.api.md +46 -0
- package/rollup.config.js +6 -72
- package/src/managementLockClient.ts +28 -3
- package/src/models/index.ts +90 -0
- package/src/models/mappers.ts +148 -0
- package/src/models/parameters.ts +1 -1
- package/src/operations/authorizationOperations.ts +6 -0
- package/src/operations/managementLocks.ts +80 -4
- package/tsconfig.json +23 -5
- package/types/arm-locks.d.ts +90 -0
- package/types/tsdoc-metadata.json +1 -1
@@ -0,0 +1,30 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.
|
15
|
+
*
|
16
|
+
* @summary To delete management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_DeleteAtSubscriptionLevel.json
|
18
|
+
*/
|
19
|
+
function deleteManagementLockAtSubscriptionLevel() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "subscriptionId";
|
22
|
+
const lockName = "testlock";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
25
|
+
const result = yield client.managementLocks.deleteAtSubscriptionLevel(lockName);
|
26
|
+
console.log(result);
|
27
|
+
});
|
28
|
+
}
|
29
|
+
deleteManagementLockAtSubscriptionLevel().catch(console.error);
|
30
|
+
//# sourceMappingURL=managementLocksDeleteAtSubscriptionLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksDeleteAtSubscriptionLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksDeleteAtSubscriptionLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uCAAuC;;QACpD,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,yBAAyB,CACnE,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uCAAuC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksDeleteByScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksDeleteByScopeSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Delete a management lock by scope.
|
15
|
+
*
|
16
|
+
* @summary Delete a management lock by scope.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_DeleteAtScope.json
|
18
|
+
*/
|
19
|
+
function deleteManagementLockAtScope() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
22
|
+
const scope = "subscriptions/subscriptionId";
|
23
|
+
const lockName = "testlock";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
26
|
+
const result = yield client.managementLocks.deleteByScope(scope, lockName);
|
27
|
+
console.log(result);
|
28
|
+
});
|
29
|
+
}
|
30
|
+
deleteManagementLockAtScope().catch(console.error);
|
31
|
+
//# sourceMappingURL=managementLocksDeleteByScopeSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksDeleteByScopeSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksDeleteByScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,2BAA2B;;QACxC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GAAG,8BAA8B,CAAC;QAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3E,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":"managementLocksGetAtResourceGroupLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtResourceGroupLevelSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets a management lock at the resource group level.
|
15
|
+
*
|
16
|
+
* @summary Gets a management lock at the resource group level.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_GetAtResourceGroupLevel.json
|
18
|
+
*/
|
19
|
+
function getManagementLockAtResourceGroupLevel() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "subscriptionId";
|
22
|
+
const resourceGroupName = "resourcegroupname";
|
23
|
+
const lockName = "testlock";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
26
|
+
const result = yield client.managementLocks.getAtResourceGroupLevel(resourceGroupName, lockName);
|
27
|
+
console.log(result);
|
28
|
+
});
|
29
|
+
}
|
30
|
+
getManagementLockAtResourceGroupLevel().catch(console.error);
|
31
|
+
//# sourceMappingURL=managementLocksGetAtResourceGroupLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetAtResourceGroupLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtResourceGroupLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,qCAAqC;;QAClD,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,uBAAuB,CACjE,iBAAiB,EACjB,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,qCAAqC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetAtResourceLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtResourceLevelSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,35 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Get the management lock of a resource or any level below resource.
|
15
|
+
*
|
16
|
+
* @summary Get the management lock of a resource or any level below resource.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_GetAtResourceLevel.json
|
18
|
+
*/
|
19
|
+
function getManagementLockAtResourceLevel() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "subscriptionId";
|
22
|
+
const resourceGroupName = "resourcegroupname";
|
23
|
+
const resourceProviderNamespace = "Microsoft.Storage";
|
24
|
+
const parentResourcePath = "parentResourcePath";
|
25
|
+
const resourceType = "storageAccounts";
|
26
|
+
const resourceName = "teststorageaccount";
|
27
|
+
const lockName = "testlock";
|
28
|
+
const credential = new DefaultAzureCredential();
|
29
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
30
|
+
const result = yield client.managementLocks.getAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, lockName);
|
31
|
+
console.log(result);
|
32
|
+
});
|
33
|
+
}
|
34
|
+
getManagementLockAtResourceLevel().catch(console.error);
|
35
|
+
//# sourceMappingURL=managementLocksGetAtResourceLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetAtResourceLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtResourceLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gCAAgC;;QAC7C,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;QACtD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,YAAY,GAAG,iBAAiB,CAAC;QACvC,MAAM,YAAY,GAAG,oBAAoB,CAAC;QAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,kBAAkB,CAC5D,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,QAAQ,CACT,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gCAAgC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetAtSubscriptionLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtSubscriptionLevelSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,30 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets a management lock at the subscription level.
|
15
|
+
*
|
16
|
+
* @summary Gets a management lock at the subscription level.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_GetAtSubscriptionLevel.json
|
18
|
+
*/
|
19
|
+
function getManagementLockAtSubscriptionLevel() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "subscriptionId";
|
22
|
+
const lockName = "testlock";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
25
|
+
const result = yield client.managementLocks.getAtSubscriptionLevel(lockName);
|
26
|
+
console.log(result);
|
27
|
+
});
|
28
|
+
}
|
29
|
+
getManagementLockAtSubscriptionLevel().catch(console.error);
|
30
|
+
//# sourceMappingURL=managementLocksGetAtSubscriptionLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetAtSubscriptionLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksGetAtSubscriptionLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oCAAoC;;QACjD,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC7E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oCAAoC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetByScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksGetByScopeSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Get a management lock by scope.
|
15
|
+
*
|
16
|
+
* @summary Get a management lock by scope.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_GetAtScope.json
|
18
|
+
*/
|
19
|
+
function getManagementLockAtScope() {
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
22
|
+
const scope = "subscriptions/subscriptionId";
|
23
|
+
const lockName = "testlock";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
26
|
+
const result = yield client.managementLocks.getByScope(scope, lockName);
|
27
|
+
console.log(result);
|
28
|
+
});
|
29
|
+
}
|
30
|
+
getManagementLockAtScope().catch(console.error);
|
31
|
+
//# sourceMappingURL=managementLocksGetByScopeSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksGetByScopeSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksGetByScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GAAG,8BAA8B,CAAC;QAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtResourceGroupLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtResourceGroupLevelSample.ts"],"names":[],"mappings":""}
|
@@ -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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets all the management locks for a resource group.
|
15
|
+
*
|
16
|
+
* @summary Gets all the management locks for a resource group.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_ListAtResourceGroupLevel.json
|
18
|
+
*/
|
19
|
+
function listManagementGroupsAtResourceGroupLevel() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "subscriptionId";
|
23
|
+
const resourceGroupName = "resourcegroupname";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
26
|
+
const resArray = new Array();
|
27
|
+
try {
|
28
|
+
for (var _b = __asyncValues(client.managementLocks.listAtResourceGroupLevel(resourceGroupName)), _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
|
+
listManagementGroupsAtResourceGroupLevel().catch(console.error);
|
44
|
+
//# sourceMappingURL=managementLocksListAtResourceGroupLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtResourceGroupLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtResourceGroupLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wCAAwC;;;QACrD,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,wBAAwB,CACpE,iBAAiB,CAClB,CAAA,IAAA;gBAFU,IAAI,IAAI,WAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,wCAAwC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtResourceLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtResourceLevelSample.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,48 @@
|
|
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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets all the management locks for a resource or any level below resource.
|
15
|
+
*
|
16
|
+
* @summary Gets all the management locks for a resource or any level below resource.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_ListAtResourceLevel.json
|
18
|
+
*/
|
19
|
+
function listManagementLocksAtResourceLevel() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "subscriptionId";
|
23
|
+
const resourceGroupName = "resourcegroupname";
|
24
|
+
const resourceProviderNamespace = "Microsoft.Storage";
|
25
|
+
const parentResourcePath = "parentResourcePath";
|
26
|
+
const resourceType = "storageAccounts";
|
27
|
+
const resourceName = "teststorageaccount";
|
28
|
+
const credential = new DefaultAzureCredential();
|
29
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
30
|
+
const resArray = new Array();
|
31
|
+
try {
|
32
|
+
for (var _b = __asyncValues(client.managementLocks.listAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)), _c; _c = yield _b.next(), !_c.done;) {
|
33
|
+
let item = _c.value;
|
34
|
+
resArray.push(item);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
38
|
+
finally {
|
39
|
+
try {
|
40
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
41
|
+
}
|
42
|
+
finally { if (e_1) throw e_1.error; }
|
43
|
+
}
|
44
|
+
console.log(resArray);
|
45
|
+
});
|
46
|
+
}
|
47
|
+
listManagementLocksAtResourceLevel().catch(console.error);
|
48
|
+
//# sourceMappingURL=managementLocksListAtResourceLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtResourceLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtResourceLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kCAAkC;;;QAC/C,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;QACtD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAChD,MAAM,YAAY,GAAG,iBAAiB,CAAC;QACvC,MAAM,YAAY,GAAG,oBAAoB,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAC/D,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,YAAY,EACZ,YAAY,CACb,CAAA,IAAA;gBANU,IAAI,IAAI,WAAA,CAAA;gBAOjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,kCAAkC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtSubscriptionLevelSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtSubscriptionLevelSample.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 { __asyncValues, __awaiter } from "tslib";
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
10
|
+
// Licensed under the MIT License.
|
11
|
+
import { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets all the management locks for a subscription.
|
15
|
+
*
|
16
|
+
* @summary Gets all the management locks for a subscription.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_ListAtSubscriptionLevel.json
|
18
|
+
*/
|
19
|
+
function listManagementLocksAtSubscriptionLevel() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "subscriptionId";
|
23
|
+
const credential = new DefaultAzureCredential();
|
24
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
25
|
+
const resArray = new Array();
|
26
|
+
try {
|
27
|
+
for (var _b = __asyncValues(client.managementLocks.listAtSubscriptionLevel()), _c; _c = yield _b.next(), !_c.done;) {
|
28
|
+
let item = _c.value;
|
29
|
+
resArray.push(item);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
33
|
+
finally {
|
34
|
+
try {
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
36
|
+
}
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
38
|
+
}
|
39
|
+
console.log(resArray);
|
40
|
+
});
|
41
|
+
}
|
42
|
+
listManagementLocksAtSubscriptionLevel().catch(console.error);
|
43
|
+
//# sourceMappingURL=managementLocksListAtSubscriptionLevelSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListAtSubscriptionLevelSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksListAtSubscriptionLevelSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sCAAsC;;;QACnD,MAAM,cAAc,GAAG,gBAAgB,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,uBAAuB,EAAE,CAAA,IAAA;gBAA5D,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,sCAAsC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListByScopeSample.d.ts","sourceRoot":"","sources":["../../samples-dev/managementLocksListByScopeSample.ts"],"names":[],"mappings":""}
|
@@ -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 { ManagementLockClient } from "@azure/arm-locks";
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
13
|
+
/**
|
14
|
+
* This sample demonstrates how to Gets all the management locks for a scope.
|
15
|
+
*
|
16
|
+
* @summary Gets all the management locks for a scope.
|
17
|
+
* x-ms-original-file: specification/resources/resource-manager/Microsoft.Authorization/stable/2020-05-01/examples/ManagementLocks_ListAtScope.json
|
18
|
+
*/
|
19
|
+
function listManagementLocksAtScope() {
|
20
|
+
var e_1, _a;
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
23
|
+
const scope = "subscriptions/subscriptionId";
|
24
|
+
const credential = new DefaultAzureCredential();
|
25
|
+
const client = new ManagementLockClient(credential, subscriptionId);
|
26
|
+
const resArray = new Array();
|
27
|
+
try {
|
28
|
+
for (var _b = __asyncValues(client.managementLocks.listByScope(scope)), _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
|
+
listManagementLocksAtScope().catch(console.error);
|
44
|
+
//# sourceMappingURL=managementLocksListByScopeSample.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"managementLocksListByScopeSample.js","sourceRoot":"","sources":["../../samples-dev/managementLocksListByScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,KAAK,GAAG,8BAA8B,CAAC;QAC7C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,oBAAoB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA,IAAA;gBAArD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,0BAA0B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"managementLockClient.d.ts","sourceRoot":"","sources":["../../src/managementLockClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"managementLockClient.d.ts","sourceRoot":"","sources":["../../src/managementLockClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EACL,uBAAuB,EACvB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAE9D,qBAAa,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,kCAAkC;IAsE9C,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,eAAe,EAAE,eAAe,CAAC;CAClC"}
|
@@ -6,6 +6,7 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
import * as coreClient from "@azure/core-client";
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
9
10
|
import { AuthorizationOperationsImpl, ManagementLocksImpl } from "./operations";
|
10
11
|
export class ManagementLockClient extends coreClient.ServiceClient {
|
11
12
|
/**
|
@@ -15,6 +16,7 @@ export class ManagementLockClient extends coreClient.ServiceClient {
|
|
15
16
|
* @param options The parameter options
|
16
17
|
*/
|
17
18
|
constructor(credentials, subscriptionId, options) {
|
19
|
+
var _a, _b;
|
18
20
|
if (credentials === undefined) {
|
19
21
|
throw new Error("'credentials' cannot be null");
|
20
22
|
}
|
@@ -29,7 +31,7 @@ export class ManagementLockClient extends coreClient.ServiceClient {
|
|
29
31
|
requestContentType: "application/json; charset=utf-8",
|
30
32
|
credential: credentials
|
31
33
|
};
|
32
|
-
const packageDetails = `azsdk-js-arm-locks/2.
|
34
|
+
const packageDetails = `azsdk-js-arm-locks/2.1.0`;
|
33
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
34
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
35
37
|
: `${packageDetails}`;
|
@@ -38,13 +40,29 @@ export class ManagementLockClient extends coreClient.ServiceClient {
|
|
38
40
|
}
|
39
41
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
40
42
|
userAgentPrefix
|
41
|
-
}, baseUri: options.endpoint
|
43
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
42
44
|
super(optionsWithDefaults);
|
45
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
46
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
47
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
48
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
49
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
50
|
+
this.pipeline.removePolicy({
|
51
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
52
|
+
});
|
53
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
54
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
55
|
+
challengeCallbacks: {
|
56
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
57
|
+
}
|
58
|
+
}));
|
59
|
+
}
|
60
|
+
}
|
43
61
|
// Parameter assignments
|
44
62
|
this.subscriptionId = subscriptionId;
|
45
63
|
// Assigning values to Constant parameters
|
46
64
|
this.$host = options.$host || "https://management.azure.com";
|
47
|
-
this.apiVersion = options.apiVersion || "
|
65
|
+
this.apiVersion = options.apiVersion || "2020-05-01";
|
48
66
|
this.authorizationOperations = new AuthorizationOperationsImpl(this);
|
49
67
|
this.managementLocks = new ManagementLocksImpl(this);
|
50
68
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"managementLockClient.js","sourceRoot":"","sources":["../../src/managementLockClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"managementLockClient.js","sourceRoot":"","sources":["../../src/managementLockClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAOhF,MAAM,OAAO,oBAAqB,SAAQ,UAAU,CAAC,aAAa;IAKhE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA4C;;QAE5C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAuC;YACnD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,0BAA0B,CAAC;QAClD,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YACzE,MAAM,gBAAgB,GAAsC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;YAClG,MAAM,oCAAoC,GAAG,gBAAgB,CAAC,IAAI,CAChE,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,IAAI;gBACnB,gBAAgB,CAAC,mCAAmC,CACvD,CAAC;YACF,IAAI,CAAC,oCAAoC,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACzB,IAAI,EAAE,gBAAgB,CAAC,mCAAmC;iBAC3D,CAAC,CAAC;gBACH,IAAI,CAAC,QAAQ,CAAC,SAAS,CACrB,gBAAgB,CAAC,+BAA+B,CAAC;oBAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,WAAW;oBACjD,kBAAkB,EAAE;wBAClB,2BAA2B,EACzB,UAAU,CAAC,gCAAgC;qBAC9C;iBACF,CAAC,CACH,CAAC;aACH;SACF;QACD,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;QACrD,IAAI,CAAC,uBAAuB,GAAG,IAAI,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;CAIF"}
|