@azure/arm-confidentialledger 1.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 (109) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +1487 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts +2 -0
  9. package/dist-esm/samples-dev/checkNameAvailabilitySample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/checkNameAvailabilitySample.js +33 -0
  11. package/dist-esm/samples-dev/checkNameAvailabilitySample.js.map +1 -0
  12. package/dist-esm/samples-dev/ledgerCreateSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/ledgerCreateSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/ledgerCreateSample.js +51 -0
  15. package/dist-esm/samples-dev/ledgerCreateSample.js.map +1 -0
  16. package/dist-esm/samples-dev/ledgerDeleteSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/ledgerDeleteSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/ledgerDeleteSample.js +31 -0
  19. package/dist-esm/samples-dev/ledgerDeleteSample.js.map +1 -0
  20. package/dist-esm/samples-dev/ledgerGetSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/ledgerGetSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/ledgerGetSample.js +31 -0
  23. package/dist-esm/samples-dev/ledgerGetSample.js.map +1 -0
  24. package/dist-esm/samples-dev/ledgerListByResourceGroupSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/ledgerListByResourceGroupSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js +44 -0
  27. package/dist-esm/samples-dev/ledgerListByResourceGroupSample.js.map +1 -0
  28. package/dist-esm/samples-dev/ledgerListBySubscriptionSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/ledgerListBySubscriptionSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js +43 -0
  31. package/dist-esm/samples-dev/ledgerListBySubscriptionSample.js.map +1 -0
  32. package/dist-esm/samples-dev/ledgerUpdateSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/ledgerUpdateSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/ledgerUpdateSample.js +54 -0
  35. package/dist-esm/samples-dev/ledgerUpdateSample.js.map +1 -0
  36. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  39. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  40. package/dist-esm/src/confidentialLedgerClient.d.ts +28 -0
  41. package/dist-esm/src/confidentialLedgerClient.d.ts.map +1 -0
  42. package/dist-esm/src/confidentialLedgerClient.js +130 -0
  43. package/dist-esm/src/confidentialLedgerClient.js.map +1 -0
  44. package/dist-esm/src/index.d.ts +5 -0
  45. package/dist-esm/src/index.d.ts.map +1 -0
  46. package/dist-esm/src/index.js +12 -0
  47. package/dist-esm/src/index.js.map +1 -0
  48. package/dist-esm/src/lroImpl.d.ts +16 -0
  49. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  50. package/dist-esm/src/lroImpl.js +29 -0
  51. package/dist-esm/src/lroImpl.js.map +1 -0
  52. package/dist-esm/src/models/index.d.ts +379 -0
  53. package/dist-esm/src/models/index.d.ts.map +1 -0
  54. package/dist-esm/src/models/index.js +47 -0
  55. package/dist-esm/src/models/index.js.map +1 -0
  56. package/dist-esm/src/models/mappers.d.ts +19 -0
  57. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  58. package/dist-esm/src/models/mappers.js +501 -0
  59. package/dist-esm/src/models/mappers.js.map +1 -0
  60. package/dist-esm/src/models/parameters.d.ts +13 -0
  61. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  62. package/dist-esm/src/models/parameters.js +118 -0
  63. package/dist-esm/src/models/parameters.js.map +1 -0
  64. package/dist-esm/src/operations/index.d.ts +3 -0
  65. package/dist-esm/src/operations/index.d.ts.map +1 -0
  66. package/dist-esm/src/operations/index.js +10 -0
  67. package/dist-esm/src/operations/index.js.map +1 -0
  68. package/dist-esm/src/operations/ledger.d.ts +107 -0
  69. package/dist-esm/src/operations/ledger.d.ts.map +1 -0
  70. package/dist-esm/src/operations/ledger.js +507 -0
  71. package/dist-esm/src/operations/ledger.js.map +1 -0
  72. package/dist-esm/src/operations/operations.d.ts +32 -0
  73. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/operations.js +120 -0
  75. package/dist-esm/src/operations/operations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  77. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/index.js +10 -0
  79. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/ledger.d.ts +71 -0
  81. package/dist-esm/src/operationsInterfaces/ledger.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/ledger.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/ledger.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  85. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  88. package/dist-esm/test/sampleTest.d.ts +2 -0
  89. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  90. package/dist-esm/test/sampleTest.js +38 -0
  91. package/dist-esm/test/sampleTest.js.map +1 -0
  92. package/package.json +122 -0
  93. package/review/arm-confidentialledger.api.md +333 -0
  94. package/rollup.config.js +122 -0
  95. package/src/confidentialLedgerClient.ts +181 -0
  96. package/src/index.ts +12 -0
  97. package/src/lroImpl.ts +34 -0
  98. package/src/models/index.ts +442 -0
  99. package/src/models/mappers.ts +524 -0
  100. package/src/models/parameters.ts +137 -0
  101. package/src/operations/index.ts +10 -0
  102. package/src/operations/ledger.ts +674 -0
  103. package/src/operations/operations.ts +137 -0
  104. package/src/operationsInterfaces/index.ts +10 -0
  105. package/src/operationsInterfaces/ledger.ts +132 -0
  106. package/src/operationsInterfaces/operations.ts +25 -0
  107. package/tsconfig.json +33 -0
  108. package/types/arm-confidentialledger.d.ts +534 -0
  109. package/types/tsdoc-metadata.json +11 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Release History
2
+
3
+ ## 1.0.0 (2022-05-30)
4
+
5
+ The package of @azure/arm-confidentialledger is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,109 @@
1
+ # Azure ConfidentialLedger client library for JavaScript
2
+
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ConfidentialLedger client.
4
+
5
+ Microsoft Azure Confidential Compute Ledger Control Plane REST API version 2020-12-01-preview.
6
+
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/confidentialledger/arm-confidentialledger) |
8
+ [Package (NPM)](https://www.npmjs.com/package/@azure/arm-confidentialledger) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-confidentialledger) |
10
+ [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
+
12
+ ## Getting started
13
+
14
+ ### Currently supported environments
15
+
16
+ - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
+ - Latest versions of Safari, Chrome, Edge and Firefox.
18
+
19
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20
+
21
+ ### Prerequisites
22
+
23
+ - An [Azure subscription][azure_sub].
24
+
25
+ ### Install the `@azure/arm-confidentialledger` package
26
+
27
+ Install the Azure ConfidentialLedger client library for JavaScript with `npm`:
28
+
29
+ ```bash
30
+ npm install @azure/arm-confidentialledger
31
+ ```
32
+
33
+ ### Create and authenticate a `ConfidentialLedgerClient`
34
+
35
+ To create a client object to access the Azure ConfidentialLedger API, you will need the `endpoint` of your Azure ConfidentialLedger resource and a `credential`. The Azure ConfidentialLedger client can use Azure Active Directory credentials to authenticate.
36
+ You can find the endpoint for your Azure ConfidentialLedger resource in the [Azure Portal][azure_portal].
37
+
38
+ You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
39
+
40
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
41
+
42
+ ```bash
43
+ npm install @azure/identity
44
+ ```
45
+
46
+ You will also need to **register a new AAD application and grant access to Azure ConfidentialLedger** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
47
+ Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
48
+
49
+ For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
50
+
51
+ ```javascript
52
+ const { ConfidentialLedgerClient } = require("@azure/arm-confidentialledger");
53
+ const { DefaultAzureCredential } = require("@azure/identity");
54
+ // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55
+
56
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
57
+ const client = new ConfidentialLedgerClient(new DefaultAzureCredential(), subscriptionId);
58
+
59
+ // For client-side applications running in the browser, use this code instead:
60
+ // const credential = new InteractiveBrowserCredential({
61
+ // tenantId: "<YOUR_TENANT_ID>",
62
+ // clientId: "<YOUR_CLIENT_ID>"
63
+ // });
64
+ // const client = new ConfidentialLedgerClient(credential, subscriptionId);
65
+ ```
66
+
67
+
68
+ ### JavaScript Bundle
69
+ 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).
70
+
71
+ ## Key concepts
72
+
73
+ ### ConfidentialLedgerClient
74
+
75
+ `ConfidentialLedgerClient` is the primary interface for developers using the Azure ConfidentialLedger client library. Explore the methods on this client object to understand the different features of the Azure ConfidentialLedger service that you can access.
76
+
77
+ ## Troubleshooting
78
+
79
+ ### Logging
80
+
81
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
82
+
83
+ ```javascript
84
+ const { setLogLevel } = require("@azure/logger");
85
+ setLogLevel("info");
86
+ ```
87
+
88
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
89
+
90
+ ## Next steps
91
+
92
+ Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
93
+
94
+ ## Contributing
95
+
96
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
97
+
98
+ ## Related projects
99
+
100
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
101
+
102
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fconfidentialledger%2Farm-confidentialledger%2FREADME.png)
103
+
104
+ [azure_cli]: https://docs.microsoft.com/cli/azure
105
+ [azure_sub]: https://azure.microsoft.com/free/
106
+ [azure_sub]: https://azure.microsoft.com/free/
107
+ [azure_portal]: https://portal.azure.com
108
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
109
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential