@azure/arm-resourcehealth 4.0.1-alpha.20231016.1 → 4.1.0-alpha.20231023.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/README.md +1 -1
  3. package/dist/index.js +144 -157
  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/availabilityStatusesGetByResourceSample.js +2 -4
  8. package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js.map +1 -1
  9. package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js +4 -9
  10. package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js.map +1 -1
  11. package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js +4 -9
  12. package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js.map +1 -1
  13. package/dist-esm/samples-dev/availabilityStatusesListSample.js +5 -12
  14. package/dist-esm/samples-dev/availabilityStatusesListSample.js.map +1 -1
  15. package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js +2 -4
  16. package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js.map +1 -1
  17. package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js +5 -12
  18. package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js.map +1 -1
  19. package/dist-esm/samples-dev/childResourcesListSample.js +5 -12
  20. package/dist-esm/samples-dev/childResourcesListSample.js.map +1 -1
  21. package/dist-esm/samples-dev/emergingIssuesGetSample.js +2 -4
  22. package/dist-esm/samples-dev/emergingIssuesGetSample.js.map +1 -1
  23. package/dist-esm/samples-dev/emergingIssuesListSample.js +5 -12
  24. package/dist-esm/samples-dev/emergingIssuesListSample.js.map +1 -1
  25. package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js +1 -1
  26. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js +2 -4
  27. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js.map +1 -1
  28. package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.js +1 -1
  29. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js +2 -4
  30. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js.map +1 -1
  31. package/dist-esm/samples-dev/eventsListBySingleResourceSample.js +5 -12
  32. package/dist-esm/samples-dev/eventsListBySingleResourceSample.js.map +1 -1
  33. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js +4 -9
  34. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js.map +1 -1
  35. package/dist-esm/samples-dev/eventsListByTenantIdSample.js +5 -12
  36. package/dist-esm/samples-dev/eventsListByTenantIdSample.js.map +1 -1
  37. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js +2 -4
  38. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js.map +1 -1
  39. package/dist-esm/samples-dev/impactedResourcesGetSample.js +1 -1
  40. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js +4 -9
  41. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -1
  42. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js +5 -12
  43. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js.map +1 -1
  44. package/dist-esm/samples-dev/metadataGetEntitySample.js +2 -4
  45. package/dist-esm/samples-dev/metadataGetEntitySample.js.map +1 -1
  46. package/dist-esm/samples-dev/metadataListSample.js +5 -12
  47. package/dist-esm/samples-dev/metadataListSample.js.map +1 -1
  48. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  49. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js +4 -9
  50. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -1
  51. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js +5 -12
  52. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js.map +1 -1
  53. package/dist-esm/src/microsoftResourceHealth.d.ts +2 -1
  54. package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
  55. package/dist-esm/src/microsoftResourceHealth.js +9 -11
  56. package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
  57. package/dist-esm/src/models/index.d.ts +46 -0
  58. package/dist-esm/src/models/index.d.ts.map +1 -1
  59. package/dist-esm/src/models/index.js +6 -0
  60. package/dist-esm/src/models/index.js.map +1 -1
  61. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  62. package/dist-esm/src/models/mappers.js +50 -0
  63. package/dist-esm/src/models/mappers.js.map +1 -1
  64. package/dist-esm/src/models/parameters.js +1 -1
  65. package/dist-esm/src/models/parameters.js.map +1 -1
  66. package/dist-esm/src/operations/availabilityStatuses.js +9 -24
  67. package/dist-esm/src/operations/availabilityStatuses.js.map +1 -1
  68. package/dist-esm/src/operations/childAvailabilityStatuses.js +3 -8
  69. package/dist-esm/src/operations/childAvailabilityStatuses.js.map +1 -1
  70. package/dist-esm/src/operations/childResources.js +3 -8
  71. package/dist-esm/src/operations/childResources.js.map +1 -1
  72. package/dist-esm/src/operations/emergingIssues.js +3 -8
  73. package/dist-esm/src/operations/emergingIssues.js.map +1 -1
  74. package/dist-esm/src/operations/eventsOperations.js +9 -24
  75. package/dist-esm/src/operations/eventsOperations.js.map +1 -1
  76. package/dist-esm/src/operations/impactedResources.js +6 -16
  77. package/dist-esm/src/operations/impactedResources.js.map +1 -1
  78. package/dist-esm/src/operations/metadata.js +3 -8
  79. package/dist-esm/src/operations/metadata.js.map +1 -1
  80. package/dist-esm/src/operations/securityAdvisoryImpactedResources.js +6 -16
  81. package/dist-esm/src/operations/securityAdvisoryImpactedResources.js.map +1 -1
  82. package/package.json +15 -8
  83. package/review/arm-resourcehealth.api.md +19 -1
  84. package/rollup.config.js +122 -0
  85. package/src/microsoftResourceHealth.ts +19 -5
  86. package/src/models/index.ts +48 -0
  87. package/src/models/mappers.ts +59 -0
  88. package/src/models/parameters.ts +1 -1
  89. package/types/arm-resourcehealth.d.ts +50 -1
@@ -16,27 +16,20 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists Azure services' emerging issues.
17
17
  *
18
18
  * @summary Lists Azure services' emerging issues.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/EmergingIssues_List.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/EmergingIssues_List.json
20
20
  */
21
21
  function getEmergingIssues() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const credential = new DefaultAzureCredential();
27
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
25
+ const client = new MicrosoftResourceHealth(credential);
28
26
  const resArray = new Array();
29
27
  try {
30
- for (var _d = true, _e = __asyncValues(client.emergingIssues.list()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
28
+ for (var _d = true, _e = __asyncValues(client.emergingIssues.list()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
31
29
  _c = _f.value;
32
30
  _d = false;
33
- try {
34
- let item = _c;
35
- resArray.push(item);
36
- }
37
- finally {
38
- _d = true;
39
- }
31
+ let item = _c;
32
+ resArray.push(item);
40
33
  }
41
34
  }
42
35
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"emergingIssuesListSample.js","sourceRoot":"","sources":["../../samples-dev/emergingIssuesListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAA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G;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAA,IAAA,sDAAE;gBAA9B,cAA4B;gBAA5B,WAA4B;gBAAxC,IAAI,IAAI,KAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Service health event details in the subscription by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
17
17
  *
18
18
  * @summary Service health event details in the subscription by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
20
20
  */
21
21
  function eventDetailsBySubscriptionIdAndTrackingId() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
@@ -16,15 +16,13 @@ dotenv.config();
16
16
  * This sample demonstrates how to Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
17
17
  *
18
18
  * @summary Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties for Security Advisory events
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Event_fetchDetailsByTenantIdAndTrackingId.json
20
20
  */
21
21
  function eventDetailsByTenantIdAndTrackingId() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
24
- "00000000-0000-0000-0000-000000000000";
25
23
  const eventTrackingId = "eventTrackingId";
26
24
  const credential = new DefaultAzureCredential();
27
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
25
+ const client = new MicrosoftResourceHealth(credential);
28
26
  const result = yield client.eventOperations.fetchDetailsByTenantIdAndTrackingId(eventTrackingId);
29
27
  console.log(result);
30
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"eventFetchDetailsByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mCAAmC;;QAChD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mCAAmC,CAC7E,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,mCAAmC,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"eventFetchDetailsByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mCAAmC;;QAChD,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mCAAmC,CAC7E,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,mCAAmC,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Service health event in the subscription by event tracking id
17
17
  *
18
18
  * @summary Service health event in the subscription by event tracking id
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetBySubscriptionIdAndTrackingId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Event_GetBySubscriptionIdAndTrackingId.json
20
20
  */
21
21
  function securityAdvisoriesEventBySubscriptionIdAndTrackingId() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
@@ -16,12 +16,10 @@ dotenv.config();
16
16
  * This sample demonstrates how to Service health event in the tenant by event tracking id
17
17
  *
18
18
  * @summary Service health event in the tenant by event tracking id
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Event_GetByTenantIdAndTrackingId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Event_GetByTenantIdAndTrackingId.json
20
20
  */
21
21
  function eventByTenantIdAndTrackingId() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
24
- "00000000-0000-0000-0000-000000000000";
25
23
  const filter = "properties/status eq 'Active'";
26
24
  const queryStartTime = "7/10/2022";
27
25
  const eventTrackingId = "eventTrackingId";
@@ -30,7 +28,7 @@ function eventByTenantIdAndTrackingId() {
30
28
  queryStartTime
31
29
  };
32
30
  const credential = new DefaultAzureCredential();
33
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
31
+ const client = new MicrosoftResourceHealth(credential);
34
32
  const result = yield client.eventOperations.getByTenantIdAndTrackingId(eventTrackingId, options);
35
33
  console.log(result);
36
34
  });
@@ -1 +1 @@
1
- {"version":3,"file":"eventGetByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventGetByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,4BAA4B;;QACzC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,MAAM,GAAG,+BAA+B,CAAC;QAC/C,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,OAAO,GAAkD;YAC7D,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,0BAA0B,CACpE,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,4BAA4B,EAAE,CAAC;IACjC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"eventGetByTenantIdAndTrackingIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventGetByTenantIdAndTrackingIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,4BAA4B;;QACzC,MAAM,MAAM,GAAG,+BAA+B,CAAC;QAC/C,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,eAAe,GAAG,iBAAiB,CAAC;QAC1C,MAAM,OAAO,GAAkD;YAC7D,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,0BAA0B,CACpE,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,4BAA4B,EAAE,CAAC;IACjC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,28 +16,21 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists current service health events for given resource.
17
17
  *
18
18
  * @summary Lists current service health events for given resource.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySingleResource.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Events_ListBySingleResource.json
20
20
  */
21
21
  function listEventsBySingleResource() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const resourceUri = "subscriptions/4abcdefgh-ijkl-mnop-qrstuvwxyz/resourceGroups/rhctestenv/providers/Microsoft.Compute/virtualMachines/rhctestenvV1PI";
27
25
  const credential = new DefaultAzureCredential();
28
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
26
+ const client = new MicrosoftResourceHealth(credential);
29
27
  const resArray = new Array();
30
28
  try {
31
- for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySingleResource(resourceUri)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
29
+ for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySingleResource(resourceUri)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
32
30
  _c = _f.value;
33
31
  _d = false;
34
- try {
35
- let item = _c;
36
- resArray.push(item);
37
- }
38
- finally {
39
- _d = true;
40
- }
32
+ let item = _c;
33
+ resArray.push(item);
41
34
  }
42
35
  }
43
36
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"eventsListBySingleResourceSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySingleResourceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,WAAW,GACf,mIAAmI,CAAC;QACtI,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,WAAW,CACZ,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"eventsListBySingleResourceSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySingleResourceSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,WAAW,GACf,mIAAmI,CAAC;QACtI,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,WAAW,CACZ,CAAA,IAAA,sDAAE;gBAFoB,cAEtB;gBAFsB,WAEtB;gBAFU,IAAI,IAAI,KAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists service health events in the subscription.
17
17
  *
18
18
  * @summary Lists service health events in the subscription.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListBySubscriptionId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Events_ListBySubscriptionId.json
20
20
  */
21
21
  function listEventsBySubscriptionId() {
22
22
  var _a, e_1, _b, _c;
@@ -32,16 +32,11 @@ function listEventsBySubscriptionId() {
32
32
  const client = new MicrosoftResourceHealth(credential, subscriptionId);
33
33
  const resArray = new Array();
34
34
  try {
35
- for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySubscriptionId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
35
+ for (var _d = true, _e = __asyncValues(client.eventsOperations.listBySubscriptionId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
36
36
  _c = _f.value;
37
37
  _d = false;
38
- try {
39
- let item = _c;
40
- resArray.push(item);
41
- }
42
- finally {
43
- _d = true;
44
- }
38
+ let item = _c;
39
+ resArray.push(item);
45
40
  }
46
41
  }
47
42
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"eventsListBySubscriptionIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySubscriptionIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,OAAO,GAA6C;YACxD,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,OAAO,CACR,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"eventsListBySubscriptionIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListBySubscriptionIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,OAAO,GAA6C;YACxD,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,CACjE,OAAO,CACR,CAAA,IAAA,sDAAE;gBAFoB,cAEtB;gBAFsB,WAEtB;gBAFU,IAAI,IAAI,KAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,13 +16,11 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists current service health events in the tenant.
17
17
  *
18
18
  * @summary Lists current service health events in the tenant.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Events_ListByTenantId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Events_ListByTenantId.json
20
20
  */
21
21
  function listEventsByTenantId() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const filter = "service eq 'Virtual Machines' or region eq 'West US'";
27
25
  const queryStartTime = "7/24/2020";
28
26
  const options = {
@@ -30,19 +28,14 @@ function listEventsByTenantId() {
30
28
  queryStartTime
31
29
  };
32
30
  const credential = new DefaultAzureCredential();
33
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
31
+ const client = new MicrosoftResourceHealth(credential);
34
32
  const resArray = new Array();
35
33
  try {
36
- for (var _d = true, _e = __asyncValues(client.eventsOperations.listByTenantId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
34
+ for (var _d = true, _e = __asyncValues(client.eventsOperations.listByTenantId(options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
37
35
  _c = _f.value;
38
36
  _d = false;
39
- try {
40
- let item = _c;
41
- resArray.push(item);
42
- }
43
- finally {
44
- _d = true;
45
- }
37
+ let item = _c;
38
+ resArray.push(item);
46
39
  }
47
40
  }
48
41
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"eventsListByTenantIdSample.js","sourceRoot":"","sources":["../../samples-dev/eventsListByTenantIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,MAAM,GAAG,sDAAsD,CAAC;QACtE,MAAM,cAAc,GAAG,WAAW,CAAC;QACnC,MAAM,OAAO,GAAuC;YAClD,MAAM;YACN,cAAc;SACf,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,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C,cAAc,CAAC,OAAO,CAAC,CAAA,IAAA,sDAAE;gBAAjD,cAA+C;gBAA/C,WAA+C;gBAA3D,IAAI,IAAI,KAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,16 +16,14 @@ dotenv.config();
16
16
  * This sample demonstrates how to Gets the specific impacted resource in the tenant by an event.
17
17
  *
18
18
  * @summary Gets the specific impacted resource in the tenant by an event.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_GetByTenantId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/ImpactedResources_GetByTenantId.json
20
20
  */
21
21
  function impactedResourcesGet() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
24
- "00000000-0000-0000-0000-000000000000";
25
23
  const eventTrackingId = "BC_1-FXZ";
26
24
  const impactedResourceName = "abc-123-ghj-456";
27
25
  const credential = new DefaultAzureCredential();
28
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
26
+ const client = new MicrosoftResourceHealth(credential);
29
27
  const result = yield client.impactedResources.getByTenantId(eventTrackingId, impactedResourceName);
30
28
  console.log(result);
31
29
  });
@@ -1 +1 @@
1
- {"version":3,"file":"impactedResourcesGetByTenantIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetByTenantIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,aAAa,CACzD,eAAe,EACf,oBAAoB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"impactedResourcesGetByTenantIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesGetByTenantIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,aAAa,CACzD,eAAe,EACf,oBAAoB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Gets the specific impacted resource in the subscription by an event.
17
17
  *
18
18
  * @summary Gets the specific impacted resource in the subscription by an event.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_Get.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/ImpactedResources_Get.json
20
20
  */
21
21
  function impactedResourcesGet() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists impacted resources in the subscription by an event.
17
17
  *
18
18
  * @summary Lists impacted resources in the subscription by an event.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/ImpactedResources_ListBySubscriptionId_ListByEventId.json
20
20
  */
21
21
  function listImpactedResourcesBySubscriptionId() {
22
22
  var _a, e_1, _b, _c;
@@ -31,16 +31,11 @@ function listImpactedResourcesBySubscriptionId() {
31
31
  const client = new MicrosoftResourceHealth(credential, subscriptionId);
32
32
  const resArray = new Array();
33
33
  try {
34
- for (var _d = true, _e = __asyncValues(client.impactedResources.listBySubscriptionIdAndEventId(eventTrackingId, options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
34
+ for (var _d = true, _e = __asyncValues(client.impactedResources.listBySubscriptionIdAndEventId(eventTrackingId, options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
35
35
  _c = _f.value;
36
36
  _d = false;
37
- try {
38
- let item = _c;
39
- resArray.push(item);
40
- }
41
- finally {
42
- _d = true;
43
- }
37
+ let item = _c;
38
+ resArray.push(item);
44
39
  }
45
40
  }
46
41
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"impactedResourcesListBySubscriptionIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qCAAqC;;;QAClD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,MAAM,GAAG,0BAA0B,CAAC;QAC1C,MAAM,OAAO,GAAkE;YAC7E,MAAM;SACP,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iBAAiB,CAAC,8BAA8B,CAC5E,eAAe,EACf,OAAO,CACR,CAAA,IAAA;gBAHsB,cAGtB;gBAHsB,WAGtB;;oBAHU,IAAI,IAAI,KAAA,CAAA;oBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,qCAAqC,EAAE,CAAC;IAC1C,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"impactedResourcesListBySubscriptionIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qCAAqC;;;QAClD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,MAAM,GAAG,0BAA0B,CAAC;QAC1C,MAAM,OAAO,GAAkE;YAC7E,MAAM;SACP,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iBAAiB,CAAC,8BAA8B,CAC5E,eAAe,EACf,OAAO,CACR,CAAA,IAAA,sDAAE;gBAHoB,cAGtB;gBAHsB,WAGtB;gBAHU,IAAI,IAAI,KAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,qCAAqC,EAAE,CAAC;IAC1C,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,32 +16,25 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists impacted resources in the tenant by an event.
17
17
  *
18
18
  * @summary Lists impacted resources in the tenant by an event.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/ImpactedResources_ListByTenantId_ListByEventId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/ImpactedResources_ListByTenantId_ListByEventId.json
20
20
  */
21
21
  function listEventsByTenantId() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const eventTrackingId = "BC_1-FXZ";
27
25
  const filter = "targetRegion eq 'westus'";
28
26
  const options = {
29
27
  filter
30
28
  };
31
29
  const credential = new DefaultAzureCredential();
32
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
30
+ const client = new MicrosoftResourceHealth(credential);
33
31
  const resArray = new Array();
34
32
  try {
35
- for (var _d = true, _e = __asyncValues(client.impactedResources.listByTenantIdAndEventId(eventTrackingId, options)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
33
+ for (var _d = true, _e = __asyncValues(client.impactedResources.listByTenantIdAndEventId(eventTrackingId, options)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
36
34
  _c = _f.value;
37
35
  _d = false;
38
- try {
39
- let item = _c;
40
- resArray.push(item);
41
- }
42
- finally {
43
- _d = true;
44
- }
36
+ let item = _c;
37
+ resArray.push(item);
45
38
  }
46
39
  }
47
40
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"impactedResourcesListByTenantIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesListByTenantIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,MAAM,GAAG,0BAA0B,CAAC;QAC1C,MAAM,OAAO,GAA4D;YACvE,MAAM;SACP,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iBAAiB,CAAC,wBAAwB,CACtE,eAAe,EACf,OAAO,CACR,CAAA,IAAA;gBAHsB,cAGtB;gBAHsB,WAGtB;;oBAHU,IAAI,IAAI,KAAA,CAAA;oBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"impactedResourcesListByTenantIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/impactedResourcesListByTenantIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;;QACjC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,MAAM,GAAG,0BAA0B,CAAC;QAC1C,MAAM,OAAO,GAA4D;YACvE,MAAM;SACP,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iBAAiB,CAAC,wBAAwB,CACtE,eAAe,EACf,OAAO,CACR,CAAA,IAAA,sDAAE;gBAHoB,cAGtB;gBAHsB,WAGtB;gBAHU,IAAI,IAAI,KAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,15 +16,13 @@ dotenv.config();
16
16
  * This sample demonstrates how to Gets the list of metadata entities.
17
17
  *
18
18
  * @summary Gets the list of metadata entities.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_GetEntity.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Metadata_GetEntity.json
20
20
  */
21
21
  function getMetadata() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
24
- "00000000-0000-0000-0000-000000000000";
25
23
  const name = "status";
26
24
  const credential = new DefaultAzureCredential();
27
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
25
+ const client = new MicrosoftResourceHealth(credential);
28
26
  const result = yield client.metadata.getEntity(name);
29
27
  console.log(result);
30
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"metadataGetEntitySample.js","sourceRoot":"","sources":["../../samples-dev/metadataGetEntitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,WAAW;;QACxB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,IAAI,GAAG,QAAQ,CAAC;QACtB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,WAAW,EAAE,CAAC;IAChB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"metadataGetEntitySample.js","sourceRoot":"","sources":["../../samples-dev/metadataGetEntitySample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,WAAW;;QACxB,MAAM,IAAI,GAAG,QAAQ,CAAC;QACtB,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,WAAW,EAAE,CAAC;IAChB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,27 +16,20 @@ dotenv.config();
16
16
  * This sample demonstrates how to Gets the list of metadata entities.
17
17
  *
18
18
  * @summary Gets the list of metadata entities.
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Metadata_List.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Metadata_List.json
20
20
  */
21
21
  function getMetadata() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const credential = new DefaultAzureCredential();
27
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
25
+ const client = new MicrosoftResourceHealth(credential);
28
26
  const resArray = new Array();
29
27
  try {
30
- for (var _d = true, _e = __asyncValues(client.metadata.list()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
28
+ for (var _d = true, _e = __asyncValues(client.metadata.list()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
31
29
  _c = _f.value;
32
30
  _d = false;
33
- try {
34
- let item = _c;
35
- resArray.push(item);
36
- }
37
- finally {
38
- _d = true;
39
- }
31
+ let item = _c;
32
+ resArray.push(item);
40
33
  }
41
34
  }
42
35
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"metadataListSample.js","sourceRoot":"","sources":["../../samples-dev/metadataListSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,WAAW;;;QACxB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAA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AQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,WAAW,EAAE,CAAC;IAChB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists available operations for the resourcehealth resource provider
17
17
  *
18
18
  * @summary Lists available operations for the resourcehealth resource provider
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/Operations_List.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/Operations_List.json
20
20
  */
21
21
  function getOperationsList() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists impacted resources in the subscription by an event (Security Advisory).
17
17
  *
18
18
  * @summary Lists impacted resources in the subscription by an event (Security Advisory).
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
20
20
  */
21
21
  function listSecurityAdvisoryImpactedResourcesBySubscriptionId() {
22
22
  var _a, e_1, _b, _c;
@@ -27,16 +27,11 @@ function listSecurityAdvisoryImpactedResourcesBySubscriptionId() {
27
27
  const client = new MicrosoftResourceHealth(credential, subscriptionId);
28
28
  const resArray = new Array();
29
29
  try {
30
- for (var _d = true, _e = __asyncValues(client.securityAdvisoryImpactedResources.listBySubscriptionIdAndEventId(eventTrackingId)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
30
+ for (var _d = true, _e = __asyncValues(client.securityAdvisoryImpactedResources.listBySubscriptionIdAndEventId(eventTrackingId)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
31
31
  _c = _f.value;
32
32
  _d = false;
33
- try {
34
- let item = _c;
35
- resArray.push(item);
36
- }
37
- finally {
38
- _d = true;
39
- }
33
+ let item = _c;
34
+ resArray.push(item);
40
35
  }
41
36
  }
42
37
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qDAAqD;;;QAClE,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iCAAiC,CAAC,8BAA8B,CAC5F,eAAe,CAChB,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,qDAAqD,EAAE,CAAC;IAC1D,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qDAAqD;;;QAClE,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,IAAI,gBAAgB,CAAC;QACpE,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iCAAiC,CAAC,8BAA8B,CAC5F,eAAe,CAChB,CAAA,IAAA,sDAAE;gBAFoB,cAEtB;gBAFsB,WAEtB;gBAFU,IAAI,IAAI,KAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,qDAAqD,EAAE,CAAC;IAC1D,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -16,28 +16,21 @@ dotenv.config();
16
16
  * This sample demonstrates how to Lists impacted resources in the tenant by an event (Security Advisory).
17
17
  *
18
18
  * @summary Lists impacted resources in the tenant by an event (Security Advisory).
19
- * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2022-10-01/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
19
+ * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
20
20
  */
21
21
  function listSecurityAdvisoryImpactedResourcesByTenantId() {
22
22
  var _a, e_1, _b, _c;
23
23
  return __awaiter(this, void 0, void 0, function* () {
24
- const subscriptionId = process.env["RESOURCEHEALTH_SUBSCRIPTION_ID"] ||
25
- "00000000-0000-0000-0000-000000000000";
26
24
  const eventTrackingId = "BC_1-FXZ";
27
25
  const credential = new DefaultAzureCredential();
28
- const client = new MicrosoftResourceHealth(credential, subscriptionId);
26
+ const client = new MicrosoftResourceHealth(credential);
29
27
  const resArray = new Array();
30
28
  try {
31
- for (var _d = true, _e = __asyncValues(client.securityAdvisoryImpactedResources.listByTenantIdAndEventId(eventTrackingId)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
29
+ for (var _d = true, _e = __asyncValues(client.securityAdvisoryImpactedResources.listByTenantIdAndEventId(eventTrackingId)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
32
30
  _c = _f.value;
33
31
  _d = false;
34
- try {
35
- let item = _c;
36
- resArray.push(item);
37
- }
38
- finally {
39
- _d = true;
40
- }
32
+ let item = _c;
33
+ resArray.push(item);
41
34
  }
42
35
  }
43
36
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
@@ -1 +1 @@
1
- {"version":3,"file":"securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,+CAA+C;;;QAC5D,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC;YAC7C,sCAAsC,CAAC;QACzC,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iCAAiC,CAAC,wBAAwB,CACtF,eAAe,CAChB,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,+CAA+C,EAAE,CAAC;IACpD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js","sourceRoot":"","sources":["../../samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,+CAA+C;;;QAC5D,MAAM,eAAe,GAAG,UAAU,CAAC;QACnC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,iCAAiC,CAAC,wBAAwB,CACtF,eAAe,CAChB,CAAA,IAAA,sDAAE;gBAFoB,cAEtB;gBAFsB,WAEtB;gBAFU,IAAI,IAAI,KAAA,CAAA;gBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,+CAA+C,EAAE,CAAC;IACpD,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -5,7 +5,7 @@ import { MicrosoftResourceHealthOptionalParams } from "./models";
5
5
  export declare class MicrosoftResourceHealth extends coreClient.ServiceClient {
6
6
  $host: string;
7
7
  apiVersion: string;
8
- subscriptionId: string;
8
+ subscriptionId?: string;
9
9
  /**
10
10
  * Initializes a new instance of the MicrosoftResourceHealth class.
11
11
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -13,6 +13,7 @@ export declare class MicrosoftResourceHealth extends coreClient.ServiceClient {
13
13
  * @param options The parameter options
14
14
  */
15
15
  constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: MicrosoftResourceHealthOptionalParams);
16
+ constructor(credentials: coreAuth.TokenCredential, options?: MicrosoftResourceHealthOptionalParams);
16
17
  /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
17
18
  private addCustomApiVersionPolicy;
18
19
  availabilityStatuses: AvailabilityStatuses;
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftResourceHealth.d.ts","sourceRoot":"","sources":["../../src/microsoftResourceHealth.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAa7C,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,iCAAiC,EACjC,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,cAAc,EACd,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,qCAAqC;IAuFjD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iCAAiC,EAAE,iCAAiC,CAAC;IACrE,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,yBAAyB,EAAE,yBAAyB,CAAC;IACrD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