@azure/arm-policy 5.0.0-beta.2 → 5.0.0

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 (49) hide show
  1. package/CHANGELOG.md +5 -45
  2. package/README.md +4 -0
  3. package/dist/index.js +4 -24
  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 +0 -1
  8. package/dist-esm/src/index.d.ts.map +1 -1
  9. package/dist-esm/src/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -1
  11. package/dist-esm/src/operations/dataPolicyManifests.d.ts +2 -2
  12. package/dist-esm/src/operations/dataPolicyManifests.d.ts.map +1 -1
  13. package/dist-esm/src/operations/dataPolicyManifests.js.map +1 -1
  14. package/dist-esm/src/operations/policyAssignments.d.ts +2 -2
  15. package/dist-esm/src/operations/policyAssignments.d.ts.map +1 -1
  16. package/dist-esm/src/operations/policyAssignments.js.map +1 -1
  17. package/dist-esm/src/operations/policyDefinitions.d.ts +2 -2
  18. package/dist-esm/src/operations/policyDefinitions.d.ts.map +1 -1
  19. package/dist-esm/src/operations/policyDefinitions.js.map +1 -1
  20. package/dist-esm/src/operations/policyExemptions.d.ts +2 -2
  21. package/dist-esm/src/operations/policyExemptions.d.ts.map +1 -1
  22. package/dist-esm/src/operations/policyExemptions.js.map +1 -1
  23. package/dist-esm/src/operations/policySetDefinitions.d.ts +2 -2
  24. package/dist-esm/src/operations/policySetDefinitions.d.ts.map +1 -1
  25. package/dist-esm/src/operations/policySetDefinitions.js.map +1 -1
  26. package/dist-esm/src/policyClient.d.ts +4 -2
  27. package/dist-esm/src/policyClient.d.ts.map +1 -1
  28. package/dist-esm/src/policyClient.js +31 -3
  29. package/dist-esm/src/policyClient.js.map +1 -1
  30. package/dist-esm/test/policy_examples.d.ts +3 -1
  31. package/dist-esm/test/policy_examples.d.ts.map +1 -1
  32. package/dist-esm/test/policy_examples.js +56 -22
  33. package/dist-esm/test/policy_examples.js.map +1 -1
  34. package/package.json +8 -8
  35. package/review/arm-policy.api.md +3 -9
  36. package/src/index.ts +0 -1
  37. package/src/operations/dataPolicyManifests.ts +3 -3
  38. package/src/operations/policyAssignments.ts +3 -3
  39. package/src/operations/policyDefinitions.ts +3 -3
  40. package/src/operations/policyExemptions.ts +3 -3
  41. package/src/operations/policySetDefinitions.ts +3 -3
  42. package/src/policyClient.ts +44 -3
  43. package/types/arm-policy.d.ts +3 -13
  44. package/types/tsdoc-metadata.json +1 -1
  45. package/dist-esm/src/policyClientContext.d.ts +0 -15
  46. package/dist-esm/src/policyClientContext.d.ts.map +0 -1
  47. package/dist-esm/src/policyClientContext.js +0 -48
  48. package/dist-esm/src/policyClientContext.js.map +0 -1
  49. package/src/policyClientContext.ts +0 -68
package/CHANGELOG.md CHANGED
@@ -1,51 +1,11 @@
1
1
  # Release History
2
-
3
- ## 5.0.0-beta.2 (2021-10-18)
4
2
 
5
- **Features**
6
-
7
- - Added operation PolicyAssignments.update
8
- - Added operation PolicyAssignments.updateById
9
- - Added Interface PolicyAssignmentsUpdateByIdOptionalParams
10
- - Added Interface PolicyAssignmentsUpdateOptionalParams
11
- - Added Interface PolicyAssignmentUpdate
12
- - Added Interface UserAssignedIdentitiesValue
13
- - Added Type Alias PolicyAssignmentsUpdateByIdResponse
14
- - Added Type Alias PolicyAssignmentsUpdateResponse
15
- - Interface Identity has a new optional parameter userAssignedIdentities
16
- - Interface PolicyAssignment has a new optional parameter systemData
17
- - Interface PolicyDefinition has a new optional parameter systemData
18
- - Interface PolicySetDefinition has a new optional parameter systemData
19
-
20
- **Breaking Changes**
21
-
22
- - Removed operation DataPolicyManifests.listNext
23
- - Removed operation PolicyAssignments.listForManagementGroupNext
24
- - Removed operation PolicyAssignments.listForResourceGroupNext
25
- - Removed operation PolicyAssignments.listForResourceNext
26
- - Removed operation PolicyAssignments.listNext
27
- - Removed operation PolicyDefinitions.listBuiltInNext
28
- - Removed operation PolicyDefinitions.listByManagementGroupNext
29
- - Removed operation PolicyDefinitions.listNext
30
- - Removed operation PolicyExemptions.listForManagementGroupNext
31
- - Removed operation PolicyExemptions.listForResourceGroupNext
32
- - Removed operation PolicyExemptions.listForResourceNext
33
- - Removed operation PolicyExemptions.listNext
34
- - Removed operation PolicySetDefinitions.listBuiltInNext
35
- - Removed operation PolicySetDefinitions.listByManagementGroupNext
36
- - Removed operation PolicySetDefinitions.listNext
37
-
38
- ## 5.0.0-beta.1 (2021-10-09)
3
+ ## 5.0.0 (2021-12-07)
39
4
 
40
- This is the first preview for the new version of the `@azure/arm-policy` package that follows the new [guidelines for TypeScript SDKs](https://azure.github.io/azure-sdk/typescript_introduction.html) for Azure services.
5
+ The package of @azure/arm-policy is using our next generation design principles since version 5.0.0, which contains breaking changes.
41
6
 
42
- While this package remains auto generated, the SDK generator itself has undergone changes to comply with the above guidelines in order to generate packages that are idiomatic to the JavaScript/TypeScript ecosystem and consistent with other packages for Azure services. For more on this, please see [State of the Azure SDK 2021](https://devblogs.microsoft.com/azure-sdk/state-of-the-azure-sdk-2021/).
7
+ To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
43
8
 
44
- Please note that this version has breaking changes, all of which were made after careful consideration during the authoring of the guidelines and user studies.
9
+ To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
45
10
 
46
- **Noteworthy changes and features**
47
- - Authentication: The packages `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` are no longer supported. Use package [@azure/identity](https://www.npmjs.com/package/@azure/identity) instead. Select a credential from Azure Identity examples based on the authentication method of your choice.
48
- - Callbacks: Method overloads that used callbacks have been removed and the use of promises is encouraged instead.
49
- - List operations now return an iterable result that follows the `PagedAsyncIterableIterator` interface as opposed to the previous model where you had to make a new request using the link to the next page.
50
- - Long running operations i.e. the Lro related object returned by methods whose names started with `begin`, now uses `pollUntilDone` to check whether the request is finished, instead of `pollUntilFinished`. To get the final result, use the corresponding method that will have the suffix `AndWait`.
51
- - The SDK only supports ECMAScript 2015 (ES6) and beyond, all projects that referenced this SDK should be upgraded to use ES6.
11
+ To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/README.md CHANGED
@@ -53,6 +53,10 @@ const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
53
  const client = new PolicyClient(new DefaultAzureCredential(), subscriptionId);
54
54
  ```
55
55
 
56
+
57
+ ### JavaScript Bundle
58
+ To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
59
+
56
60
  ## Key concepts
57
61
 
58
62
  ### PolicyClient
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var tslib = require('tslib');
6
5
  var coreClient = require('@azure/core-client');
6
+ var tslib = require('tslib');
7
7
 
8
8
  /*
9
9
  * Copyright (c) Microsoft Corporation.
@@ -4427,9 +4427,9 @@ const listForManagementGroupNextOperationSpec$1 = {
4427
4427
  * Code generated by Microsoft (R) AutoRest Code Generator.
4428
4428
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4429
4429
  */
4430
- class PolicyClientContext extends coreClient.ServiceClient {
4430
+ class PolicyClient extends coreClient.ServiceClient {
4431
4431
  /**
4432
- * Initializes a new instance of the PolicyClientContext class.
4432
+ * Initializes a new instance of the PolicyClient class.
4433
4433
  * @param credentials Subscription credentials which uniquely identify client subscription.
4434
4434
  * @param subscriptionId The ID of the target subscription.
4435
4435
  * @param options The parameter options
@@ -4449,7 +4449,7 @@ class PolicyClientContext extends coreClient.ServiceClient {
4449
4449
  requestContentType: "application/json; charset=utf-8",
4450
4450
  credential: credentials
4451
4451
  };
4452
- const packageDetails = `azsdk-js-arm-policy/5.0.0-beta.2`;
4452
+ const packageDetails = `azsdk-js-arm-policy/5.0.0`;
4453
4453
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4454
4454
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4455
4455
  : `${packageDetails}`;
@@ -4464,25 +4464,6 @@ class PolicyClientContext extends coreClient.ServiceClient {
4464
4464
  this.subscriptionId = subscriptionId;
4465
4465
  // Assigning values to Constant parameters
4466
4466
  this.$host = options.$host || "https://management.azure.com";
4467
- }
4468
- }
4469
-
4470
- /*
4471
- * Copyright (c) Microsoft Corporation.
4472
- * Licensed under the MIT License.
4473
- *
4474
- * Code generated by Microsoft (R) AutoRest Code Generator.
4475
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
4476
- */
4477
- class PolicyClient extends PolicyClientContext {
4478
- /**
4479
- * Initializes a new instance of the PolicyClient class.
4480
- * @param credentials Subscription credentials which uniquely identify client subscription.
4481
- * @param subscriptionId The ID of the target subscription.
4482
- * @param options The parameter options
4483
- */
4484
- constructor(credentials, subscriptionId, options) {
4485
- super(credentials, subscriptionId, options);
4486
4467
  this.dataPolicyManifests = new DataPolicyManifestsImpl(this);
4487
4468
  this.policyAssignments = new PolicyAssignmentsImpl(this);
4488
4469
  this.policyDefinitions = new PolicyDefinitionsImpl(this);
@@ -4492,5 +4473,4 @@ class PolicyClient extends PolicyClientContext {
4492
4473
  }
4493
4474
 
4494
4475
  exports.PolicyClient = PolicyClient;
4495
- exports.PolicyClientContext = PolicyClientContext;
4496
4476
  //# sourceMappingURL=index.js.map