@azure/arm-resourcehealth 3.2.1-alpha.20230522.1 → 4.0.1-alpha.20230524.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. package/CHANGELOG.md +114 -1
  2. package/dist/index.js +2621 -386
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/availabilityStatusesGetByResourceSample.js +1 -1
  7. package/dist-esm/samples-dev/availabilityStatusesListByResourceGroupSample.js +3 -3
  8. package/dist-esm/samples-dev/availabilityStatusesListBySubscriptionIdSample.js +3 -3
  9. package/dist-esm/samples-dev/availabilityStatusesListSample.js +3 -3
  10. package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js +4 -4
  11. package/dist-esm/samples-dev/childAvailabilityStatusesGetByResourceSample.js.map +1 -1
  12. package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js +4 -4
  13. package/dist-esm/samples-dev/childAvailabilityStatusesListSample.js.map +1 -1
  14. package/dist-esm/samples-dev/childResourcesListSample.js +3 -3
  15. package/dist-esm/samples-dev/childResourcesListSample.js.map +1 -1
  16. package/dist-esm/samples-dev/emergingIssuesGetSample.js +3 -2
  17. package/dist-esm/samples-dev/emergingIssuesGetSample.js.map +1 -1
  18. package/dist-esm/samples-dev/emergingIssuesListSample.js +1 -1
  19. package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js +37 -0
  22. package/dist-esm/samples-dev/eventFetchDetailsBySubscriptionIdAndTrackingIdSample.js.map +1 -0
  23. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js +38 -0
  26. package/dist-esm/samples-dev/eventFetchDetailsByTenantIdAndTrackingIdSample.js.map +1 -0
  27. package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.js +43 -0
  30. package/dist-esm/samples-dev/eventGetBySubscriptionIdAndTrackingIdSample.js.map +1 -0
  31. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js +44 -0
  34. package/dist-esm/samples-dev/eventGetByTenantIdAndTrackingIdSample.js.map +1 -0
  35. package/dist-esm/samples-dev/eventsListBySingleResourceSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/eventsListBySingleResourceSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/eventsListBySingleResourceSample.js +59 -0
  38. package/dist-esm/samples-dev/eventsListBySingleResourceSample.js.map +1 -0
  39. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.d.ts +2 -0
  40. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js +63 -0
  42. package/dist-esm/samples-dev/eventsListBySubscriptionIdSample.js.map +1 -0
  43. package/dist-esm/samples-dev/eventsListByTenantIdSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/eventsListByTenantIdSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/eventsListByTenantIdSample.js +64 -0
  46. package/dist-esm/samples-dev/eventsListByTenantIdSample.js.map +1 -0
  47. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js +39 -0
  50. package/dist-esm/samples-dev/impactedResourcesGetByTenantIdSample.js.map +1 -0
  51. package/dist-esm/samples-dev/impactedResourcesGetSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/impactedResourcesGetSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/impactedResourcesGetSample.js +38 -0
  54. package/dist-esm/samples-dev/impactedResourcesGetSample.js.map +1 -0
  55. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js +62 -0
  58. package/dist-esm/samples-dev/impactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -0
  59. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.d.ts +2 -0
  60. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.d.ts.map +1 -0
  61. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js +63 -0
  62. package/dist-esm/samples-dev/impactedResourcesListByTenantIdAndEventIdSample.js.map +1 -0
  63. package/dist-esm/samples-dev/metadataGetEntitySample.d.ts +2 -0
  64. package/dist-esm/samples-dev/metadataGetEntitySample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/metadataGetEntitySample.js +38 -0
  66. package/dist-esm/samples-dev/metadataGetEntitySample.js.map +1 -0
  67. package/dist-esm/samples-dev/metadataListSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/metadataListSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/metadataListSample.js +58 -0
  70. package/dist-esm/samples-dev/metadataListSample.js.map +1 -0
  71. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/operationsListSample.js +37 -0
  74. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  75. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.d.ts +2 -0
  76. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.d.ts.map +1 -0
  77. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js +58 -0
  78. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSample.js.map +1 -0
  79. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.d.ts +2 -0
  80. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.d.ts.map +1 -0
  81. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js +59 -0
  82. package/dist-esm/samples-dev/securityAdvisoryImpactedResourcesListByTenantIdAndEventIdSample.js.map +1 -0
  83. package/dist-esm/src/microsoftResourceHealth.d.ts +8 -4
  84. package/dist-esm/src/microsoftResourceHealth.d.ts.map +1 -1
  85. package/dist-esm/src/microsoftResourceHealth.js +10 -6
  86. package/dist-esm/src/microsoftResourceHealth.js.map +1 -1
  87. package/dist-esm/src/models/index.d.ts +657 -34
  88. package/dist-esm/src/models/index.d.ts.map +1 -1
  89. package/dist-esm/src/models/index.js +114 -0
  90. package/dist-esm/src/models/index.js.map +1 -1
  91. package/dist-esm/src/models/mappers.d.ts +24 -3
  92. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  93. package/dist-esm/src/models/mappers.js +883 -100
  94. package/dist-esm/src/models/mappers.js.map +1 -1
  95. package/dist-esm/src/models/parameters.d.ts +4 -0
  96. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  97. package/dist-esm/src/models/parameters.js +51 -3
  98. package/dist-esm/src/models/parameters.js.map +1 -1
  99. package/dist-esm/src/operations/availabilityStatuses.d.ts +9 -15
  100. package/dist-esm/src/operations/availabilityStatuses.d.ts.map +1 -1
  101. package/dist-esm/src/operations/availabilityStatuses.js +9 -15
  102. package/dist-esm/src/operations/availabilityStatuses.js.map +1 -1
  103. package/dist-esm/src/operations/emergingIssues.d.ts +6 -5
  104. package/dist-esm/src/operations/emergingIssues.d.ts.map +1 -1
  105. package/dist-esm/src/operations/emergingIssues.js +15 -14
  106. package/dist-esm/src/operations/emergingIssues.js.map +1 -1
  107. package/dist-esm/src/operations/eventOperations.d.ts +39 -0
  108. package/dist-esm/src/operations/eventOperations.d.ts.map +1 -0
  109. package/dist-esm/src/operations/eventOperations.js +137 -0
  110. package/dist-esm/src/operations/eventOperations.js.map +1 -0
  111. package/dist-esm/src/operations/eventsOperations.d.ts +83 -0
  112. package/dist-esm/src/operations/eventsOperations.d.ts.map +1 -0
  113. package/dist-esm/src/operations/eventsOperations.js +393 -0
  114. package/dist-esm/src/operations/eventsOperations.js.map +1 -0
  115. package/dist-esm/src/operations/impactedResources.d.ts +72 -0
  116. package/dist-esm/src/operations/impactedResources.d.ts.map +1 -0
  117. package/dist-esm/src/operations/impactedResources.js +330 -0
  118. package/dist-esm/src/operations/impactedResources.js.map +1 -0
  119. package/dist-esm/src/operations/index.d.ts +6 -1
  120. package/dist-esm/src/operations/index.d.ts.map +1 -1
  121. package/dist-esm/src/operations/index.js +6 -1
  122. package/dist-esm/src/operations/index.js.map +1 -1
  123. package/dist-esm/src/operations/metadata.d.ts +38 -0
  124. package/dist-esm/src/operations/metadata.d.ts.map +1 -0
  125. package/dist-esm/src/operations/metadata.js +162 -0
  126. package/dist-esm/src/operations/metadata.js.map +1 -0
  127. package/dist-esm/src/operations/securityAdvisoryImpactedResources.d.ts +58 -0
  128. package/dist-esm/src/operations/securityAdvisoryImpactedResources.d.ts.map +1 -0
  129. package/dist-esm/src/operations/securityAdvisoryImpactedResources.js +271 -0
  130. package/dist-esm/src/operations/securityAdvisoryImpactedResources.js.map +1 -0
  131. package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts +4 -7
  132. package/dist-esm/src/operationsInterfaces/availabilityStatuses.d.ts.map +1 -1
  133. package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts +3 -2
  134. package/dist-esm/src/operationsInterfaces/emergingIssues.d.ts.map +1 -1
  135. package/dist-esm/src/operationsInterfaces/eventOperations.d.ts +31 -0
  136. package/dist-esm/src/operationsInterfaces/eventOperations.d.ts.map +1 -0
  137. package/dist-esm/src/operationsInterfaces/eventOperations.js +9 -0
  138. package/dist-esm/src/operationsInterfaces/eventOperations.js.map +1 -0
  139. package/dist-esm/src/operationsInterfaces/eventsOperations.d.ts +26 -0
  140. package/dist-esm/src/operationsInterfaces/eventsOperations.d.ts.map +1 -0
  141. package/dist-esm/src/operationsInterfaces/eventsOperations.js +9 -0
  142. package/dist-esm/src/operationsInterfaces/eventsOperations.js.map +1 -0
  143. package/dist-esm/src/operationsInterfaces/impactedResources.d.ts +32 -0
  144. package/dist-esm/src/operationsInterfaces/impactedResources.d.ts.map +1 -0
  145. package/dist-esm/src/operationsInterfaces/impactedResources.js +9 -0
  146. package/dist-esm/src/operationsInterfaces/impactedResources.js.map +1 -0
  147. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -1
  148. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  149. package/dist-esm/src/operationsInterfaces/index.js +6 -1
  150. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  151. package/dist-esm/src/operationsInterfaces/metadata.d.ts +17 -0
  152. package/dist-esm/src/operationsInterfaces/metadata.d.ts.map +1 -0
  153. package/dist-esm/src/operationsInterfaces/metadata.js +9 -0
  154. package/dist-esm/src/operationsInterfaces/metadata.js.map +1 -0
  155. package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.d.ts +18 -0
  156. package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.d.ts.map +1 -0
  157. package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.js +9 -0
  158. package/dist-esm/src/operationsInterfaces/securityAdvisoryImpactedResources.js.map +1 -0
  159. package/dist-esm/test/resourcehealth_operations_test.spec.d.ts +4 -0
  160. package/dist-esm/test/resourcehealth_operations_test.spec.d.ts.map +1 -0
  161. package/dist-esm/test/resourcehealth_operations_test.spec.js +56 -0
  162. package/dist-esm/test/resourcehealth_operations_test.spec.js.map +1 -0
  163. package/package.json +4 -4
  164. package/review/arm-resourcehealth.api.md +516 -8
  165. package/src/microsoftResourceHealth.ts +29 -8
  166. package/src/models/index.ts +757 -35
  167. package/src/models/mappers.ts +956 -101
  168. package/src/models/parameters.ts +55 -3
  169. package/src/operations/availabilityStatuses.ts +9 -15
  170. package/src/operations/emergingIssues.ts +24 -18
  171. package/src/operations/eventOperations.ts +184 -0
  172. package/src/operations/eventsOperations.ts +434 -0
  173. package/src/operations/impactedResources.ts +414 -0
  174. package/src/operations/index.ts +6 -1
  175. package/src/operations/metadata.ts +182 -0
  176. package/src/operations/securityAdvisoryImpactedResources.ts +342 -0
  177. package/src/operationsInterfaces/availabilityStatuses.ts +4 -7
  178. package/src/operationsInterfaces/emergingIssues.ts +3 -0
  179. package/src/operationsInterfaces/eventOperations.ts +60 -0
  180. package/src/operationsInterfaces/eventsOperations.ts +47 -0
  181. package/src/operationsInterfaces/impactedResources.ts +63 -0
  182. package/src/operationsInterfaces/index.ts +6 -1
  183. package/src/operationsInterfaces/metadata.ts +36 -0
  184. package/src/operationsInterfaces/securityAdvisoryImpactedResources.ts +37 -0
  185. package/types/arm-resourcehealth.d.ts +853 -23
  186. package/dist-esm/test/sampleTest.d.ts +0 -2
  187. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  188. package/dist-esm/test/sampleTest.js +0 -38
  189. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -39,7 +39,7 @@ export const $host: OperationURLParameter = {
39
39
  export const apiVersion: OperationQueryParameter = {
40
40
  parameterPath: "apiVersion",
41
41
  mapper: {
42
- defaultValue: "2017-07-01",
42
+ defaultValue: "2022-10-01",
43
43
  isConstant: true,
44
44
  serializedName: "api-version",
45
45
  type: {
@@ -61,6 +61,9 @@ export const filter: OperationQueryParameter = {
61
61
  export const subscriptionId: OperationURLParameter = {
62
62
  parameterPath: "subscriptionId",
63
63
  mapper: {
64
+ constraints: {
65
+ MinLength: 1
66
+ },
64
67
  serializedName: "subscriptionId",
65
68
  required: true,
66
69
  type: {
@@ -82,6 +85,10 @@ export const expand: OperationQueryParameter = {
82
85
  export const resourceGroupName: OperationURLParameter = {
83
86
  parameterPath: "resourceGroupName",
84
87
  mapper: {
88
+ constraints: {
89
+ MaxLength: 90,
90
+ MinLength: 1
91
+ },
85
92
  serializedName: "resourceGroupName",
86
93
  required: true,
87
94
  type: {
@@ -114,12 +121,57 @@ export const nextLink: OperationURLParameter = {
114
121
  skipEncoding: true
115
122
  };
116
123
 
124
+ export const name: OperationURLParameter = {
125
+ parameterPath: "name",
126
+ mapper: {
127
+ serializedName: "name",
128
+ required: true,
129
+ type: {
130
+ name: "String"
131
+ }
132
+ }
133
+ };
134
+
135
+ export const eventTrackingId: OperationURLParameter = {
136
+ parameterPath: "eventTrackingId",
137
+ mapper: {
138
+ serializedName: "eventTrackingId",
139
+ required: true,
140
+ type: {
141
+ name: "String"
142
+ }
143
+ }
144
+ };
145
+
146
+ export const impactedResourceName: OperationURLParameter = {
147
+ parameterPath: "impactedResourceName",
148
+ mapper: {
149
+ constraints: {
150
+ Pattern: new RegExp("^[^*#&+:<>%?]+$")
151
+ },
152
+ serializedName: "impactedResourceName",
153
+ required: true,
154
+ type: {
155
+ name: "String"
156
+ }
157
+ }
158
+ };
159
+
160
+ export const queryStartTime: OperationQueryParameter = {
161
+ parameterPath: ["options", "queryStartTime"],
162
+ mapper: {
163
+ serializedName: "queryStartTime",
164
+ type: {
165
+ name: "String"
166
+ }
167
+ }
168
+ };
169
+
117
170
  export const issueName: OperationURLParameter = {
118
171
  parameterPath: "issueName",
119
172
  mapper: {
120
- defaultValue: "default",
121
- isConstant: true,
122
173
  serializedName: "issueName",
174
+ required: true,
123
175
  type: {
124
176
  name: "String"
125
177
  }
@@ -45,8 +45,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
45
45
  }
46
46
 
47
47
  /**
48
- * Lists the current availability status for all the resources in the subscription. Use the nextLink
49
- * property in the response to get the next page of availability statuses.
48
+ * Lists the current availability status for all the resources in the subscription.
50
49
  * @param options The options parameters.
51
50
  */
52
51
  public listBySubscriptionId(
@@ -100,9 +99,8 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
100
99
  }
101
100
 
102
101
  /**
103
- * Lists the current availability status for all the resources in the resource group. Use the nextLink
104
- * property in the response to get the next page of availability statuses.
105
- * @param resourceGroupName The name of the resource group.
102
+ * Lists the current availability status for all the resources in the resource group.
103
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
106
104
  * @param options The options parameters.
107
105
  */
108
106
  public listByResourceGroup(
@@ -170,8 +168,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
170
168
  }
171
169
 
172
170
  /**
173
- * Lists all historical availability transitions and impacting events for a single resource. Use the
174
- * nextLink property in the response to get the next page of availability status
171
+ * Lists all historical availability transitions and impacting events for a single resource.
175
172
  * @param resourceUri The fully qualified ID of the resource, including the resource name and resource
176
173
  * type. Currently the API support not nested and one nesting level resource types :
177
174
  * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
@@ -233,8 +230,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
233
230
  }
234
231
 
235
232
  /**
236
- * Lists the current availability status for all the resources in the subscription. Use the nextLink
237
- * property in the response to get the next page of availability statuses.
233
+ * Lists the current availability status for all the resources in the subscription.
238
234
  * @param options The options parameters.
239
235
  */
240
236
  private _listBySubscriptionId(
@@ -247,9 +243,8 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
247
243
  }
248
244
 
249
245
  /**
250
- * Lists the current availability status for all the resources in the resource group. Use the nextLink
251
- * property in the response to get the next page of availability statuses.
252
- * @param resourceGroupName The name of the resource group.
246
+ * Lists the current availability status for all the resources in the resource group.
247
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
253
248
  * @param options The options parameters.
254
249
  */
255
250
  private _listByResourceGroup(
@@ -282,8 +277,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
282
277
  }
283
278
 
284
279
  /**
285
- * Lists all historical availability transitions and impacting events for a single resource. Use the
286
- * nextLink property in the response to get the next page of availability status
280
+ * Lists all historical availability transitions and impacting events for a single resource.
287
281
  * @param resourceUri The fully qualified ID of the resource, including the resource name and resource
288
282
  * type. Currently the API support not nested and one nesting level resource types :
289
283
  * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}
@@ -318,7 +312,7 @@ export class AvailabilityStatusesImpl implements AvailabilityStatuses {
318
312
 
319
313
  /**
320
314
  * ListByResourceGroupNext
321
- * @param resourceGroupName The name of the resource group.
315
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
322
316
  * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
323
317
  * @param options The options parameters.
324
318
  */
@@ -18,6 +18,7 @@ import {
18
18
  EmergingIssuesListNextOptionalParams,
19
19
  EmergingIssuesListOptionalParams,
20
20
  EmergingIssuesListResponse,
21
+ IssueNameParameter,
21
22
  EmergingIssuesGetOptionalParams,
22
23
  EmergingIssuesGetResponse,
23
24
  EmergingIssuesListNextResponse
@@ -90,16 +91,6 @@ export class EmergingIssuesImpl implements EmergingIssues {
90
91
  }
91
92
  }
92
93
 
93
- /**
94
- * Gets Azure services' emerging issues.
95
- * @param options The options parameters.
96
- */
97
- get(
98
- options?: EmergingIssuesGetOptionalParams
99
- ): Promise<EmergingIssuesGetResponse> {
100
- return this.client.sendOperationRequest({ options }, getOperationSpec);
101
- }
102
-
103
94
  /**
104
95
  * Lists Azure services' emerging issues.
105
96
  * @param options The options parameters.
@@ -110,6 +101,21 @@ export class EmergingIssuesImpl implements EmergingIssues {
110
101
  return this.client.sendOperationRequest({ options }, listOperationSpec);
111
102
  }
112
103
 
104
+ /**
105
+ * Gets Azure services' emerging issues.
106
+ * @param issueName The name of the emerging issue.
107
+ * @param options The options parameters.
108
+ */
109
+ get(
110
+ issueName: IssueNameParameter,
111
+ options?: EmergingIssuesGetOptionalParams
112
+ ): Promise<EmergingIssuesGetResponse> {
113
+ return this.client.sendOperationRequest(
114
+ { issueName, options },
115
+ getOperationSpec
116
+ );
117
+ }
118
+
113
119
  /**
114
120
  * ListNext
115
121
  * @param nextLink The nextLink from the previous successful call to the List method.
@@ -128,35 +134,35 @@ export class EmergingIssuesImpl implements EmergingIssues {
128
134
  // Operation Specifications
129
135
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
130
136
 
131
- const getOperationSpec: coreClient.OperationSpec = {
132
- path: "/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}",
137
+ const listOperationSpec: coreClient.OperationSpec = {
138
+ path: "/providers/Microsoft.ResourceHealth/emergingIssues",
133
139
  httpMethod: "GET",
134
140
  responses: {
135
141
  200: {
136
- bodyMapper: Mappers.EmergingIssuesGetResult
142
+ bodyMapper: Mappers.EmergingIssueListResult
137
143
  },
138
144
  default: {
139
145
  bodyMapper: Mappers.ErrorResponse
140
146
  }
141
147
  },
142
148
  queryParameters: [Parameters.apiVersion],
143
- urlParameters: [Parameters.$host, Parameters.issueName],
149
+ urlParameters: [Parameters.$host],
144
150
  headerParameters: [Parameters.accept],
145
151
  serializer
146
152
  };
147
- const listOperationSpec: coreClient.OperationSpec = {
148
- path: "/providers/Microsoft.ResourceHealth/emergingIssues",
153
+ const getOperationSpec: coreClient.OperationSpec = {
154
+ path: "/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}",
149
155
  httpMethod: "GET",
150
156
  responses: {
151
157
  200: {
152
- bodyMapper: Mappers.EmergingIssueListResult
158
+ bodyMapper: Mappers.EmergingIssuesGetResult
153
159
  },
154
160
  default: {
155
161
  bodyMapper: Mappers.ErrorResponse
156
162
  }
157
163
  },
158
164
  queryParameters: [Parameters.apiVersion],
159
- urlParameters: [Parameters.$host],
165
+ urlParameters: [Parameters.$host, Parameters.issueName],
160
166
  headerParameters: [Parameters.accept],
161
167
  serializer
162
168
  };
@@ -0,0 +1,184 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { EventOperations } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { MicrosoftResourceHealth } from "../microsoftResourceHealth";
14
+ import {
15
+ EventGetBySubscriptionIdAndTrackingIdOptionalParams,
16
+ EventGetBySubscriptionIdAndTrackingIdResponse,
17
+ EventFetchDetailsBySubscriptionIdAndTrackingIdOptionalParams,
18
+ EventFetchDetailsBySubscriptionIdAndTrackingIdResponse,
19
+ EventGetByTenantIdAndTrackingIdOptionalParams,
20
+ EventGetByTenantIdAndTrackingIdResponse,
21
+ EventFetchDetailsByTenantIdAndTrackingIdOptionalParams,
22
+ EventFetchDetailsByTenantIdAndTrackingIdResponse
23
+ } from "../models";
24
+
25
+ /** Class containing EventOperations operations. */
26
+ export class EventOperationsImpl implements EventOperations {
27
+ private readonly client: MicrosoftResourceHealth;
28
+
29
+ /**
30
+ * Initialize a new instance of the class EventOperations class.
31
+ * @param client Reference to the service client
32
+ */
33
+ constructor(client: MicrosoftResourceHealth) {
34
+ this.client = client;
35
+ }
36
+
37
+ /**
38
+ * Service health event in the subscription by event tracking id
39
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
40
+ * @param options The options parameters.
41
+ */
42
+ getBySubscriptionIdAndTrackingId(
43
+ eventTrackingId: string,
44
+ options?: EventGetBySubscriptionIdAndTrackingIdOptionalParams
45
+ ): Promise<EventGetBySubscriptionIdAndTrackingIdResponse> {
46
+ return this.client.sendOperationRequest(
47
+ { eventTrackingId, options },
48
+ getBySubscriptionIdAndTrackingIdOperationSpec
49
+ );
50
+ }
51
+
52
+ /**
53
+ * Service health event details in the subscription by event tracking id. This can be used to fetch
54
+ * sensitive properties for Security Advisory events
55
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
56
+ * @param options The options parameters.
57
+ */
58
+ fetchDetailsBySubscriptionIdAndTrackingId(
59
+ eventTrackingId: string,
60
+ options?: EventFetchDetailsBySubscriptionIdAndTrackingIdOptionalParams
61
+ ): Promise<EventFetchDetailsBySubscriptionIdAndTrackingIdResponse> {
62
+ return this.client.sendOperationRequest(
63
+ { eventTrackingId, options },
64
+ fetchDetailsBySubscriptionIdAndTrackingIdOperationSpec
65
+ );
66
+ }
67
+
68
+ /**
69
+ * Service health event in the tenant by event tracking id
70
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
71
+ * @param options The options parameters.
72
+ */
73
+ getByTenantIdAndTrackingId(
74
+ eventTrackingId: string,
75
+ options?: EventGetByTenantIdAndTrackingIdOptionalParams
76
+ ): Promise<EventGetByTenantIdAndTrackingIdResponse> {
77
+ return this.client.sendOperationRequest(
78
+ { eventTrackingId, options },
79
+ getByTenantIdAndTrackingIdOperationSpec
80
+ );
81
+ }
82
+
83
+ /**
84
+ * Service health event details in the tenant by event tracking id. This can be used to fetch sensitive
85
+ * properties for Security Advisory events
86
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
87
+ * @param options The options parameters.
88
+ */
89
+ fetchDetailsByTenantIdAndTrackingId(
90
+ eventTrackingId: string,
91
+ options?: EventFetchDetailsByTenantIdAndTrackingIdOptionalParams
92
+ ): Promise<EventFetchDetailsByTenantIdAndTrackingIdResponse> {
93
+ return this.client.sendOperationRequest(
94
+ { eventTrackingId, options },
95
+ fetchDetailsByTenantIdAndTrackingIdOperationSpec
96
+ );
97
+ }
98
+ }
99
+ // Operation Specifications
100
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
101
+
102
+ const getBySubscriptionIdAndTrackingIdOperationSpec: coreClient.OperationSpec = {
103
+ path:
104
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}",
105
+ httpMethod: "GET",
106
+ responses: {
107
+ 200: {
108
+ bodyMapper: Mappers.Event
109
+ },
110
+ default: {
111
+ bodyMapper: Mappers.ErrorResponse
112
+ }
113
+ },
114
+ queryParameters: [
115
+ Parameters.apiVersion,
116
+ Parameters.filter,
117
+ Parameters.queryStartTime
118
+ ],
119
+ urlParameters: [
120
+ Parameters.$host,
121
+ Parameters.subscriptionId,
122
+ Parameters.eventTrackingId
123
+ ],
124
+ headerParameters: [Parameters.accept],
125
+ serializer
126
+ };
127
+ const fetchDetailsBySubscriptionIdAndTrackingIdOperationSpec: coreClient.OperationSpec = {
128
+ path:
129
+ "/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/fetchEventDetails",
130
+ httpMethod: "POST",
131
+ responses: {
132
+ 200: {
133
+ bodyMapper: Mappers.Event
134
+ },
135
+ default: {
136
+ bodyMapper: Mappers.ErrorResponse
137
+ }
138
+ },
139
+ queryParameters: [Parameters.apiVersion],
140
+ urlParameters: [
141
+ Parameters.$host,
142
+ Parameters.subscriptionId,
143
+ Parameters.eventTrackingId
144
+ ],
145
+ headerParameters: [Parameters.accept],
146
+ serializer
147
+ };
148
+ const getByTenantIdAndTrackingIdOperationSpec: coreClient.OperationSpec = {
149
+ path: "/providers/Microsoft.ResourceHealth/events/{eventTrackingId}",
150
+ httpMethod: "GET",
151
+ responses: {
152
+ 200: {
153
+ bodyMapper: Mappers.Event
154
+ },
155
+ default: {
156
+ bodyMapper: Mappers.ErrorResponse
157
+ }
158
+ },
159
+ queryParameters: [
160
+ Parameters.apiVersion,
161
+ Parameters.filter,
162
+ Parameters.queryStartTime
163
+ ],
164
+ urlParameters: [Parameters.$host, Parameters.eventTrackingId],
165
+ headerParameters: [Parameters.accept],
166
+ serializer
167
+ };
168
+ const fetchDetailsByTenantIdAndTrackingIdOperationSpec: coreClient.OperationSpec = {
169
+ path:
170
+ "/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/fetchEventDetails",
171
+ httpMethod: "POST",
172
+ responses: {
173
+ 200: {
174
+ bodyMapper: Mappers.Event
175
+ },
176
+ default: {
177
+ bodyMapper: Mappers.ErrorResponse
178
+ }
179
+ },
180
+ queryParameters: [Parameters.apiVersion],
181
+ urlParameters: [Parameters.$host, Parameters.eventTrackingId],
182
+ headerParameters: [Parameters.accept],
183
+ serializer
184
+ };