@azure/arm-datadog 3.0.3-alpha.20231023.1 → 3.1.0-alpha.20231030.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 (175) hide show
  1. package/CHANGELOG.md +35 -11
  2. package/LICENSE +1 -1
  3. package/dist/index.js +929 -183
  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/creationSupportedGetSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/creationSupportedGetSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/creationSupportedGetSample.js +38 -0
  10. package/dist-esm/samples-dev/creationSupportedGetSample.js.map +1 -0
  11. package/dist-esm/samples-dev/creationSupportedListSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/creationSupportedListSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/creationSupportedListSample.js +54 -0
  14. package/dist-esm/samples-dev/creationSupportedListSample.js.map +1 -0
  15. package/dist-esm/samples-dev/marketplaceAgreementsCreateOrUpdateSample.js +11 -3
  16. package/dist-esm/samples-dev/marketplaceAgreementsCreateOrUpdateSample.js.map +1 -1
  17. package/dist-esm/samples-dev/marketplaceAgreementsListSample.js +11 -3
  18. package/dist-esm/samples-dev/marketplaceAgreementsListSample.js.map +1 -1
  19. package/dist-esm/samples-dev/monitoredSubscriptionsCreateorUpdateSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/monitoredSubscriptionsCreateorUpdateSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/monitoredSubscriptionsCreateorUpdateSample.js +40 -0
  22. package/dist-esm/samples-dev/monitoredSubscriptionsCreateorUpdateSample.js.map +1 -0
  23. package/dist-esm/samples-dev/monitoredSubscriptionsDeleteSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/monitoredSubscriptionsDeleteSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/monitoredSubscriptionsDeleteSample.js +40 -0
  26. package/dist-esm/samples-dev/monitoredSubscriptionsDeleteSample.js.map +1 -0
  27. package/dist-esm/samples-dev/monitoredSubscriptionsGetSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/monitoredSubscriptionsGetSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/monitoredSubscriptionsGetSample.js +40 -0
  30. package/dist-esm/samples-dev/monitoredSubscriptionsGetSample.js.map +1 -0
  31. package/dist-esm/samples-dev/monitoredSubscriptionsListSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/monitoredSubscriptionsListSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/monitoredSubscriptionsListSample.js +55 -0
  34. package/dist-esm/samples-dev/monitoredSubscriptionsListSample.js.map +1 -0
  35. package/dist-esm/samples-dev/monitoredSubscriptionsUpdateSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/monitoredSubscriptionsUpdateSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/monitoredSubscriptionsUpdateSample.js +40 -0
  38. package/dist-esm/samples-dev/monitoredSubscriptionsUpdateSample.js.map +1 -0
  39. package/dist-esm/samples-dev/monitorsCreateSample.js +12 -4
  40. package/dist-esm/samples-dev/monitorsCreateSample.js.map +1 -1
  41. package/dist-esm/samples-dev/monitorsDeleteSample.js +12 -4
  42. package/dist-esm/samples-dev/monitorsDeleteSample.js.map +1 -1
  43. package/dist-esm/samples-dev/monitorsGetDefaultKeySample.js +12 -4
  44. package/dist-esm/samples-dev/monitorsGetDefaultKeySample.js.map +1 -1
  45. package/dist-esm/samples-dev/monitorsGetSample.js +12 -4
  46. package/dist-esm/samples-dev/monitorsGetSample.js.map +1 -1
  47. package/dist-esm/samples-dev/monitorsListApiKeysSample.js +12 -4
  48. package/dist-esm/samples-dev/monitorsListApiKeysSample.js.map +1 -1
  49. package/dist-esm/samples-dev/monitorsListByResourceGroupSample.js +12 -4
  50. package/dist-esm/samples-dev/monitorsListByResourceGroupSample.js.map +1 -1
  51. package/dist-esm/samples-dev/monitorsListHostsSample.js +12 -4
  52. package/dist-esm/samples-dev/monitorsListHostsSample.js.map +1 -1
  53. package/dist-esm/samples-dev/monitorsListLinkedResourcesSample.js +12 -4
  54. package/dist-esm/samples-dev/monitorsListLinkedResourcesSample.js.map +1 -1
  55. package/dist-esm/samples-dev/monitorsListMonitoredResourcesSample.js +12 -4
  56. package/dist-esm/samples-dev/monitorsListMonitoredResourcesSample.js.map +1 -1
  57. package/dist-esm/samples-dev/monitorsListSample.js +11 -3
  58. package/dist-esm/samples-dev/monitorsListSample.js.map +1 -1
  59. package/dist-esm/samples-dev/monitorsRefreshSetPasswordLinkSample.js +12 -4
  60. package/dist-esm/samples-dev/monitorsRefreshSetPasswordLinkSample.js.map +1 -1
  61. package/dist-esm/samples-dev/monitorsSetDefaultKeySample.js +12 -4
  62. package/dist-esm/samples-dev/monitorsSetDefaultKeySample.js.map +1 -1
  63. package/dist-esm/samples-dev/monitorsUpdateSample.js +12 -4
  64. package/dist-esm/samples-dev/monitorsUpdateSample.js.map +1 -1
  65. package/dist-esm/samples-dev/operationsListSample.js +13 -5
  66. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  67. package/dist-esm/samples-dev/singleSignOnConfigurationsCreateOrUpdateSample.js +12 -4
  68. package/dist-esm/samples-dev/singleSignOnConfigurationsCreateOrUpdateSample.js.map +1 -1
  69. package/dist-esm/samples-dev/singleSignOnConfigurationsGetSample.js +12 -4
  70. package/dist-esm/samples-dev/singleSignOnConfigurationsGetSample.js.map +1 -1
  71. package/dist-esm/samples-dev/singleSignOnConfigurationsListSample.js +12 -4
  72. package/dist-esm/samples-dev/singleSignOnConfigurationsListSample.js.map +1 -1
  73. package/dist-esm/samples-dev/tagRulesCreateOrUpdateSample.js +12 -4
  74. package/dist-esm/samples-dev/tagRulesCreateOrUpdateSample.js.map +1 -1
  75. package/dist-esm/samples-dev/tagRulesGetSample.js +12 -4
  76. package/dist-esm/samples-dev/tagRulesGetSample.js.map +1 -1
  77. package/dist-esm/samples-dev/tagRulesListSample.js +12 -4
  78. package/dist-esm/samples-dev/tagRulesListSample.js.map +1 -1
  79. package/dist-esm/src/lroImpl.d.ts +6 -11
  80. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  81. package/dist-esm/src/lroImpl.js +12 -20
  82. package/dist-esm/src/lroImpl.js.map +1 -1
  83. package/dist-esm/src/microsoftDatadogClient.d.ts +3 -1
  84. package/dist-esm/src/microsoftDatadogClient.d.ts.map +1 -1
  85. package/dist-esm/src/microsoftDatadogClient.js +5 -3
  86. package/dist-esm/src/microsoftDatadogClient.js.map +1 -1
  87. package/dist-esm/src/models/index.d.ts +177 -19
  88. package/dist-esm/src/models/index.d.ts.map +1 -1
  89. package/dist-esm/src/models/index.js +26 -0
  90. package/dist-esm/src/models/index.js.map +1 -1
  91. package/dist-esm/src/models/mappers.d.ts +7 -0
  92. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  93. package/dist-esm/src/models/mappers.js +190 -2
  94. package/dist-esm/src/models/mappers.js.map +1 -1
  95. package/dist-esm/src/models/parameters.d.ts +2 -0
  96. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  97. package/dist-esm/src/models/parameters.js +16 -2
  98. package/dist-esm/src/models/parameters.js.map +1 -1
  99. package/dist-esm/src/operations/creationSupported.d.ts +34 -0
  100. package/dist-esm/src/operations/creationSupported.d.ts.map +1 -0
  101. package/dist-esm/src/operations/creationSupported.js +122 -0
  102. package/dist-esm/src/operations/creationSupported.js.map +1 -0
  103. package/dist-esm/src/operations/index.d.ts +2 -0
  104. package/dist-esm/src/operations/index.d.ts.map +1 -1
  105. package/dist-esm/src/operations/index.js +2 -0
  106. package/dist-esm/src/operations/index.js.map +1 -1
  107. package/dist-esm/src/operations/marketplaceAgreements.js +0 -1
  108. package/dist-esm/src/operations/marketplaceAgreements.js.map +1 -1
  109. package/dist-esm/src/operations/monitoredSubscriptions.d.ts +87 -0
  110. package/dist-esm/src/operations/monitoredSubscriptions.d.ts.map +1 -0
  111. package/dist-esm/src/operations/monitoredSubscriptions.js +399 -0
  112. package/dist-esm/src/operations/monitoredSubscriptions.js.map +1 -0
  113. package/dist-esm/src/operations/monitors.d.ts +4 -4
  114. package/dist-esm/src/operations/monitors.d.ts.map +1 -1
  115. package/dist-esm/src/operations/monitors.js +27 -21
  116. package/dist-esm/src/operations/monitors.js.map +1 -1
  117. package/dist-esm/src/operations/operations.d.ts +2 -2
  118. package/dist-esm/src/operations/operations.js +2 -3
  119. package/dist-esm/src/operations/operations.js.map +1 -1
  120. package/dist-esm/src/operations/singleSignOnConfigurations.d.ts +2 -2
  121. package/dist-esm/src/operations/singleSignOnConfigurations.d.ts.map +1 -1
  122. package/dist-esm/src/operations/singleSignOnConfigurations.js +11 -8
  123. package/dist-esm/src/operations/singleSignOnConfigurations.js.map +1 -1
  124. package/dist-esm/src/operations/tagRules.js +0 -1
  125. package/dist-esm/src/operations/tagRules.js.map +1 -1
  126. package/dist-esm/src/operationsInterfaces/creationSupported.d.ts +18 -0
  127. package/dist-esm/src/operationsInterfaces/creationSupported.d.ts.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/creationSupported.js +9 -0
  129. package/dist-esm/src/operationsInterfaces/creationSupported.js.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  131. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  132. package/dist-esm/src/operationsInterfaces/index.js +2 -0
  133. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  134. package/dist-esm/src/operationsInterfaces/monitoredSubscriptions.d.ts +70 -0
  135. package/dist-esm/src/operationsInterfaces/monitoredSubscriptions.d.ts.map +1 -0
  136. package/dist-esm/src/operationsInterfaces/monitoredSubscriptions.js +9 -0
  137. package/dist-esm/src/operationsInterfaces/monitoredSubscriptions.js.map +1 -0
  138. package/dist-esm/src/operationsInterfaces/monitors.d.ts +4 -4
  139. package/dist-esm/src/operationsInterfaces/monitors.d.ts.map +1 -1
  140. package/dist-esm/src/operationsInterfaces/operations.d.ts +1 -1
  141. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts +2 -2
  142. package/dist-esm/src/operationsInterfaces/singleSignOnConfigurations.d.ts.map +1 -1
  143. package/dist-esm/src/pagingHelper.d.ts +4 -4
  144. package/dist-esm/src/pagingHelper.js +4 -4
  145. package/dist-esm/test/datadog_operations_test.spec.d.ts +4 -0
  146. package/dist-esm/test/datadog_operations_test.spec.d.ts.map +1 -0
  147. package/dist-esm/test/datadog_operations_test.spec.js +73 -0
  148. package/dist-esm/test/datadog_operations_test.spec.js.map +1 -0
  149. package/package.json +10 -9
  150. package/review/arm-datadog.api.md +155 -8
  151. package/src/lroImpl.ts +31 -23
  152. package/src/microsoftDatadogClient.ts +12 -4
  153. package/src/models/index.ts +204 -19
  154. package/src/models/mappers.ts +197 -2
  155. package/src/models/parameters.ts +19 -2
  156. package/src/operations/creationSupported.ts +150 -0
  157. package/src/operations/index.ts +2 -0
  158. package/src/operations/marketplaceAgreements.ts +0 -1
  159. package/src/operations/monitoredSubscriptions.ts +557 -0
  160. package/src/operations/monitors.ts +42 -38
  161. package/src/operations/operations.ts +2 -3
  162. package/src/operations/singleSignOnConfigurations.ts +20 -14
  163. package/src/operations/tagRules.ts +0 -1
  164. package/src/operationsInterfaces/creationSupported.ts +38 -0
  165. package/src/operationsInterfaces/index.ts +2 -0
  166. package/src/operationsInterfaces/monitoredSubscriptions.ts +138 -0
  167. package/src/operationsInterfaces/monitors.ts +6 -6
  168. package/src/operationsInterfaces/operations.ts +1 -1
  169. package/src/operationsInterfaces/singleSignOnConfigurations.ts +3 -3
  170. package/src/pagingHelper.ts +4 -4
  171. package/types/arm-datadog.d.ts +297 -30
  172. package/dist-esm/test/sampleTest.d.ts +0 -2
  173. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  174. package/dist-esm/test/sampleTest.js +0 -38
  175. package/dist-esm/test/sampleTest.js.map +0 -1
package/dist/index.js CHANGED
@@ -34,11 +34,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespaceDefault(coreRest
34
34
  */
35
35
  const pageMap = new WeakMap();
36
36
  /**
37
- * Given a result page from a pageable operation, returns a
38
- * continuation token that can be used to begin paging from
37
+ * Given the last `.value` produced by the `byPage` iterator,
38
+ * returns a continuation token that can be used to begin paging from
39
39
  * that point later.
40
- * @param page A result object from calling .byPage() on a paged operation.
41
- * @returns The continuation token that can be passed into byPage().
40
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
41
+ * @returns The continuation token that can be passed into byPage() during future calls.
42
42
  */
43
43
  function getContinuationToken(page) {
44
44
  var _a;
@@ -154,6 +154,32 @@ exports.KnownSingleSignOnStates = void 0;
154
154
  /** Existing */
155
155
  KnownSingleSignOnStates["Existing"] = "Existing";
156
156
  })(exports.KnownSingleSignOnStates || (exports.KnownSingleSignOnStates = {}));
157
+ /** Known values of {@link Operation} that the service accepts. */
158
+ exports.KnownOperation = void 0;
159
+ (function (KnownOperation) {
160
+ /** AddBegin */
161
+ KnownOperation["AddBegin"] = "AddBegin";
162
+ /** AddComplete */
163
+ KnownOperation["AddComplete"] = "AddComplete";
164
+ /** DeleteBegin */
165
+ KnownOperation["DeleteBegin"] = "DeleteBegin";
166
+ /** DeleteComplete */
167
+ KnownOperation["DeleteComplete"] = "DeleteComplete";
168
+ /** Active */
169
+ KnownOperation["Active"] = "Active";
170
+ })(exports.KnownOperation || (exports.KnownOperation = {}));
171
+ /** Known values of {@link Status} that the service accepts. */
172
+ exports.KnownStatus = void 0;
173
+ (function (KnownStatus) {
174
+ /** InProgress */
175
+ KnownStatus["InProgress"] = "InProgress";
176
+ /** Active */
177
+ KnownStatus["Active"] = "Active";
178
+ /** Failed */
179
+ KnownStatus["Failed"] = "Failed";
180
+ /** Deleting */
181
+ KnownStatus["Deleting"] = "Deleting";
182
+ })(exports.KnownStatus || (exports.KnownStatus = {}));
157
183
 
158
184
  /*
159
185
  * Copyright (c) Microsoft Corporation.
@@ -424,6 +450,63 @@ const ErrorAdditionalInfo = {
424
450
  }
425
451
  }
426
452
  };
453
+ const CreateResourceSupportedResponseList = {
454
+ type: {
455
+ name: "Composite",
456
+ className: "CreateResourceSupportedResponseList",
457
+ modelProperties: {
458
+ value: {
459
+ serializedName: "value",
460
+ type: {
461
+ name: "Sequence",
462
+ element: {
463
+ type: {
464
+ name: "Composite",
465
+ className: "CreateResourceSupportedResponse"
466
+ }
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }
472
+ };
473
+ const CreateResourceSupportedResponse = {
474
+ type: {
475
+ name: "Composite",
476
+ className: "CreateResourceSupportedResponse",
477
+ modelProperties: {
478
+ properties: {
479
+ serializedName: "properties",
480
+ type: {
481
+ name: "Composite",
482
+ className: "CreateResourceSupportedProperties"
483
+ }
484
+ }
485
+ }
486
+ }
487
+ };
488
+ const CreateResourceSupportedProperties = {
489
+ type: {
490
+ name: "Composite",
491
+ className: "CreateResourceSupportedProperties",
492
+ modelProperties: {
493
+ name: {
494
+ serializedName: "name",
495
+ readOnly: true,
496
+ type: {
497
+ name: "String"
498
+ }
499
+ },
500
+ creationSupported: {
501
+ serializedName: "creationSupported",
502
+ readOnly: true,
503
+ type: {
504
+ name: "Boolean"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ };
427
510
  const DatadogApiKeyListResponse = {
428
511
  type: {
429
512
  name: "Composite",
@@ -985,14 +1068,12 @@ const DatadogOrganizationProperties = {
985
1068
  modelProperties: {
986
1069
  name: {
987
1070
  serializedName: "name",
988
- readOnly: true,
989
1071
  type: {
990
1072
  name: "String"
991
1073
  }
992
1074
  },
993
1075
  id: {
994
1076
  serializedName: "id",
995
- readOnly: true,
996
1077
  type: {
997
1078
  name: "String"
998
1079
  }
@@ -1032,6 +1113,12 @@ const DatadogOrganizationProperties = {
1032
1113
  type: {
1033
1114
  name: "String"
1034
1115
  }
1116
+ },
1117
+ cspm: {
1118
+ serializedName: "cspm",
1119
+ type: {
1120
+ name: "Boolean"
1121
+ }
1035
1122
  }
1036
1123
  }
1037
1124
  }
@@ -1139,6 +1226,12 @@ const MonitorUpdateProperties = {
1139
1226
  type: {
1140
1227
  name: "String"
1141
1228
  }
1229
+ },
1230
+ cspm: {
1231
+ serializedName: "cspm",
1232
+ type: {
1233
+ name: "Boolean"
1234
+ }
1142
1235
  }
1143
1236
  }
1144
1237
  }
@@ -1251,6 +1344,12 @@ const MonitoringTagRulesProperties = {
1251
1344
  name: "Composite",
1252
1345
  className: "MetricRules"
1253
1346
  }
1347
+ },
1348
+ automuting: {
1349
+ serializedName: "automuting",
1350
+ type: {
1351
+ name: "Boolean"
1352
+ }
1254
1353
  }
1255
1354
  }
1256
1355
  }
@@ -1442,9 +1541,127 @@ const DatadogSingleSignOnProperties = {
1442
1541
  }
1443
1542
  }
1444
1543
  };
1544
+ const MonitoredSubscriptionPropertiesList = {
1545
+ type: {
1546
+ name: "Composite",
1547
+ className: "MonitoredSubscriptionPropertiesList",
1548
+ modelProperties: {
1549
+ value: {
1550
+ serializedName: "value",
1551
+ type: {
1552
+ name: "Sequence",
1553
+ element: {
1554
+ type: {
1555
+ name: "Composite",
1556
+ className: "MonitoredSubscriptionProperties"
1557
+ }
1558
+ }
1559
+ }
1560
+ }
1561
+ }
1562
+ }
1563
+ };
1564
+ const MonitoredSubscriptionProperties = {
1565
+ type: {
1566
+ name: "Composite",
1567
+ className: "MonitoredSubscriptionProperties",
1568
+ modelProperties: {
1569
+ name: {
1570
+ serializedName: "name",
1571
+ readOnly: true,
1572
+ type: {
1573
+ name: "String"
1574
+ }
1575
+ },
1576
+ id: {
1577
+ serializedName: "id",
1578
+ readOnly: true,
1579
+ type: {
1580
+ name: "String"
1581
+ }
1582
+ },
1583
+ type: {
1584
+ serializedName: "type",
1585
+ readOnly: true,
1586
+ type: {
1587
+ name: "String"
1588
+ }
1589
+ },
1590
+ properties: {
1591
+ serializedName: "properties",
1592
+ type: {
1593
+ name: "Composite",
1594
+ className: "SubscriptionList"
1595
+ }
1596
+ }
1597
+ }
1598
+ }
1599
+ };
1600
+ const SubscriptionList = {
1601
+ type: {
1602
+ name: "Composite",
1603
+ className: "SubscriptionList",
1604
+ modelProperties: {
1605
+ operation: {
1606
+ serializedName: "operation",
1607
+ type: {
1608
+ name: "String"
1609
+ }
1610
+ },
1611
+ monitoredSubscriptionList: {
1612
+ serializedName: "monitoredSubscriptionList",
1613
+ type: {
1614
+ name: "Sequence",
1615
+ element: {
1616
+ type: {
1617
+ name: "Composite",
1618
+ className: "MonitoredSubscription"
1619
+ }
1620
+ }
1621
+ }
1622
+ }
1623
+ }
1624
+ }
1625
+ };
1626
+ const MonitoredSubscription = {
1627
+ type: {
1628
+ name: "Composite",
1629
+ className: "MonitoredSubscription",
1630
+ modelProperties: {
1631
+ subscriptionId: {
1632
+ serializedName: "subscriptionId",
1633
+ type: {
1634
+ name: "String"
1635
+ }
1636
+ },
1637
+ status: {
1638
+ serializedName: "status",
1639
+ type: {
1640
+ name: "String"
1641
+ }
1642
+ },
1643
+ error: {
1644
+ serializedName: "error",
1645
+ type: {
1646
+ name: "String"
1647
+ }
1648
+ },
1649
+ tagRules: {
1650
+ serializedName: "tagRules",
1651
+ type: {
1652
+ name: "Composite",
1653
+ className: "MonitoringTagRulesProperties"
1654
+ }
1655
+ }
1656
+ }
1657
+ }
1658
+ };
1445
1659
 
1446
1660
  var Mappers = /*#__PURE__*/Object.freeze({
1447
1661
  __proto__: null,
1662
+ CreateResourceSupportedProperties: CreateResourceSupportedProperties,
1663
+ CreateResourceSupportedResponse: CreateResourceSupportedResponse,
1664
+ CreateResourceSupportedResponseList: CreateResourceSupportedResponseList,
1448
1665
  DatadogAgreementProperties: DatadogAgreementProperties,
1449
1666
  DatadogAgreementResource: DatadogAgreementResource,
1450
1667
  DatadogAgreementResourceListResponse: DatadogAgreementResourceListResponse,
@@ -1476,6 +1693,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
1476
1693
  MonitorUpdateProperties: MonitorUpdateProperties,
1477
1694
  MonitoredResource: MonitoredResource,
1478
1695
  MonitoredResourceListResponse: MonitoredResourceListResponse,
1696
+ MonitoredSubscription: MonitoredSubscription,
1697
+ MonitoredSubscriptionProperties: MonitoredSubscriptionProperties,
1698
+ MonitoredSubscriptionPropertiesList: MonitoredSubscriptionPropertiesList,
1479
1699
  MonitoringTagRules: MonitoringTagRules,
1480
1700
  MonitoringTagRulesListResponse: MonitoringTagRulesListResponse,
1481
1701
  MonitoringTagRulesProperties: MonitoringTagRulesProperties,
@@ -1483,6 +1703,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
1483
1703
  OperationListResult: OperationListResult,
1484
1704
  OperationResult: OperationResult,
1485
1705
  ResourceSku: ResourceSku,
1706
+ SubscriptionList: SubscriptionList,
1486
1707
  SystemData: SystemData,
1487
1708
  UserInfo: UserInfo
1488
1709
  });
@@ -1532,7 +1753,7 @@ const subscriptionId = {
1532
1753
  const apiVersion = {
1533
1754
  parameterPath: "apiVersion",
1534
1755
  mapper: {
1535
- defaultValue: "2021-03-01",
1756
+ defaultValue: "2023-01-01",
1536
1757
  isConstant: true,
1537
1758
  serializedName: "api-version",
1538
1759
  type: {
@@ -1566,6 +1787,16 @@ const nextLink = {
1566
1787
  },
1567
1788
  skipEncoding: true
1568
1789
  };
1790
+ const datadogOrganizationId = {
1791
+ parameterPath: "datadogOrganizationId",
1792
+ mapper: {
1793
+ serializedName: "datadogOrganizationId",
1794
+ required: true,
1795
+ type: {
1796
+ name: "String"
1797
+ }
1798
+ }
1799
+ };
1569
1800
  const resourceGroupName = {
1570
1801
  parameterPath: "resourceGroupName",
1571
1802
  mapper: {
@@ -1630,6 +1861,10 @@ const configurationName = {
1630
1861
  }
1631
1862
  }
1632
1863
  };
1864
+ const body6 = {
1865
+ parameterPath: ["options", "body"],
1866
+ mapper: MonitoredSubscriptionProperties
1867
+ };
1633
1868
 
1634
1869
  /*
1635
1870
  * Copyright (c) Microsoft Corporation.
@@ -1714,7 +1949,7 @@ class MarketplaceAgreementsImpl {
1714
1949
  * @param options The options parameters.
1715
1950
  */
1716
1951
  _list(options) {
1717
- return this.client.sendOperationRequest({ options }, listOperationSpec$4);
1952
+ return this.client.sendOperationRequest({ options }, listOperationSpec$6);
1718
1953
  }
1719
1954
  /**
1720
1955
  * Create Datadog marketplace agreement in the subscription.
@@ -1733,8 +1968,8 @@ class MarketplaceAgreementsImpl {
1733
1968
  }
1734
1969
  }
1735
1970
  // Operation Specifications
1736
- const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1737
- const listOperationSpec$4 = {
1971
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1972
+ const listOperationSpec$6 = {
1738
1973
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements",
1739
1974
  httpMethod: "GET",
1740
1975
  responses: {
@@ -1748,7 +1983,7 @@ const listOperationSpec$4 = {
1748
1983
  queryParameters: [apiVersion],
1749
1984
  urlParameters: [$host, subscriptionId],
1750
1985
  headerParameters: [accept],
1751
- serializer: serializer$4
1986
+ serializer: serializer$6
1752
1987
  };
1753
1988
  const createOrUpdateOperationSpec$2 = {
1754
1989
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default",
@@ -1766,7 +2001,7 @@ const createOrUpdateOperationSpec$2 = {
1766
2001
  urlParameters: [$host, subscriptionId],
1767
2002
  headerParameters: [accept, contentType],
1768
2003
  mediaType: "json",
1769
- serializer: serializer$4
2004
+ serializer: serializer$6
1770
2005
  };
1771
2006
  const listNextOperationSpec$4 = {
1772
2007
  path: "{nextLink}",
@@ -1779,44 +2014,15 @@ const listNextOperationSpec$4 = {
1779
2014
  bodyMapper: ErrorResponse
1780
2015
  }
1781
2016
  },
1782
- queryParameters: [apiVersion],
1783
2017
  urlParameters: [
1784
2018
  $host,
1785
2019
  subscriptionId,
1786
2020
  nextLink
1787
2021
  ],
1788
2022
  headerParameters: [accept],
1789
- serializer: serializer$4
2023
+ serializer: serializer$6
1790
2024
  };
1791
2025
 
1792
- /*
1793
- * Copyright (c) Microsoft Corporation.
1794
- * Licensed under the MIT License.
1795
- *
1796
- * Code generated by Microsoft (R) AutoRest Code Generator.
1797
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1798
- */
1799
- class LroImpl {
1800
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
1801
- this.sendOperationFn = sendOperationFn;
1802
- this.args = args;
1803
- this.spec = spec;
1804
- this.requestPath = requestPath;
1805
- this.requestMethod = requestMethod;
1806
- }
1807
- sendInitialRequest() {
1808
- return tslib.__awaiter(this, void 0, void 0, function* () {
1809
- return this.sendOperationFn(this.args, this.spec);
1810
- });
1811
- }
1812
- sendPollRequest(path) {
1813
- return tslib.__awaiter(this, void 0, void 0, function* () {
1814
- const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
1815
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
1816
- });
1817
- }
1818
- }
1819
-
1820
2026
  /*
1821
2027
  * Copyright (c) Microsoft Corporation.
1822
2028
  * Licensed under the MIT License.
@@ -1825,23 +2031,22 @@ class LroImpl {
1825
2031
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1826
2032
  */
1827
2033
  /// <reference lib="esnext.asynciterable" />
1828
- /** Class containing Monitors operations. */
1829
- class MonitorsImpl {
2034
+ /** Class containing CreationSupported operations. */
2035
+ class CreationSupportedImpl {
1830
2036
  /**
1831
- * Initialize a new instance of the class Monitors class.
2037
+ * Initialize a new instance of the class CreationSupported class.
1832
2038
  * @param client Reference to the service client
1833
2039
  */
1834
2040
  constructor(client) {
1835
2041
  this.client = client;
1836
2042
  }
1837
2043
  /**
1838
- * List the api keys for a given monitor resource.
1839
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1840
- * @param monitorName Monitor resource name
2044
+ * Informs if the current subscription is being already monitored for selected Datadog organization.
2045
+ * @param datadogOrganizationId Datadog Organization Id
1841
2046
  * @param options The options parameters.
1842
2047
  */
1843
- listApiKeys(resourceGroupName, monitorName, options) {
1844
- const iter = this.listApiKeysPagingAll(resourceGroupName, monitorName, options);
2048
+ list(datadogOrganizationId, options) {
2049
+ const iter = this.listPagingAll(datadogOrganizationId, options);
1845
2050
  return {
1846
2051
  next() {
1847
2052
  return iter.next();
@@ -1853,35 +2058,22 @@ class MonitorsImpl {
1853
2058
  if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1854
2059
  throw new Error("maxPageSize is not supported by this operation.");
1855
2060
  }
1856
- return this.listApiKeysPagingPage(resourceGroupName, monitorName, options, settings);
2061
+ return this.listPagingPage(datadogOrganizationId, options, settings);
1857
2062
  }
1858
2063
  };
1859
2064
  }
1860
- listApiKeysPagingPage(resourceGroupName, monitorName, options, settings) {
1861
- return tslib.__asyncGenerator(this, arguments, function* listApiKeysPagingPage_1() {
2065
+ listPagingPage(datadogOrganizationId, options, _settings) {
2066
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1862
2067
  let result;
1863
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1864
- if (!continuationToken) {
1865
- result = yield tslib.__await(this._listApiKeys(resourceGroupName, monitorName, options));
1866
- let page = result.value || [];
1867
- continuationToken = result.nextLink;
1868
- setContinuationToken(page, continuationToken);
1869
- yield yield tslib.__await(page);
1870
- }
1871
- while (continuationToken) {
1872
- result = yield tslib.__await(this._listApiKeysNext(resourceGroupName, monitorName, continuationToken, options));
1873
- continuationToken = result.nextLink;
1874
- let page = result.value || [];
1875
- setContinuationToken(page, continuationToken);
1876
- yield yield tslib.__await(page);
1877
- }
2068
+ result = yield tslib.__await(this._list(datadogOrganizationId, options));
2069
+ yield yield tslib.__await(result.value || []);
1878
2070
  });
1879
2071
  }
1880
- listApiKeysPagingAll(resourceGroupName, monitorName, options) {
1881
- return tslib.__asyncGenerator(this, arguments, function* listApiKeysPagingAll_1() {
2072
+ listPagingAll(datadogOrganizationId, options) {
2073
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1882
2074
  var _a, e_1, _b, _c;
1883
2075
  try {
1884
- for (var _d = true, _e = tslib.__asyncValues(this.listApiKeysPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2076
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(datadogOrganizationId, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1885
2077
  _c = _f.value;
1886
2078
  _d = false;
1887
2079
  const page = _c;
@@ -1898,42 +2090,194 @@ class MonitorsImpl {
1898
2090
  });
1899
2091
  }
1900
2092
  /**
1901
- * List the hosts for a given monitor resource.
1902
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
1903
- * @param monitorName Monitor resource name
2093
+ * Informs if the current subscription is being already monitored for selected Datadog organization.
2094
+ * @param datadogOrganizationId Datadog Organization Id
1904
2095
  * @param options The options parameters.
1905
2096
  */
1906
- listHosts(resourceGroupName, monitorName, options) {
1907
- const iter = this.listHostsPagingAll(resourceGroupName, monitorName, options);
1908
- return {
1909
- next() {
1910
- return iter.next();
1911
- },
1912
- [Symbol.asyncIterator]() {
1913
- return this;
1914
- },
1915
- byPage: (settings) => {
1916
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1917
- throw new Error("maxPageSize is not supported by this operation.");
1918
- }
1919
- return this.listHostsPagingPage(resourceGroupName, monitorName, options, settings);
1920
- }
1921
- };
2097
+ _list(datadogOrganizationId, options) {
2098
+ return this.client.sendOperationRequest({ datadogOrganizationId, options }, listOperationSpec$5);
1922
2099
  }
1923
- listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
1924
- return tslib.__asyncGenerator(this, arguments, function* listHostsPagingPage_1() {
1925
- let result;
1926
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1927
- if (!continuationToken) {
1928
- result = yield tslib.__await(this._listHosts(resourceGroupName, monitorName, options));
1929
- let page = result.value || [];
1930
- continuationToken = result.nextLink;
1931
- setContinuationToken(page, continuationToken);
1932
- yield yield tslib.__await(page);
1933
- }
1934
- while (continuationToken) {
1935
- result = yield tslib.__await(this._listHostsNext(resourceGroupName, monitorName, continuationToken, options));
1936
- continuationToken = result.nextLink;
2100
+ /**
2101
+ * Informs if the current subscription is being already monitored for selected Datadog organization.
2102
+ * @param datadogOrganizationId Datadog Organization Id
2103
+ * @param options The options parameters.
2104
+ */
2105
+ get(datadogOrganizationId, options) {
2106
+ return this.client.sendOperationRequest({ datadogOrganizationId, options }, getOperationSpec$4);
2107
+ }
2108
+ }
2109
+ // Operation Specifications
2110
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2111
+ const listOperationSpec$5 = {
2112
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses",
2113
+ httpMethod: "GET",
2114
+ responses: {
2115
+ 200: {
2116
+ bodyMapper: CreateResourceSupportedResponseList
2117
+ },
2118
+ default: {
2119
+ bodyMapper: ErrorResponse
2120
+ }
2121
+ },
2122
+ queryParameters: [apiVersion, datadogOrganizationId],
2123
+ urlParameters: [$host, subscriptionId],
2124
+ headerParameters: [accept],
2125
+ serializer: serializer$5
2126
+ };
2127
+ const getOperationSpec$4 = {
2128
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default",
2129
+ httpMethod: "GET",
2130
+ responses: {
2131
+ 200: {
2132
+ bodyMapper: CreateResourceSupportedResponse
2133
+ },
2134
+ default: {
2135
+ bodyMapper: ErrorResponse
2136
+ }
2137
+ },
2138
+ queryParameters: [apiVersion, datadogOrganizationId],
2139
+ urlParameters: [$host, subscriptionId],
2140
+ headerParameters: [accept],
2141
+ serializer: serializer$5
2142
+ };
2143
+
2144
+ /*
2145
+ * Copyright (c) Microsoft Corporation.
2146
+ * Licensed under the MIT License.
2147
+ *
2148
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2149
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2150
+ */
2151
+ function createLroSpec(inputs) {
2152
+ const { args, spec, sendOperationFn } = inputs;
2153
+ return {
2154
+ requestMethod: spec.httpMethod,
2155
+ requestPath: spec.path,
2156
+ sendInitialRequest: () => sendOperationFn(args, spec),
2157
+ sendPollRequest: (path, options) => {
2158
+ const restSpec = tslib.__rest(spec, ["requestBody"]);
2159
+ return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
2160
+ }
2161
+ };
2162
+ }
2163
+
2164
+ /*
2165
+ * Copyright (c) Microsoft Corporation.
2166
+ * Licensed under the MIT License.
2167
+ *
2168
+ * Code generated by Microsoft (R) AutoRest Code Generator.
2169
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2170
+ */
2171
+ /// <reference lib="esnext.asynciterable" />
2172
+ /** Class containing Monitors operations. */
2173
+ class MonitorsImpl {
2174
+ /**
2175
+ * Initialize a new instance of the class Monitors class.
2176
+ * @param client Reference to the service client
2177
+ */
2178
+ constructor(client) {
2179
+ this.client = client;
2180
+ }
2181
+ /**
2182
+ * List the api keys for a given monitor resource.
2183
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2184
+ * @param monitorName Monitor resource name
2185
+ * @param options The options parameters.
2186
+ */
2187
+ listApiKeys(resourceGroupName, monitorName, options) {
2188
+ const iter = this.listApiKeysPagingAll(resourceGroupName, monitorName, options);
2189
+ return {
2190
+ next() {
2191
+ return iter.next();
2192
+ },
2193
+ [Symbol.asyncIterator]() {
2194
+ return this;
2195
+ },
2196
+ byPage: (settings) => {
2197
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2198
+ throw new Error("maxPageSize is not supported by this operation.");
2199
+ }
2200
+ return this.listApiKeysPagingPage(resourceGroupName, monitorName, options, settings);
2201
+ }
2202
+ };
2203
+ }
2204
+ listApiKeysPagingPage(resourceGroupName, monitorName, options, settings) {
2205
+ return tslib.__asyncGenerator(this, arguments, function* listApiKeysPagingPage_1() {
2206
+ let result;
2207
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2208
+ if (!continuationToken) {
2209
+ result = yield tslib.__await(this._listApiKeys(resourceGroupName, monitorName, options));
2210
+ let page = result.value || [];
2211
+ continuationToken = result.nextLink;
2212
+ setContinuationToken(page, continuationToken);
2213
+ yield yield tslib.__await(page);
2214
+ }
2215
+ while (continuationToken) {
2216
+ result = yield tslib.__await(this._listApiKeysNext(resourceGroupName, monitorName, continuationToken, options));
2217
+ continuationToken = result.nextLink;
2218
+ let page = result.value || [];
2219
+ setContinuationToken(page, continuationToken);
2220
+ yield yield tslib.__await(page);
2221
+ }
2222
+ });
2223
+ }
2224
+ listApiKeysPagingAll(resourceGroupName, monitorName, options) {
2225
+ return tslib.__asyncGenerator(this, arguments, function* listApiKeysPagingAll_1() {
2226
+ var _a, e_1, _b, _c;
2227
+ try {
2228
+ for (var _d = true, _e = tslib.__asyncValues(this.listApiKeysPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2229
+ _c = _f.value;
2230
+ _d = false;
2231
+ const page = _c;
2232
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
2233
+ }
2234
+ }
2235
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2236
+ finally {
2237
+ try {
2238
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2239
+ }
2240
+ finally { if (e_1) throw e_1.error; }
2241
+ }
2242
+ });
2243
+ }
2244
+ /**
2245
+ * List the hosts for a given monitor resource.
2246
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2247
+ * @param monitorName Monitor resource name
2248
+ * @param options The options parameters.
2249
+ */
2250
+ listHosts(resourceGroupName, monitorName, options) {
2251
+ const iter = this.listHostsPagingAll(resourceGroupName, monitorName, options);
2252
+ return {
2253
+ next() {
2254
+ return iter.next();
2255
+ },
2256
+ [Symbol.asyncIterator]() {
2257
+ return this;
2258
+ },
2259
+ byPage: (settings) => {
2260
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
2261
+ throw new Error("maxPageSize is not supported by this operation.");
2262
+ }
2263
+ return this.listHostsPagingPage(resourceGroupName, monitorName, options, settings);
2264
+ }
2265
+ };
2266
+ }
2267
+ listHostsPagingPage(resourceGroupName, monitorName, options, settings) {
2268
+ return tslib.__asyncGenerator(this, arguments, function* listHostsPagingPage_1() {
2269
+ let result;
2270
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
2271
+ if (!continuationToken) {
2272
+ result = yield tslib.__await(this._listHosts(resourceGroupName, monitorName, options));
2273
+ let page = result.value || [];
2274
+ continuationToken = result.nextLink;
2275
+ setContinuationToken(page, continuationToken);
2276
+ yield yield tslib.__await(page);
2277
+ }
2278
+ while (continuationToken) {
2279
+ result = yield tslib.__await(this._listHostsNext(resourceGroupName, monitorName, continuationToken, options));
2280
+ continuationToken = result.nextLink;
1937
2281
  let page = result.value || [];
1938
2282
  setContinuationToken(page, continuationToken);
1939
2283
  yield yield tslib.__await(page);
@@ -2268,7 +2612,7 @@ class MonitorsImpl {
2268
2612
  * @param options The options parameters.
2269
2613
  */
2270
2614
  _list(options) {
2271
- return this.client.sendOperationRequest({ options }, listOperationSpec$3);
2615
+ return this.client.sendOperationRequest({ options }, listOperationSpec$4);
2272
2616
  }
2273
2617
  /**
2274
2618
  * List all monitors under the specified resource group.
@@ -2285,7 +2629,7 @@ class MonitorsImpl {
2285
2629
  * @param options The options parameters.
2286
2630
  */
2287
2631
  get(resourceGroupName, monitorName, options) {
2288
- return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, getOperationSpec$2);
2632
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, getOperationSpec$3);
2289
2633
  }
2290
2634
  /**
2291
2635
  * Create a monitor resource.
@@ -2298,7 +2642,7 @@ class MonitorsImpl {
2298
2642
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2299
2643
  return this.client.sendOperationRequest(args, spec);
2300
2644
  });
2301
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2645
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2302
2646
  var _a;
2303
2647
  let currentRawResponse = undefined;
2304
2648
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2317,11 +2661,15 @@ class MonitorsImpl {
2317
2661
  }
2318
2662
  };
2319
2663
  });
2320
- const lro = new LroImpl(sendOperation, { resourceGroupName, monitorName, options }, createOperationSpec);
2321
- const poller = new coreLro.LroEngine(lro, {
2322
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2664
+ const lro = createLroSpec({
2665
+ sendOperationFn,
2666
+ args: { resourceGroupName, monitorName, options },
2667
+ spec: createOperationSpec
2668
+ });
2669
+ const poller = yield coreLro.createHttpPoller(lro, {
2670
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2323
2671
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2324
- lroResourceLocationConfig: "azure-async-operation"
2672
+ resourceLocationConfig: "azure-async-operation"
2325
2673
  });
2326
2674
  yield poller.poll();
2327
2675
  return poller;
@@ -2350,7 +2698,7 @@ class MonitorsImpl {
2350
2698
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2351
2699
  return this.client.sendOperationRequest(args, spec);
2352
2700
  });
2353
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2701
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2354
2702
  var _a;
2355
2703
  let currentRawResponse = undefined;
2356
2704
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2369,9 +2717,13 @@ class MonitorsImpl {
2369
2717
  }
2370
2718
  };
2371
2719
  });
2372
- const lro = new LroImpl(sendOperation, { resourceGroupName, monitorName, options }, updateOperationSpec);
2373
- const poller = new coreLro.LroEngine(lro, {
2374
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2720
+ const lro = createLroSpec({
2721
+ sendOperationFn,
2722
+ args: { resourceGroupName, monitorName, options },
2723
+ spec: updateOperationSpec$1
2724
+ });
2725
+ const poller = yield coreLro.createHttpPoller(lro, {
2726
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2375
2727
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2376
2728
  });
2377
2729
  yield poller.poll();
@@ -2401,7 +2753,7 @@ class MonitorsImpl {
2401
2753
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2402
2754
  return this.client.sendOperationRequest(args, spec);
2403
2755
  });
2404
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2756
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2405
2757
  var _a;
2406
2758
  let currentRawResponse = undefined;
2407
2759
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -2420,9 +2772,13 @@ class MonitorsImpl {
2420
2772
  }
2421
2773
  };
2422
2774
  });
2423
- const lro = new LroImpl(sendOperation, { resourceGroupName, monitorName, options }, deleteOperationSpec);
2424
- const poller = new coreLro.LroEngine(lro, {
2425
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2775
+ const lro = createLroSpec({
2776
+ sendOperationFn,
2777
+ args: { resourceGroupName, monitorName, options },
2778
+ spec: deleteOperationSpec$1
2779
+ });
2780
+ const poller = yield coreLro.createHttpPoller(lro, {
2781
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2426
2782
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2427
2783
  });
2428
2784
  yield poller.poll();
@@ -2509,7 +2865,7 @@ class MonitorsImpl {
2509
2865
  }
2510
2866
  }
2511
2867
  // Operation Specifications
2512
- const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2868
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2513
2869
  const listApiKeysOperationSpec = {
2514
2870
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys",
2515
2871
  httpMethod: "POST",
@@ -2529,7 +2885,7 @@ const listApiKeysOperationSpec = {
2529
2885
  monitorName
2530
2886
  ],
2531
2887
  headerParameters: [accept],
2532
- serializer: serializer$3
2888
+ serializer: serializer$4
2533
2889
  };
2534
2890
  const getDefaultKeyOperationSpec = {
2535
2891
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getDefaultKey",
@@ -2550,7 +2906,7 @@ const getDefaultKeyOperationSpec = {
2550
2906
  monitorName
2551
2907
  ],
2552
2908
  headerParameters: [accept],
2553
- serializer: serializer$3
2909
+ serializer: serializer$4
2554
2910
  };
2555
2911
  const setDefaultKeyOperationSpec = {
2556
2912
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey",
@@ -2571,7 +2927,7 @@ const setDefaultKeyOperationSpec = {
2571
2927
  ],
2572
2928
  headerParameters: [accept, contentType],
2573
2929
  mediaType: "json",
2574
- serializer: serializer$3
2930
+ serializer: serializer$4
2575
2931
  };
2576
2932
  const listHostsOperationSpec = {
2577
2933
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts",
@@ -2592,7 +2948,7 @@ const listHostsOperationSpec = {
2592
2948
  monitorName
2593
2949
  ],
2594
2950
  headerParameters: [accept],
2595
- serializer: serializer$3
2951
+ serializer: serializer$4
2596
2952
  };
2597
2953
  const listLinkedResourcesOperationSpec = {
2598
2954
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources",
@@ -2613,7 +2969,7 @@ const listLinkedResourcesOperationSpec = {
2613
2969
  monitorName
2614
2970
  ],
2615
2971
  headerParameters: [accept],
2616
- serializer: serializer$3
2972
+ serializer: serializer$4
2617
2973
  };
2618
2974
  const listMonitoredResourcesOperationSpec = {
2619
2975
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources",
@@ -2634,9 +2990,9 @@ const listMonitoredResourcesOperationSpec = {
2634
2990
  monitorName
2635
2991
  ],
2636
2992
  headerParameters: [accept],
2637
- serializer: serializer$3
2993
+ serializer: serializer$4
2638
2994
  };
2639
- const listOperationSpec$3 = {
2995
+ const listOperationSpec$4 = {
2640
2996
  path: "/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/monitors",
2641
2997
  httpMethod: "GET",
2642
2998
  responses: {
@@ -2650,7 +3006,7 @@ const listOperationSpec$3 = {
2650
3006
  queryParameters: [apiVersion],
2651
3007
  urlParameters: [$host, subscriptionId],
2652
3008
  headerParameters: [accept],
2653
- serializer: serializer$3
3009
+ serializer: serializer$4
2654
3010
  };
2655
3011
  const listByResourceGroupOperationSpec = {
2656
3012
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors",
@@ -2670,9 +3026,9 @@ const listByResourceGroupOperationSpec = {
2670
3026
  resourceGroupName
2671
3027
  ],
2672
3028
  headerParameters: [accept],
2673
- serializer: serializer$3
3029
+ serializer: serializer$4
2674
3030
  };
2675
- const getOperationSpec$2 = {
3031
+ const getOperationSpec$3 = {
2676
3032
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
2677
3033
  httpMethod: "GET",
2678
3034
  responses: {
@@ -2691,7 +3047,7 @@ const getOperationSpec$2 = {
2691
3047
  monitorName
2692
3048
  ],
2693
3049
  headerParameters: [accept],
2694
- serializer: serializer$3
3050
+ serializer: serializer$4
2695
3051
  };
2696
3052
  const createOperationSpec = {
2697
3053
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
@@ -2723,9 +3079,9 @@ const createOperationSpec = {
2723
3079
  ],
2724
3080
  headerParameters: [accept, contentType],
2725
3081
  mediaType: "json",
2726
- serializer: serializer$3
3082
+ serializer: serializer$4
2727
3083
  };
2728
- const updateOperationSpec = {
3084
+ const updateOperationSpec$1 = {
2729
3085
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
2730
3086
  httpMethod: "PATCH",
2731
3087
  responses: {
@@ -2755,9 +3111,9 @@ const updateOperationSpec = {
2755
3111
  ],
2756
3112
  headerParameters: [accept, contentType],
2757
3113
  mediaType: "json",
2758
- serializer: serializer$3
3114
+ serializer: serializer$4
2759
3115
  };
2760
- const deleteOperationSpec = {
3116
+ const deleteOperationSpec$1 = {
2761
3117
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}",
2762
3118
  httpMethod: "DELETE",
2763
3119
  responses: {
@@ -2777,7 +3133,7 @@ const deleteOperationSpec = {
2777
3133
  monitorName
2778
3134
  ],
2779
3135
  headerParameters: [accept],
2780
- serializer: serializer$3
3136
+ serializer: serializer$4
2781
3137
  };
2782
3138
  const refreshSetPasswordLinkOperationSpec = {
2783
3139
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/refreshSetPasswordLink",
@@ -2798,7 +3154,7 @@ const refreshSetPasswordLinkOperationSpec = {
2798
3154
  monitorName
2799
3155
  ],
2800
3156
  headerParameters: [accept],
2801
- serializer: serializer$3
3157
+ serializer: serializer$4
2802
3158
  };
2803
3159
  const listApiKeysNextOperationSpec = {
2804
3160
  path: "{nextLink}",
@@ -2811,7 +3167,6 @@ const listApiKeysNextOperationSpec = {
2811
3167
  bodyMapper: ErrorResponse
2812
3168
  }
2813
3169
  },
2814
- queryParameters: [apiVersion],
2815
3170
  urlParameters: [
2816
3171
  $host,
2817
3172
  subscriptionId,
@@ -2820,7 +3175,7 @@ const listApiKeysNextOperationSpec = {
2820
3175
  monitorName
2821
3176
  ],
2822
3177
  headerParameters: [accept],
2823
- serializer: serializer$3
3178
+ serializer: serializer$4
2824
3179
  };
2825
3180
  const listHostsNextOperationSpec = {
2826
3181
  path: "{nextLink}",
@@ -2833,7 +3188,6 @@ const listHostsNextOperationSpec = {
2833
3188
  bodyMapper: ErrorResponse
2834
3189
  }
2835
3190
  },
2836
- queryParameters: [apiVersion],
2837
3191
  urlParameters: [
2838
3192
  $host,
2839
3193
  subscriptionId,
@@ -2842,7 +3196,7 @@ const listHostsNextOperationSpec = {
2842
3196
  monitorName
2843
3197
  ],
2844
3198
  headerParameters: [accept],
2845
- serializer: serializer$3
3199
+ serializer: serializer$4
2846
3200
  };
2847
3201
  const listLinkedResourcesNextOperationSpec = {
2848
3202
  path: "{nextLink}",
@@ -2855,7 +3209,6 @@ const listLinkedResourcesNextOperationSpec = {
2855
3209
  bodyMapper: ErrorResponse
2856
3210
  }
2857
3211
  },
2858
- queryParameters: [apiVersion],
2859
3212
  urlParameters: [
2860
3213
  $host,
2861
3214
  subscriptionId,
@@ -2864,7 +3217,7 @@ const listLinkedResourcesNextOperationSpec = {
2864
3217
  monitorName
2865
3218
  ],
2866
3219
  headerParameters: [accept],
2867
- serializer: serializer$3
3220
+ serializer: serializer$4
2868
3221
  };
2869
3222
  const listMonitoredResourcesNextOperationSpec = {
2870
3223
  path: "{nextLink}",
@@ -2877,7 +3230,6 @@ const listMonitoredResourcesNextOperationSpec = {
2877
3230
  bodyMapper: ErrorResponse
2878
3231
  }
2879
3232
  },
2880
- queryParameters: [apiVersion],
2881
3233
  urlParameters: [
2882
3234
  $host,
2883
3235
  subscriptionId,
@@ -2886,7 +3238,7 @@ const listMonitoredResourcesNextOperationSpec = {
2886
3238
  monitorName
2887
3239
  ],
2888
3240
  headerParameters: [accept],
2889
- serializer: serializer$3
3241
+ serializer: serializer$4
2890
3242
  };
2891
3243
  const listNextOperationSpec$3 = {
2892
3244
  path: "{nextLink}",
@@ -2899,14 +3251,13 @@ const listNextOperationSpec$3 = {
2899
3251
  bodyMapper: ErrorResponse
2900
3252
  }
2901
3253
  },
2902
- queryParameters: [apiVersion],
2903
3254
  urlParameters: [
2904
3255
  $host,
2905
3256
  subscriptionId,
2906
3257
  nextLink
2907
3258
  ],
2908
3259
  headerParameters: [accept],
2909
- serializer: serializer$3
3260
+ serializer: serializer$4
2910
3261
  };
2911
3262
  const listByResourceGroupNextOperationSpec = {
2912
3263
  path: "{nextLink}",
@@ -2919,7 +3270,6 @@ const listByResourceGroupNextOperationSpec = {
2919
3270
  bodyMapper: ErrorResponse
2920
3271
  }
2921
3272
  },
2922
- queryParameters: [apiVersion],
2923
3273
  urlParameters: [
2924
3274
  $host,
2925
3275
  subscriptionId,
@@ -2927,7 +3277,7 @@ const listByResourceGroupNextOperationSpec = {
2927
3277
  resourceGroupName
2928
3278
  ],
2929
3279
  headerParameters: [accept],
2930
- serializer: serializer$3
3280
+ serializer: serializer$4
2931
3281
  };
2932
3282
 
2933
3283
  /*
@@ -2948,7 +3298,7 @@ class OperationsImpl {
2948
3298
  this.client = client;
2949
3299
  }
2950
3300
  /**
2951
- * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
3301
+ * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version.
2952
3302
  * @param options The options parameters.
2953
3303
  */
2954
3304
  list(options) {
@@ -3009,11 +3359,11 @@ class OperationsImpl {
3009
3359
  });
3010
3360
  }
3011
3361
  /**
3012
- * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version.
3362
+ * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version.
3013
3363
  * @param options The options parameters.
3014
3364
  */
3015
3365
  _list(options) {
3016
- return this.client.sendOperationRequest({ options }, listOperationSpec$2);
3366
+ return this.client.sendOperationRequest({ options }, listOperationSpec$3);
3017
3367
  }
3018
3368
  /**
3019
3369
  * ListNext
@@ -3025,8 +3375,8 @@ class OperationsImpl {
3025
3375
  }
3026
3376
  }
3027
3377
  // Operation Specifications
3028
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3029
- const listOperationSpec$2 = {
3378
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3379
+ const listOperationSpec$3 = {
3030
3380
  path: "/providers/Microsoft.Datadog/operations",
3031
3381
  httpMethod: "GET",
3032
3382
  responses: {
@@ -3040,7 +3390,7 @@ const listOperationSpec$2 = {
3040
3390
  queryParameters: [apiVersion],
3041
3391
  urlParameters: [$host],
3042
3392
  headerParameters: [accept],
3043
- serializer: serializer$2
3393
+ serializer: serializer$3
3044
3394
  };
3045
3395
  const listNextOperationSpec$2 = {
3046
3396
  path: "{nextLink}",
@@ -3053,10 +3403,9 @@ const listNextOperationSpec$2 = {
3053
3403
  bodyMapper: ErrorResponse
3054
3404
  }
3055
3405
  },
3056
- queryParameters: [apiVersion],
3057
3406
  urlParameters: [$host, nextLink],
3058
3407
  headerParameters: [accept],
3059
- serializer: serializer$2
3408
+ serializer: serializer$3
3060
3409
  };
3061
3410
 
3062
3411
  /*
@@ -3146,7 +3495,7 @@ class TagRulesImpl {
3146
3495
  * @param options The options parameters.
3147
3496
  */
3148
3497
  _list(resourceGroupName, monitorName, options) {
3149
- return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, listOperationSpec$1);
3498
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, listOperationSpec$2);
3150
3499
  }
3151
3500
  /**
3152
3501
  * Create or update a tag rule set for a given monitor resource.
@@ -3166,7 +3515,7 @@ class TagRulesImpl {
3166
3515
  * @param options The options parameters.
3167
3516
  */
3168
3517
  get(resourceGroupName, monitorName, ruleSetName, options) {
3169
- return this.client.sendOperationRequest({ resourceGroupName, monitorName, ruleSetName, options }, getOperationSpec$1);
3518
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, ruleSetName, options }, getOperationSpec$2);
3170
3519
  }
3171
3520
  /**
3172
3521
  * ListNext
@@ -3180,8 +3529,8 @@ class TagRulesImpl {
3180
3529
  }
3181
3530
  }
3182
3531
  // Operation Specifications
3183
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3184
- const listOperationSpec$1 = {
3532
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3533
+ const listOperationSpec$2 = {
3185
3534
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules",
3186
3535
  httpMethod: "GET",
3187
3536
  responses: {
@@ -3200,7 +3549,7 @@ const listOperationSpec$1 = {
3200
3549
  monitorName
3201
3550
  ],
3202
3551
  headerParameters: [accept],
3203
- serializer: serializer$1
3552
+ serializer: serializer$2
3204
3553
  };
3205
3554
  const createOrUpdateOperationSpec$1 = {
3206
3555
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName}",
@@ -3224,9 +3573,9 @@ const createOrUpdateOperationSpec$1 = {
3224
3573
  ],
3225
3574
  headerParameters: [accept, contentType],
3226
3575
  mediaType: "json",
3227
- serializer: serializer$1
3576
+ serializer: serializer$2
3228
3577
  };
3229
- const getOperationSpec$1 = {
3578
+ const getOperationSpec$2 = {
3230
3579
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName}",
3231
3580
  httpMethod: "GET",
3232
3581
  responses: {
@@ -3246,7 +3595,7 @@ const getOperationSpec$1 = {
3246
3595
  ruleSetName
3247
3596
  ],
3248
3597
  headerParameters: [accept],
3249
- serializer: serializer$1
3598
+ serializer: serializer$2
3250
3599
  };
3251
3600
  const listNextOperationSpec$1 = {
3252
3601
  path: "{nextLink}",
@@ -3259,7 +3608,6 @@ const listNextOperationSpec$1 = {
3259
3608
  bodyMapper: ErrorResponse
3260
3609
  }
3261
3610
  },
3262
- queryParameters: [apiVersion],
3263
3611
  urlParameters: [
3264
3612
  $host,
3265
3613
  subscriptionId,
@@ -3268,7 +3616,7 @@ const listNextOperationSpec$1 = {
3268
3616
  monitorName
3269
3617
  ],
3270
3618
  headerParameters: [accept],
3271
- serializer: serializer$1
3619
+ serializer: serializer$2
3272
3620
  };
3273
3621
 
3274
3622
  /*
@@ -3358,7 +3706,7 @@ class SingleSignOnConfigurationsImpl {
3358
3706
  * @param options The options parameters.
3359
3707
  */
3360
3708
  _list(resourceGroupName, monitorName, options) {
3361
- return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, listOperationSpec);
3709
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, listOperationSpec$1);
3362
3710
  }
3363
3711
  /**
3364
3712
  * Configures single-sign-on for this resource.
@@ -3372,7 +3720,7 @@ class SingleSignOnConfigurationsImpl {
3372
3720
  const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3373
3721
  return this.client.sendOperationRequest(args, spec);
3374
3722
  });
3375
- const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3723
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3376
3724
  var _a;
3377
3725
  let currentRawResponse = undefined;
3378
3726
  const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
@@ -3391,11 +3739,15 @@ class SingleSignOnConfigurationsImpl {
3391
3739
  }
3392
3740
  };
3393
3741
  });
3394
- const lro = new LroImpl(sendOperation, { resourceGroupName, monitorName, configurationName, options }, createOrUpdateOperationSpec);
3395
- const poller = new coreLro.LroEngine(lro, {
3396
- resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3742
+ const lro = createLroSpec({
3743
+ sendOperationFn,
3744
+ args: { resourceGroupName, monitorName, configurationName, options },
3745
+ spec: createOrUpdateOperationSpec
3746
+ });
3747
+ const poller = yield coreLro.createHttpPoller(lro, {
3748
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3397
3749
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3398
- lroResourceLocationConfig: "azure-async-operation"
3750
+ resourceLocationConfig: "azure-async-operation"
3399
3751
  });
3400
3752
  yield poller.poll();
3401
3753
  return poller;
@@ -3422,7 +3774,7 @@ class SingleSignOnConfigurationsImpl {
3422
3774
  * @param options The options parameters.
3423
3775
  */
3424
3776
  get(resourceGroupName, monitorName, configurationName, options) {
3425
- return this.client.sendOperationRequest({ resourceGroupName, monitorName, configurationName, options }, getOperationSpec);
3777
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, configurationName, options }, getOperationSpec$1);
3426
3778
  }
3427
3779
  /**
3428
3780
  * ListNext
@@ -3436,8 +3788,8 @@ class SingleSignOnConfigurationsImpl {
3436
3788
  }
3437
3789
  }
3438
3790
  // Operation Specifications
3439
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3440
- const listOperationSpec = {
3791
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3792
+ const listOperationSpec$1 = {
3441
3793
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations",
3442
3794
  httpMethod: "GET",
3443
3795
  responses: {
@@ -3456,7 +3808,7 @@ const listOperationSpec = {
3456
3808
  monitorName
3457
3809
  ],
3458
3810
  headerParameters: [accept],
3459
- serializer
3811
+ serializer: serializer$1
3460
3812
  };
3461
3813
  const createOrUpdateOperationSpec = {
3462
3814
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}",
@@ -3489,9 +3841,9 @@ const createOrUpdateOperationSpec = {
3489
3841
  ],
3490
3842
  headerParameters: [accept, contentType],
3491
3843
  mediaType: "json",
3492
- serializer
3844
+ serializer: serializer$1
3493
3845
  };
3494
- const getOperationSpec = {
3846
+ const getOperationSpec$1 = {
3495
3847
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}",
3496
3848
  httpMethod: "GET",
3497
3849
  responses: {
@@ -3511,7 +3863,7 @@ const getOperationSpec = {
3511
3863
  configurationName
3512
3864
  ],
3513
3865
  headerParameters: [accept],
3514
- serializer
3866
+ serializer: serializer$1
3515
3867
  };
3516
3868
  const listNextOperationSpec = {
3517
3869
  path: "{nextLink}",
@@ -3524,7 +3876,6 @@ const listNextOperationSpec = {
3524
3876
  bodyMapper: ErrorResponse
3525
3877
  }
3526
3878
  },
3527
- queryParameters: [apiVersion],
3528
3879
  urlParameters: [
3529
3880
  $host,
3530
3881
  subscriptionId,
@@ -3533,6 +3884,399 @@ const listNextOperationSpec = {
3533
3884
  monitorName
3534
3885
  ],
3535
3886
  headerParameters: [accept],
3887
+ serializer: serializer$1
3888
+ };
3889
+
3890
+ /*
3891
+ * Copyright (c) Microsoft Corporation.
3892
+ * Licensed under the MIT License.
3893
+ *
3894
+ * Code generated by Microsoft (R) AutoRest Code Generator.
3895
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
3896
+ */
3897
+ /// <reference lib="esnext.asynciterable" />
3898
+ /** Class containing MonitoredSubscriptions operations. */
3899
+ class MonitoredSubscriptionsImpl {
3900
+ /**
3901
+ * Initialize a new instance of the class MonitoredSubscriptions class.
3902
+ * @param client Reference to the service client
3903
+ */
3904
+ constructor(client) {
3905
+ this.client = client;
3906
+ }
3907
+ /**
3908
+ * List the subscriptions currently being monitored by the Datadog monitor resource.
3909
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3910
+ * @param monitorName Monitor resource name
3911
+ * @param options The options parameters.
3912
+ */
3913
+ list(resourceGroupName, monitorName, options) {
3914
+ const iter = this.listPagingAll(resourceGroupName, monitorName, options);
3915
+ return {
3916
+ next() {
3917
+ return iter.next();
3918
+ },
3919
+ [Symbol.asyncIterator]() {
3920
+ return this;
3921
+ },
3922
+ byPage: (settings) => {
3923
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
3924
+ throw new Error("maxPageSize is not supported by this operation.");
3925
+ }
3926
+ return this.listPagingPage(resourceGroupName, monitorName, options, settings);
3927
+ }
3928
+ };
3929
+ }
3930
+ listPagingPage(resourceGroupName, monitorName, options, _settings) {
3931
+ return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
3932
+ let result;
3933
+ result = yield tslib.__await(this._list(resourceGroupName, monitorName, options));
3934
+ yield yield tslib.__await(result.value || []);
3935
+ });
3936
+ }
3937
+ listPagingAll(resourceGroupName, monitorName, options) {
3938
+ return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
3939
+ var _a, e_1, _b, _c;
3940
+ try {
3941
+ for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(resourceGroupName, monitorName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
3942
+ _c = _f.value;
3943
+ _d = false;
3944
+ const page = _c;
3945
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
3946
+ }
3947
+ }
3948
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
3949
+ finally {
3950
+ try {
3951
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
3952
+ }
3953
+ finally { if (e_1) throw e_1.error; }
3954
+ }
3955
+ });
3956
+ }
3957
+ /**
3958
+ * List the subscriptions currently being monitored by the Datadog monitor resource.
3959
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3960
+ * @param monitorName Monitor resource name
3961
+ * @param options The options parameters.
3962
+ */
3963
+ _list(resourceGroupName, monitorName, options) {
3964
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, options }, listOperationSpec);
3965
+ }
3966
+ /**
3967
+ * List the subscriptions currently being monitored by the Datadog monitor resource.
3968
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3969
+ * @param monitorName Monitor resource name
3970
+ * @param configurationName The configuration name. Only 'default' value is supported.
3971
+ * @param options The options parameters.
3972
+ */
3973
+ get(resourceGroupName, monitorName, configurationName, options) {
3974
+ return this.client.sendOperationRequest({ resourceGroupName, monitorName, configurationName, options }, getOperationSpec);
3975
+ }
3976
+ /**
3977
+ * Add the subscriptions that should be monitored by the Datadog monitor resource.
3978
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
3979
+ * @param monitorName Monitor resource name
3980
+ * @param configurationName The configuration name. Only 'default' value is supported.
3981
+ * @param options The options parameters.
3982
+ */
3983
+ beginCreateorUpdate(resourceGroupName, monitorName, configurationName, options) {
3984
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3985
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3986
+ return this.client.sendOperationRequest(args, spec);
3987
+ });
3988
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3989
+ var _a;
3990
+ let currentRawResponse = undefined;
3991
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3992
+ const callback = (rawResponse, flatResponse) => {
3993
+ currentRawResponse = rawResponse;
3994
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3995
+ };
3996
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3997
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3998
+ return {
3999
+ flatResponse,
4000
+ rawResponse: {
4001
+ statusCode: currentRawResponse.status,
4002
+ body: currentRawResponse.parsedBody,
4003
+ headers: currentRawResponse.headers.toJSON()
4004
+ }
4005
+ };
4006
+ });
4007
+ const lro = createLroSpec({
4008
+ sendOperationFn,
4009
+ args: { resourceGroupName, monitorName, configurationName, options },
4010
+ spec: createorUpdateOperationSpec
4011
+ });
4012
+ const poller = yield coreLro.createHttpPoller(lro, {
4013
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4014
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4015
+ });
4016
+ yield poller.poll();
4017
+ return poller;
4018
+ });
4019
+ }
4020
+ /**
4021
+ * Add the subscriptions that should be monitored by the Datadog monitor resource.
4022
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4023
+ * @param monitorName Monitor resource name
4024
+ * @param configurationName The configuration name. Only 'default' value is supported.
4025
+ * @param options The options parameters.
4026
+ */
4027
+ beginCreateorUpdateAndWait(resourceGroupName, monitorName, configurationName, options) {
4028
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4029
+ const poller = yield this.beginCreateorUpdate(resourceGroupName, monitorName, configurationName, options);
4030
+ return poller.pollUntilDone();
4031
+ });
4032
+ }
4033
+ /**
4034
+ * Updates the subscriptions that are being monitored by the Datadog monitor resource
4035
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4036
+ * @param monitorName Monitor resource name
4037
+ * @param configurationName The configuration name. Only 'default' value is supported.
4038
+ * @param options The options parameters.
4039
+ */
4040
+ beginUpdate(resourceGroupName, monitorName, configurationName, options) {
4041
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4042
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4043
+ return this.client.sendOperationRequest(args, spec);
4044
+ });
4045
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4046
+ var _a;
4047
+ let currentRawResponse = undefined;
4048
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4049
+ const callback = (rawResponse, flatResponse) => {
4050
+ currentRawResponse = rawResponse;
4051
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4052
+ };
4053
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4054
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4055
+ return {
4056
+ flatResponse,
4057
+ rawResponse: {
4058
+ statusCode: currentRawResponse.status,
4059
+ body: currentRawResponse.parsedBody,
4060
+ headers: currentRawResponse.headers.toJSON()
4061
+ }
4062
+ };
4063
+ });
4064
+ const lro = createLroSpec({
4065
+ sendOperationFn,
4066
+ args: { resourceGroupName, monitorName, configurationName, options },
4067
+ spec: updateOperationSpec
4068
+ });
4069
+ const poller = yield coreLro.createHttpPoller(lro, {
4070
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4071
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4072
+ });
4073
+ yield poller.poll();
4074
+ return poller;
4075
+ });
4076
+ }
4077
+ /**
4078
+ * Updates the subscriptions that are being monitored by the Datadog monitor resource
4079
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4080
+ * @param monitorName Monitor resource name
4081
+ * @param configurationName The configuration name. Only 'default' value is supported.
4082
+ * @param options The options parameters.
4083
+ */
4084
+ beginUpdateAndWait(resourceGroupName, monitorName, configurationName, options) {
4085
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4086
+ const poller = yield this.beginUpdate(resourceGroupName, monitorName, configurationName, options);
4087
+ return poller.pollUntilDone();
4088
+ });
4089
+ }
4090
+ /**
4091
+ * Updates the subscriptions that are being monitored by the Datadog monitor resource
4092
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4093
+ * @param monitorName Monitor resource name
4094
+ * @param configurationName Configuration name
4095
+ * @param options The options parameters.
4096
+ */
4097
+ beginDelete(resourceGroupName, monitorName, configurationName, options) {
4098
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4099
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4100
+ return this.client.sendOperationRequest(args, spec);
4101
+ });
4102
+ const sendOperationFn = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
4103
+ var _a;
4104
+ let currentRawResponse = undefined;
4105
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
4106
+ const callback = (rawResponse, flatResponse) => {
4107
+ currentRawResponse = rawResponse;
4108
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
4109
+ };
4110
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
4111
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
4112
+ return {
4113
+ flatResponse,
4114
+ rawResponse: {
4115
+ statusCode: currentRawResponse.status,
4116
+ body: currentRawResponse.parsedBody,
4117
+ headers: currentRawResponse.headers.toJSON()
4118
+ }
4119
+ };
4120
+ });
4121
+ const lro = createLroSpec({
4122
+ sendOperationFn,
4123
+ args: { resourceGroupName, monitorName, configurationName, options },
4124
+ spec: deleteOperationSpec
4125
+ });
4126
+ const poller = yield coreLro.createHttpPoller(lro, {
4127
+ restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4128
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
4129
+ });
4130
+ yield poller.poll();
4131
+ return poller;
4132
+ });
4133
+ }
4134
+ /**
4135
+ * Updates the subscriptions that are being monitored by the Datadog monitor resource
4136
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
4137
+ * @param monitorName Monitor resource name
4138
+ * @param configurationName Configuration name
4139
+ * @param options The options parameters.
4140
+ */
4141
+ beginDeleteAndWait(resourceGroupName, monitorName, configurationName, options) {
4142
+ return tslib.__awaiter(this, void 0, void 0, function* () {
4143
+ const poller = yield this.beginDelete(resourceGroupName, monitorName, configurationName, options);
4144
+ return poller.pollUntilDone();
4145
+ });
4146
+ }
4147
+ }
4148
+ // Operation Specifications
4149
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
4150
+ const listOperationSpec = {
4151
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions",
4152
+ httpMethod: "GET",
4153
+ responses: {
4154
+ 200: {
4155
+ bodyMapper: MonitoredSubscriptionPropertiesList
4156
+ },
4157
+ default: {
4158
+ bodyMapper: ErrorResponse
4159
+ }
4160
+ },
4161
+ queryParameters: [apiVersion],
4162
+ urlParameters: [
4163
+ $host,
4164
+ subscriptionId,
4165
+ resourceGroupName,
4166
+ monitorName
4167
+ ],
4168
+ headerParameters: [accept],
4169
+ serializer
4170
+ };
4171
+ const getOperationSpec = {
4172
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
4173
+ httpMethod: "GET",
4174
+ responses: {
4175
+ 200: {
4176
+ bodyMapper: MonitoredSubscriptionProperties
4177
+ },
4178
+ default: {
4179
+ bodyMapper: ErrorResponse
4180
+ }
4181
+ },
4182
+ queryParameters: [apiVersion],
4183
+ urlParameters: [
4184
+ $host,
4185
+ subscriptionId,
4186
+ resourceGroupName,
4187
+ monitorName,
4188
+ configurationName
4189
+ ],
4190
+ headerParameters: [accept],
4191
+ serializer
4192
+ };
4193
+ const createorUpdateOperationSpec = {
4194
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
4195
+ httpMethod: "PUT",
4196
+ responses: {
4197
+ 200: {
4198
+ bodyMapper: MonitoredSubscriptionProperties
4199
+ },
4200
+ 201: {
4201
+ bodyMapper: MonitoredSubscriptionProperties
4202
+ },
4203
+ 202: {
4204
+ bodyMapper: MonitoredSubscriptionProperties
4205
+ },
4206
+ 204: {
4207
+ bodyMapper: MonitoredSubscriptionProperties
4208
+ },
4209
+ default: {
4210
+ bodyMapper: ErrorResponse
4211
+ }
4212
+ },
4213
+ requestBody: body6,
4214
+ queryParameters: [apiVersion],
4215
+ urlParameters: [
4216
+ $host,
4217
+ subscriptionId,
4218
+ resourceGroupName,
4219
+ monitorName,
4220
+ configurationName
4221
+ ],
4222
+ headerParameters: [accept, contentType],
4223
+ mediaType: "json",
4224
+ serializer
4225
+ };
4226
+ const updateOperationSpec = {
4227
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
4228
+ httpMethod: "PATCH",
4229
+ responses: {
4230
+ 200: {
4231
+ bodyMapper: MonitoredSubscriptionProperties
4232
+ },
4233
+ 201: {
4234
+ bodyMapper: MonitoredSubscriptionProperties
4235
+ },
4236
+ 202: {
4237
+ bodyMapper: MonitoredSubscriptionProperties
4238
+ },
4239
+ 204: {
4240
+ bodyMapper: MonitoredSubscriptionProperties
4241
+ },
4242
+ default: {
4243
+ bodyMapper: ErrorResponse
4244
+ }
4245
+ },
4246
+ requestBody: body6,
4247
+ queryParameters: [apiVersion],
4248
+ urlParameters: [
4249
+ $host,
4250
+ subscriptionId,
4251
+ resourceGroupName,
4252
+ monitorName,
4253
+ configurationName
4254
+ ],
4255
+ headerParameters: [accept, contentType],
4256
+ mediaType: "json",
4257
+ serializer
4258
+ };
4259
+ const deleteOperationSpec = {
4260
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}",
4261
+ httpMethod: "DELETE",
4262
+ responses: {
4263
+ 200: {},
4264
+ 201: {},
4265
+ 202: {},
4266
+ 204: {},
4267
+ default: {
4268
+ bodyMapper: ErrorResponse
4269
+ }
4270
+ },
4271
+ queryParameters: [apiVersion],
4272
+ urlParameters: [
4273
+ $host,
4274
+ subscriptionId,
4275
+ resourceGroupName,
4276
+ monitorName,
4277
+ configurationName
4278
+ ],
4279
+ headerParameters: [accept],
3536
4280
  serializer
3537
4281
  };
3538
4282
 
@@ -3566,7 +4310,7 @@ class MicrosoftDatadogClient extends coreClient__namespace.ServiceClient {
3566
4310
  requestContentType: "application/json; charset=utf-8",
3567
4311
  credential: credentials
3568
4312
  };
3569
- const packageDetails = `azsdk-js-arm-datadog/3.0.3`;
4313
+ const packageDetails = `azsdk-js-arm-datadog/3.1.0`;
3570
4314
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
3571
4315
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
3572
4316
  : `${packageDetails}`;
@@ -3599,12 +4343,14 @@ class MicrosoftDatadogClient extends coreClient__namespace.ServiceClient {
3599
4343
  this.subscriptionId = subscriptionId;
3600
4344
  // Assigning values to Constant parameters
3601
4345
  this.$host = options.$host || "https://management.azure.com";
3602
- this.apiVersion = options.apiVersion || "2021-03-01";
4346
+ this.apiVersion = options.apiVersion || "2023-01-01";
3603
4347
  this.marketplaceAgreements = new MarketplaceAgreementsImpl(this);
4348
+ this.creationSupported = new CreationSupportedImpl(this);
3604
4349
  this.monitors = new MonitorsImpl(this);
3605
4350
  this.operations = new OperationsImpl(this);
3606
4351
  this.tagRules = new TagRulesImpl(this);
3607
4352
  this.singleSignOnConfigurations = new SingleSignOnConfigurationsImpl(this);
4353
+ this.monitoredSubscriptions = new MonitoredSubscriptionsImpl(this);
3608
4354
  this.addCustomApiVersionPolicy(options.apiVersion);
3609
4355
  }
3610
4356
  /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */