@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
@@ -3,616 +3,976 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as msRestAzure from "@azure/ms-rest-azure-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/monitorsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Monitors } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
14
13
  import * as Parameters from "../models/parameters";
15
- import { MicrosoftDatadogClientContext } from "../microsoftDatadogClientContext";
14
+ import { MicrosoftDatadogClient } from "../microsoftDatadogClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ DatadogApiKey,
19
+ MonitorsListApiKeysNextOptionalParams,
20
+ MonitorsListApiKeysOptionalParams,
21
+ DatadogHost,
22
+ MonitorsListHostsNextOptionalParams,
23
+ MonitorsListHostsOptionalParams,
24
+ LinkedResource,
25
+ MonitorsListLinkedResourcesNextOptionalParams,
26
+ MonitorsListLinkedResourcesOptionalParams,
27
+ MonitoredResource,
28
+ MonitorsListMonitoredResourcesNextOptionalParams,
29
+ MonitorsListMonitoredResourcesOptionalParams,
30
+ DatadogMonitorResource,
31
+ MonitorsListNextOptionalParams,
32
+ MonitorsListOptionalParams,
33
+ MonitorsListByResourceGroupNextOptionalParams,
34
+ MonitorsListByResourceGroupOptionalParams,
35
+ MonitorsListApiKeysResponse,
36
+ MonitorsGetDefaultKeyOptionalParams,
37
+ MonitorsGetDefaultKeyResponse,
38
+ MonitorsSetDefaultKeyOptionalParams,
39
+ MonitorsListHostsResponse,
40
+ MonitorsListLinkedResourcesResponse,
41
+ MonitorsListMonitoredResourcesResponse,
42
+ MonitorsListResponse,
43
+ MonitorsListByResourceGroupResponse,
44
+ MonitorsGetOptionalParams,
45
+ MonitorsGetResponse,
46
+ MonitorsCreateOptionalParams,
47
+ MonitorsCreateResponse,
48
+ MonitorsUpdateOptionalParams,
49
+ MonitorsUpdateResponse,
50
+ MonitorsDeleteOptionalParams,
51
+ MonitorsRefreshSetPasswordLinkOptionalParams,
52
+ MonitorsRefreshSetPasswordLinkResponse,
53
+ MonitorsListApiKeysNextResponse,
54
+ MonitorsListHostsNextResponse,
55
+ MonitorsListLinkedResourcesNextResponse,
56
+ MonitorsListMonitoredResourcesNextResponse,
57
+ MonitorsListNextResponse,
58
+ MonitorsListByResourceGroupNextResponse
59
+ } from "../models";
16
60
 
17
- /** Class representing a Monitors. */
18
- export class Monitors {
19
- private readonly client: MicrosoftDatadogClientContext;
61
+ /// <reference lib="esnext.asynciterable" />
62
+ /** Class containing Monitors operations. */
63
+ export class MonitorsImpl implements Monitors {
64
+ private readonly client: MicrosoftDatadogClient;
20
65
 
21
66
  /**
22
- * Create a Monitors.
23
- * @param {MicrosoftDatadogClientContext} client Reference to the service client.
67
+ * Initialize a new instance of the class Monitors class.
68
+ * @param client Reference to the service client
24
69
  */
25
- constructor(client: MicrosoftDatadogClientContext) {
70
+ constructor(client: MicrosoftDatadogClient) {
26
71
  this.client = client;
27
72
  }
28
73
 
29
74
  /**
30
- * @summary List the api keys for a given monitor resource.
75
+ * List the api keys for a given monitor resource.
31
76
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
32
77
  * @param monitorName Monitor resource name
33
- * @param [options] The optional parameters
34
- * @returns Promise<Models.MonitorsListApiKeysResponse>
78
+ * @param options The options parameters.
35
79
  */
36
- listApiKeys(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListApiKeysResponse>;
37
- /**
38
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
39
- * @param monitorName Monitor resource name
40
- * @param callback The callback
41
- */
42
- listApiKeys(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): void;
43
- /**
44
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
45
- * @param monitorName Monitor resource name
46
- * @param options The optional parameters
47
- * @param callback The callback
48
- */
49
- listApiKeys(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): void;
50
- listApiKeys(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogApiKeyListResponse>, callback?: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): Promise<Models.MonitorsListApiKeysResponse> {
51
- return this.client.sendOperationRequest(
52
- {
80
+ public listApiKeys(
81
+ resourceGroupName: string,
82
+ monitorName: string,
83
+ options?: MonitorsListApiKeysOptionalParams
84
+ ): PagedAsyncIterableIterator<DatadogApiKey> {
85
+ const iter = this.listApiKeysPagingAll(
86
+ resourceGroupName,
87
+ monitorName,
88
+ options
89
+ );
90
+ return {
91
+ next() {
92
+ return iter.next();
93
+ },
94
+ [Symbol.asyncIterator]() {
95
+ return this;
96
+ },
97
+ byPage: () => {
98
+ return this.listApiKeysPagingPage(
99
+ resourceGroupName,
100
+ monitorName,
101
+ options
102
+ );
103
+ }
104
+ };
105
+ }
106
+
107
+ private async *listApiKeysPagingPage(
108
+ resourceGroupName: string,
109
+ monitorName: string,
110
+ options?: MonitorsListApiKeysOptionalParams
111
+ ): AsyncIterableIterator<DatadogApiKey[]> {
112
+ let result = await this._listApiKeys(
113
+ resourceGroupName,
114
+ monitorName,
115
+ options
116
+ );
117
+ yield result.value || [];
118
+ let continuationToken = result.nextLink;
119
+ while (continuationToken) {
120
+ result = await this._listApiKeysNext(
53
121
  resourceGroupName,
54
122
  monitorName,
123
+ continuationToken,
55
124
  options
56
- },
57
- listApiKeysOperationSpec,
58
- callback) as Promise<Models.MonitorsListApiKeysResponse>;
125
+ );
126
+ continuationToken = result.nextLink;
127
+ yield result.value || [];
128
+ }
129
+ }
130
+
131
+ private async *listApiKeysPagingAll(
132
+ resourceGroupName: string,
133
+ monitorName: string,
134
+ options?: MonitorsListApiKeysOptionalParams
135
+ ): AsyncIterableIterator<DatadogApiKey> {
136
+ for await (const page of this.listApiKeysPagingPage(
137
+ resourceGroupName,
138
+ monitorName,
139
+ options
140
+ )) {
141
+ yield* page;
142
+ }
59
143
  }
60
144
 
61
145
  /**
62
- * @summary Get the default api key.
63
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
64
- * @param monitorName Monitor resource name
65
- * @param [options] The optional parameters
66
- * @returns Promise<Models.MonitorsGetDefaultKeyResponse>
67
- */
68
- getDefaultKey(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsGetDefaultKeyResponse>;
69
- /**
70
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
71
- * @param monitorName Monitor resource name
72
- * @param callback The callback
73
- */
74
- getDefaultKey(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogApiKey>): void;
75
- /**
146
+ * List the hosts for a given monitor resource.
76
147
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
77
148
  * @param monitorName Monitor resource name
78
- * @param options The optional parameters
79
- * @param callback The callback
149
+ * @param options The options parameters.
80
150
  */
81
- getDefaultKey(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogApiKey>): void;
82
- getDefaultKey(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogApiKey>, callback?: msRest.ServiceCallback<Models.DatadogApiKey>): Promise<Models.MonitorsGetDefaultKeyResponse> {
83
- return this.client.sendOperationRequest(
84
- {
151
+ public listHosts(
152
+ resourceGroupName: string,
153
+ monitorName: string,
154
+ options?: MonitorsListHostsOptionalParams
155
+ ): PagedAsyncIterableIterator<DatadogHost> {
156
+ const iter = this.listHostsPagingAll(
157
+ resourceGroupName,
158
+ monitorName,
159
+ options
160
+ );
161
+ return {
162
+ next() {
163
+ return iter.next();
164
+ },
165
+ [Symbol.asyncIterator]() {
166
+ return this;
167
+ },
168
+ byPage: () => {
169
+ return this.listHostsPagingPage(
170
+ resourceGroupName,
171
+ monitorName,
172
+ options
173
+ );
174
+ }
175
+ };
176
+ }
177
+
178
+ private async *listHostsPagingPage(
179
+ resourceGroupName: string,
180
+ monitorName: string,
181
+ options?: MonitorsListHostsOptionalParams
182
+ ): AsyncIterableIterator<DatadogHost[]> {
183
+ let result = await this._listHosts(resourceGroupName, monitorName, options);
184
+ yield result.value || [];
185
+ let continuationToken = result.nextLink;
186
+ while (continuationToken) {
187
+ result = await this._listHostsNext(
85
188
  resourceGroupName,
86
189
  monitorName,
190
+ continuationToken,
87
191
  options
88
- },
89
- getDefaultKeyOperationSpec,
90
- callback) as Promise<Models.MonitorsGetDefaultKeyResponse>;
192
+ );
193
+ continuationToken = result.nextLink;
194
+ yield result.value || [];
195
+ }
196
+ }
197
+
198
+ private async *listHostsPagingAll(
199
+ resourceGroupName: string,
200
+ monitorName: string,
201
+ options?: MonitorsListHostsOptionalParams
202
+ ): AsyncIterableIterator<DatadogHost> {
203
+ for await (const page of this.listHostsPagingPage(
204
+ resourceGroupName,
205
+ monitorName,
206
+ options
207
+ )) {
208
+ yield* page;
209
+ }
91
210
  }
92
211
 
93
212
  /**
94
- * @summary Set the default api key.
95
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
96
- * @param monitorName Monitor resource name
97
- * @param [options] The optional parameters
98
- * @returns Promise<msRest.RestResponse>
99
- */
100
- setDefaultKey(resourceGroupName: string, monitorName: string, options?: Models.MonitorsSetDefaultKeyOptionalParams): Promise<msRest.RestResponse>;
101
- /**
102
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
103
- * @param monitorName Monitor resource name
104
- * @param callback The callback
105
- */
106
- setDefaultKey(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<void>): void;
107
- /**
213
+ * List all Azure resources associated to the same Datadog organization as the target resource.
108
214
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
109
215
  * @param monitorName Monitor resource name
110
- * @param options The optional parameters
111
- * @param callback The callback
216
+ * @param options The options parameters.
112
217
  */
113
- setDefaultKey(resourceGroupName: string, monitorName: string, options: Models.MonitorsSetDefaultKeyOptionalParams, callback: msRest.ServiceCallback<void>): void;
114
- setDefaultKey(resourceGroupName: string, monitorName: string, options?: Models.MonitorsSetDefaultKeyOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
115
- return this.client.sendOperationRequest(
116
- {
218
+ public listLinkedResources(
219
+ resourceGroupName: string,
220
+ monitorName: string,
221
+ options?: MonitorsListLinkedResourcesOptionalParams
222
+ ): PagedAsyncIterableIterator<LinkedResource> {
223
+ const iter = this.listLinkedResourcesPagingAll(
224
+ resourceGroupName,
225
+ monitorName,
226
+ options
227
+ );
228
+ return {
229
+ next() {
230
+ return iter.next();
231
+ },
232
+ [Symbol.asyncIterator]() {
233
+ return this;
234
+ },
235
+ byPage: () => {
236
+ return this.listLinkedResourcesPagingPage(
237
+ resourceGroupName,
238
+ monitorName,
239
+ options
240
+ );
241
+ }
242
+ };
243
+ }
244
+
245
+ private async *listLinkedResourcesPagingPage(
246
+ resourceGroupName: string,
247
+ monitorName: string,
248
+ options?: MonitorsListLinkedResourcesOptionalParams
249
+ ): AsyncIterableIterator<LinkedResource[]> {
250
+ let result = await this._listLinkedResources(
251
+ resourceGroupName,
252
+ monitorName,
253
+ options
254
+ );
255
+ yield result.value || [];
256
+ let continuationToken = result.nextLink;
257
+ while (continuationToken) {
258
+ result = await this._listLinkedResourcesNext(
117
259
  resourceGroupName,
118
260
  monitorName,
261
+ continuationToken,
119
262
  options
120
- },
121
- setDefaultKeyOperationSpec,
122
- callback);
263
+ );
264
+ continuationToken = result.nextLink;
265
+ yield result.value || [];
266
+ }
267
+ }
268
+
269
+ private async *listLinkedResourcesPagingAll(
270
+ resourceGroupName: string,
271
+ monitorName: string,
272
+ options?: MonitorsListLinkedResourcesOptionalParams
273
+ ): AsyncIterableIterator<LinkedResource> {
274
+ for await (const page of this.listLinkedResourcesPagingPage(
275
+ resourceGroupName,
276
+ monitorName,
277
+ options
278
+ )) {
279
+ yield* page;
280
+ }
123
281
  }
124
282
 
125
283
  /**
126
- * @summary List the hosts for a given monitor resource.
127
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
128
- * @param monitorName Monitor resource name
129
- * @param [options] The optional parameters
130
- * @returns Promise<Models.MonitorsListHostsResponse>
131
- */
132
- listHosts(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListHostsResponse>;
133
- /**
134
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
135
- * @param monitorName Monitor resource name
136
- * @param callback The callback
137
- */
138
- listHosts(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogHostListResponse>): void;
139
- /**
284
+ * List the resources currently being monitored by the Datadog monitor resource.
140
285
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
141
286
  * @param monitorName Monitor resource name
142
- * @param options The optional parameters
143
- * @param callback The callback
287
+ * @param options The options parameters.
144
288
  */
145
- listHosts(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogHostListResponse>): void;
146
- listHosts(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogHostListResponse>, callback?: msRest.ServiceCallback<Models.DatadogHostListResponse>): Promise<Models.MonitorsListHostsResponse> {
147
- return this.client.sendOperationRequest(
148
- {
289
+ public listMonitoredResources(
290
+ resourceGroupName: string,
291
+ monitorName: string,
292
+ options?: MonitorsListMonitoredResourcesOptionalParams
293
+ ): PagedAsyncIterableIterator<MonitoredResource> {
294
+ const iter = this.listMonitoredResourcesPagingAll(
295
+ resourceGroupName,
296
+ monitorName,
297
+ options
298
+ );
299
+ return {
300
+ next() {
301
+ return iter.next();
302
+ },
303
+ [Symbol.asyncIterator]() {
304
+ return this;
305
+ },
306
+ byPage: () => {
307
+ return this.listMonitoredResourcesPagingPage(
308
+ resourceGroupName,
309
+ monitorName,
310
+ options
311
+ );
312
+ }
313
+ };
314
+ }
315
+
316
+ private async *listMonitoredResourcesPagingPage(
317
+ resourceGroupName: string,
318
+ monitorName: string,
319
+ options?: MonitorsListMonitoredResourcesOptionalParams
320
+ ): AsyncIterableIterator<MonitoredResource[]> {
321
+ let result = await this._listMonitoredResources(
322
+ resourceGroupName,
323
+ monitorName,
324
+ options
325
+ );
326
+ yield result.value || [];
327
+ let continuationToken = result.nextLink;
328
+ while (continuationToken) {
329
+ result = await this._listMonitoredResourcesNext(
149
330
  resourceGroupName,
150
331
  monitorName,
332
+ continuationToken,
151
333
  options
152
- },
153
- listHostsOperationSpec,
154
- callback) as Promise<Models.MonitorsListHostsResponse>;
334
+ );
335
+ continuationToken = result.nextLink;
336
+ yield result.value || [];
337
+ }
338
+ }
339
+
340
+ private async *listMonitoredResourcesPagingAll(
341
+ resourceGroupName: string,
342
+ monitorName: string,
343
+ options?: MonitorsListMonitoredResourcesOptionalParams
344
+ ): AsyncIterableIterator<MonitoredResource> {
345
+ for await (const page of this.listMonitoredResourcesPagingPage(
346
+ resourceGroupName,
347
+ monitorName,
348
+ options
349
+ )) {
350
+ yield* page;
351
+ }
155
352
  }
156
353
 
157
354
  /**
158
- * @summary List all Azure resources associated to the same Datadog organization as the target
159
- * resource.
160
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
161
- * @param monitorName Monitor resource name
162
- * @param [options] The optional parameters
163
- * @returns Promise<Models.MonitorsListLinkedResourcesResponse>
164
- */
165
- listLinkedResources(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListLinkedResourcesResponse>;
166
- /**
167
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
168
- * @param monitorName Monitor resource name
169
- * @param callback The callback
355
+ * List all monitors under the specified subscription.
356
+ * @param options The options parameters.
170
357
  */
171
- listLinkedResources(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.LinkedResourceListResponse>): void;
358
+ public list(
359
+ options?: MonitorsListOptionalParams
360
+ ): PagedAsyncIterableIterator<DatadogMonitorResource> {
361
+ const iter = this.listPagingAll(options);
362
+ return {
363
+ next() {
364
+ return iter.next();
365
+ },
366
+ [Symbol.asyncIterator]() {
367
+ return this;
368
+ },
369
+ byPage: () => {
370
+ return this.listPagingPage(options);
371
+ }
372
+ };
373
+ }
374
+
375
+ private async *listPagingPage(
376
+ options?: MonitorsListOptionalParams
377
+ ): AsyncIterableIterator<DatadogMonitorResource[]> {
378
+ let result = await this._list(options);
379
+ yield result.value || [];
380
+ let continuationToken = result.nextLink;
381
+ while (continuationToken) {
382
+ result = await this._listNext(continuationToken, options);
383
+ continuationToken = result.nextLink;
384
+ yield result.value || [];
385
+ }
386
+ }
387
+
388
+ private async *listPagingAll(
389
+ options?: MonitorsListOptionalParams
390
+ ): AsyncIterableIterator<DatadogMonitorResource> {
391
+ for await (const page of this.listPagingPage(options)) {
392
+ yield* page;
393
+ }
394
+ }
395
+
172
396
  /**
397
+ * List all monitors under the specified resource group.
173
398
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
174
- * @param monitorName Monitor resource name
175
- * @param options The optional parameters
176
- * @param callback The callback
399
+ * @param options The options parameters.
177
400
  */
178
- listLinkedResources(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LinkedResourceListResponse>): void;
179
- listLinkedResources(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LinkedResourceListResponse>, callback?: msRest.ServiceCallback<Models.LinkedResourceListResponse>): Promise<Models.MonitorsListLinkedResourcesResponse> {
180
- return this.client.sendOperationRequest(
181
- {
401
+ public listByResourceGroup(
402
+ resourceGroupName: string,
403
+ options?: MonitorsListByResourceGroupOptionalParams
404
+ ): PagedAsyncIterableIterator<DatadogMonitorResource> {
405
+ const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
406
+ return {
407
+ next() {
408
+ return iter.next();
409
+ },
410
+ [Symbol.asyncIterator]() {
411
+ return this;
412
+ },
413
+ byPage: () => {
414
+ return this.listByResourceGroupPagingPage(resourceGroupName, options);
415
+ }
416
+ };
417
+ }
418
+
419
+ private async *listByResourceGroupPagingPage(
420
+ resourceGroupName: string,
421
+ options?: MonitorsListByResourceGroupOptionalParams
422
+ ): AsyncIterableIterator<DatadogMonitorResource[]> {
423
+ let result = await this._listByResourceGroup(resourceGroupName, options);
424
+ yield result.value || [];
425
+ let continuationToken = result.nextLink;
426
+ while (continuationToken) {
427
+ result = await this._listByResourceGroupNext(
182
428
  resourceGroupName,
183
- monitorName,
429
+ continuationToken,
184
430
  options
185
- },
186
- listLinkedResourcesOperationSpec,
187
- callback) as Promise<Models.MonitorsListLinkedResourcesResponse>;
431
+ );
432
+ continuationToken = result.nextLink;
433
+ yield result.value || [];
434
+ }
435
+ }
436
+
437
+ private async *listByResourceGroupPagingAll(
438
+ resourceGroupName: string,
439
+ options?: MonitorsListByResourceGroupOptionalParams
440
+ ): AsyncIterableIterator<DatadogMonitorResource> {
441
+ for await (const page of this.listByResourceGroupPagingPage(
442
+ resourceGroupName,
443
+ options
444
+ )) {
445
+ yield* page;
446
+ }
188
447
  }
189
448
 
190
449
  /**
191
- * @summary List the resources currently being monitored by the Datadog monitor resource.
192
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
193
- * @param monitorName Monitor resource name
194
- * @param [options] The optional parameters
195
- * @returns Promise<Models.MonitorsListMonitoredResourcesResponse>
196
- */
197
- listMonitoredResources(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListMonitoredResourcesResponse>;
198
- /**
199
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
200
- * @param monitorName Monitor resource name
201
- * @param callback The callback
202
- */
203
- listMonitoredResources(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): void;
204
- /**
450
+ * List the api keys for a given monitor resource.
205
451
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
206
452
  * @param monitorName Monitor resource name
207
- * @param options The optional parameters
208
- * @param callback The callback
453
+ * @param options The options parameters.
209
454
  */
210
- listMonitoredResources(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): void;
211
- listMonitoredResources(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.MonitoredResourceListResponse>, callback?: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): Promise<Models.MonitorsListMonitoredResourcesResponse> {
455
+ private _listApiKeys(
456
+ resourceGroupName: string,
457
+ monitorName: string,
458
+ options?: MonitorsListApiKeysOptionalParams
459
+ ): Promise<MonitorsListApiKeysResponse> {
212
460
  return this.client.sendOperationRequest(
213
- {
214
- resourceGroupName,
215
- monitorName,
216
- options
217
- },
218
- listMonitoredResourcesOperationSpec,
219
- callback) as Promise<Models.MonitorsListMonitoredResourcesResponse>;
461
+ { resourceGroupName, monitorName, options },
462
+ listApiKeysOperationSpec
463
+ );
220
464
  }
221
465
 
222
466
  /**
223
- * @summary List all monitors under the specified subscription.
224
- * @param [options] The optional parameters
225
- * @returns Promise<Models.MonitorsListResponse>
226
- */
227
- list(options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListResponse>;
228
- /**
229
- * @param callback The callback
230
- */
231
- list(callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
232
- /**
233
- * @param options The optional parameters
234
- * @param callback The callback
467
+ * Get the default api key.
468
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
469
+ * @param monitorName Monitor resource name
470
+ * @param options The options parameters.
235
471
  */
236
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
237
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): Promise<Models.MonitorsListResponse> {
472
+ getDefaultKey(
473
+ resourceGroupName: string,
474
+ monitorName: string,
475
+ options?: MonitorsGetDefaultKeyOptionalParams
476
+ ): Promise<MonitorsGetDefaultKeyResponse> {
238
477
  return this.client.sendOperationRequest(
239
- {
240
- options
241
- },
242
- listOperationSpec,
243
- callback) as Promise<Models.MonitorsListResponse>;
478
+ { resourceGroupName, monitorName, options },
479
+ getDefaultKeyOperationSpec
480
+ );
244
481
  }
245
482
 
246
483
  /**
247
- * @summary List all monitors under the specified resource group.
248
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
249
- * @param [options] The optional parameters
250
- * @returns Promise<Models.MonitorsListByResourceGroupResponse>
251
- */
252
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListByResourceGroupResponse>;
253
- /**
254
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
255
- * @param callback The callback
256
- */
257
- listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
258
- /**
484
+ * Set the default api key.
259
485
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
260
- * @param options The optional parameters
261
- * @param callback The callback
486
+ * @param monitorName Monitor resource name
487
+ * @param options The options parameters.
262
488
  */
263
- listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
264
- listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): Promise<Models.MonitorsListByResourceGroupResponse> {
489
+ setDefaultKey(
490
+ resourceGroupName: string,
491
+ monitorName: string,
492
+ options?: MonitorsSetDefaultKeyOptionalParams
493
+ ): Promise<void> {
265
494
  return this.client.sendOperationRequest(
266
- {
267
- resourceGroupName,
268
- options
269
- },
270
- listByResourceGroupOperationSpec,
271
- callback) as Promise<Models.MonitorsListByResourceGroupResponse>;
495
+ { resourceGroupName, monitorName, options },
496
+ setDefaultKeyOperationSpec
497
+ );
272
498
  }
273
499
 
274
500
  /**
275
- * @summary Get the properties of a specific monitor resource.
501
+ * List the hosts for a given monitor resource.
276
502
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
277
503
  * @param monitorName Monitor resource name
278
- * @param [options] The optional parameters
279
- * @returns Promise<Models.MonitorsGetResponse>
504
+ * @param options The options parameters.
280
505
  */
281
- get(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsGetResponse>;
506
+ private _listHosts(
507
+ resourceGroupName: string,
508
+ monitorName: string,
509
+ options?: MonitorsListHostsOptionalParams
510
+ ): Promise<MonitorsListHostsResponse> {
511
+ return this.client.sendOperationRequest(
512
+ { resourceGroupName, monitorName, options },
513
+ listHostsOperationSpec
514
+ );
515
+ }
516
+
282
517
  /**
518
+ * List all Azure resources associated to the same Datadog organization as the target resource.
283
519
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
284
520
  * @param monitorName Monitor resource name
285
- * @param callback The callback
521
+ * @param options The options parameters.
286
522
  */
287
- get(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogMonitorResource>): void;
523
+ private _listLinkedResources(
524
+ resourceGroupName: string,
525
+ monitorName: string,
526
+ options?: MonitorsListLinkedResourcesOptionalParams
527
+ ): Promise<MonitorsListLinkedResourcesResponse> {
528
+ return this.client.sendOperationRequest(
529
+ { resourceGroupName, monitorName, options },
530
+ listLinkedResourcesOperationSpec
531
+ );
532
+ }
533
+
288
534
  /**
535
+ * List the resources currently being monitored by the Datadog monitor resource.
289
536
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
290
537
  * @param monitorName Monitor resource name
291
- * @param options The optional parameters
292
- * @param callback The callback
538
+ * @param options The options parameters.
293
539
  */
294
- get(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogMonitorResource>): void;
295
- get(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogMonitorResource>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResource>): Promise<Models.MonitorsGetResponse> {
540
+ private _listMonitoredResources(
541
+ resourceGroupName: string,
542
+ monitorName: string,
543
+ options?: MonitorsListMonitoredResourcesOptionalParams
544
+ ): Promise<MonitorsListMonitoredResourcesResponse> {
296
545
  return this.client.sendOperationRequest(
297
- {
298
- resourceGroupName,
299
- monitorName,
300
- options
301
- },
302
- getOperationSpec,
303
- callback) as Promise<Models.MonitorsGetResponse>;
546
+ { resourceGroupName, monitorName, options },
547
+ listMonitoredResourcesOperationSpec
548
+ );
304
549
  }
305
550
 
306
551
  /**
307
- * @summary Create a monitor resource.
308
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
309
- * @param monitorName Monitor resource name
310
- * @param [options] The optional parameters
311
- * @returns Promise<Models.MonitorsCreateResponse>
552
+ * List all monitors under the specified subscription.
553
+ * @param options The options parameters.
312
554
  */
313
- create(resourceGroupName: string, monitorName: string, options?: Models.MonitorsCreateOptionalParams): Promise<Models.MonitorsCreateResponse> {
314
- return this.beginCreate(resourceGroupName,monitorName,options)
315
- .then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.MonitorsCreateResponse>;
555
+ private _list(
556
+ options?: MonitorsListOptionalParams
557
+ ): Promise<MonitorsListResponse> {
558
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
316
559
  }
317
560
 
318
561
  /**
319
- * @summary Update a monitor resource.
562
+ * List all monitors under the specified resource group.
320
563
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
321
- * @param monitorName Monitor resource name
322
- * @param [options] The optional parameters
323
- * @returns Promise<Models.MonitorsUpdateResponse>
564
+ * @param options The options parameters.
324
565
  */
325
- update(resourceGroupName: string, monitorName: string, options?: Models.MonitorsUpdateOptionalParams): Promise<Models.MonitorsUpdateResponse>;
566
+ private _listByResourceGroup(
567
+ resourceGroupName: string,
568
+ options?: MonitorsListByResourceGroupOptionalParams
569
+ ): Promise<MonitorsListByResourceGroupResponse> {
570
+ return this.client.sendOperationRequest(
571
+ { resourceGroupName, options },
572
+ listByResourceGroupOperationSpec
573
+ );
574
+ }
575
+
326
576
  /**
577
+ * Get the properties of a specific monitor resource.
327
578
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
328
579
  * @param monitorName Monitor resource name
329
- * @param callback The callback
580
+ * @param options The options parameters.
330
581
  */
331
- update(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogMonitorResource>): void;
582
+ get(
583
+ resourceGroupName: string,
584
+ monitorName: string,
585
+ options?: MonitorsGetOptionalParams
586
+ ): Promise<MonitorsGetResponse> {
587
+ return this.client.sendOperationRequest(
588
+ { resourceGroupName, monitorName, options },
589
+ getOperationSpec
590
+ );
591
+ }
592
+
332
593
  /**
594
+ * Create a monitor resource.
333
595
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
334
596
  * @param monitorName Monitor resource name
335
- * @param options The optional parameters
336
- * @param callback The callback
597
+ * @param options The options parameters.
337
598
  */
338
- update(resourceGroupName: string, monitorName: string, options: Models.MonitorsUpdateOptionalParams, callback: msRest.ServiceCallback<Models.DatadogMonitorResource>): void;
339
- update(resourceGroupName: string, monitorName: string, options?: Models.MonitorsUpdateOptionalParams | msRest.ServiceCallback<Models.DatadogMonitorResource>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResource>): Promise<Models.MonitorsUpdateResponse> {
340
- return this.client.sendOperationRequest(
341
- {
342
- resourceGroupName,
343
- monitorName,
344
- options
345
- },
346
- updateOperationSpec,
347
- callback) as Promise<Models.MonitorsUpdateResponse>;
599
+ async beginCreate(
600
+ resourceGroupName: string,
601
+ monitorName: string,
602
+ options?: MonitorsCreateOptionalParams
603
+ ): Promise<
604
+ PollerLike<
605
+ PollOperationState<MonitorsCreateResponse>,
606
+ MonitorsCreateResponse
607
+ >
608
+ > {
609
+ const directSendOperation = async (
610
+ args: coreClient.OperationArguments,
611
+ spec: coreClient.OperationSpec
612
+ ): Promise<MonitorsCreateResponse> => {
613
+ return this.client.sendOperationRequest(args, spec);
614
+ };
615
+ const sendOperation = async (
616
+ args: coreClient.OperationArguments,
617
+ spec: coreClient.OperationSpec
618
+ ) => {
619
+ let currentRawResponse:
620
+ | coreClient.FullOperationResponse
621
+ | undefined = undefined;
622
+ const providedCallback = args.options?.onResponse;
623
+ const callback: coreClient.RawResponseCallback = (
624
+ rawResponse: coreClient.FullOperationResponse,
625
+ flatResponse: unknown
626
+ ) => {
627
+ currentRawResponse = rawResponse;
628
+ providedCallback?.(rawResponse, flatResponse);
629
+ };
630
+ const updatedArgs = {
631
+ ...args,
632
+ options: {
633
+ ...args.options,
634
+ onResponse: callback
635
+ }
636
+ };
637
+ const flatResponse = await directSendOperation(updatedArgs, spec);
638
+ return {
639
+ flatResponse,
640
+ rawResponse: {
641
+ statusCode: currentRawResponse!.status,
642
+ body: currentRawResponse!.parsedBody,
643
+ headers: currentRawResponse!.headers.toJSON()
644
+ }
645
+ };
646
+ };
647
+
648
+ const lro = new LroImpl(
649
+ sendOperation,
650
+ { resourceGroupName, monitorName, options },
651
+ createOperationSpec
652
+ );
653
+ return new LroEngine(lro, {
654
+ resumeFrom: options?.resumeFrom,
655
+ intervalInMs: options?.updateIntervalInMs,
656
+ lroResourceLocationConfig: "azure-async-operation"
657
+ });
348
658
  }
349
659
 
350
660
  /**
351
- * @summary Delete a monitor resource.
661
+ * Create a monitor resource.
352
662
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
353
663
  * @param monitorName Monitor resource name
354
- * @param [options] The optional parameters
355
- * @returns Promise<msRest.RestResponse>
664
+ * @param options The options parameters.
356
665
  */
357
- deleteMethod(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
358
- return this.beginDeleteMethod(resourceGroupName,monitorName,options)
359
- .then(lroPoller => lroPoller.pollUntilFinished());
666
+ async beginCreateAndWait(
667
+ resourceGroupName: string,
668
+ monitorName: string,
669
+ options?: MonitorsCreateOptionalParams
670
+ ): Promise<MonitorsCreateResponse> {
671
+ const poller = await this.beginCreate(
672
+ resourceGroupName,
673
+ monitorName,
674
+ options
675
+ );
676
+ return poller.pollUntilDone();
360
677
  }
361
678
 
362
679
  /**
363
- * @summary Refresh the set password link and return a latest one.
680
+ * Update a monitor resource.
364
681
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
365
682
  * @param monitorName Monitor resource name
366
- * @param [options] The optional parameters
367
- * @returns Promise<Models.MonitorsRefreshSetPasswordLinkResponse>
683
+ * @param options The options parameters.
368
684
  */
369
- refreshSetPasswordLink(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsRefreshSetPasswordLinkResponse>;
685
+ async beginUpdate(
686
+ resourceGroupName: string,
687
+ monitorName: string,
688
+ options?: MonitorsUpdateOptionalParams
689
+ ): Promise<
690
+ PollerLike<
691
+ PollOperationState<MonitorsUpdateResponse>,
692
+ MonitorsUpdateResponse
693
+ >
694
+ > {
695
+ const directSendOperation = async (
696
+ args: coreClient.OperationArguments,
697
+ spec: coreClient.OperationSpec
698
+ ): Promise<MonitorsUpdateResponse> => {
699
+ return this.client.sendOperationRequest(args, spec);
700
+ };
701
+ const sendOperation = async (
702
+ args: coreClient.OperationArguments,
703
+ spec: coreClient.OperationSpec
704
+ ) => {
705
+ let currentRawResponse:
706
+ | coreClient.FullOperationResponse
707
+ | undefined = undefined;
708
+ const providedCallback = args.options?.onResponse;
709
+ const callback: coreClient.RawResponseCallback = (
710
+ rawResponse: coreClient.FullOperationResponse,
711
+ flatResponse: unknown
712
+ ) => {
713
+ currentRawResponse = rawResponse;
714
+ providedCallback?.(rawResponse, flatResponse);
715
+ };
716
+ const updatedArgs = {
717
+ ...args,
718
+ options: {
719
+ ...args.options,
720
+ onResponse: callback
721
+ }
722
+ };
723
+ const flatResponse = await directSendOperation(updatedArgs, spec);
724
+ return {
725
+ flatResponse,
726
+ rawResponse: {
727
+ statusCode: currentRawResponse!.status,
728
+ body: currentRawResponse!.parsedBody,
729
+ headers: currentRawResponse!.headers.toJSON()
730
+ }
731
+ };
732
+ };
733
+
734
+ const lro = new LroImpl(
735
+ sendOperation,
736
+ { resourceGroupName, monitorName, options },
737
+ updateOperationSpec
738
+ );
739
+ return new LroEngine(lro, {
740
+ resumeFrom: options?.resumeFrom,
741
+ intervalInMs: options?.updateIntervalInMs
742
+ });
743
+ }
744
+
370
745
  /**
746
+ * Update a monitor resource.
371
747
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
372
748
  * @param monitorName Monitor resource name
373
- * @param callback The callback
749
+ * @param options The options parameters.
374
750
  */
375
- refreshSetPasswordLink(resourceGroupName: string, monitorName: string, callback: msRest.ServiceCallback<Models.DatadogSetPasswordLink>): void;
751
+ async beginUpdateAndWait(
752
+ resourceGroupName: string,
753
+ monitorName: string,
754
+ options?: MonitorsUpdateOptionalParams
755
+ ): Promise<MonitorsUpdateResponse> {
756
+ const poller = await this.beginUpdate(
757
+ resourceGroupName,
758
+ monitorName,
759
+ options
760
+ );
761
+ return poller.pollUntilDone();
762
+ }
763
+
376
764
  /**
765
+ * Delete a monitor resource.
377
766
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
378
767
  * @param monitorName Monitor resource name
379
- * @param options The optional parameters
380
- * @param callback The callback
768
+ * @param options The options parameters.
381
769
  */
382
- refreshSetPasswordLink(resourceGroupName: string, monitorName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogSetPasswordLink>): void;
383
- refreshSetPasswordLink(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogSetPasswordLink>, callback?: msRest.ServiceCallback<Models.DatadogSetPasswordLink>): Promise<Models.MonitorsRefreshSetPasswordLinkResponse> {
384
- return this.client.sendOperationRequest(
385
- {
386
- resourceGroupName,
387
- monitorName,
388
- options
389
- },
390
- refreshSetPasswordLinkOperationSpec,
391
- callback) as Promise<Models.MonitorsRefreshSetPasswordLinkResponse>;
770
+ async beginDelete(
771
+ resourceGroupName: string,
772
+ monitorName: string,
773
+ options?: MonitorsDeleteOptionalParams
774
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
775
+ const directSendOperation = async (
776
+ args: coreClient.OperationArguments,
777
+ spec: coreClient.OperationSpec
778
+ ): Promise<void> => {
779
+ return this.client.sendOperationRequest(args, spec);
780
+ };
781
+ const sendOperation = async (
782
+ args: coreClient.OperationArguments,
783
+ spec: coreClient.OperationSpec
784
+ ) => {
785
+ let currentRawResponse:
786
+ | coreClient.FullOperationResponse
787
+ | undefined = undefined;
788
+ const providedCallback = args.options?.onResponse;
789
+ const callback: coreClient.RawResponseCallback = (
790
+ rawResponse: coreClient.FullOperationResponse,
791
+ flatResponse: unknown
792
+ ) => {
793
+ currentRawResponse = rawResponse;
794
+ providedCallback?.(rawResponse, flatResponse);
795
+ };
796
+ const updatedArgs = {
797
+ ...args,
798
+ options: {
799
+ ...args.options,
800
+ onResponse: callback
801
+ }
802
+ };
803
+ const flatResponse = await directSendOperation(updatedArgs, spec);
804
+ return {
805
+ flatResponse,
806
+ rawResponse: {
807
+ statusCode: currentRawResponse!.status,
808
+ body: currentRawResponse!.parsedBody,
809
+ headers: currentRawResponse!.headers.toJSON()
810
+ }
811
+ };
812
+ };
813
+
814
+ const lro = new LroImpl(
815
+ sendOperation,
816
+ { resourceGroupName, monitorName, options },
817
+ deleteOperationSpec
818
+ );
819
+ return new LroEngine(lro, {
820
+ resumeFrom: options?.resumeFrom,
821
+ intervalInMs: options?.updateIntervalInMs
822
+ });
392
823
  }
393
824
 
394
825
  /**
395
- * @summary Create a monitor resource.
826
+ * Delete a monitor resource.
396
827
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
397
828
  * @param monitorName Monitor resource name
398
- * @param [options] The optional parameters
399
- * @returns Promise<msRestAzure.LROPoller>
829
+ * @param options The options parameters.
400
830
  */
401
- beginCreate(resourceGroupName: string, monitorName: string, options?: Models.MonitorsBeginCreateOptionalParams): Promise<msRestAzure.LROPoller> {
402
- return this.client.sendLRORequest(
403
- {
404
- resourceGroupName,
405
- monitorName,
406
- options
407
- },
408
- beginCreateOperationSpec,
409
- options);
831
+ async beginDeleteAndWait(
832
+ resourceGroupName: string,
833
+ monitorName: string,
834
+ options?: MonitorsDeleteOptionalParams
835
+ ): Promise<void> {
836
+ const poller = await this.beginDelete(
837
+ resourceGroupName,
838
+ monitorName,
839
+ options
840
+ );
841
+ return poller.pollUntilDone();
410
842
  }
411
843
 
412
844
  /**
413
- * @summary Delete a monitor resource.
845
+ * Refresh the set password link and return a latest one.
414
846
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
415
847
  * @param monitorName Monitor resource name
416
- * @param [options] The optional parameters
417
- * @returns Promise<msRestAzure.LROPoller>
848
+ * @param options The options parameters.
418
849
  */
419
- beginDeleteMethod(resourceGroupName: string, monitorName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
420
- return this.client.sendLRORequest(
421
- {
422
- resourceGroupName,
423
- monitorName,
424
- options
425
- },
426
- beginDeleteMethodOperationSpec,
427
- options);
850
+ refreshSetPasswordLink(
851
+ resourceGroupName: string,
852
+ monitorName: string,
853
+ options?: MonitorsRefreshSetPasswordLinkOptionalParams
854
+ ): Promise<MonitorsRefreshSetPasswordLinkResponse> {
855
+ return this.client.sendOperationRequest(
856
+ { resourceGroupName, monitorName, options },
857
+ refreshSetPasswordLinkOperationSpec
858
+ );
428
859
  }
429
860
 
430
861
  /**
431
- * @summary List the api keys for a given monitor resource.
432
- * @param nextPageLink The NextLink from the previous successful call to List operation.
433
- * @param [options] The optional parameters
434
- * @returns Promise<Models.MonitorsListApiKeysNextResponse>
435
- */
436
- listApiKeysNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListApiKeysNextResponse>;
437
- /**
438
- * @param nextPageLink The NextLink from the previous successful call to List operation.
439
- * @param callback The callback
440
- */
441
- listApiKeysNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): void;
442
- /**
443
- * @param nextPageLink The NextLink from the previous successful call to List operation.
444
- * @param options The optional parameters
445
- * @param callback The callback
862
+ * ListApiKeysNext
863
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
864
+ * @param monitorName Monitor resource name
865
+ * @param nextLink The nextLink from the previous successful call to the ListApiKeys method.
866
+ * @param options The options parameters.
446
867
  */
447
- listApiKeysNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): void;
448
- listApiKeysNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogApiKeyListResponse>, callback?: msRest.ServiceCallback<Models.DatadogApiKeyListResponse>): Promise<Models.MonitorsListApiKeysNextResponse> {
868
+ private _listApiKeysNext(
869
+ resourceGroupName: string,
870
+ monitorName: string,
871
+ nextLink: string,
872
+ options?: MonitorsListApiKeysNextOptionalParams
873
+ ): Promise<MonitorsListApiKeysNextResponse> {
449
874
  return this.client.sendOperationRequest(
450
- {
451
- nextPageLink,
452
- options
453
- },
454
- listApiKeysNextOperationSpec,
455
- callback) as Promise<Models.MonitorsListApiKeysNextResponse>;
875
+ { resourceGroupName, monitorName, nextLink, options },
876
+ listApiKeysNextOperationSpec
877
+ );
456
878
  }
457
879
 
458
880
  /**
459
- * @summary List the hosts for a given monitor resource.
460
- * @param nextPageLink The NextLink from the previous successful call to List operation.
461
- * @param [options] The optional parameters
462
- * @returns Promise<Models.MonitorsListHostsNextResponse>
463
- */
464
- listHostsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListHostsNextResponse>;
465
- /**
466
- * @param nextPageLink The NextLink from the previous successful call to List operation.
467
- * @param callback The callback
468
- */
469
- listHostsNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DatadogHostListResponse>): void;
470
- /**
471
- * @param nextPageLink The NextLink from the previous successful call to List operation.
472
- * @param options The optional parameters
473
- * @param callback The callback
881
+ * ListHostsNext
882
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
883
+ * @param monitorName Monitor resource name
884
+ * @param nextLink The nextLink from the previous successful call to the ListHosts method.
885
+ * @param options The options parameters.
474
886
  */
475
- listHostsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogHostListResponse>): void;
476
- listHostsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogHostListResponse>, callback?: msRest.ServiceCallback<Models.DatadogHostListResponse>): Promise<Models.MonitorsListHostsNextResponse> {
887
+ private _listHostsNext(
888
+ resourceGroupName: string,
889
+ monitorName: string,
890
+ nextLink: string,
891
+ options?: MonitorsListHostsNextOptionalParams
892
+ ): Promise<MonitorsListHostsNextResponse> {
477
893
  return this.client.sendOperationRequest(
478
- {
479
- nextPageLink,
480
- options
481
- },
482
- listHostsNextOperationSpec,
483
- callback) as Promise<Models.MonitorsListHostsNextResponse>;
894
+ { resourceGroupName, monitorName, nextLink, options },
895
+ listHostsNextOperationSpec
896
+ );
484
897
  }
485
898
 
486
899
  /**
487
- * @summary List all Azure resources associated to the same Datadog organization as the target
488
- * resource.
489
- * @param nextPageLink The NextLink from the previous successful call to List operation.
490
- * @param [options] The optional parameters
491
- * @returns Promise<Models.MonitorsListLinkedResourcesNextResponse>
492
- */
493
- listLinkedResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListLinkedResourcesNextResponse>;
494
- /**
495
- * @param nextPageLink The NextLink from the previous successful call to List operation.
496
- * @param callback The callback
497
- */
498
- listLinkedResourcesNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.LinkedResourceListResponse>): void;
499
- /**
500
- * @param nextPageLink The NextLink from the previous successful call to List operation.
501
- * @param options The optional parameters
502
- * @param callback The callback
900
+ * ListLinkedResourcesNext
901
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
902
+ * @param monitorName Monitor resource name
903
+ * @param nextLink The nextLink from the previous successful call to the ListLinkedResources method.
904
+ * @param options The options parameters.
503
905
  */
504
- listLinkedResourcesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LinkedResourceListResponse>): void;
505
- listLinkedResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LinkedResourceListResponse>, callback?: msRest.ServiceCallback<Models.LinkedResourceListResponse>): Promise<Models.MonitorsListLinkedResourcesNextResponse> {
906
+ private _listLinkedResourcesNext(
907
+ resourceGroupName: string,
908
+ monitorName: string,
909
+ nextLink: string,
910
+ options?: MonitorsListLinkedResourcesNextOptionalParams
911
+ ): Promise<MonitorsListLinkedResourcesNextResponse> {
506
912
  return this.client.sendOperationRequest(
507
- {
508
- nextPageLink,
509
- options
510
- },
511
- listLinkedResourcesNextOperationSpec,
512
- callback) as Promise<Models.MonitorsListLinkedResourcesNextResponse>;
913
+ { resourceGroupName, monitorName, nextLink, options },
914
+ listLinkedResourcesNextOperationSpec
915
+ );
513
916
  }
514
917
 
515
918
  /**
516
- * @summary List the resources currently being monitored by the Datadog monitor resource.
517
- * @param nextPageLink The NextLink from the previous successful call to List operation.
518
- * @param [options] The optional parameters
519
- * @returns Promise<Models.MonitorsListMonitoredResourcesNextResponse>
520
- */
521
- listMonitoredResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListMonitoredResourcesNextResponse>;
522
- /**
523
- * @param nextPageLink The NextLink from the previous successful call to List operation.
524
- * @param callback The callback
525
- */
526
- listMonitoredResourcesNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): void;
527
- /**
528
- * @param nextPageLink The NextLink from the previous successful call to List operation.
529
- * @param options The optional parameters
530
- * @param callback The callback
919
+ * ListMonitoredResourcesNext
920
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
921
+ * @param monitorName Monitor resource name
922
+ * @param nextLink The nextLink from the previous successful call to the ListMonitoredResources method.
923
+ * @param options The options parameters.
531
924
  */
532
- listMonitoredResourcesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): void;
533
- listMonitoredResourcesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.MonitoredResourceListResponse>, callback?: msRest.ServiceCallback<Models.MonitoredResourceListResponse>): Promise<Models.MonitorsListMonitoredResourcesNextResponse> {
925
+ private _listMonitoredResourcesNext(
926
+ resourceGroupName: string,
927
+ monitorName: string,
928
+ nextLink: string,
929
+ options?: MonitorsListMonitoredResourcesNextOptionalParams
930
+ ): Promise<MonitorsListMonitoredResourcesNextResponse> {
534
931
  return this.client.sendOperationRequest(
535
- {
536
- nextPageLink,
537
- options
538
- },
539
- listMonitoredResourcesNextOperationSpec,
540
- callback) as Promise<Models.MonitorsListMonitoredResourcesNextResponse>;
932
+ { resourceGroupName, monitorName, nextLink, options },
933
+ listMonitoredResourcesNextOperationSpec
934
+ );
541
935
  }
542
936
 
543
937
  /**
544
- * @summary List all monitors under the specified subscription.
545
- * @param nextPageLink The NextLink from the previous successful call to List operation.
546
- * @param [options] The optional parameters
547
- * @returns Promise<Models.MonitorsListNextResponse>
938
+ * ListNext
939
+ * @param nextLink The nextLink from the previous successful call to the List method.
940
+ * @param options The options parameters.
548
941
  */
549
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListNextResponse>;
550
- /**
551
- * @param nextPageLink The NextLink from the previous successful call to List operation.
552
- * @param callback The callback
553
- */
554
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
555
- /**
556
- * @param nextPageLink The NextLink from the previous successful call to List operation.
557
- * @param options The optional parameters
558
- * @param callback The callback
559
- */
560
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
561
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): Promise<Models.MonitorsListNextResponse> {
942
+ private _listNext(
943
+ nextLink: string,
944
+ options?: MonitorsListNextOptionalParams
945
+ ): Promise<MonitorsListNextResponse> {
562
946
  return this.client.sendOperationRequest(
563
- {
564
- nextPageLink,
565
- options
566
- },
567
- listNextOperationSpec,
568
- callback) as Promise<Models.MonitorsListNextResponse>;
947
+ { nextLink, options },
948
+ listNextOperationSpec
949
+ );
569
950
  }
570
951
 
571
952
  /**
572
- * @summary List all monitors under the specified resource group.
573
- * @param nextPageLink The NextLink from the previous successful call to List operation.
574
- * @param [options] The optional parameters
575
- * @returns Promise<Models.MonitorsListByResourceGroupNextResponse>
576
- */
577
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.MonitorsListByResourceGroupNextResponse>;
578
- /**
579
- * @param nextPageLink The NextLink from the previous successful call to List operation.
580
- * @param callback The callback
581
- */
582
- listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
583
- /**
584
- * @param nextPageLink The NextLink from the previous successful call to List operation.
585
- * @param options The optional parameters
586
- * @param callback The callback
953
+ * ListByResourceGroupNext
954
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
955
+ * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
956
+ * @param options The options parameters.
587
957
  */
588
- listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): void;
589
- listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>, callback?: msRest.ServiceCallback<Models.DatadogMonitorResourceListResponse>): Promise<Models.MonitorsListByResourceGroupNextResponse> {
958
+ private _listByResourceGroupNext(
959
+ resourceGroupName: string,
960
+ nextLink: string,
961
+ options?: MonitorsListByResourceGroupNextOptionalParams
962
+ ): Promise<MonitorsListByResourceGroupNextResponse> {
590
963
  return this.client.sendOperationRequest(
591
- {
592
- nextPageLink,
593
- options
594
- },
595
- listByResourceGroupNextOperationSpec,
596
- callback) as Promise<Models.MonitorsListByResourceGroupNextResponse>;
964
+ { resourceGroupName, nextLink, options },
965
+ listByResourceGroupNextOperationSpec
966
+ );
597
967
  }
598
968
  }
599
-
600
969
  // Operation Specifications
601
- const serializer = new msRest.Serializer(Mappers);
602
- const listApiKeysOperationSpec: msRest.OperationSpec = {
970
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
971
+
972
+ const listApiKeysOperationSpec: coreClient.OperationSpec = {
973
+ path:
974
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys",
603
975
  httpMethod: "POST",
604
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys",
605
- urlParameters: [
606
- Parameters.subscriptionId,
607
- Parameters.resourceGroupName,
608
- Parameters.monitorName
609
- ],
610
- queryParameters: [
611
- Parameters.apiVersion
612
- ],
613
- headerParameters: [
614
- Parameters.acceptLanguage
615
- ],
616
976
  responses: {
617
977
  200: {
618
978
  bodyMapper: Mappers.DatadogApiKeyListResponse
@@ -621,23 +981,20 @@ const listApiKeysOperationSpec: msRest.OperationSpec = {
621
981
  bodyMapper: Mappers.ErrorResponse
622
982
  }
623
983
  },
624
- serializer
625
- };
626
-
627
- const getDefaultKeyOperationSpec: msRest.OperationSpec = {
628
- httpMethod: "POST",
629
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getDefaultKey",
984
+ queryParameters: [Parameters.apiVersion],
630
985
  urlParameters: [
986
+ Parameters.$host,
631
987
  Parameters.subscriptionId,
632
988
  Parameters.resourceGroupName,
633
989
  Parameters.monitorName
634
990
  ],
635
- queryParameters: [
636
- Parameters.apiVersion
637
- ],
638
- headerParameters: [
639
- Parameters.acceptLanguage
640
- ],
991
+ headerParameters: [Parameters.accept],
992
+ serializer
993
+ };
994
+ const getDefaultKeyOperationSpec: coreClient.OperationSpec = {
995
+ path:
996
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getDefaultKey",
997
+ httpMethod: "POST",
641
998
  responses: {
642
999
  200: {
643
1000
  bodyMapper: Mappers.DatadogApiKey
@@ -646,53 +1003,42 @@ const getDefaultKeyOperationSpec: msRest.OperationSpec = {
646
1003
  bodyMapper: Mappers.ErrorResponse
647
1004
  }
648
1005
  },
649
- serializer
650
- };
651
-
652
- const setDefaultKeyOperationSpec: msRest.OperationSpec = {
653
- httpMethod: "POST",
654
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey",
1006
+ queryParameters: [Parameters.apiVersion],
655
1007
  urlParameters: [
1008
+ Parameters.$host,
656
1009
  Parameters.subscriptionId,
657
1010
  Parameters.resourceGroupName,
658
1011
  Parameters.monitorName
659
1012
  ],
660
- queryParameters: [
661
- Parameters.apiVersion
662
- ],
663
- headerParameters: [
664
- Parameters.acceptLanguage
665
- ],
666
- requestBody: {
667
- parameterPath: [
668
- "options",
669
- "body"
670
- ],
671
- mapper: Mappers.DatadogApiKey
672
- },
1013
+ headerParameters: [Parameters.accept],
1014
+ serializer
1015
+ };
1016
+ const setDefaultKeyOperationSpec: coreClient.OperationSpec = {
1017
+ path:
1018
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey",
1019
+ httpMethod: "POST",
673
1020
  responses: {
674
1021
  200: {},
675
1022
  default: {
676
1023
  bodyMapper: Mappers.ErrorResponse
677
1024
  }
678
1025
  },
679
- serializer
680
- };
681
-
682
- const listHostsOperationSpec: msRest.OperationSpec = {
683
- httpMethod: "POST",
684
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts",
1026
+ requestBody: Parameters.body1,
1027
+ queryParameters: [Parameters.apiVersion],
685
1028
  urlParameters: [
1029
+ Parameters.$host,
686
1030
  Parameters.subscriptionId,
687
1031
  Parameters.resourceGroupName,
688
1032
  Parameters.monitorName
689
1033
  ],
690
- queryParameters: [
691
- Parameters.apiVersion
692
- ],
693
- headerParameters: [
694
- Parameters.acceptLanguage
695
- ],
1034
+ headerParameters: [Parameters.accept, Parameters.contentType],
1035
+ mediaType: "json",
1036
+ serializer
1037
+ };
1038
+ const listHostsOperationSpec: coreClient.OperationSpec = {
1039
+ path:
1040
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts",
1041
+ httpMethod: "POST",
696
1042
  responses: {
697
1043
  200: {
698
1044
  bodyMapper: Mappers.DatadogHostListResponse
@@ -701,23 +1047,20 @@ const listHostsOperationSpec: msRest.OperationSpec = {
701
1047
  bodyMapper: Mappers.ErrorResponse
702
1048
  }
703
1049
  },
704
- serializer
705
- };
706
-
707
- const listLinkedResourcesOperationSpec: msRest.OperationSpec = {
708
- httpMethod: "POST",
709
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources",
1050
+ queryParameters: [Parameters.apiVersion],
710
1051
  urlParameters: [
1052
+ Parameters.$host,
711
1053
  Parameters.subscriptionId,
712
1054
  Parameters.resourceGroupName,
713
1055
  Parameters.monitorName
714
1056
  ],
715
- queryParameters: [
716
- Parameters.apiVersion
717
- ],
718
- headerParameters: [
719
- Parameters.acceptLanguage
720
- ],
1057
+ headerParameters: [Parameters.accept],
1058
+ serializer
1059
+ };
1060
+ const listLinkedResourcesOperationSpec: coreClient.OperationSpec = {
1061
+ path:
1062
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources",
1063
+ httpMethod: "POST",
721
1064
  responses: {
722
1065
  200: {
723
1066
  bodyMapper: Mappers.LinkedResourceListResponse
@@ -726,23 +1069,20 @@ const listLinkedResourcesOperationSpec: msRest.OperationSpec = {
726
1069
  bodyMapper: Mappers.ErrorResponse
727
1070
  }
728
1071
  },
729
- serializer
730
- };
731
-
732
- const listMonitoredResourcesOperationSpec: msRest.OperationSpec = {
733
- httpMethod: "POST",
734
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources",
1072
+ queryParameters: [Parameters.apiVersion],
735
1073
  urlParameters: [
1074
+ Parameters.$host,
736
1075
  Parameters.subscriptionId,
737
1076
  Parameters.resourceGroupName,
738
1077
  Parameters.monitorName
739
1078
  ],
740
- queryParameters: [
741
- Parameters.apiVersion
742
- ],
743
- headerParameters: [
744
- Parameters.acceptLanguage
745
- ],
1079
+ headerParameters: [Parameters.accept],
1080
+ serializer
1081
+ };
1082
+ const listMonitoredResourcesOperationSpec: coreClient.OperationSpec = {
1083
+ path:
1084
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources",
1085
+ httpMethod: "POST",
746
1086
  responses: {
747
1087
  200: {
748
1088
  bodyMapper: Mappers.MonitoredResourceListResponse
@@ -751,21 +1091,19 @@ const listMonitoredResourcesOperationSpec: msRest.OperationSpec = {
751
1091
  bodyMapper: Mappers.ErrorResponse
752
1092
  }
753
1093
  },
1094
+ queryParameters: [Parameters.apiVersion],
1095
+ urlParameters: [
1096
+ Parameters.$host,
1097
+ Parameters.subscriptionId,
1098
+ Parameters.resourceGroupName,
1099
+ Parameters.monitorName
1100
+ ],
1101
+ headerParameters: [Parameters.accept],
754
1102
  serializer
755
1103
  };
756
-
757
- const listOperationSpec: msRest.OperationSpec = {
1104
+ const listOperationSpec: coreClient.OperationSpec = {
1105
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/monitors",
758
1106
  httpMethod: "GET",
759
- path: "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/monitors",
760
- urlParameters: [
761
- Parameters.subscriptionId
762
- ],
763
- queryParameters: [
764
- Parameters.apiVersion
765
- ],
766
- headerParameters: [
767
- Parameters.acceptLanguage
768
- ],
769
1107
  responses: {
770
1108
  200: {
771
1109
  bodyMapper: Mappers.DatadogMonitorResourceListResponse
@@ -774,22 +1112,15 @@ const listOperationSpec: msRest.OperationSpec = {
774
1112
  bodyMapper: Mappers.ErrorResponse
775
1113
  }
776
1114
  },
1115
+ queryParameters: [Parameters.apiVersion],
1116
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
1117
+ headerParameters: [Parameters.accept],
777
1118
  serializer
778
1119
  };
779
-
780
- const listByResourceGroupOperationSpec: msRest.OperationSpec = {
1120
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
1121
+ path:
1122
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors",
781
1123
  httpMethod: "GET",
782
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors",
783
- urlParameters: [
784
- Parameters.subscriptionId,
785
- Parameters.resourceGroupName
786
- ],
787
- queryParameters: [
788
- Parameters.apiVersion
789
- ],
790
- headerParameters: [
791
- Parameters.acceptLanguage
792
- ],
793
1124
  responses: {
794
1125
  200: {
795
1126
  bodyMapper: Mappers.DatadogMonitorResourceListResponse
@@ -798,23 +1129,19 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = {
798
1129
  bodyMapper: Mappers.ErrorResponse
799
1130
  }
800
1131
  },
801
- serializer
802
- };
803
-
804
- const getOperationSpec: msRest.OperationSpec = {
805
- httpMethod: "GET",
806
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1132
+ queryParameters: [Parameters.apiVersion],
807
1133
  urlParameters: [
1134
+ Parameters.$host,
808
1135
  Parameters.subscriptionId,
809
- Parameters.resourceGroupName,
810
- Parameters.monitorName
811
- ],
812
- queryParameters: [
813
- Parameters.apiVersion
814
- ],
815
- headerParameters: [
816
- Parameters.acceptLanguage
1136
+ Parameters.resourceGroupName
817
1137
  ],
1138
+ headerParameters: [Parameters.accept],
1139
+ serializer
1140
+ };
1141
+ const getOperationSpec: coreClient.OperationSpec = {
1142
+ path:
1143
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1144
+ httpMethod: "GET",
818
1145
  responses: {
819
1146
  200: {
820
1147
  bodyMapper: Mappers.DatadogMonitorResource
@@ -823,87 +1150,53 @@ const getOperationSpec: msRest.OperationSpec = {
823
1150
  bodyMapper: Mappers.ErrorResponse
824
1151
  }
825
1152
  },
826
- serializer
827
- };
828
-
829
- const updateOperationSpec: msRest.OperationSpec = {
830
- httpMethod: "PATCH",
831
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1153
+ queryParameters: [Parameters.apiVersion],
832
1154
  urlParameters: [
1155
+ Parameters.$host,
833
1156
  Parameters.subscriptionId,
834
1157
  Parameters.resourceGroupName,
835
1158
  Parameters.monitorName
836
1159
  ],
837
- queryParameters: [
838
- Parameters.apiVersion
839
- ],
840
- headerParameters: [
841
- Parameters.acceptLanguage
842
- ],
843
- requestBody: {
844
- parameterPath: [
845
- "options",
846
- "body"
847
- ],
848
- mapper: Mappers.DatadogMonitorResourceUpdateParameters
849
- },
1160
+ headerParameters: [Parameters.accept],
1161
+ serializer
1162
+ };
1163
+ const createOperationSpec: coreClient.OperationSpec = {
1164
+ path:
1165
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1166
+ httpMethod: "PUT",
850
1167
  responses: {
851
1168
  200: {
852
1169
  bodyMapper: Mappers.DatadogMonitorResource
853
1170
  },
1171
+ 201: {
1172
+ bodyMapper: Mappers.DatadogMonitorResource
1173
+ },
1174
+ 202: {
1175
+ bodyMapper: Mappers.DatadogMonitorResource
1176
+ },
1177
+ 204: {
1178
+ bodyMapper: Mappers.DatadogMonitorResource
1179
+ },
854
1180
  default: {
855
1181
  bodyMapper: Mappers.ErrorResponse
856
1182
  }
857
1183
  },
858
- serializer
859
- };
860
-
861
- const refreshSetPasswordLinkOperationSpec: msRest.OperationSpec = {
862
- httpMethod: "POST",
863
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/refreshSetPasswordLink",
1184
+ requestBody: Parameters.body2,
1185
+ queryParameters: [Parameters.apiVersion],
864
1186
  urlParameters: [
1187
+ Parameters.$host,
865
1188
  Parameters.subscriptionId,
866
1189
  Parameters.resourceGroupName,
867
1190
  Parameters.monitorName
868
1191
  ],
869
- queryParameters: [
870
- Parameters.apiVersion
871
- ],
872
- headerParameters: [
873
- Parameters.acceptLanguage
874
- ],
875
- responses: {
876
- 200: {
877
- bodyMapper: Mappers.DatadogSetPasswordLink
878
- },
879
- default: {
880
- bodyMapper: Mappers.ErrorResponse
881
- }
882
- },
1192
+ headerParameters: [Parameters.accept, Parameters.contentType],
1193
+ mediaType: "json",
883
1194
  serializer
884
1195
  };
885
-
886
- const beginCreateOperationSpec: msRest.OperationSpec = {
887
- httpMethod: "PUT",
888
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
889
- urlParameters: [
890
- Parameters.subscriptionId,
891
- Parameters.resourceGroupName,
892
- Parameters.monitorName
893
- ],
894
- queryParameters: [
895
- Parameters.apiVersion
896
- ],
897
- headerParameters: [
898
- Parameters.acceptLanguage
899
- ],
900
- requestBody: {
901
- parameterPath: [
902
- "options",
903
- "body"
904
- ],
905
- mapper: Mappers.DatadogMonitorResource
906
- },
1196
+ const updateOperationSpec: coreClient.OperationSpec = {
1197
+ path:
1198
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1199
+ httpMethod: "PATCH",
907
1200
  responses: {
908
1201
  200: {
909
1202
  bodyMapper: Mappers.DatadogMonitorResource
@@ -911,51 +1204,76 @@ const beginCreateOperationSpec: msRest.OperationSpec = {
911
1204
  201: {
912
1205
  bodyMapper: Mappers.DatadogMonitorResource
913
1206
  },
1207
+ 202: {
1208
+ bodyMapper: Mappers.DatadogMonitorResource
1209
+ },
1210
+ 204: {
1211
+ bodyMapper: Mappers.DatadogMonitorResource
1212
+ },
914
1213
  default: {
915
1214
  bodyMapper: Mappers.ErrorResponse
916
1215
  }
917
1216
  },
918
- serializer
919
- };
920
-
921
- const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
922
- httpMethod: "DELETE",
923
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1217
+ requestBody: Parameters.body3,
1218
+ queryParameters: [Parameters.apiVersion],
924
1219
  urlParameters: [
1220
+ Parameters.$host,
925
1221
  Parameters.subscriptionId,
926
1222
  Parameters.resourceGroupName,
927
1223
  Parameters.monitorName
928
1224
  ],
929
- queryParameters: [
930
- Parameters.apiVersion
931
- ],
932
- headerParameters: [
933
- Parameters.acceptLanguage
934
- ],
1225
+ headerParameters: [Parameters.accept, Parameters.contentType],
1226
+ mediaType: "json",
1227
+ serializer
1228
+ };
1229
+ const deleteOperationSpec: coreClient.OperationSpec = {
1230
+ path:
1231
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
1232
+ httpMethod: "DELETE",
935
1233
  responses: {
936
1234
  200: {},
1235
+ 201: {},
937
1236
  202: {},
938
1237
  204: {},
939
1238
  default: {
940
1239
  bodyMapper: Mappers.ErrorResponse
941
1240
  }
942
1241
  },
1242
+ queryParameters: [Parameters.apiVersion],
1243
+ urlParameters: [
1244
+ Parameters.$host,
1245
+ Parameters.subscriptionId,
1246
+ Parameters.resourceGroupName,
1247
+ Parameters.monitorName
1248
+ ],
1249
+ headerParameters: [Parameters.accept],
943
1250
  serializer
944
1251
  };
945
-
946
- const listApiKeysNextOperationSpec: msRest.OperationSpec = {
1252
+ const refreshSetPasswordLinkOperationSpec: coreClient.OperationSpec = {
1253
+ path:
1254
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/refreshSetPasswordLink",
947
1255
  httpMethod: "POST",
948
- baseUrl: "https://management.azure.com",
949
- path: "{nextLink}",
1256
+ responses: {
1257
+ 200: {
1258
+ bodyMapper: Mappers.DatadogSetPasswordLink
1259
+ },
1260
+ default: {
1261
+ bodyMapper: Mappers.ErrorResponse
1262
+ }
1263
+ },
1264
+ queryParameters: [Parameters.apiVersion],
950
1265
  urlParameters: [
951
- Parameters.nextPageLink
952
- ],
953
- queryParameters: [
954
- Parameters.apiVersion
955
- ],
956
- headerParameters: [
957
- Parameters.acceptLanguage
1266
+ Parameters.$host,
1267
+ Parameters.subscriptionId,
1268
+ Parameters.resourceGroupName,
1269
+ Parameters.monitorName
958
1270
  ],
1271
+ headerParameters: [Parameters.accept],
1272
+ serializer
1273
+ };
1274
+ const listApiKeysNextOperationSpec: coreClient.OperationSpec = {
1275
+ path: "{nextLink}",
1276
+ httpMethod: "GET",
959
1277
  responses: {
960
1278
  200: {
961
1279
  bodyMapper: Mappers.DatadogApiKeyListResponse
@@ -964,22 +1282,20 @@ const listApiKeysNextOperationSpec: msRest.OperationSpec = {
964
1282
  bodyMapper: Mappers.ErrorResponse
965
1283
  }
966
1284
  },
1285
+ queryParameters: [Parameters.apiVersion],
1286
+ urlParameters: [
1287
+ Parameters.$host,
1288
+ Parameters.subscriptionId,
1289
+ Parameters.nextLink,
1290
+ Parameters.resourceGroupName,
1291
+ Parameters.monitorName
1292
+ ],
1293
+ headerParameters: [Parameters.accept],
967
1294
  serializer
968
1295
  };
969
-
970
- const listHostsNextOperationSpec: msRest.OperationSpec = {
971
- httpMethod: "POST",
972
- baseUrl: "https://management.azure.com",
1296
+ const listHostsNextOperationSpec: coreClient.OperationSpec = {
973
1297
  path: "{nextLink}",
974
- urlParameters: [
975
- Parameters.nextPageLink
976
- ],
977
- queryParameters: [
978
- Parameters.apiVersion
979
- ],
980
- headerParameters: [
981
- Parameters.acceptLanguage
982
- ],
1298
+ httpMethod: "GET",
983
1299
  responses: {
984
1300
  200: {
985
1301
  bodyMapper: Mappers.DatadogHostListResponse
@@ -988,22 +1304,20 @@ const listHostsNextOperationSpec: msRest.OperationSpec = {
988
1304
  bodyMapper: Mappers.ErrorResponse
989
1305
  }
990
1306
  },
1307
+ queryParameters: [Parameters.apiVersion],
1308
+ urlParameters: [
1309
+ Parameters.$host,
1310
+ Parameters.subscriptionId,
1311
+ Parameters.nextLink,
1312
+ Parameters.resourceGroupName,
1313
+ Parameters.monitorName
1314
+ ],
1315
+ headerParameters: [Parameters.accept],
991
1316
  serializer
992
1317
  };
993
-
994
- const listLinkedResourcesNextOperationSpec: msRest.OperationSpec = {
995
- httpMethod: "POST",
996
- baseUrl: "https://management.azure.com",
1318
+ const listLinkedResourcesNextOperationSpec: coreClient.OperationSpec = {
997
1319
  path: "{nextLink}",
998
- urlParameters: [
999
- Parameters.nextPageLink
1000
- ],
1001
- queryParameters: [
1002
- Parameters.apiVersion
1003
- ],
1004
- headerParameters: [
1005
- Parameters.acceptLanguage
1006
- ],
1320
+ httpMethod: "GET",
1007
1321
  responses: {
1008
1322
  200: {
1009
1323
  bodyMapper: Mappers.LinkedResourceListResponse
@@ -1012,22 +1326,20 @@ const listLinkedResourcesNextOperationSpec: msRest.OperationSpec = {
1012
1326
  bodyMapper: Mappers.ErrorResponse
1013
1327
  }
1014
1328
  },
1329
+ queryParameters: [Parameters.apiVersion],
1330
+ urlParameters: [
1331
+ Parameters.$host,
1332
+ Parameters.subscriptionId,
1333
+ Parameters.nextLink,
1334
+ Parameters.resourceGroupName,
1335
+ Parameters.monitorName
1336
+ ],
1337
+ headerParameters: [Parameters.accept],
1015
1338
  serializer
1016
1339
  };
1017
-
1018
- const listMonitoredResourcesNextOperationSpec: msRest.OperationSpec = {
1019
- httpMethod: "POST",
1020
- baseUrl: "https://management.azure.com",
1340
+ const listMonitoredResourcesNextOperationSpec: coreClient.OperationSpec = {
1021
1341
  path: "{nextLink}",
1022
- urlParameters: [
1023
- Parameters.nextPageLink
1024
- ],
1025
- queryParameters: [
1026
- Parameters.apiVersion
1027
- ],
1028
- headerParameters: [
1029
- Parameters.acceptLanguage
1030
- ],
1342
+ httpMethod: "GET",
1031
1343
  responses: {
1032
1344
  200: {
1033
1345
  bodyMapper: Mappers.MonitoredResourceListResponse
@@ -1036,22 +1348,20 @@ const listMonitoredResourcesNextOperationSpec: msRest.OperationSpec = {
1036
1348
  bodyMapper: Mappers.ErrorResponse
1037
1349
  }
1038
1350
  },
1351
+ queryParameters: [Parameters.apiVersion],
1352
+ urlParameters: [
1353
+ Parameters.$host,
1354
+ Parameters.subscriptionId,
1355
+ Parameters.nextLink,
1356
+ Parameters.resourceGroupName,
1357
+ Parameters.monitorName
1358
+ ],
1359
+ headerParameters: [Parameters.accept],
1039
1360
  serializer
1040
1361
  };
1041
-
1042
- const listNextOperationSpec: msRest.OperationSpec = {
1043
- httpMethod: "GET",
1044
- baseUrl: "https://management.azure.com",
1362
+ const listNextOperationSpec: coreClient.OperationSpec = {
1045
1363
  path: "{nextLink}",
1046
- urlParameters: [
1047
- Parameters.nextPageLink
1048
- ],
1049
- queryParameters: [
1050
- Parameters.apiVersion
1051
- ],
1052
- headerParameters: [
1053
- Parameters.acceptLanguage
1054
- ],
1364
+ httpMethod: "GET",
1055
1365
  responses: {
1056
1366
  200: {
1057
1367
  bodyMapper: Mappers.DatadogMonitorResourceListResponse
@@ -1060,22 +1370,18 @@ const listNextOperationSpec: msRest.OperationSpec = {
1060
1370
  bodyMapper: Mappers.ErrorResponse
1061
1371
  }
1062
1372
  },
1373
+ queryParameters: [Parameters.apiVersion],
1374
+ urlParameters: [
1375
+ Parameters.$host,
1376
+ Parameters.subscriptionId,
1377
+ Parameters.nextLink
1378
+ ],
1379
+ headerParameters: [Parameters.accept],
1063
1380
  serializer
1064
1381
  };
1065
-
1066
- const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
1067
- httpMethod: "GET",
1068
- baseUrl: "https://management.azure.com",
1382
+ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
1069
1383
  path: "{nextLink}",
1070
- urlParameters: [
1071
- Parameters.nextPageLink
1072
- ],
1073
- queryParameters: [
1074
- Parameters.apiVersion
1075
- ],
1076
- headerParameters: [
1077
- Parameters.acceptLanguage
1078
- ],
1384
+ httpMethod: "GET",
1079
1385
  responses: {
1080
1386
  200: {
1081
1387
  bodyMapper: Mappers.DatadogMonitorResourceListResponse
@@ -1084,5 +1390,13 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
1084
1390
  bodyMapper: Mappers.ErrorResponse
1085
1391
  }
1086
1392
  },
1393
+ queryParameters: [Parameters.apiVersion],
1394
+ urlParameters: [
1395
+ Parameters.$host,
1396
+ Parameters.subscriptionId,
1397
+ Parameters.nextLink,
1398
+ Parameters.resourceGroupName
1399
+ ],
1400
+ headerParameters: [Parameters.accept],
1087
1401
  serializer
1088
1402
  };