@azure/arm-monitor 7.0.1-alpha.20220427.1 → 8.0.0-alpha.20220907.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/CHANGELOG.md +157 -2
  2. package/README.md +1 -1
  3. package/dist/index.js +2634 -1068
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js +138 -0
  10. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtActionGroupResourceLevelSample.js.map +1 -0
  11. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js +137 -0
  14. package/dist-esm/samples-dev/actionGroupsCreateNotificationsAtResourceGroupLevelSample.js.map +1 -0
  15. package/dist-esm/samples-dev/actionGroupsCreateOrUpdateSample.js +1 -1
  16. package/dist-esm/samples-dev/actionGroupsDeleteSample.js +1 -1
  17. package/dist-esm/samples-dev/actionGroupsEnableReceiverSample.js +1 -1
  18. package/dist-esm/samples-dev/actionGroupsGetSample.js +1 -1
  19. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js +32 -0
  22. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtActionGroupResourceLevelSample.js.map +1 -0
  23. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js +31 -0
  26. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsAtResourceGroupLevelSample.js.map +1 -0
  27. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsSample.js +3 -3
  28. package/dist-esm/samples-dev/actionGroupsGetTestNotificationsSample.js.map +1 -1
  29. package/dist-esm/samples-dev/actionGroupsListByResourceGroupSample.js +3 -3
  30. package/dist-esm/samples-dev/actionGroupsListByResourceGroupSample.js.map +1 -1
  31. package/dist-esm/samples-dev/actionGroupsListBySubscriptionIdSample.js +3 -3
  32. package/dist-esm/samples-dev/actionGroupsListBySubscriptionIdSample.js.map +1 -1
  33. package/dist-esm/samples-dev/actionGroupsPostTestNotificationsSample.js +15 -3
  34. package/dist-esm/samples-dev/actionGroupsPostTestNotificationsSample.js.map +1 -1
  35. package/dist-esm/samples-dev/actionGroupsUpdateSample.js +1 -1
  36. package/dist-esm/samples-dev/activityLogAlertsCreateOrUpdateSample.js +100 -14
  37. package/dist-esm/samples-dev/activityLogAlertsCreateOrUpdateSample.js.map +1 -1
  38. package/dist-esm/samples-dev/activityLogAlertsDeleteSample.js +7 -7
  39. package/dist-esm/samples-dev/activityLogAlertsDeleteSample.js.map +1 -1
  40. package/dist-esm/samples-dev/activityLogAlertsGetSample.js +7 -7
  41. package/dist-esm/samples-dev/activityLogAlertsGetSample.js.map +1 -1
  42. package/dist-esm/samples-dev/activityLogAlertsListByResourceGroupSample.js +4 -4
  43. package/dist-esm/samples-dev/activityLogAlertsListByResourceGroupSample.js.map +1 -1
  44. package/dist-esm/samples-dev/activityLogAlertsListBySubscriptionIdSample.js +5 -5
  45. package/dist-esm/samples-dev/activityLogAlertsListBySubscriptionIdSample.js.map +1 -1
  46. package/dist-esm/samples-dev/activityLogAlertsUpdateSample.js +9 -9
  47. package/dist-esm/samples-dev/activityLogAlertsUpdateSample.js.map +1 -1
  48. package/dist-esm/samples-dev/autoscaleSettingsCreateOrUpdateSample.js +3 -2
  49. package/dist-esm/samples-dev/autoscaleSettingsCreateOrUpdateSample.js.map +1 -1
  50. package/dist-esm/samples-dev/autoscaleSettingsDeleteSample.js +1 -1
  51. package/dist-esm/samples-dev/autoscaleSettingsGetSample.js +1 -1
  52. package/dist-esm/samples-dev/autoscaleSettingsListByResourceGroupSample.js +1 -1
  53. package/dist-esm/samples-dev/autoscaleSettingsListBySubscriptionSample.js +3 -3
  54. package/dist-esm/samples-dev/autoscaleSettingsListBySubscriptionSample.js.map +1 -1
  55. package/dist-esm/samples-dev/autoscaleSettingsUpdateSample.js +3 -4
  56. package/dist-esm/samples-dev/autoscaleSettingsUpdateSample.js.map +1 -1
  57. package/dist-esm/samples-dev/dataCollectionEndpointsCreateSample.js +1 -1
  58. package/dist-esm/samples-dev/dataCollectionEndpointsDeleteSample.js +1 -1
  59. package/dist-esm/samples-dev/dataCollectionEndpointsGetSample.js +1 -1
  60. package/dist-esm/samples-dev/dataCollectionEndpointsListByResourceGroupSample.js +1 -1
  61. package/dist-esm/samples-dev/dataCollectionEndpointsListBySubscriptionSample.js +1 -1
  62. package/dist-esm/samples-dev/dataCollectionEndpointsUpdateSample.js +1 -1
  63. package/dist-esm/samples-dev/dataCollectionRuleAssociationsCreateSample.js +1 -1
  64. package/dist-esm/samples-dev/dataCollectionRuleAssociationsDeleteSample.js +1 -1
  65. package/dist-esm/samples-dev/dataCollectionRuleAssociationsGetSample.js +1 -1
  66. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.d.ts +2 -0
  67. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.d.ts.map +1 -0
  68. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js +45 -0
  69. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js.map +1 -0
  70. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByResourceSample.js +1 -1
  71. package/dist-esm/samples-dev/dataCollectionRuleAssociationsListByRuleSample.js +1 -1
  72. package/dist-esm/samples-dev/dataCollectionRulesCreateSample.js +1 -1
  73. package/dist-esm/samples-dev/dataCollectionRulesDeleteSample.js +1 -1
  74. package/dist-esm/samples-dev/dataCollectionRulesGetSample.js +1 -1
  75. package/dist-esm/samples-dev/dataCollectionRulesListByResourceGroupSample.js +1 -1
  76. package/dist-esm/samples-dev/dataCollectionRulesListBySubscriptionSample.js +1 -1
  77. package/dist-esm/samples-dev/dataCollectionRulesUpdateSample.js +1 -1
  78. package/dist-esm/samples-dev/diagnosticSettingsCategoryGetSample.js +1 -1
  79. package/dist-esm/samples-dev/diagnosticSettingsCategoryListSample.js +18 -4
  80. package/dist-esm/samples-dev/diagnosticSettingsCategoryListSample.js.map +1 -1
  81. package/dist-esm/samples-dev/diagnosticSettingsCreateOrUpdateSample.js +44 -3
  82. package/dist-esm/samples-dev/diagnosticSettingsCreateOrUpdateSample.js.map +1 -1
  83. package/dist-esm/samples-dev/diagnosticSettingsDeleteSample.js +1 -1
  84. package/dist-esm/samples-dev/diagnosticSettingsGetSample.js +19 -1
  85. package/dist-esm/samples-dev/diagnosticSettingsGetSample.js.map +1 -1
  86. package/dist-esm/samples-dev/diagnosticSettingsListSample.js +49 -4
  87. package/dist-esm/samples-dev/diagnosticSettingsListSample.js.map +1 -1
  88. package/dist-esm/samples-dev/predictiveMetricGetSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/predictiveMetricGetSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/predictiveMetricGetSample.js +36 -0
  91. package/dist-esm/samples-dev/predictiveMetricGetSample.js.map +1 -0
  92. package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
  93. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
  94. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
  95. package/dist-esm/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.js +4 -18
  96. package/dist-esm/samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.js.map +1 -1
  97. package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +1 -1
  98. package/dist-esm/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.js +4 -18
  99. package/dist-esm/samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.js.map +1 -1
  100. package/dist-esm/samples-dev/privateLinkScopeOperationStatusGetSample.js +1 -1
  101. package/dist-esm/samples-dev/privateLinkScopedResourcesCreateOrUpdateSample.js +1 -1
  102. package/dist-esm/samples-dev/privateLinkScopedResourcesDeleteSample.js +1 -1
  103. package/dist-esm/samples-dev/privateLinkScopedResourcesGetSample.js +1 -1
  104. package/dist-esm/samples-dev/privateLinkScopedResourcesListByPrivateLinkScopeSample.js +1 -1
  105. package/dist-esm/samples-dev/privateLinkScopesCreateOrUpdateSample.js +12 -2
  106. package/dist-esm/samples-dev/privateLinkScopesCreateOrUpdateSample.js.map +1 -1
  107. package/dist-esm/samples-dev/privateLinkScopesDeleteSample.js +1 -1
  108. package/dist-esm/samples-dev/privateLinkScopesGetSample.js +1 -1
  109. package/dist-esm/samples-dev/privateLinkScopesListByResourceGroupSample.js +1 -1
  110. package/dist-esm/samples-dev/privateLinkScopesListSample.js +1 -1
  111. package/dist-esm/samples-dev/privateLinkScopesUpdateTagsSample.js +1 -1
  112. package/dist-esm/src/models/index.d.ts +1054 -394
  113. package/dist-esm/src/models/index.d.ts.map +1 -1
  114. package/dist-esm/src/models/index.js +234 -8
  115. package/dist-esm/src/models/index.js.map +1 -1
  116. package/dist-esm/src/models/mappers.d.ts +55 -28
  117. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  118. package/dist-esm/src/models/mappers.js +1394 -651
  119. package/dist-esm/src/models/mappers.js.map +1 -1
  120. package/dist-esm/src/models/parameters.d.ts +20 -14
  121. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  122. package/dist-esm/src/models/parameters.js +88 -27
  123. package/dist-esm/src/models/parameters.js.map +1 -1
  124. package/dist-esm/src/monitorClient.d.ts +2 -1
  125. package/dist-esm/src/monitorClient.d.ts.map +1 -1
  126. package/dist-esm/src/monitorClient.js +20 -14
  127. package/dist-esm/src/monitorClient.js.map +1 -1
  128. package/dist-esm/src/operations/actionGroups.d.ts +46 -1
  129. package/dist-esm/src/operations/actionGroups.d.ts.map +1 -1
  130. package/dist-esm/src/operations/actionGroups.js +244 -13
  131. package/dist-esm/src/operations/actionGroups.js.map +1 -1
  132. package/dist-esm/src/operations/activityLogAlerts.d.ts +32 -18
  133. package/dist-esm/src/operations/activityLogAlerts.d.ts.map +1 -1
  134. package/dist-esm/src/operations/activityLogAlerts.js +117 -41
  135. package/dist-esm/src/operations/activityLogAlerts.js.map +1 -1
  136. package/dist-esm/src/operations/activityLogs.js +2 -2
  137. package/dist-esm/src/operations/activityLogs.js.map +1 -1
  138. package/dist-esm/src/operations/alertRuleIncidents.js +2 -2
  139. package/dist-esm/src/operations/alertRules.js +6 -6
  140. package/dist-esm/src/operations/autoscaleSettings.js +8 -8
  141. package/dist-esm/src/operations/autoscaleSettings.js.map +1 -1
  142. package/dist-esm/src/operations/baselines.js +4 -4
  143. package/dist-esm/src/operations/baselines.js.map +1 -1
  144. package/dist-esm/src/operations/dataCollectionEndpoints.js +8 -8
  145. package/dist-esm/src/operations/dataCollectionRuleAssociations.d.ts +29 -1
  146. package/dist-esm/src/operations/dataCollectionRuleAssociations.d.ts.map +1 -1
  147. package/dist-esm/src/operations/dataCollectionRuleAssociations.js +123 -7
  148. package/dist-esm/src/operations/dataCollectionRuleAssociations.js.map +1 -1
  149. package/dist-esm/src/operations/dataCollectionRules.js +8 -8
  150. package/dist-esm/src/operations/diagnosticSettings.d.ts +11 -2
  151. package/dist-esm/src/operations/diagnosticSettings.d.ts.map +1 -1
  152. package/dist-esm/src/operations/diagnosticSettings.js +50 -5
  153. package/dist-esm/src/operations/diagnosticSettings.js.map +1 -1
  154. package/dist-esm/src/operations/diagnosticSettingsCategory.d.ts +11 -2
  155. package/dist-esm/src/operations/diagnosticSettingsCategory.d.ts.map +1 -1
  156. package/dist-esm/src/operations/diagnosticSettingsCategory.js +48 -3
  157. package/dist-esm/src/operations/diagnosticSettingsCategory.js.map +1 -1
  158. package/dist-esm/src/operations/eventCategories.js +1 -1
  159. package/dist-esm/src/operations/eventCategories.js.map +1 -1
  160. package/dist-esm/src/operations/index.d.ts +1 -0
  161. package/dist-esm/src/operations/index.d.ts.map +1 -1
  162. package/dist-esm/src/operations/index.js +1 -0
  163. package/dist-esm/src/operations/index.js.map +1 -1
  164. package/dist-esm/src/operations/logProfiles.js +5 -5
  165. package/dist-esm/src/operations/metricAlerts.js +6 -6
  166. package/dist-esm/src/operations/metricAlertsStatus.js +2 -2
  167. package/dist-esm/src/operations/metricDefinitions.js +1 -1
  168. package/dist-esm/src/operations/metricNamespaces.js +1 -1
  169. package/dist-esm/src/operations/metrics.js +4 -4
  170. package/dist-esm/src/operations/metrics.js.map +1 -1
  171. package/dist-esm/src/operations/operations.js +1 -1
  172. package/dist-esm/src/operations/operations.js.map +1 -1
  173. package/dist-esm/src/operations/predictiveMetric.d.ts +28 -0
  174. package/dist-esm/src/operations/predictiveMetric.d.ts.map +1 -0
  175. package/dist-esm/src/operations/predictiveMetric.js +77 -0
  176. package/dist-esm/src/operations/predictiveMetric.js.map +1 -0
  177. package/dist-esm/src/operations/privateEndpointConnections.d.ts +4 -22
  178. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  179. package/dist-esm/src/operations/privateEndpointConnections.js +27 -89
  180. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  181. package/dist-esm/src/operations/privateLinkResources.d.ts +2 -20
  182. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
  183. package/dist-esm/src/operations/privateLinkResources.js +8 -83
  184. package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
  185. package/dist-esm/src/operations/privateLinkScopeOperationStatus.js +4 -1
  186. package/dist-esm/src/operations/privateLinkScopeOperationStatus.js.map +1 -1
  187. package/dist-esm/src/operations/privateLinkScopedResources.js +27 -6
  188. package/dist-esm/src/operations/privateLinkScopedResources.js.map +1 -1
  189. package/dist-esm/src/operations/privateLinkScopes.js +39 -9
  190. package/dist-esm/src/operations/privateLinkScopes.js.map +1 -1
  191. package/dist-esm/src/operations/scheduledQueryRules.js +6 -6
  192. package/dist-esm/src/operations/tenantActivityLogs.js +2 -2
  193. package/dist-esm/src/operations/tenantActivityLogs.js.map +1 -1
  194. package/dist-esm/src/operations/vMInsights.js +1 -1
  195. package/dist-esm/src/operations/vMInsights.js.map +1 -1
  196. package/dist-esm/src/operationsInterfaces/actionGroups.d.ts +46 -1
  197. package/dist-esm/src/operationsInterfaces/actionGroups.d.ts.map +1 -1
  198. package/dist-esm/src/operationsInterfaces/activityLogAlerts.d.ts +17 -16
  199. package/dist-esm/src/operationsInterfaces/activityLogAlerts.d.ts.map +1 -1
  200. package/dist-esm/src/operationsInterfaces/dataCollectionRuleAssociations.d.ts +9 -1
  201. package/dist-esm/src/operationsInterfaces/dataCollectionRuleAssociations.d.ts.map +1 -1
  202. package/dist-esm/src/operationsInterfaces/diagnosticSettings.d.ts +8 -7
  203. package/dist-esm/src/operationsInterfaces/diagnosticSettings.d.ts.map +1 -1
  204. package/dist-esm/src/operationsInterfaces/diagnosticSettingsCategory.d.ts +7 -6
  205. package/dist-esm/src/operationsInterfaces/diagnosticSettingsCategory.d.ts.map +1 -1
  206. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  207. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  208. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  209. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  210. package/dist-esm/src/operationsInterfaces/predictiveMetric.d.ts +20 -0
  211. package/dist-esm/src/operationsInterfaces/predictiveMetric.d.ts.map +1 -0
  212. package/dist-esm/src/operationsInterfaces/predictiveMetric.js +9 -0
  213. package/dist-esm/src/operationsInterfaces/predictiveMetric.js.map +1 -0
  214. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +10 -11
  215. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
  216. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +2 -3
  217. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -1
  218. package/dist-esm/test/monitor_examples.d.ts.map +1 -1
  219. package/dist-esm/test/monitor_examples.js +25 -31
  220. package/dist-esm/test/monitor_examples.js.map +1 -1
  221. package/package.json +9 -6
  222. package/review/arm-monitor.api.md +585 -376
  223. package/src/models/index.ts +1137 -435
  224. package/src/models/mappers.ts +1481 -688
  225. package/src/models/parameters.ts +94 -27
  226. package/src/monitorClient.ts +27 -16
  227. package/src/operations/actionGroups.ts +356 -13
  228. package/src/operations/activityLogAlerts.ts +142 -43
  229. package/src/operations/activityLogs.ts +2 -2
  230. package/src/operations/alertRuleIncidents.ts +2 -2
  231. package/src/operations/alertRules.ts +6 -6
  232. package/src/operations/autoscaleSettings.ts +8 -8
  233. package/src/operations/baselines.ts +4 -4
  234. package/src/operations/dataCollectionEndpoints.ts +8 -8
  235. package/src/operations/dataCollectionRuleAssociations.ts +175 -8
  236. package/src/operations/dataCollectionRules.ts +8 -8
  237. package/src/operations/diagnosticSettings.ts +49 -7
  238. package/src/operations/diagnosticSettingsCategory.ts +47 -4
  239. package/src/operations/eventCategories.ts +1 -1
  240. package/src/operations/index.ts +1 -0
  241. package/src/operations/logProfiles.ts +5 -5
  242. package/src/operations/metricAlerts.ts +6 -6
  243. package/src/operations/metricAlertsStatus.ts +2 -2
  244. package/src/operations/metricDefinitions.ts +1 -1
  245. package/src/operations/metricNamespaces.ts +1 -1
  246. package/src/operations/metrics.ts +4 -4
  247. package/src/operations/operations.ts +1 -1
  248. package/src/operations/predictiveMetric.ts +101 -0
  249. package/src/operations/privateEndpointConnections.ts +29 -124
  250. package/src/operations/privateLinkResources.ts +10 -118
  251. package/src/operations/privateLinkScopeOperationStatus.ts +4 -1
  252. package/src/operations/privateLinkScopedResources.ts +27 -6
  253. package/src/operations/privateLinkScopes.ts +39 -9
  254. package/src/operations/scheduledQueryRules.ts +6 -6
  255. package/src/operations/tenantActivityLogs.ts +2 -2
  256. package/src/operations/vMInsights.ts +1 -1
  257. package/src/operationsInterfaces/actionGroups.ts +96 -0
  258. package/src/operationsInterfaces/activityLogAlerts.ts +17 -16
  259. package/src/operationsInterfaces/dataCollectionRuleAssociations.ts +13 -0
  260. package/src/operationsInterfaces/diagnosticSettings.ts +14 -13
  261. package/src/operationsInterfaces/diagnosticSettingsCategory.ts +14 -12
  262. package/src/operationsInterfaces/index.ts +1 -0
  263. package/src/operationsInterfaces/predictiveMetric.ts +40 -0
  264. package/src/operationsInterfaces/privateEndpointConnections.ts +17 -18
  265. package/src/operationsInterfaces/privateLinkResources.ts +2 -4
  266. package/types/arm-monitor.d.ts +1082 -293
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncValues, __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { MonitorClient } from "@azure/arm-monitor";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ /**
14
+ * This sample demonstrates how to Lists associations for the specified data collection endpoint.
15
+ *
16
+ * @summary Lists associations for the specified data collection endpoint.
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByDataCollectionEndpoint.json
18
+ */
19
+ function listAssociationsForSpecifiedDataCollectionEndpoint() {
20
+ var e_1, _a;
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const subscriptionId = "703362b3-f278-4e4b-9179-c76eaf41ffc2";
23
+ const resourceGroupName = "myResourceGroup";
24
+ const dataCollectionEndpointName = "myDataCollectionEndpointName";
25
+ const credential = new DefaultAzureCredential();
26
+ const client = new MonitorClient(credential, subscriptionId);
27
+ const resArray = new Array();
28
+ try {
29
+ for (var _b = __asyncValues(client.dataCollectionRuleAssociations.listByDataCollectionEndpoint(resourceGroupName, dataCollectionEndpointName)), _c; _c = yield _b.next(), !_c.done;) {
30
+ let item = _c.value;
31
+ resArray.push(item);
32
+ }
33
+ }
34
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
35
+ finally {
36
+ try {
37
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
38
+ }
39
+ finally { if (e_1) throw e_1.error; }
40
+ }
41
+ console.log(resArray);
42
+ });
43
+ }
44
+ listAssociationsForSpecifiedDataCollectionEndpoint().catch(console.error);
45
+ //# sourceMappingURL=dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataCollectionRuleAssociationsListByDataCollectionEndpointSample.js","sourceRoot":"","sources":["../../samples-dev/dataCollectionRuleAssociationsListByDataCollectionEndpointSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,kDAAkD;;;QAC/D,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,0BAA0B,GAAG,8BAA8B,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,8BAA8B,CAAC,4BAA4B,CACvF,iBAAiB,EACjB,0BAA0B,CAC3B,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,kDAAkD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Lists associations for the specified resource.
15
15
  *
16
16
  * @summary Lists associations for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByResource.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByResource.json
18
18
  */
19
19
  function listAssociationsForSpecifiedResource() {
20
20
  var e_1, _a;
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Lists associations for the specified data collection rule.
15
15
  *
16
16
  * @summary Lists associations for the specified data collection rule.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRuleAssociationsListByRule.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRuleAssociationsListByRule.json
18
18
  */
19
19
  function listAssociationsForSpecifiedDataCollectionRule() {
20
20
  var e_1, _a;
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Creates or updates a data collection rule.
15
15
  *
16
16
  * @summary Creates or updates a data collection rule.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesCreate.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesCreate.json
18
18
  */
19
19
  function createOrUpdateDataCollectionRule() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Deletes a data collection rule.
15
15
  *
16
16
  * @summary Deletes a data collection rule.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesDelete.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesDelete.json
18
18
  */
19
19
  function deleteDataCollectionRule() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Returns the specified data collection rule.
15
15
  *
16
16
  * @summary Returns the specified data collection rule.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesGet.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesGet.json
18
18
  */
19
19
  function getDataCollectionRule() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Lists all data collection rules in the specified resource group.
15
15
  *
16
16
  * @summary Lists all data collection rules in the specified resource group.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesListByResourceGroup.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListByResourceGroup.json
18
18
  */
19
19
  function listDataCollectionRulesByResourceGroup() {
20
20
  var e_1, _a;
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Lists all data collection rules in the specified subscription.
15
15
  *
16
16
  * @summary Lists all data collection rules in the specified subscription.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesListBySubscription.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesListBySubscription.json
18
18
  */
19
19
  function listDataCollectionRulesBySubscription() {
20
20
  var e_1, _a;
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Updates part of a data collection rule.
15
15
  *
16
16
  * @summary Updates part of a data collection rule.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2021-04-01/examples/DataCollectionRulesUpdate.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-09-01-preview/examples/DataCollectionRulesUpdate.json
18
18
  */
19
19
  function updateDataCollectionRule() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets the diagnostic settings category for the specified resource.
15
15
  *
16
16
  * @summary Gets the diagnostic settings category for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/getDiagnosticSettingsCategory.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingsCategory.json
18
18
  */
19
19
  function getsTheDiagnosticSetting() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -5,7 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __awaiter } from "tslib";
8
+ import { __asyncValues, __awaiter } from "tslib";
9
9
  // Copyright (c) Microsoft Corporation.
10
10
  // Licensed under the MIT License.
11
11
  import { MonitorClient } from "@azure/arm-monitor";
@@ -14,16 +14,30 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Lists the diagnostic settings categories for the specified resource.
15
15
  *
16
16
  * @summary Lists the diagnostic settings categories for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/listDiagnosticSettingsCategories.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategories.json
18
18
  */
19
19
  function getsTheDiagnosticSetting() {
20
+ var e_1, _a;
20
21
  return __awaiter(this, void 0, void 0, function* () {
21
22
  const subscriptionId = "00000000-0000-0000-0000-000000000000";
22
23
  const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
23
24
  const credential = new DefaultAzureCredential();
24
25
  const client = new MonitorClient(credential, subscriptionId);
25
- const result = yield client.diagnosticSettingsCategory.list(resourceUri);
26
- console.log(result);
26
+ const resArray = new Array();
27
+ try {
28
+ for (var _b = __asyncValues(client.diagnosticSettingsCategory.list(resourceUri)), _c; _c = yield _b.next(), !_c.done;) {
29
+ let item = _c.value;
30
+ resArray.push(item);
31
+ }
32
+ }
33
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
34
+ finally {
35
+ try {
36
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
37
+ }
38
+ finally { if (e_1) throw e_1.error; }
39
+ }
40
+ console.log(resArray);
27
41
  });
28
42
  }
29
43
  getsTheDiagnosticSetting().catch(console.error);
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettingsCategoryListSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsCategoryListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"diagnosticSettingsCategoryListSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsCategoryListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,IAAA;gBAA/D,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource.
15
15
  *
16
16
  * @summary Creates or updates diagnostic settings for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/createOrUpdateDiagnosticSetting.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSetting.json
18
18
  */
19
19
  function createsOrUpdatesTheDiagnosticSetting() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -22,16 +22,17 @@ function createsOrUpdatesTheDiagnosticSetting() {
22
22
  const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
23
23
  const name = "mysetting";
24
24
  const parameters = {
25
- eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
25
+ eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
26
26
  eventHubName: "myeventhub",
27
27
  logAnalyticsDestinationType: "Dedicated",
28
28
  logs: [
29
29
  {
30
- category: "WorkflowRuntime",
30
+ categoryGroup: "allLogs",
31
31
  enabled: true,
32
32
  retentionPolicy: { days: 0, enabled: false }
33
33
  }
34
34
  ],
35
+ marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
35
36
  metrics: [
36
37
  {
37
38
  category: "WorkflowMetrics",
@@ -49,4 +50,44 @@ function createsOrUpdatesTheDiagnosticSetting() {
49
50
  });
50
51
  }
51
52
  createsOrUpdatesTheDiagnosticSetting().catch(console.error);
53
+ /**
54
+ * This sample demonstrates how to Creates or updates diagnostic settings for the specified resource.
55
+ *
56
+ * @summary Creates or updates diagnostic settings for the specified resource.
57
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/createOrUpdateDiagnosticSettingCategory.json
58
+ */
59
+ function createsOrUpdatesTheDiagnosticSettingForCategory() {
60
+ return __awaiter(this, void 0, void 0, function* () {
61
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
62
+ const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
63
+ const name = "mysetting";
64
+ const parameters = {
65
+ eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
66
+ eventHubName: "myeventhub",
67
+ logAnalyticsDestinationType: "Dedicated",
68
+ logs: [
69
+ {
70
+ category: "WorkflowRuntime",
71
+ enabled: true,
72
+ retentionPolicy: { days: 0, enabled: false }
73
+ }
74
+ ],
75
+ marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
76
+ metrics: [
77
+ {
78
+ category: "WorkflowMetrics",
79
+ enabled: true,
80
+ retentionPolicy: { days: 0, enabled: false }
81
+ }
82
+ ],
83
+ storageAccountId: "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
84
+ workspaceId: ""
85
+ };
86
+ const credential = new DefaultAzureCredential();
87
+ const client = new MonitorClient(credential, subscriptionId);
88
+ const result = yield client.diagnosticSettings.createOrUpdate(resourceUri, name, parameters);
89
+ console.log(result);
90
+ });
91
+ }
92
+ createsOrUpdatesTheDiagnosticSettingForCategory().catch(console.error);
52
93
  //# sourceMappingURL=diagnosticSettingsCreateOrUpdateSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettingsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAA8B,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oCAAoC;;QACjD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAA+B;YAC7C,2BAA2B,EACzB,+KAA+K;YACjL,YAAY,EAAE,YAAY;YAC1B,2BAA2B,EAAE,WAAW;YACxC,IAAI,EAAE;gBACJ;oBACE,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,gBAAgB,EACd,wIAAwI;YAC1I,WAAW,EAAE,EAAE;SAChB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAC3D,WAAW,EACX,IAAI,EACJ,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oCAAoC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"diagnosticSettingsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAA8B,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oCAAoC;;QACjD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAA+B;YAC7C,2BAA2B,EACzB,0JAA0J;YAC5J,YAAY,EAAE,YAAY;YAC1B,2BAA2B,EAAE,WAAW;YACxC,IAAI,EAAE;gBACJ;oBACE,aAAa,EAAE,SAAS;oBACxB,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,oBAAoB,EAClB,qHAAqH;YACvH,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,gBAAgB,EACd,wIAAwI;YAC1I,WAAW,EAAE,EAAE;SAChB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAC3D,WAAW,EACX,IAAI,EACJ,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oCAAoC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,SAAe,+CAA+C;;QAC5D,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAA+B;YAC7C,2BAA2B,EACzB,0JAA0J;YAC5J,YAAY,EAAE,YAAY;YAC1B,2BAA2B,EAAE,WAAW;YACxC,IAAI,EAAE;gBACJ;oBACE,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,oBAAoB,EAClB,qHAAqH;YACvH,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE,IAAI;oBACb,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;iBAC7C;aACF;YACD,gBAAgB,EACd,wIAAwI;YAC1I,WAAW,EAAE,EAAE;SAChB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAC3D,WAAW,EACX,IAAI,EACJ,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,+CAA+C,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Deletes existing diagnostic settings for the specified resource.
15
15
  *
16
16
  * @summary Deletes existing diagnostic settings for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/deleteDiagnosticSetting.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/deleteDiagnosticSetting.json
18
18
  */
19
19
  function deletesTheDiagnosticSetting() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets the active diagnostic settings for the specified resource.
15
15
  *
16
16
  * @summary Gets the active diagnostic settings for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/getDiagnosticSetting.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSetting.json
18
18
  */
19
19
  function getsTheDiagnosticSetting() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -28,4 +28,22 @@ function getsTheDiagnosticSetting() {
28
28
  });
29
29
  }
30
30
  getsTheDiagnosticSetting().catch(console.error);
31
+ /**
32
+ * This sample demonstrates how to Gets the active diagnostic settings for the specified resource.
33
+ *
34
+ * @summary Gets the active diagnostic settings for the specified resource.
35
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/getDiagnosticSettingCategory.json
36
+ */
37
+ function getsTheDiagnosticSettingForCategory() {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
40
+ const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
41
+ const name = "mysetting";
42
+ const credential = new DefaultAzureCredential();
43
+ const client = new MonitorClient(credential, subscriptionId);
44
+ const result = yield client.diagnosticSettings.get(resourceUri, name);
45
+ console.log(result);
46
+ });
47
+ }
48
+ getsTheDiagnosticSettingForCategory().catch(console.error);
31
49
  //# sourceMappingURL=diagnosticSettingsGetSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettingsGetSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"diagnosticSettingsGetSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,SAAe,mCAAmC;;QAChD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,IAAI,GAAG,WAAW,CAAC;QACzB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,mCAAmC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __awaiter } from "tslib";
8
+ import { __asyncValues, __awaiter } from "tslib";
9
9
  // Copyright (c) Microsoft Corporation.
10
10
  // Licensed under the MIT License.
11
11
  import { MonitorClient } from "@azure/arm-monitor";
@@ -14,17 +14,62 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource.
15
15
  *
16
16
  * @summary Gets the active diagnostic settings list for the specified resource.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/examples/listDiagnosticSettings.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettings.json
18
18
  */
19
19
  function getsTheDiagnosticSetting() {
20
+ var e_1, _a;
20
21
  return __awaiter(this, void 0, void 0, function* () {
21
22
  const subscriptionId = "00000000-0000-0000-0000-000000000000";
22
23
  const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
23
24
  const credential = new DefaultAzureCredential();
24
25
  const client = new MonitorClient(credential, subscriptionId);
25
- const result = yield client.diagnosticSettings.list(resourceUri);
26
- console.log(result);
26
+ const resArray = new Array();
27
+ try {
28
+ for (var _b = __asyncValues(client.diagnosticSettings.list(resourceUri)), _c; _c = yield _b.next(), !_c.done;) {
29
+ let item = _c.value;
30
+ resArray.push(item);
31
+ }
32
+ }
33
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
34
+ finally {
35
+ try {
36
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
37
+ }
38
+ finally { if (e_1) throw e_1.error; }
39
+ }
40
+ console.log(resArray);
27
41
  });
28
42
  }
29
43
  getsTheDiagnosticSetting().catch(console.error);
44
+ /**
45
+ * This sample demonstrates how to Gets the active diagnostic settings list for the specified resource.
46
+ *
47
+ * @summary Gets the active diagnostic settings list for the specified resource.
48
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-05-01-preview/examples/listDiagnosticSettingsCategory.json
49
+ */
50
+ function getsTheDiagnosticSettingForCategory() {
51
+ var e_2, _a;
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
54
+ const resourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6";
55
+ const credential = new DefaultAzureCredential();
56
+ const client = new MonitorClient(credential, subscriptionId);
57
+ const resArray = new Array();
58
+ try {
59
+ for (var _b = __asyncValues(client.diagnosticSettings.list(resourceUri)), _c; _c = yield _b.next(), !_c.done;) {
60
+ let item = _c.value;
61
+ resArray.push(item);
62
+ }
63
+ }
64
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
65
+ finally {
66
+ try {
67
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
68
+ }
69
+ finally { if (e_2) throw e_2.error; }
70
+ }
71
+ console.log(resArray);
72
+ });
73
+ }
74
+ getsTheDiagnosticSettingForCategory().catch(console.error);
30
75
  //# sourceMappingURL=diagnosticSettingsListSample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticSettingsListSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"diagnosticSettingsListSample.js","sourceRoot":"","sources":["../../samples-dev/diagnosticSettingsListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,wBAAwB;;;QACrC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,IAAA;gBAAvD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,wBAAwB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,SAAe,mCAAmC;;;QAChD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,WAAW,GACf,yHAAyH,CAAC;QAC5H,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA,IAAA;gBAAvD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,mCAAmC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=predictiveMetricGetSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictiveMetricGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/predictiveMetricGetSample.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __awaiter } from "tslib";
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT License.
11
+ import { MonitorClient } from "@azure/arm-monitor";
12
+ import { DefaultAzureCredential } from "@azure/identity";
13
+ /**
14
+ * This sample demonstrates how to get predictive autoscale metric future data
15
+ *
16
+ * @summary get predictive autoscale metric future data
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2022-10-01/examples/GetPredictiveMetric.json
18
+ */
19
+ function getMetricForData() {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
22
+ const resourceGroupName = "myRG";
23
+ const autoscaleSettingName = "vmss1-Autoscale-775";
24
+ const timespan = "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z";
25
+ const interval = "PT1H";
26
+ const metricNamespace = "Microsoft.Compute/virtualMachineScaleSets";
27
+ const metricName = "PercentageCPU";
28
+ const aggregation = "Total";
29
+ const credential = new DefaultAzureCredential();
30
+ const client = new MonitorClient(credential, subscriptionId);
31
+ const result = yield client.predictiveMetric.get(resourceGroupName, autoscaleSettingName, timespan, interval, metricNamespace, metricName, aggregation);
32
+ console.log(result);
33
+ });
34
+ }
35
+ getMetricForData().catch(console.error);
36
+ //# sourceMappingURL=predictiveMetricGetSample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predictiveMetricGetSample.js","sourceRoot":"","sources":["../../samples-dev/predictiveMetricGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,gBAAgB;;QAC7B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,MAAM,CAAC;QACjC,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;QACnD,MAAM,QAAQ,GAAG,mDAAmD,CAAC;QACrE,MAAM,QAAQ,GAAG,MAAM,CAAC;QACxB,MAAM,eAAe,GAAG,2CAA2C,CAAC;QACpE,MAAM,UAAU,GAAG,eAAe,CAAC;QACnC,MAAM,WAAW,GAAG,OAAO,CAAC;QAC5B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAC9C,iBAAiB,EACjB,oBAAoB,EACpB,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,UAAU,EACV,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Approve or reject a private endpoint connection with a given name.
15
15
  *
16
16
  * @summary Approve or reject a private endpoint connection with a given name.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateEndpointConnectionUpdate.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionUpdate.json
18
18
  */
19
19
  function approveOrRejectAPrivateEndpointConnectionWithAGivenName() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Deletes a private endpoint connection with a given name.
15
15
  *
16
16
  * @summary Deletes a private endpoint connection with a given name.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateEndpointConnectionDelete.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionDelete.json
18
18
  */
19
19
  function deletesAPrivateEndpointConnectionWithAGivenName() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets a private endpoint connection.
15
15
  *
16
16
  * @summary Gets a private endpoint connection.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateEndpointConnectionGet.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionGet.json
18
18
  */
19
19
  function getsPrivateEndpointConnection() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -5,7 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncValues, __awaiter } from "tslib";
8
+ import { __awaiter } from "tslib";
9
9
  // Copyright (c) Microsoft Corporation.
10
10
  // Licensed under the MIT License.
11
11
  import { MonitorClient } from "@azure/arm-monitor";
@@ -14,31 +14,17 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets all private endpoint connections on a private link scope.
15
15
  *
16
16
  * @summary Gets all private endpoint connections on a private link scope.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateEndpointConnectionList.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateEndpointConnectionList.json
18
18
  */
19
19
  function getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() {
20
- var e_1, _a;
21
20
  return __awaiter(this, void 0, void 0, function* () {
22
21
  const subscriptionId = "00000000-1111-2222-3333-444444444444";
23
22
  const resourceGroupName = "MyResourceGroup";
24
23
  const scopeName = "MyPrivateLinkScope";
25
24
  const credential = new DefaultAzureCredential();
26
25
  const client = new MonitorClient(credential, subscriptionId);
27
- const resArray = new Array();
28
- try {
29
- for (var _b = __asyncValues(client.privateEndpointConnections.listByPrivateLinkScope(resourceGroupName, scopeName)), _c; _c = yield _b.next(), !_c.done;) {
30
- let item = _c.value;
31
- resArray.push(item);
32
- }
33
- }
34
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
35
- finally {
36
- try {
37
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
38
- }
39
- finally { if (e_1) throw e_1.error; }
40
- }
41
- console.log(resArray);
26
+ const result = yield client.privateEndpointConnections.listByPrivateLinkScope(resourceGroupName, scopeName);
27
+ console.log(result);
42
28
  });
43
29
  }
44
30
  getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope().catch(console.error);
@@ -1 +1 @@
1
- {"version":3,"file":"privateEndpointConnectionsListByPrivateLinkScopeSample.js","sourceRoot":"","sources":["../../samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uDAAuD;;;QACpE,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,0BAA0B,CAAC,sBAAsB,CAC7E,iBAAiB,EACjB,SAAS,CACV,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,uDAAuD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"privateEndpointConnectionsListByPrivateLinkScopeSample.js","sourceRoot":"","sources":["../../samples-dev/privateEndpointConnectionsListByPrivateLinkScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,uDAAuD;;QACpE,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,sBAAsB,CAC3E,iBAAiB,EACjB,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,uDAAuD,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -14,7 +14,7 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
15
15
  *
16
16
  * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceGet.json
18
18
  */
19
19
  function getsPrivateEndpointConnection() {
20
20
  return __awaiter(this, void 0, void 0, function* () {
@@ -5,7 +5,7 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncValues, __awaiter } from "tslib";
8
+ import { __awaiter } from "tslib";
9
9
  // Copyright (c) Microsoft Corporation.
10
10
  // Licensed under the MIT License.
11
11
  import { MonitorClient } from "@azure/arm-monitor";
@@ -14,31 +14,17 @@ import { DefaultAzureCredential } from "@azure/identity";
14
14
  * This sample demonstrates how to Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
15
15
  *
16
16
  * @summary Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.
17
- * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2019-10-17-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json
17
+ * x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/preview/2021-07-01-preview/examples/PrivateLinkScopePrivateLinkResourceListGet.json
18
18
  */
19
19
  function getsPrivateEndpointConnection() {
20
- var e_1, _a;
21
20
  return __awaiter(this, void 0, void 0, function* () {
22
21
  const subscriptionId = "00000000-1111-2222-3333-444444444444";
23
22
  const resourceGroupName = "MyResourceGroup";
24
23
  const scopeName = "MyPrivateLinkScope";
25
24
  const credential = new DefaultAzureCredential();
26
25
  const client = new MonitorClient(credential, subscriptionId);
27
- const resArray = new Array();
28
- try {
29
- for (var _b = __asyncValues(client.privateLinkResources.listByPrivateLinkScope(resourceGroupName, scopeName)), _c; _c = yield _b.next(), !_c.done;) {
30
- let item = _c.value;
31
- resArray.push(item);
32
- }
33
- }
34
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
35
- finally {
36
- try {
37
- if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
38
- }
39
- finally { if (e_1) throw e_1.error; }
40
- }
41
- console.log(resArray);
26
+ const result = yield client.privateLinkResources.listByPrivateLinkScope(resourceGroupName, scopeName);
27
+ console.log(result);
42
28
  });
43
29
  }
44
30
  getsPrivateEndpointConnection().catch(console.error);
@@ -1 +1 @@
1
- {"version":3,"file":"privateLinkResourcesListByPrivateLinkScopeSample.js","sourceRoot":"","sources":["../../samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,6BAA6B;;;QAC1C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,oBAAoB,CAAC,sBAAsB,CACvE,iBAAiB,EACjB,SAAS,CACV,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,6BAA6B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"privateLinkResourcesListByPrivateLinkScopeSample.js","sourceRoot":"","sources":["../../samples-dev/privateLinkResourcesListByPrivateLinkScopeSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,6BAA6B;;QAC1C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;QAC5C,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACvC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,sBAAsB,CACrE,iBAAiB,EACjB,SAAS,CACV,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,6BAA6B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}