@azure/arm-locks 2.0.0-beta.1 → 2.0.1-alpha.20211215.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.
Files changed (95) hide show
  1. package/CHANGELOG.md +15 -10
  2. package/README.md +15 -9
  3. package/dist/index.js +6 -432
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +5 -0
  8. package/dist-esm/src/index.d.ts.map +1 -0
  9. package/{esm → dist-esm/src}/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -0
  11. package/{esm → dist-esm/src}/managementLockClient.d.ts +5 -2
  12. package/dist-esm/src/managementLockClient.d.ts.map +1 -0
  13. package/{esm/managementLockClientContext.js → dist-esm/src/managementLockClient.js} +7 -4
  14. package/dist-esm/src/managementLockClient.js.map +1 -0
  15. package/{esm → dist-esm/src}/models/index.d.ts +0 -33
  16. package/dist-esm/src/models/index.d.ts.map +1 -0
  17. package/{esm → dist-esm/src}/models/index.js +0 -0
  18. package/dist-esm/src/models/index.js.map +1 -0
  19. package/{esm → dist-esm/src}/models/mappers.d.ts +0 -0
  20. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  21. package/{esm → dist-esm/src}/models/mappers.js +0 -0
  22. package/dist-esm/src/models/mappers.js.map +1 -0
  23. package/{esm → dist-esm/src}/models/parameters.d.ts +0 -0
  24. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  25. package/{esm → dist-esm/src}/models/parameters.js +0 -0
  26. package/dist-esm/src/models/parameters.js.map +1 -0
  27. package/{esm → dist-esm/src}/operations/authorizationOperations.d.ts +4 -19
  28. package/dist-esm/src/operations/authorizationOperations.d.ts.map +1 -0
  29. package/{esm → dist-esm/src}/operations/authorizationOperations.js +1 -72
  30. package/dist-esm/src/operations/authorizationOperations.js.map +1 -0
  31. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  32. package/dist-esm/src/operations/index.d.ts.map +1 -0
  33. package/{esm → dist-esm/src}/operations/index.js +0 -0
  34. package/dist-esm/src/operations/index.js.map +1 -0
  35. package/{esm/operationsInterfaces → dist-esm/src/operations}/managementLocks.d.ts +89 -42
  36. package/dist-esm/src/operations/managementLocks.d.ts.map +1 -0
  37. package/{esm → dist-esm/src}/operations/managementLocks.js +1 -337
  38. package/dist-esm/src/operations/managementLocks.js.map +1 -0
  39. package/dist-esm/src/operationsInterfaces/authorizationOperations.d.ts +11 -0
  40. package/dist-esm/src/operationsInterfaces/authorizationOperations.d.ts.map +1 -0
  41. package/{esm → dist-esm/src}/operationsInterfaces/authorizationOperations.js +1 -1
  42. package/dist-esm/src/operationsInterfaces/authorizationOperations.js.map +1 -0
  43. package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
  44. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  45. package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
  46. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  47. package/dist-esm/src/operationsInterfaces/managementLocks.d.ts +159 -0
  48. package/dist-esm/src/operationsInterfaces/managementLocks.d.ts.map +1 -0
  49. package/{esm → dist-esm/src}/operationsInterfaces/managementLocks.js +1 -1
  50. package/dist-esm/src/operationsInterfaces/managementLocks.js.map +1 -0
  51. package/dist-esm/test/locks_examples.d.ts +4 -0
  52. package/dist-esm/test/locks_examples.d.ts.map +1 -0
  53. package/dist-esm/test/locks_examples.js +106 -0
  54. package/dist-esm/test/locks_examples.js.map +1 -0
  55. package/package.json +24 -20
  56. package/review/arm-locks.api.md +5 -55
  57. package/src/index.ts +0 -1
  58. package/src/managementLockClient.ts +46 -3
  59. package/src/models/index.ts +0 -47
  60. package/src/operations/authorizationOperations.ts +5 -82
  61. package/src/operations/managementLocks.ts +5 -467
  62. package/src/operationsInterfaces/authorizationOperations.ts +0 -11
  63. package/src/operationsInterfaces/managementLocks.ts +0 -62
  64. package/tsconfig.json +2 -3
  65. package/{esm/index.d.ts → types/arm-locks.d.ts} +4 -101
  66. package/types/tsdoc-metadata.json +11 -0
  67. package/esm/index.d.ts.map +0 -1
  68. package/esm/index.js.map +0 -1
  69. package/esm/managementLockClient.d.ts.map +0 -1
  70. package/esm/managementLockClient.js +0 -23
  71. package/esm/managementLockClient.js.map +0 -1
  72. package/esm/managementLockClientContext.d.ts +0 -16
  73. package/esm/managementLockClientContext.d.ts.map +0 -1
  74. package/esm/managementLockClientContext.js.map +0 -1
  75. package/esm/models/index.d.ts.map +0 -1
  76. package/esm/models/index.js.map +0 -1
  77. package/esm/models/mappers.d.ts.map +0 -1
  78. package/esm/models/mappers.js.map +0 -1
  79. package/esm/models/parameters.d.ts.map +0 -1
  80. package/esm/models/parameters.js.map +0 -1
  81. package/esm/operations/authorizationOperations.d.ts.map +0 -1
  82. package/esm/operations/authorizationOperations.js.map +0 -1
  83. package/esm/operations/index.d.ts.map +0 -1
  84. package/esm/operations/index.js.map +0 -1
  85. package/esm/operations/managementLocks.d.ts +0 -331
  86. package/esm/operations/managementLocks.d.ts.map +0 -1
  87. package/esm/operations/managementLocks.js.map +0 -1
  88. package/esm/operationsInterfaces/authorizationOperations.d.ts +0 -18
  89. package/esm/operationsInterfaces/authorizationOperations.d.ts.map +0 -1
  90. package/esm/operationsInterfaces/authorizationOperations.js.map +0 -1
  91. package/esm/operationsInterfaces/index.d.ts.map +0 -1
  92. package/esm/operationsInterfaces/index.js.map +0 -1
  93. package/esm/operationsInterfaces/managementLocks.d.ts.map +0 -1
  94. package/esm/operationsInterfaces/managementLocks.js.map +0 -1
  95. package/src/managementLockClientContext.ts +0 -70
@@ -0,0 +1,159 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { ManagementLockObject, ManagementLocksListAtResourceGroupLevelOptionalParams, ManagementLocksListAtResourceLevelOptionalParams, ManagementLocksListAtSubscriptionLevelOptionalParams, ManagementLocksListByScopeOptionalParams, ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams, ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse, ManagementLocksDeleteAtResourceGroupLevelOptionalParams, ManagementLocksGetAtResourceGroupLevelOptionalParams, ManagementLocksGetAtResourceGroupLevelResponse, ManagementLocksCreateOrUpdateByScopeOptionalParams, ManagementLocksCreateOrUpdateByScopeResponse, ManagementLocksDeleteByScopeOptionalParams, ManagementLocksGetByScopeOptionalParams, ManagementLocksGetByScopeResponse, ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams, ManagementLocksCreateOrUpdateAtResourceLevelResponse, ManagementLocksDeleteAtResourceLevelOptionalParams, ManagementLocksGetAtResourceLevelOptionalParams, ManagementLocksGetAtResourceLevelResponse, ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams, ManagementLocksCreateOrUpdateAtSubscriptionLevelResponse, ManagementLocksDeleteAtSubscriptionLevelOptionalParams, ManagementLocksGetAtSubscriptionLevelOptionalParams, ManagementLocksGetAtSubscriptionLevelResponse } from "../models";
3
+ /** Interface representing a ManagementLocks. */
4
+ export interface ManagementLocks {
5
+ /**
6
+ * Gets all the management locks for a resource group.
7
+ * @param resourceGroupName The name of the resource group containing the locks to get.
8
+ * @param options The options parameters.
9
+ */
10
+ listAtResourceGroupLevel(resourceGroupName: string, options?: ManagementLocksListAtResourceGroupLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
11
+ /**
12
+ * Gets all the management locks for a resource or any level below resource.
13
+ * @param resourceGroupName The name of the resource group containing the locked resource. The name is
14
+ * case insensitive.
15
+ * @param resourceProviderNamespace The namespace of the resource provider.
16
+ * @param parentResourcePath The parent resource identity.
17
+ * @param resourceType The resource type of the locked resource.
18
+ * @param resourceName The name of the locked resource.
19
+ * @param options The options parameters.
20
+ */
21
+ listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: ManagementLocksListAtResourceLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
22
+ /**
23
+ * Gets all the management locks for a subscription.
24
+ * @param options The options parameters.
25
+ */
26
+ listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
27
+ /**
28
+ * Gets all the management locks for a scope.
29
+ * @param scope The scope for the lock. When providing a scope for the assignment, use
30
+ * '/subscriptions/{subscriptionId}' for subscriptions,
31
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
32
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
33
+ * for resources.
34
+ * @param options The options parameters.
35
+ */
36
+ listByScope(scope: string, options?: ManagementLocksListByScopeOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
37
+ /**
38
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
39
+ * management locks, you must have access to Microsoft.Authorization/* or
40
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
41
+ * Administrator are granted those actions.
42
+ * @param resourceGroupName The name of the resource group to lock.
43
+ * @param lockName The lock name. The lock name can be a maximum of 260 characters. It cannot contain
44
+ * <, > %, &, :, \, ?, /, or any control characters.
45
+ * @param parameters The management lock parameters.
46
+ * @param options The options parameters.
47
+ */
48
+ createOrUpdateAtResourceGroupLevel(resourceGroupName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceGroupLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtResourceGroupLevelResponse>;
49
+ /**
50
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
51
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
52
+ * Administrator are granted those actions.
53
+ * @param resourceGroupName The name of the resource group containing the lock.
54
+ * @param lockName The name of lock to delete.
55
+ * @param options The options parameters.
56
+ */
57
+ deleteAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksDeleteAtResourceGroupLevelOptionalParams): Promise<void>;
58
+ /**
59
+ * Gets a management lock at the resource group level.
60
+ * @param resourceGroupName The name of the locked resource group.
61
+ * @param lockName The name of the lock to get.
62
+ * @param options The options parameters.
63
+ */
64
+ getAtResourceGroupLevel(resourceGroupName: string, lockName: string, options?: ManagementLocksGetAtResourceGroupLevelOptionalParams): Promise<ManagementLocksGetAtResourceGroupLevelResponse>;
65
+ /**
66
+ * Create or update a management lock by scope.
67
+ * @param scope The scope for the lock. When providing a scope for the assignment, use
68
+ * '/subscriptions/{subscriptionId}' for subscriptions,
69
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and
70
+ * '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}'
71
+ * for resources.
72
+ * @param lockName The name of lock.
73
+ * @param parameters Create or update management lock parameters.
74
+ * @param options The options parameters.
75
+ */
76
+ createOrUpdateByScope(scope: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateByScopeOptionalParams): Promise<ManagementLocksCreateOrUpdateByScopeResponse>;
77
+ /**
78
+ * Delete a management lock by scope.
79
+ * @param scope The scope for the lock.
80
+ * @param lockName The name of lock.
81
+ * @param options The options parameters.
82
+ */
83
+ deleteByScope(scope: string, lockName: string, options?: ManagementLocksDeleteByScopeOptionalParams): Promise<void>;
84
+ /**
85
+ * Get a management lock by scope.
86
+ * @param scope The scope for the lock.
87
+ * @param lockName The name of lock.
88
+ * @param options The options parameters.
89
+ */
90
+ getByScope(scope: string, lockName: string, options?: ManagementLocksGetByScopeOptionalParams): Promise<ManagementLocksGetByScopeResponse>;
91
+ /**
92
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
93
+ * management locks, you must have access to Microsoft.Authorization/* or
94
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
95
+ * Administrator are granted those actions.
96
+ * @param resourceGroupName The name of the resource group containing the resource to lock.
97
+ * @param resourceProviderNamespace The resource provider namespace of the resource to lock.
98
+ * @param parentResourcePath The parent resource identity.
99
+ * @param resourceType The resource type of the resource to lock.
100
+ * @param resourceName The name of the resource to lock.
101
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
102
+ * contain <, > %, &, :, \, ?, /, or any control characters.
103
+ * @param parameters Parameters for creating or updating a management lock.
104
+ * @param options The options parameters.
105
+ */
106
+ createOrUpdateAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtResourceLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtResourceLevelResponse>;
107
+ /**
108
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
109
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
110
+ * Administrator are granted those actions.
111
+ * @param resourceGroupName The name of the resource group containing the resource with the lock to
112
+ * delete.
113
+ * @param resourceProviderNamespace The resource provider namespace of the resource with the lock to
114
+ * delete.
115
+ * @param parentResourcePath The parent resource identity.
116
+ * @param resourceType The resource type of the resource with the lock to delete.
117
+ * @param resourceName The name of the resource with the lock to delete.
118
+ * @param lockName The name of the lock to delete.
119
+ * @param options The options parameters.
120
+ */
121
+ deleteAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksDeleteAtResourceLevelOptionalParams): Promise<void>;
122
+ /**
123
+ * Get the management lock of a resource or any level below resource.
124
+ * @param resourceGroupName The name of the resource group.
125
+ * @param resourceProviderNamespace The namespace of the resource provider.
126
+ * @param parentResourcePath An extra path parameter needed in some services, like SQL Databases.
127
+ * @param resourceType The type of the resource.
128
+ * @param resourceName The name of the resource.
129
+ * @param lockName The name of lock.
130
+ * @param options The options parameters.
131
+ */
132
+ getAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, lockName: string, options?: ManagementLocksGetAtResourceLevelOptionalParams): Promise<ManagementLocksGetAtResourceLevelResponse>;
133
+ /**
134
+ * When you apply a lock at a parent scope, all child resources inherit the same lock. To create
135
+ * management locks, you must have access to Microsoft.Authorization/* or
136
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
137
+ * Administrator are granted those actions.
138
+ * @param lockName The name of lock. The lock name can be a maximum of 260 characters. It cannot
139
+ * contain <, > %, &, :, \, ?, /, or any control characters.
140
+ * @param parameters The management lock parameters.
141
+ * @param options The options parameters.
142
+ */
143
+ createOrUpdateAtSubscriptionLevel(lockName: string, parameters: ManagementLockObject, options?: ManagementLocksCreateOrUpdateAtSubscriptionLevelOptionalParams): Promise<ManagementLocksCreateOrUpdateAtSubscriptionLevelResponse>;
144
+ /**
145
+ * To delete management locks, you must have access to Microsoft.Authorization/* or
146
+ * Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access
147
+ * Administrator are granted those actions.
148
+ * @param lockName The name of lock to delete.
149
+ * @param options The options parameters.
150
+ */
151
+ deleteAtSubscriptionLevel(lockName: string, options?: ManagementLocksDeleteAtSubscriptionLevelOptionalParams): Promise<void>;
152
+ /**
153
+ * Gets a management lock at the subscription level.
154
+ * @param lockName The name of the lock to get.
155
+ * @param options The options parameters.
156
+ */
157
+ getAtSubscriptionLevel(lockName: string, options?: ManagementLocksGetAtSubscriptionLevelOptionalParams): Promise<ManagementLocksGetAtSubscriptionLevelResponse>;
158
+ }
159
+ //# sourceMappingURL=managementLocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managementLocks.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/managementLocks.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,qDAAqD,EACrD,gDAAgD,EAChD,oDAAoD,EACpD,wCAAwC,EACxC,+DAA+D,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C;IACjB;;;;;;;;;OASG;IACH,kBAAkB,CAChB,iBAAiB,EAAE,MAAM,EACzB,yBAAyB,EAAE,MAAM,EACjC,kBAAkB,EAAE,MAAM,EAC1B,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,+CAA+C,GACxD,OAAO,CAAC,yCAAyC,CAAC,CAAC;IACtD;;;;;;;;;OASG;IACH,iCAAiC,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,8DAA8D,GACvE,OAAO,CAAC,wDAAwD,CAAC,CAAC;IACrE;;;;;;OAMG;IACH,yBAAyB,CACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,sDAAsD,GAC/D,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;OAIG;IACH,sBAAsB,CACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,mDAAmD,GAC5D,OAAO,CAAC,6CAA6C,CAAC,CAAC;CAC3D"}
@@ -5,5 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import "@azure/core-paging";
8
+ export {};
9
9
  //# sourceMappingURL=managementLocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managementLocks.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/managementLocks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,4 @@
1
+ export declare const testPollingOptions: {
2
+ updateIntervalInMs: number | undefined;
3
+ };
4
+ //# sourceMappingURL=locks_examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locks_examples.d.ts","sourceRoot":"","sources":["../../test/locks_examples.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
@@ -0,0 +1,106 @@
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
+ import { env, record, isPlaybackMode } from "@azure-tools/test-recorder";
10
+ import * as assert from "assert";
11
+ import { ClientSecretCredential } from "@azure/identity";
12
+ import { ManagementLockClient } from "../src/managementLockClient";
13
+ const recorderEnvSetup = {
14
+ replaceableVariables: {
15
+ AZURE_CLIENT_ID: "azure_client_id",
16
+ AZURE_CLIENT_SECRET: "azure_client_secret",
17
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
18
+ SUBSCRIPTION_ID: "azure_subscription_id"
19
+ },
20
+ customizationsOnRecordings: [
21
+ (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
22
+ ],
23
+ queryParametersToSkip: []
24
+ };
25
+ export const testPollingOptions = {
26
+ updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
27
+ };
28
+ describe("Locks test", () => {
29
+ let recorder;
30
+ let subscriptionId;
31
+ let client;
32
+ let location;
33
+ let resourceGroup;
34
+ let lockName;
35
+ beforeEach(function () {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ recorder = record(this, recorderEnvSetup);
38
+ subscriptionId = env.SUBSCRIPTION_ID;
39
+ // This is an example of how the environment variables are used
40
+ const credential = new ClientSecretCredential(env.AZURE_TENANT_ID, env.AZURE_CLIENT_ID, env.AZURE_CLIENT_SECRET);
41
+ client = new ManagementLockClient(credential, subscriptionId);
42
+ location = "eastus";
43
+ resourceGroup = "myjstest";
44
+ lockName = "jslockrg";
45
+ });
46
+ });
47
+ afterEach(function () {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ yield recorder.stop();
50
+ });
51
+ });
52
+ it("managementLocks create test", function () {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const res = yield client.managementLocks.createOrUpdateAtSubscriptionLevel(lockName, { level: "CanNotDelete" });
55
+ assert.equal(res.name, lockName);
56
+ });
57
+ });
58
+ it("managementLocks get test", function () {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const res = yield client.managementLocks.getAtSubscriptionLevel(lockName);
61
+ assert.equal(res.name, lockName);
62
+ });
63
+ });
64
+ it("managementLocks list test", function () {
65
+ var e_1, _a;
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const resArray = new Array();
68
+ try {
69
+ for (var _b = __asyncValues(client.managementLocks.listAtSubscriptionLevel()), _c; _c = yield _b.next(), !_c.done;) {
70
+ const item = _c.value;
71
+ resArray.push(item);
72
+ }
73
+ }
74
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
75
+ finally {
76
+ try {
77
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
78
+ }
79
+ finally { if (e_1) throw e_1.error; }
80
+ }
81
+ assert.notEqual(resArray.length, 0);
82
+ });
83
+ });
84
+ it("managementLocks delete test", function () {
85
+ var e_2, _a;
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const res = yield client.managementLocks.deleteAtSubscriptionLevel(lockName);
88
+ const resArray = new Array();
89
+ try {
90
+ for (var _b = __asyncValues(client.managementLocks.listAtSubscriptionLevel()), _c; _c = yield _b.next(), !_c.done;) {
91
+ const item = _c.value;
92
+ resArray.push(item);
93
+ }
94
+ }
95
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
96
+ finally {
97
+ try {
98
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
99
+ }
100
+ finally { if (e_2) throw e_2.error; }
101
+ }
102
+ assert.notEqual(resArray.length, 0);
103
+ });
104
+ });
105
+ });
106
+ //# sourceMappingURL=locks_examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locks_examples.js","sourceRoot":"","sources":["../../test/locks_examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,MA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AAe,CAAC,uBAAuB,EAAE,CAAA,IAAA;oBAA9D,MAAM,IAAI,WAAA,CAAA;oBACnB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACrB;;;;;;;;;YACD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAC,CAAC,CAAC,CAAC;;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for ManagementLockClient.",
6
- "version": "2.0.0-beta.1",
6
+ "version": "2.0.1-alpha.20211215.1",
7
7
  "engines": {
8
8
  "node": ">=12.0.0"
9
9
  },
10
10
  "dependencies": {
11
- "@azure/core-paging": "^1.1.1",
11
+ "@azure/core-paging": ">=1.2.0-alpha <1.2.0-alphb",
12
12
  "@azure/core-client": "^1.0.0",
13
13
  "@azure/core-auth": "^1.3.0",
14
14
  "@azure/core-rest-pipeline": "^1.1.0",
@@ -23,8 +23,8 @@
23
23
  ],
24
24
  "license": "MIT",
25
25
  "main": "./dist/index.js",
26
- "module": "./esm/index.js",
27
- "types": "./esm/index.d.ts",
26
+ "module": "./dist-esm/src/index.js",
27
+ "types": "./types/arm-locks.d.ts",
28
28
  "devDependencies": {
29
29
  "@microsoft/api-extractor": "^7.18.11",
30
30
  "@rollup/plugin-commonjs": "11.0.2",
@@ -34,9 +34,13 @@
34
34
  "mkdirp": "^1.0.4",
35
35
  "rollup": "^1.16.3",
36
36
  "rollup-plugin-sourcemaps": "^0.4.2",
37
- "rollup-plugin-node-resolve": "^3.4.0",
38
37
  "typescript": "~4.2.0",
39
- "uglify-js": "^3.4.9"
38
+ "uglify-js": "^3.4.9",
39
+ "rimraf": "^3.0.0",
40
+ "@azure/identity": "^2.0.1",
41
+ "@azure-tools/test-recorder": "^1.0.0",
42
+ "mocha": "^7.1.1",
43
+ "cross-env": "^7.0.2"
40
44
  },
41
45
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/locks/arm-locks",
42
46
  "repository": {
@@ -51,27 +55,28 @@
51
55
  "dist/**/*.js.map",
52
56
  "dist/**/*.d.ts",
53
57
  "dist/**/*.d.ts.map",
54
- "esm/**/*.js",
55
- "esm/**/*.js.map",
56
- "esm/**/*.d.ts",
57
- "esm/**/*.d.ts.map",
58
+ "dist-esm/**/*.js",
59
+ "dist-esm/**/*.js.map",
60
+ "dist-esm/**/*.d.ts",
61
+ "dist-esm/**/*.d.ts.map",
58
62
  "src/**/*.ts",
59
63
  "README.md",
60
64
  "LICENSE",
61
65
  "rollup.config.js",
62
66
  "tsconfig.json",
63
67
  "review/*",
64
- "CHANGELOG.md"
68
+ "CHANGELOG.md",
69
+ "types/*"
65
70
  ],
66
71
  "scripts": {
67
- "build": "tsc && rollup -c rollup.config.js && npm run minify && mkdirp ./review && npm run extract-api",
72
+ "build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
68
73
  "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
69
74
  "prepack": "npm run build",
70
75
  "pack": "npm pack 2>&1",
71
- "extract-api": "mkdirp ./review && api-extractor run --local",
76
+ "extract-api": "api-extractor run --local",
72
77
  "lint": "echo skipped",
73
78
  "audit": "echo skipped",
74
- "clean": "echo skipped",
79
+ "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
75
80
  "build:node": "echo skipped",
76
81
  "build:browser": "echo skipped",
77
82
  "build:test": "echo skipped",
@@ -79,16 +84,15 @@
79
84
  "check-format": "echo skipped",
80
85
  "execute:samples": "echo skipped",
81
86
  "format": "echo skipped",
82
- "test": "echo skipped",
83
- "prebuild": "echo skipped",
87
+ "test": "npm run integration-test",
84
88
  "test:node": "echo skipped",
85
89
  "test:browser": "echo skipped",
86
- "unit-test": "echo skipped",
87
- "unit-test:node": "echo skipped",
90
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
91
+ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
88
92
  "unit-test:browser": "echo skipped",
93
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
94
+ "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
89
95
  "integration-test:browser": "echo skipped",
90
- "integration-test:node": "echo skipped",
91
- "integration-test": "echo skipped",
92
96
  "docs": "echo skipped"
93
97
  },
94
98
  "sideEffects": false,
@@ -11,16 +11,8 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
11
11
  // @public
12
12
  export interface AuthorizationOperations {
13
13
  list(options?: AuthorizationOperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
14
- listNext(nextLink: string, options?: AuthorizationOperationsListNextOptionalParams): PagedAsyncIterableIterator<Operation>;
15
14
  }
16
15
 
17
- // @public
18
- export interface AuthorizationOperationsListNextNextOptionalParams extends coreClient.OperationOptions {
19
- }
20
-
21
- // @public
22
- export type AuthorizationOperationsListNextNextResponse = OperationListResult;
23
-
24
16
  // @public
25
17
  export interface AuthorizationOperationsListNextOptionalParams extends coreClient.OperationOptions {
26
18
  }
@@ -49,22 +41,17 @@ export enum KnownLockLevel {
49
41
  export type LockLevel = string;
50
42
 
51
43
  // @public (undocumented)
52
- export class ManagementLockClient extends ManagementLockClientContext {
53
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLockClientOptionalParams);
54
- // (undocumented)
55
- authorizationOperations: AuthorizationOperations;
56
- // (undocumented)
57
- managementLocks: ManagementLocks;
58
- }
59
-
60
- // @public (undocumented)
61
- export class ManagementLockClientContext extends coreClient.ServiceClient {
44
+ export class ManagementLockClient extends coreClient.ServiceClient {
62
45
  // (undocumented)
63
46
  $host: string;
64
47
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ManagementLockClientOptionalParams);
65
48
  // (undocumented)
66
49
  apiVersion: string;
67
50
  // (undocumented)
51
+ authorizationOperations: AuthorizationOperations;
52
+ // (undocumented)
53
+ managementLocks: ManagementLocks;
54
+ // (undocumented)
68
55
  subscriptionId: string;
69
56
  }
70
57
 
@@ -111,13 +98,9 @@ export interface ManagementLocks {
111
98
  getAtSubscriptionLevel(lockName: string, options?: ManagementLocksGetAtSubscriptionLevelOptionalParams): Promise<ManagementLocksGetAtSubscriptionLevelResponse>;
112
99
  getByScope(scope: string, lockName: string, options?: ManagementLocksGetByScopeOptionalParams): Promise<ManagementLocksGetByScopeResponse>;
113
100
  listAtResourceGroupLevel(resourceGroupName: string, options?: ManagementLocksListAtResourceGroupLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
114
- listAtResourceGroupLevelNext(resourceGroupName: string, nextLink: string, options?: ManagementLocksListAtResourceGroupLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
115
101
  listAtResourceLevel(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: ManagementLocksListAtResourceLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
116
- listAtResourceLevelNext(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, nextLink: string, options?: ManagementLocksListAtResourceLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
117
102
  listAtSubscriptionLevel(options?: ManagementLocksListAtSubscriptionLevelOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
118
- listAtSubscriptionLevelNext(nextLink: string, options?: ManagementLocksListAtSubscriptionLevelNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
119
103
  listByScope(scope: string, options?: ManagementLocksListByScopeOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
120
- listByScopeNext(scope: string, nextLink: string, options?: ManagementLocksListByScopeNextOptionalParams): PagedAsyncIterableIterator<ManagementLockObject>;
121
104
  }
122
105
 
123
106
  // @public
@@ -192,14 +175,6 @@ export interface ManagementLocksGetByScopeOptionalParams extends coreClient.Oper
192
175
  // @public
193
176
  export type ManagementLocksGetByScopeResponse = ManagementLockObject;
194
177
 
195
- // @public
196
- export interface ManagementLocksListAtResourceGroupLevelNextNextOptionalParams extends coreClient.OperationOptions {
197
- filter?: string;
198
- }
199
-
200
- // @public
201
- export type ManagementLocksListAtResourceGroupLevelNextNextResponse = ManagementLockListResult;
202
-
203
178
  // @public
204
179
  export interface ManagementLocksListAtResourceGroupLevelNextOptionalParams extends coreClient.OperationOptions {
205
180
  filter?: string;
@@ -216,14 +191,6 @@ export interface ManagementLocksListAtResourceGroupLevelOptionalParams extends c
216
191
  // @public
217
192
  export type ManagementLocksListAtResourceGroupLevelResponse = ManagementLockListResult;
218
193
 
219
- // @public
220
- export interface ManagementLocksListAtResourceLevelNextNextOptionalParams extends coreClient.OperationOptions {
221
- filter?: string;
222
- }
223
-
224
- // @public
225
- export type ManagementLocksListAtResourceLevelNextNextResponse = ManagementLockListResult;
226
-
227
194
  // @public
228
195
  export interface ManagementLocksListAtResourceLevelNextOptionalParams extends coreClient.OperationOptions {
229
196
  filter?: string;
@@ -240,14 +207,6 @@ export interface ManagementLocksListAtResourceLevelOptionalParams extends coreCl
240
207
  // @public
241
208
  export type ManagementLocksListAtResourceLevelResponse = ManagementLockListResult;
242
209
 
243
- // @public
244
- export interface ManagementLocksListAtSubscriptionLevelNextNextOptionalParams extends coreClient.OperationOptions {
245
- filter?: string;
246
- }
247
-
248
- // @public
249
- export type ManagementLocksListAtSubscriptionLevelNextNextResponse = ManagementLockListResult;
250
-
251
210
  // @public
252
211
  export interface ManagementLocksListAtSubscriptionLevelNextOptionalParams extends coreClient.OperationOptions {
253
212
  filter?: string;
@@ -264,14 +223,6 @@ export interface ManagementLocksListAtSubscriptionLevelOptionalParams extends co
264
223
  // @public
265
224
  export type ManagementLocksListAtSubscriptionLevelResponse = ManagementLockListResult;
266
225
 
267
- // @public
268
- export interface ManagementLocksListByScopeNextNextOptionalParams extends coreClient.OperationOptions {
269
- filter?: string;
270
- }
271
-
272
- // @public
273
- export type ManagementLocksListByScopeNextNextResponse = ManagementLockListResult;
274
-
275
226
  // @public
276
227
  export interface ManagementLocksListByScopeNextOptionalParams extends coreClient.OperationOptions {
277
228
  filter?: string;
@@ -307,7 +258,6 @@ export interface OperationListResult {
307
258
  value?: Operation[];
308
259
  }
309
260
 
310
-
311
261
  // (No @packageDocumentation comment for this package)
312
262
 
313
263
  ```
package/src/index.ts CHANGED
@@ -9,5 +9,4 @@
9
9
  /// <reference lib="esnext.asynciterable" />
10
10
  export * from "./models";
11
11
  export { ManagementLockClient } from "./managementLockClient";
12
- export { ManagementLockClientContext } from "./managementLockClientContext";
13
12
  export * from "./operationsInterfaces";
@@ -6,16 +6,20 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ import * as coreClient from "@azure/core-client";
9
10
  import * as coreAuth from "@azure/core-auth";
10
11
  import { AuthorizationOperationsImpl, ManagementLocksImpl } from "./operations";
11
12
  import {
12
13
  AuthorizationOperations,
13
14
  ManagementLocks
14
15
  } from "./operationsInterfaces";
15
- import { ManagementLockClientContext } from "./managementLockClientContext";
16
16
  import { ManagementLockClientOptionalParams } from "./models";
17
17
 
18
- export class ManagementLockClient extends ManagementLockClientContext {
18
+ export class ManagementLockClient extends coreClient.ServiceClient {
19
+ $host: string;
20
+ apiVersion: string;
21
+ subscriptionId: string;
22
+
19
23
  /**
20
24
  * Initializes a new instance of the ManagementLockClient class.
21
25
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -27,7 +31,46 @@ export class ManagementLockClient extends ManagementLockClientContext {
27
31
  subscriptionId: string,
28
32
  options?: ManagementLockClientOptionalParams
29
33
  ) {
30
- super(credentials, subscriptionId, options);
34
+ if (credentials === undefined) {
35
+ throw new Error("'credentials' cannot be null");
36
+ }
37
+ if (subscriptionId === undefined) {
38
+ throw new Error("'subscriptionId' cannot be null");
39
+ }
40
+
41
+ // Initializing default values for options
42
+ if (!options) {
43
+ options = {};
44
+ }
45
+ const defaults: ManagementLockClientOptionalParams = {
46
+ requestContentType: "application/json; charset=utf-8",
47
+ credential: credentials
48
+ };
49
+
50
+ const packageDetails = `azsdk-js-arm-locks/2.0.0`;
51
+ const userAgentPrefix =
52
+ options.userAgentOptions && options.userAgentOptions.userAgentPrefix
53
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
54
+ : `${packageDetails}`;
55
+
56
+ if (!options.credentialScopes) {
57
+ options.credentialScopes = ["https://management.azure.com/.default"];
58
+ }
59
+ const optionsWithDefaults = {
60
+ ...defaults,
61
+ ...options,
62
+ userAgentOptions: {
63
+ userAgentPrefix
64
+ },
65
+ baseUri: options.endpoint || "https://management.azure.com"
66
+ };
67
+ super(optionsWithDefaults);
68
+ // Parameter assignments
69
+ this.subscriptionId = subscriptionId;
70
+
71
+ // Assigning values to Constant parameters
72
+ this.$host = options.$host || "https://management.azure.com";
73
+ this.apiVersion = options.apiVersion || "2016-09-01";
31
74
  this.authorizationOperations = new AuthorizationOperationsImpl(this);
32
75
  this.managementLocks = new ManagementLocksImpl(this);
33
76
  }