@azure/arm-datadog 1.0.0 → 3.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 (175) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +70 -70
  4. package/dist/index.js +3359 -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/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/microsoftDatadogClient.d.ts +22 -0
  17. package/dist-esm/src/microsoftDatadogClient.d.ts.map +1 -0
  18. package/dist-esm/src/microsoftDatadogClient.js +55 -0
  19. package/dist-esm/src/microsoftDatadogClient.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +790 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +69 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +42 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +554 -596
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +18 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +145 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +1 -2
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/marketplaceAgreements.d.ts +37 -0
  37. package/dist-esm/src/operations/marketplaceAgreements.d.ts.map +1 -0
  38. package/dist-esm/src/operations/marketplaceAgreements.js +149 -0
  39. package/dist-esm/src/operations/marketplaceAgreements.js.map +1 -0
  40. package/dist-esm/src/operations/monitors.d.ts +220 -0
  41. package/dist-esm/src/operations/monitors.d.ts.map +1 -0
  42. package/dist-esm/src/operations/monitors.js +1035 -0
  43. package/dist-esm/src/operations/monitors.js.map +1 -0
  44. package/dist-esm/src/operations/operations.d.ts +32 -0
  45. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/operations.js +120 -0
  47. package/dist-esm/src/operations/operations.js.map +1 -0
  48. package/dist-esm/src/operations/singleSignOnConfigurations.d.ts +63 -0
  49. package/dist-esm/src/operations/singleSignOnConfigurations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/singleSignOnConfigurations.js +256 -0
  51. package/dist-esm/src/operations/singleSignOnConfigurations.js.map +1 -0
  52. package/dist-esm/src/operations/tagRules.d.ts +54 -0
  53. package/dist-esm/src/operations/tagRules.d.ts.map +1 -0
  54. package/dist-esm/src/operations/tagRules.js +203 -0
  55. package/dist-esm/src/operations/tagRules.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  57. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  59. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/marketplaceAgreements.d.ts +16 -0
  61. package/dist-esm/src/operationsInterfaces/marketplaceAgreements.d.ts.map +1 -0
  62. package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/marketplaceAgreements.js} +2 -9
  63. package/dist-esm/src/operationsInterfaces/marketplaceAgreements.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/monitors.d.ts +116 -0
  65. package/dist-esm/src/operationsInterfaces/monitors.d.ts.map +1 -0
  66. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/monitors.js} +2 -1
  67. package/dist-esm/src/operationsInterfaces/monitors.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/operations.js} +2 -2
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts +38 -0
  73. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/tagRules.d.ts +29 -0
  77. package/dist-esm/src/operationsInterfaces/tagRules.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/tagRules.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/tagRules.js.map +1 -0
  80. package/dist-esm/test/sampleTest.d.ts +2 -0
  81. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  82. package/dist-esm/test/sampleTest.js +40 -0
  83. package/dist-esm/test/sampleTest.js.map +1 -0
  84. package/package.json +65 -31
  85. package/review/arm-datadog.api.md +746 -0
  86. package/rollup.config.js +181 -30
  87. package/src/index.ts +12 -0
  88. package/src/lroImpl.ts +34 -0
  89. package/src/microsoftDatadogClient.ts +80 -34
  90. package/src/models/index.ts +652 -1254
  91. package/src/models/mappers.ts +564 -605
  92. package/src/models/parameters.ts +104 -34
  93. package/src/operations/index.ts +1 -2
  94. package/src/operations/marketplaceAgreements.ts +110 -116
  95. package/src/operations/monitors.ts +1010 -696
  96. package/src/operations/operations.ts +87 -75
  97. package/src/operations/singleSignOnConfigurations.ts +247 -166
  98. package/src/operations/tagRules.ts +169 -171
  99. package/src/operationsInterfaces/index.ts +13 -0
  100. package/src/operationsInterfaces/marketplaceAgreements.ts +34 -0
  101. package/src/operationsInterfaces/monitors.ts +220 -0
  102. package/src/operationsInterfaces/operations.ts +22 -0
  103. package/src/operationsInterfaces/singleSignOnConfigurations.ts +78 -0
  104. package/src/operationsInterfaces/tagRules.ts +59 -0
  105. package/tsconfig.json +3 -3
  106. package/types/arm-datadog.d.ts +1130 -0
  107. package/types/tsdoc-metadata.json +11 -0
  108. package/dist/arm-datadog.js +0 -2959
  109. package/dist/arm-datadog.js.map +0 -1
  110. package/dist/arm-datadog.min.js +0 -1
  111. package/dist/arm-datadog.min.js.map +0 -1
  112. package/esm/microsoftDatadogClient.d.ts +0 -22
  113. package/esm/microsoftDatadogClient.d.ts.map +0 -1
  114. package/esm/microsoftDatadogClient.js +0 -36
  115. package/esm/microsoftDatadogClient.js.map +0 -1
  116. package/esm/microsoftDatadogClientContext.d.ts +0 -16
  117. package/esm/microsoftDatadogClientContext.d.ts.map +0 -1
  118. package/esm/microsoftDatadogClientContext.js +0 -55
  119. package/esm/microsoftDatadogClientContext.js.map +0 -1
  120. package/esm/models/index.d.ts +0 -1397
  121. package/esm/models/index.d.ts.map +0 -1
  122. package/esm/models/index.js.map +0 -1
  123. package/esm/models/mappers.d.ts +0 -44
  124. package/esm/models/mappers.d.ts.map +0 -1
  125. package/esm/models/mappers.js.map +0 -1
  126. package/esm/models/marketplaceAgreementsMappers.d.ts +0 -2
  127. package/esm/models/marketplaceAgreementsMappers.d.ts.map +0 -1
  128. package/esm/models/marketplaceAgreementsMappers.js +0 -9
  129. package/esm/models/marketplaceAgreementsMappers.js.map +0 -1
  130. package/esm/models/monitorsMappers.d.ts +0 -2
  131. package/esm/models/monitorsMappers.d.ts.map +0 -1
  132. package/esm/models/monitorsMappers.js +0 -9
  133. package/esm/models/monitorsMappers.js.map +0 -1
  134. package/esm/models/operationsMappers.d.ts +0 -2
  135. package/esm/models/operationsMappers.d.ts.map +0 -1
  136. package/esm/models/operationsMappers.js.map +0 -1
  137. package/esm/models/parameters.d.ts +0 -10
  138. package/esm/models/parameters.d.ts.map +0 -1
  139. package/esm/models/parameters.js +0 -101
  140. package/esm/models/parameters.js.map +0 -1
  141. package/esm/models/singleSignOnConfigurationsMappers.d.ts +0 -2
  142. package/esm/models/singleSignOnConfigurationsMappers.d.ts.map +0 -1
  143. package/esm/models/singleSignOnConfigurationsMappers.js +0 -9
  144. package/esm/models/singleSignOnConfigurationsMappers.js.map +0 -1
  145. package/esm/models/tagRulesMappers.d.ts +0 -2
  146. package/esm/models/tagRulesMappers.d.ts.map +0 -1
  147. package/esm/models/tagRulesMappers.js +0 -9
  148. package/esm/models/tagRulesMappers.js.map +0 -1
  149. package/esm/operations/index.d.ts.map +0 -1
  150. package/esm/operations/index.js.map +0 -1
  151. package/esm/operations/marketplaceAgreements.d.ts +0 -61
  152. package/esm/operations/marketplaceAgreements.d.ts.map +0 -1
  153. package/esm/operations/marketplaceAgreements.js +0 -116
  154. package/esm/operations/marketplaceAgreements.js.map +0 -1
  155. package/esm/operations/monitors.d.ts +0 -378
  156. package/esm/operations/monitors.d.ts.map +0 -1
  157. package/esm/operations/monitors.js +0 -655
  158. package/esm/operations/monitors.js.map +0 -1
  159. package/esm/operations/operations.d.ts +0 -46
  160. package/esm/operations/operations.d.ts.map +0 -1
  161. package/esm/operations/operations.js +0 -79
  162. package/esm/operations/operations.js.map +0 -1
  163. package/esm/operations/singleSignOnConfigurations.d.ts +0 -95
  164. package/esm/operations/singleSignOnConfigurations.d.ts.map +0 -1
  165. package/esm/operations/singleSignOnConfigurations.js +0 -182
  166. package/esm/operations/singleSignOnConfigurations.js.map +0 -1
  167. package/esm/operations/tagRules.d.ts +0 -100
  168. package/esm/operations/tagRules.d.ts.map +0 -1
  169. package/esm/operations/tagRules.js +0 -159
  170. package/esm/operations/tagRules.js.map +0 -1
  171. package/src/microsoftDatadogClientContext.ts +0 -61
  172. package/src/models/marketplaceAgreementsMappers.ts +0 -31
  173. package/src/models/monitorsMappers.ts +0 -45
  174. package/src/models/singleSignOnConfigurationsMappers.ts +0 -31
  175. package/src/models/tagRulesMappers.ts +0 -31
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Release History
2
+
3
+ ## 3.0.0 (2022-01-12)
4
+
5
+ The package of @azure/arm-datadog is using our next generation design principles since version 3.0.0, which contains breaking changes.
6
+
7
+ To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
8
+
9
+ To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
10
+
11
+ 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 CHANGED
@@ -1,98 +1,98 @@
1
- ## Azure MicrosoftDatadogClient SDK for JavaScript
1
+ # Azure Microsoft Datadog client library for JavaScript
2
2
 
3
- This package contains an isomorphic SDK for MicrosoftDatadogClient.
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Microsoft Datadog client.
4
+
5
+
6
+
7
+ [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datadog/arm-datadog) |
8
+ [Package (NPM)](https://www.npmjs.com/package/@azure/arm-datadog) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-datadog) |
10
+ [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
+
12
+ ## Getting started
4
13
 
5
14
  ### Currently supported environments
6
15
 
7
- - Node.js version 6.x.x or higher
8
- - Browser JavaScript
16
+ - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
+ - Latest versions of Safari, Chrome, Edge and Firefox.
18
+
19
+ ### Prerequisites
20
+
21
+ - An [Azure subscription][azure_sub].
9
22
 
10
- ### How to Install
23
+ ### Install the `@azure/arm-datadog` package
24
+
25
+ Install the Azure Microsoft Datadog client library for JavaScript with `npm`:
11
26
 
12
27
  ```bash
13
28
  npm install @azure/arm-datadog
14
29
  ```
15
30
 
16
- ### How to use
31
+ ### Create and authenticate a `MicrosoftDatadogClient`
32
+
33
+ To create a client object to access the Azure Microsoft Datadog API, you will need the `endpoint` of your Azure Microsoft Datadog resource and a `credential`. The Azure Microsoft Datadog client can use Azure Active Directory credentials to authenticate.
34
+ You can find the endpoint for your Azure Microsoft Datadog resource in the [Azure Portal][azure_portal].
17
35
 
18
- #### nodejs - client creation and list marketplaceAgreements as an example written in TypeScript.
36
+ 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).
19
37
 
20
- ##### Install @azure/ms-rest-nodeauth
38
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
21
39
 
22
- - Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`.
23
40
  ```bash
24
- npm install @azure/ms-rest-nodeauth@"^3.0.0"
41
+ npm install @azure/identity
25
42
  ```
26
43
 
27
- ##### Sample code
44
+ You will also need to **register a new AAD application and grant access to Azure Microsoft Datadog** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
45
+ 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`.
46
+
47
+ 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).
28
48
 
29
- While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
30
- ```typescript
31
- const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
49
+ ```javascript
32
50
  const { MicrosoftDatadogClient } = require("@azure/arm-datadog");
33
- const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
34
-
35
- msRestNodeAuth.interactiveLogin().then((creds) => {
36
- const client = new MicrosoftDatadogClient(creds, subscriptionId);
37
- client.marketplaceAgreements.list().then((result) => {
38
- console.log("The result is:");
39
- console.log(result);
40
- });
41
- }).catch((err) => {
42
- console.error(err);
43
- });
51
+ const { DefaultAzureCredential } = require("@azure/identity");
52
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
+ const client = new MicrosoftDatadogClient(new DefaultAzureCredential(), subscriptionId);
44
54
  ```
45
55
 
46
- #### browser - Authentication, client creation and list marketplaceAgreements as an example written in JavaScript.
47
56
 
48
- ##### Install @azure/ms-rest-browserauth
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).
49
59
 
50
- ```bash
51
- npm install @azure/ms-rest-browserauth
52
- ```
60
+ ## Key concepts
53
61
 
54
- ##### Sample code
55
-
56
- See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
57
-
58
- - index.html
59
- ```html
60
- <!DOCTYPE html>
61
- <html lang="en">
62
- <head>
63
- <title>@azure/arm-datadog sample</title>
64
- <script src="node_modules/@azure/ms-rest-js/dist/msRest.browser.js"></script>
65
- <script src="node_modules/@azure/ms-rest-azure-js/dist/msRestAzure.js"></script>
66
- <script src="node_modules/@azure/ms-rest-browserauth/dist/msAuth.js"></script>
67
- <script src="node_modules/@azure/arm-datadog/dist/arm-datadog.js"></script>
68
- <script type="text/javascript">
69
- const subscriptionId = "<Subscription_Id>";
70
- const authManager = new msAuth.AuthManager({
71
- clientId: "<client id for your Azure AD app>",
72
- tenant: "<optional tenant for your organization>"
73
- });
74
- authManager.finalizeLogin().then((res) => {
75
- if (!res.isLoggedIn) {
76
- // may cause redirects
77
- authManager.login();
78
- }
79
- const client = new Azure.ArmDatadog.MicrosoftDatadogClient(res.creds, subscriptionId);
80
- client.marketplaceAgreements.list().then((result) => {
81
- console.log("The result is:");
82
- console.log(result);
83
- }).catch((err) => {
84
- console.log("An error occurred:");
85
- console.error(err);
86
- });
87
- });
88
- </script>
89
- </head>
90
- <body></body>
91
- </html>
62
+ ### MicrosoftDatadogClient
63
+
64
+ `MicrosoftDatadogClient` is the primary interface for developers using the Azure Microsoft Datadog client library. Explore the methods on this client object to understand the different features of the Azure Microsoft Datadog service that you can access.
65
+
66
+ ## Troubleshooting
67
+
68
+ ### Logging
69
+
70
+ 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`:
71
+
72
+ ```javascript
73
+ const { setLogLevel } = require("@azure/logger");
74
+ setLogLevel("info");
92
75
  ```
93
76
 
77
+ 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).
78
+
79
+ ## Next steps
80
+
81
+ 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.
82
+
83
+ ## Contributing
84
+
85
+ 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.
86
+
94
87
  ## Related projects
95
88
 
96
- - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
89
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
90
+
91
+ ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdatadog%2Farm-datadog%2FREADME.png)
97
92
 
98
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/datadog/arm-datadog/README.png)
93
+ [azure_cli]: https://docs.microsoft.com/cli/azure
94
+ [azure_sub]: https://azure.microsoft.com/free/
95
+ [azure_sub]: https://azure.microsoft.com/free/
96
+ [azure_portal]: https://portal.azure.com
97
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
98
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential