diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/SessionRecords/InfrastructureInsightsAdminClient/TestRepairAlert.json b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/SessionRecords/InfrastructureInsightsAdminClient/TestRepairAlert.json
new file mode 100644
index 000000000000..c1089023d93f
--- /dev/null
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/SessionRecords/InfrastructureInsightsAdminClient/TestRepairAlert.json
@@ -0,0 +1,269 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths?api-version=2016-05-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWQwNzE0OTMtOTM3ZC00ODZiLWJkZWEtYjQxZjY0MTM2YmJhL3Jlc291cmNlR3JvdXBzL1N5c3RlbS5sb2NhbC9wcm92aWRlcnMvTWljcm9zb2Z0LkluZnJhc3RydWN0dXJlSW5zaWdodHMuQWRtaW4vcmVnaW9uSGVhbHRocz9hcGktdmVyc2lvbj0yMDE2LTA1LTAx",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "355c5be5-299c-464e-8d93-a1dde759eee3"
+ ],
+ "accept-language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.26614.01",
+ "OSName/Windows",
+ "OSVersion/MicrosoftWindows10.0.16299",
+ "Microsoft.AzureStack.Management.InfrastructureInsights.Admin.InfrastructureInsightsAdminClient/0.3.0.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Sun, 04 Nov 2018 06:58:02 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "WWW-Authenticate": [
+ "oYG3MIG0oAMKAQChCwYJKoZIgvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRvp5dHXVpC/CXdKIEMHLXLVRGdixY5RSGo6wShB9/c/TkWr8cOy8PFID1oxSJ6YCFwUU4gzv4RwlG5X8Ll2kya4REqu4iJksuDXG59eEL1xp0u+WatvNOmGGe/DMOfD+b8y9lyq6PM0evMyzfEktRE"
+ ],
+ "x-ms-correlation-request-id": [
+ "89d52048-2a62-43e0-aa56-037c8224a3e3"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14934"
+ ],
+ "x-ms-request-id": [
+ "89d52048-2a62-43e0-aa56-037c8224a3e3"
+ ],
+ "x-ms-routing-request-id": [
+ "LOCAL:20181104T065803Z:89d52048-2a62-43e0-aa56-037c8224a3e3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Content-Length": [
+ "816"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local\",\r\n \"name\": \"local\",\r\n \"type\": \"Microsoft.InfrastructureInsights.Admin/regionHealths\",\r\n \"location\": \"local\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"usageMetrics\": [\r\n {\r\n \"name\": \"Physical memory\",\r\n \"metricsValue\": [\r\n {\r\n \"name\": \"Used\",\r\n \"unit\": \"GB\",\r\n \"value\": 73.552734375\r\n },\r\n {\r\n \"name\": \"Available\",\r\n \"unit\": \"GB\",\r\n \"value\": 54.328125\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Physical storage\",\r\n \"metricsValue\": [\r\n {\r\n \"name\": \"Used\",\r\n \"unit\": \"TB\",\r\n \"value\": 0.28384866565465927\r\n },\r\n {\r\n \"name\": \"Available\",\r\n \"unit\": \"TB\",\r\n \"value\": 2.9854994788765907\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Public IP address pools\",\r\n \"metricsValue\": [\r\n {\r\n \"name\": \"Used\",\r\n \"unit\": \"One\",\r\n \"value\": 33.0\r\n },\r\n {\r\n \"name\": \"Available\",\r\n \"unit\": \"One\",\r\n \"value\": 222.0\r\n }\r\n ]\r\n }\r\n ],\r\n \"alertSummary\": {\r\n \"criticalAlertCount\": 0,\r\n \"warningAlertCount\": 0\r\n }\r\n }\r\n }\r\n ]\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts?api-version=2016-05-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWQwNzE0OTMtOTM3ZC00ODZiLWJkZWEtYjQxZjY0MTM2YmJhL3Jlc291cmNlR3JvdXBzL1N5c3RlbS5sb2NhbC9wcm92aWRlcnMvTWljcm9zb2Z0LkluZnJhc3RydWN0dXJlSW5zaWdodHMuQWRtaW4vcmVnaW9uSGVhbHRocy9sb2NhbC9hbGVydHM/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "54d02af8-e543-4d03-89b7-f6ea3340d1d9"
+ ],
+ "accept-language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.26614.01",
+ "OSName/Windows",
+ "OSVersion/MicrosoftWindows10.0.16299",
+ "Microsoft.AzureStack.Management.InfrastructureInsights.Admin.InfrastructureInsightsAdminClient/0.3.0.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Sun, 04 Nov 2018 06:58:02 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "WWW-Authenticate": [
+ "oYG3MIG0oAMKAQChCwYJKoZIgvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRvHSs+VGyle7VpA922jxanotmVeI6WkGwArfvk9FvmQ37TN4tJjYySpL53ptFMMgeOWz/lhrahMralbkW0N08mfqHYGWrCqRdaIuXxQoKvO84r5ZVuCxKLp3wgmeTdCoCosIH+vZ7dIOrmgbooJGvC"
+ ],
+ "x-ms-correlation-request-id": [
+ "0632bb01-cf18-4786-b9e9-8c765511172f"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14933"
+ ],
+ "x-ms-request-id": [
+ "0632bb01-cf18-4786-b9e9-8c765511172f"
+ ],
+ "x-ms-routing-request-id": [
+ "LOCAL:20181104T065803Z:0632bb01-cf18-4786-b9e9-8c765511172f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Content-Length": [
+ "4266"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/23f01fcc-7117-4b02-a4e0-b64d0be9d401\",\r\n \"name\": \"local/23f01fcc-7117-4b02-a4e0-b64d0be9d401\",\r\n \"type\": \"Microsoft.InfrastructureInsights.Admin/regionHealths/alerts\",\r\n \"location\": \"local\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"closedTimestamp\": \"2018-11-03T14:05:10.1604283Z\",\r\n \"createdTimestamp\": \"2018-11-03T14:05:09.4885517Z\",\r\n \"description\": [\r\n {\r\n \"text\": \"Azure Stack is not activated.\",\r\n \"type\": \"Text\"\r\n }\r\n ],\r\n \"faultId\": \"AzureBridge.NotActivated\",\r\n \"alertId\": \"23f01fcc-7117-4b02-a4e0-b64d0be9d401\",\r\n \"faultTypeId\": \"AzureBridge.NotActivated\",\r\n \"lastUpdatedTimestamp\": \"2018-11-03T14:05:10.1604283Z\",\r\n \"alertProperties\": {},\r\n \"remediation\": [\r\n {\r\n \"text\": \"You have not activated Azure Stack. To do so, see the following help article: \",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"linkType\": \"Uri\",\r\n \"uri\": \"https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-register\",\r\n \"type\": \"LinkBegin\"\r\n },\r\n {\r\n \"text\": \"https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-register\",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"type\": \"LinkEnd\"\r\n },\r\n {\r\n \"text\": \".\",\r\n \"type\": \"Text\"\r\n }\r\n ],\r\n \"resourceRegistrationId\": \"7aa3739a-19f0-4b7c-b309-c980ceee0bd3\",\r\n \"resourceProviderRegistrationId\": \"e56bc7b8-c8b5-4e25-b00c-4f951effb22c\",\r\n \"severity\": \"Warning\",\r\n \"state\": \"Closed\",\r\n \"title\": \"Activation Required\",\r\n \"impactedResourceId\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoles/AzureBridge\",\r\n \"impactedResourceDisplayName\": \"Azure bridge\",\r\n \"preview\": \"False\",\r\n \"hasValidRemediationAction\": false,\r\n \"remediationHistory\": {}\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/a7bbf949-b53e-4b0f-8f50-dd0e5719d3e2\",\r\n \"name\": \"local/a7bbf949-b53e-4b0f-8f50-dd0e5719d3e2\",\r\n \"type\": \"Microsoft.InfrastructureInsights.Admin/regionHealths/alerts\",\r\n \"location\": \"local\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"closedTimestamp\": \"2018-11-03T18:54:03.2541639Z\",\r\n \"createdTimestamp\": \"2018-11-03T18:49:59.5610328Z\",\r\n \"description\": [\r\n {\r\n \"text\": \"The infrastructure role instance AZS-CA01 is unavailable. This might impact performance and availability of Azure Stack services.\",\r\n \"type\": \"Text\"\r\n }\r\n ],\r\n \"faultId\": \"3d682306-1f81-4575-be8b-0b333fb4380b\",\r\n \"alertId\": \"a7bbf949-b53e-4b0f-8f50-dd0e5719d3e2\",\r\n \"faultTypeId\": \"FRP.Heartbeat.InfraVM\",\r\n \"lastUpdatedTimestamp\": \"2018-11-03T18:54:03.2541639Z\",\r\n \"alertProperties\": {\r\n \"heartbeatAlert\": \"true\",\r\n \"nodeName\": \"AZS-CA01\"\r\n },\r\n \"remediation\": [\r\n {\r\n \"text\": \"1. Select the 'Repair' action to try to start the Infrastructure role instance, and then wait for the action to complete. Do not attempt to repair more than one alert at a time. Do not attempt the repair action if an update is in progress.\",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"type\": \"NewLine\"\r\n },\r\n {\r\n \"text\": \" 2. A few minutes after the Infrastructure role instance starts, the alert will automatically close. You can view the operational status of the role instance by navigating to the following \",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"linkType\": \"ResourceId\",\r\n \"resourceId\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraroleinstances/AZS-CA01\",\r\n \"type\": \"LinkBegin\"\r\n },\r\n {\r\n \"text\": \"AZS-CA01\",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"type\": \"LinkEnd\"\r\n },\r\n {\r\n \"text\": \". \",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"type\": \"NewLine\"\r\n },\r\n {\r\n \"text\": \" 3. If the alert remains active for more than a few minutes after the repair action completes, start the log file collection process using the guidance from \",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"linkType\": \"Uri\",\r\n \"uri\": \"https://aka.ms/azurestacklogfiles\",\r\n \"type\": \"LinkBegin\"\r\n },\r\n {\r\n \"text\": \"https://aka.ms/azurestacklogfiles\",\r\n \"type\": \"Text\"\r\n },\r\n {\r\n \"type\": \"LinkEnd\"\r\n },\r\n {\r\n \"text\": \", and then contact support.\",\r\n \"type\": \"Text\"\r\n }\r\n ],\r\n \"resourceProviderRegistrationId\": \"e56bc7b8-c8b5-4e25-b00c-4f951effb22c\",\r\n \"severity\": \"Warning\",\r\n \"state\": \"Closed\",\r\n \"title\": \"Infrastructure role instance unavailable\",\r\n \"impactedResourceId\": \"/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/system.local/providers/Microsoft.Fabric.Admin/fabricLocations/local/infraRoleInstances/AZS-CA01\",\r\n \"impactedResourceDisplayName\": \"AZS-CA01\",\r\n \"closedByUserAlias\": \"?api-version=1.0.0\",\r\n \"preview\": \"False\",\r\n \"hasValidRemediationAction\": true,\r\n \"remediationHistory\": {}\r\n }\r\n }\r\n ]\r\n}",
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/alerts/a7bbf949-b53e-4b0f-8f50-dd0e5719d3e2/repair?api-version=2016-05-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWQwNzE0OTMtOTM3ZC00ODZiLWJkZWEtYjQxZjY0MTM2YmJhL3Jlc291cmNlR3JvdXBzL1N5c3RlbS5sb2NhbC9wcm92aWRlcnMvTWljcm9zb2Z0LkluZnJhc3RydWN0dXJlSW5zaWdodHMuQWRtaW4vcmVnaW9uSGVhbHRocy9sb2NhbC9hbGVydHMvYTdiYmY5NDktYjUzZS00YjBmLThmNTAtZGQwZTU3MTlkM2UyL3JlcGFpcj9hcGktdmVyc2lvbj0yMDE2LTA1LTAx",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-client-request-id": [
+ "b03fd201-2d0d-405e-a6b4-92eb0143e3f1"
+ ],
+ "accept-language": [
+ "en-US"
+ ],
+ "User-Agent": [
+ "FxVersion/4.6.26614.01",
+ "OSName/Windows",
+ "OSVersion/MicrosoftWindows10.0.16299",
+ "Microsoft.AzureStack.Management.InfrastructureInsights.Admin.InfrastructureInsightsAdminClient/0.3.0.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Sun, 04 Nov 2018 06:58:04 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Location": [
+ "https://adminmanagement.local.azurestack.external/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/healthServiceOperationResults/b03fd201-2d0d-405e-a6b4-92eb0143e3f1?api-version=2016-05-01"
+ ],
+ "Retry-After": [
+ "60"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "WWW-Authenticate": [
+ "oYG3MIG0oAMKAQChCwYJKoZIgvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRvu2qTV5JwRUOkPfzSusRPb8PFW5SLxbds96lV4Va25f7PE3+G3EPY1NaPA/9INQZr6zM9ox9Nz/gPPnIlw058Ki4wUWIByJjb9wME0SrGD9h/nbSLeTMRorqT9jws+AHp1pL1cql8UF50TgbLi+D0"
+ ],
+ "x-ms-correlation-request-id": [
+ "3224752c-baba-4310-9352-ec9d9db19116"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "3224752c-baba-4310-9352-ec9d9db19116"
+ ],
+ "x-ms-routing-request-id": [
+ "LOCAL:20181104T065804Z:3224752c-baba-4310-9352-ec9d9db19116"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Content-Length": [
+ "0"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "",
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/subscriptions/ed071493-937d-486b-bdea-b41f64136bba/resourceGroups/System.local/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/local/healthServiceOperationResults/b03fd201-2d0d-405e-a6b4-92eb0143e3f1?api-version=2016-05-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZWQwNzE0OTMtOTM3ZC00ODZiLWJkZWEtYjQxZjY0MTM2YmJhL3Jlc291cmNlR3JvdXBzL1N5c3RlbS5sb2NhbC9wcm92aWRlcnMvTWljcm9zb2Z0LkluZnJhc3RydWN0dXJlSW5zaWdodHMuQWRtaW4vcmVnaW9uSGVhbHRocy9sb2NhbC9oZWFsdGhTZXJ2aWNlT3BlcmF0aW9uUmVzdWx0cy9iMDNmZDIwMS0yZDBkLTQwNWUtYTZiNC05MmViMDE0M2UzZjE/YXBpLXZlcnNpb249MjAxNi0wNS0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "FxVersion/4.6.26614.01",
+ "OSName/Windows",
+ "OSVersion/MicrosoftWindows10.0.16299",
+ "Microsoft.AzureStack.Management.InfrastructureInsights.Admin.InfrastructureInsightsAdminClient/0.3.0.0"
+ ]
+ },
+ "ResponseHeaders": {
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Sun, 04 Nov 2018 06:59:04 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ],
+ "WWW-Authenticate": [
+ "oYG3MIG0oAMKAQChCwYJKoZIgvcSAQICooGfBIGcYIGZBgkqhkiG9xIBAgICAG+BiTCBhqADAgEFoQMCAQ+iejB4oAMCARKicQRvxa+Mtn3Q75fuuWGM30tpJSHhMRP3Fz72xaeQ7bjjwCqRVotiel5h7WlHXBd0oVMaotZD8hY57ZdJOkopXXUjpi3ygJ5FfJfhw9RJ5rKzUOLx+58TmbXouE99cS94ucMDGzZp5FFaApgLx/KmF7+W"
+ ],
+ "x-ms-correlation-request-id": [
+ "c5dcbcaf-ea67-44a3-bf62-05201c1aae2d"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14932"
+ ],
+ "x-ms-request-id": [
+ "c5dcbcaf-ea67-44a3-bf62-05201c1aae2d"
+ ],
+ "x-ms-routing-request-id": [
+ "LOCAL:20181104T065904Z:c5dcbcaf-ea67-44a3-bf62-05201c1aae2d"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "X-Content-Type-Options": [
+ "nosniff"
+ ],
+ "Content-Length": [
+ "329"
+ ],
+ "Content-Type": [
+ "application/json"
+ ],
+ "Expires": [
+ "-1"
+ ]
+ },
+ "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Failed\"\r\n },\r\n \"error\": {\r\n \"code\": \"RemediateAlertPrecheckFailed\",\r\n \"message\": \"Alert remediation for alert 'a7bbf949-b53e-4b0f-8f50-dd0e5719d3e2' failed prerequisite checks. Prerequiste checks include that the alert exists, is open, has a remediation action, and remediation is not already in progress.\"\r\n }\r\n}",
+ "StatusCode": 400
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "ed071493-937d-486b-bdea-b41f64136bba"
+ }
+}
\ No newline at end of file
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/src/AlertTests.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/src/AlertTests.cs
index dcad291cf61b..a583604dfb6f 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/src/AlertTests.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin.Tests/src/AlertTests.cs
@@ -3,6 +3,7 @@
// license information.
//
+using System;
using Microsoft.AzureStack.Management.InfrastructureInsights.Admin;
using Microsoft.AzureStack.Management.InfrastructureInsights.Admin.Models;
using Xunit;
@@ -142,6 +143,50 @@ public void TestGetAllAlerts() {
});
}
+ [Fact]
+ public void TestRepairAlert()
+ {
+ RunTest((client) => {
+ bool done = false;
+ var regions = client.RegionHealths.List(ResourceGroupName);
+ Common.MapOverIPage(regions, client.RegionHealths.ListNext, (regionHealth) => {
+ if (!done)
+ {
+ var regionName = ExtractName(regionHealth.Name);
+ var alerts = client.Alerts.List(ResourceGroupName, regionName);
+ Common.MapOverIPage(alerts, client.Alerts.ListNext, (alert) => {
+ if (!done && alert.HasValidRemediationAction.GetValueOrDefault())
+ {
+ var alertName = ExtractName(alert.AlertId);
+ var exceptionThrown = false;
+ try
+ {
+ client.Alerts.Repair(ResourceGroupName, regionName, alertName);
+ }
+ catch(Exception)
+ {
+ exceptionThrown = true;
+ }
+ finally
+ {
+ if (alert.State.Equals("Active"))
+ {
+ Assert.False(exceptionThrown);
+ }
+ else
+ {
+ Assert.True(exceptionThrown);
+ }
+ }
+
+ done = true;
+ }
+
+ });
+ }
+ });
+ });
+ }
[Fact(Skip ="Causes RP to crash.")]
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperations.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperations.cs
index fe90addca2f7..381ac4376f81 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperations.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperations.cs
@@ -695,6 +695,215 @@ internal AlertsOperations(InfrastructureInsightsAdminClient client)
return _result;
}
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task RepairWithHttpMessagesAsync(string resourceGroupName, string location, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginRepairWithHttpMessagesAsync(resourceGroupName, location, alertName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginRepairWithHttpMessagesAsync(string resourceGroupName, string location, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "location");
+ }
+ if (alertName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "alertName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("location", location);
+ tracingParameters.Add("alertName", alertName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginRepair", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.InfrastructureInsights.Admin/regionHealths/{location}/alerts/{alertName}/repair").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
+ _url = _url.Replace("{alertName}", System.Uri.EscapeDataString(alertName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Returns the list of all alerts in a given region.
///
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperationsExtensions.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperationsExtensions.cs
index 5f307421fa55..c386dccc5b49 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperationsExtensions.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/AlertsOperationsExtensions.cs
@@ -172,6 +172,92 @@ public static Alert Close(this IAlertsOperations operations, string resourceGrou
}
}
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ public static void Repair(this IAlertsOperations operations, string resourceGroupName, string location, string alertName)
+ {
+ operations.RepairAsync(resourceGroupName, location, alertName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RepairAsync(this IAlertsOperations operations, string resourceGroupName, string location, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RepairWithHttpMessagesAsync(resourceGroupName, location, alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ public static void BeginRepair(this IAlertsOperations operations, string resourceGroupName, string location, string alertName)
+ {
+ operations.BeginRepairAsync(resourceGroupName, location, alertName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginRepairAsync(this IAlertsOperations operations, string resourceGroupName, string location, string alertName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginRepairWithHttpMessagesAsync(resourceGroupName, location, alertName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Returns the list of all alerts in a given region.
///
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IAlertsOperations.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IAlertsOperations.cs
index 38c0a89c7b03..77ddf10c8e27 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IAlertsOperations.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IAlertsOperations.cs
@@ -115,6 +115,56 @@ public partial interface IAlertsOperations
///
Task> CloseWithHttpMessagesAsync(string resourceGroupName, string location, string alertName, string user, Alert alert, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task RepairWithHttpMessagesAsync(string resourceGroupName, string location, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Repairs an alert.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// Name of the region
+ ///
+ ///
+ /// Name of the alert.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginRepairWithHttpMessagesAsync(string resourceGroupName, string location, string alertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Returns the list of all alerts in a given region.
///
///
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IInfrastructureInsightsAdminClient.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IInfrastructureInsightsAdminClient.cs
index 5455c14eff8b..40a352f87143 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IInfrastructureInsightsAdminClient.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/IInfrastructureInsightsAdminClient.cs
@@ -53,19 +53,20 @@ public partial interface IInfrastructureInsightsAdminClient : System.IDisposable
string ApiVersion { get; }
///
- /// Gets or sets the preferred language for the response.
+ /// The preferred language for the response.
///
string AcceptLanguage { get; set; }
///
- /// Gets or sets the retry timeout in seconds for Long Running
- /// Operations. Default value is 30.
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
///
int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is generated
- /// and included in each request. Default is true.
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
///
bool? GenerateClientRequestId { get; set; }
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/InfrastructureInsightsAdminClient.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/InfrastructureInsightsAdminClient.cs
index da42bcc2a708..573fa54e79b2 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/InfrastructureInsightsAdminClient.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/InfrastructureInsightsAdminClient.cs
@@ -59,19 +59,20 @@ public partial class InfrastructureInsightsAdminClient : ServiceClient
- /// Gets or sets the preferred language for the response.
+ /// The preferred language for the response.
///
public string AcceptLanguage { get; set; }
///
- /// Gets or sets the retry timeout in seconds for Long Running Operations.
- /// Default value is 30.
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
///
public int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is generated and
- /// included in each request. Default is true.
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
///
public bool? GenerateClientRequestId { get; set; }
@@ -100,6 +101,19 @@ public partial class InfrastructureInsightsAdminClient : ServiceClient
public virtual IServiceHealthsOperations ServiceHealths { get; private set; }
+ ///
+ /// Initializes a new instance of the InfrastructureInsightsAdminClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling InfrastructureInsightsAdminClient.Dispose(). False: will not dispose provided httpClient
+ protected InfrastructureInsightsAdminClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
///
/// Initializes a new instance of the InfrastructureInsightsAdminClient class.
///
@@ -195,6 +209,33 @@ public InfrastructureInsightsAdminClient(ServiceClientCredentials credentials, p
}
}
+ ///
+ /// Initializes a new instance of the InfrastructureInsightsAdminClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling InfrastructureInsightsAdminClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public InfrastructureInsightsAdminClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
///
/// Initializes a new instance of the InfrastructureInsightsAdminClient class.
///
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/Models/Alert.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/Models/Alert.cs
index 197f685ce58d..4854c6d0e3c0 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/Models/Alert.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/Models/Alert.cs
@@ -72,7 +72,9 @@ public Alert()
/// impacted item.
/// User alias who closed the
/// alert.
- public Alert(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), string closedTimestamp = default(string), string createdTimestamp = default(string), IList> description = default(IList>), string faultId = default(string), string alertId = default(string), string faultTypeId = default(string), string lastUpdatedTimestamp = default(string), IDictionary alertProperties = default(IDictionary), IList> remediation = default(IList>), string resourceRegistrationId = default(string), string resourceProviderRegistrationId = default(string), string severity = default(string), string state = default(string), string title = default(string), string impactedResourceId = default(string), string impactedResourceDisplayName = default(string), string closedByUserAlias = default(string))
+ /// Indicates if the alert can
+ /// be remediated.
+ public Alert(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), string closedTimestamp = default(string), string createdTimestamp = default(string), IList> description = default(IList>), string faultId = default(string), string alertId = default(string), string faultTypeId = default(string), string lastUpdatedTimestamp = default(string), IDictionary alertProperties = default(IDictionary), IList> remediation = default(IList>), string resourceRegistrationId = default(string), string resourceProviderRegistrationId = default(string), string severity = default(string), string state = default(string), string title = default(string), string impactedResourceId = default(string), string impactedResourceDisplayName = default(string), string closedByUserAlias = default(string), bool? hasValidRemediationAction = default(bool?))
: base(id, name, type, tags, location)
{
ClosedTimestamp = closedTimestamp;
@@ -92,6 +94,7 @@ public Alert()
ImpactedResourceId = impactedResourceId;
ImpactedResourceDisplayName = impactedResourceDisplayName;
ClosedByUserAlias = closedByUserAlias;
+ HasValidRemediationAction = hasValidRemediationAction;
CustomInit();
}
@@ -206,5 +209,11 @@ public Alert()
[JsonProperty(PropertyName = "properties.closedByUserAlias")]
public string ClosedByUserAlias { get; set; }
+ ///
+ /// Gets or sets indicates if the alert can be remediated.
+ ///
+ [JsonProperty(PropertyName = "properties.hasValidRemediationAction")]
+ public bool? HasValidRemediationAction { get; set; }
+
}
}
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/SdkInfo_InfrastructureInsightsAdminClient.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/SdkInfo_InfrastructureInsightsAdminClient.cs
index 9b9589037dc6..7dbae766f528 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/SdkInfo_InfrastructureInsightsAdminClient.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Generated/SdkInfo_InfrastructureInsightsAdminClient.cs
@@ -1,22 +1,42 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
-internal static partial class SdkInfo
+namespace Microsoft.AzureStack.Management.InfrastructureInsights.Admin
{
- public static IEnumerable> ApiInfo_InfrastructureInsightsAdminClient
- {
- get
- {
- return new Tuple[]
- {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_InfrastructureInsightsAdminClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
new Tuple("InfrastructureInsights.Admin", "Alerts", "2016-05-01"),
new Tuple("InfrastructureInsights.Admin", "Operations", "2016-05-01"),
new Tuple("InfrastructureInsights.Admin", "RegionHealths", "2016-05-01"),
new Tuple("InfrastructureInsights.Admin", "ResourceHealths", "2016-05-01"),
new Tuple("InfrastructureInsights.Admin", "ServiceHealths", "2016-05-01"),
- }.AsEnumerable();
- }
- }
+ }.AsEnumerable();
+ }
+ }
+ // BEGIN: Code Generation Metadata Section
+ public static readonly String AutoRestVersion = "latest";
+ public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
+ public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azsadmin/resource-manager/infrastructureinsights/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Git\\azure-sdk-for-net\\src\\AzureStack\\Admin\\InfrastructureInsightsAdmin\\InfrastructureInsights.Admin";
+ public static readonly String GithubForkName = "Azure";
+ public static readonly String GithubBranchName = "master";
+ public static readonly String GithubCommidId = "7df0ce599e8d6579acd109ed9f4805954304969f";
+ public static readonly String CodeGenerationErrors = "";
+ public static readonly String GithubRepoName = "azure-rest-api-specs";
+ // END: Code Generation Metadata Section
+ }
}
+
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
index 6ae28eff5966..53a3f2752259 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Microsoft.AzureStack.Management.InfrastructureInsights.Admin.csproj
@@ -7,14 +7,12 @@
Microsoft.AzureStack.Management.InfrastructureInsights.Admin
Provides developers with libraries for the health admin under AzureStack to manage health alerts.
- 0.2.0-preview
+ 0.3.0-preview
Microsoft.AzureStack.Management.InfrastructureInsights.Admin
Microsoft Azure Stack;InfrastructureInsights;REST HTTP client;azureostackfficial;netcore451511
diff --git a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Properties/AssemblyInfo.cs b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Properties/AssemblyInfo.cs
index 37e3046046bf..7f5bdf5a4b1a 100644
--- a/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Properties/AssemblyInfo.cs
+++ b/src/AzureStack/Admin/InfrastructureInsightsAdmin/InfrastructureInsights.Admin/Properties/AssemblyInfo.cs
@@ -14,5 +14,5 @@
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
-[assembly: AssemblyVersion("0.2.0.0")]
-[assembly: AssemblyFileVersion("0.2.0.0")]
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
diff --git a/src/AzureStack/_metadata/azsadmin_resource-manager_infrastructureinsights.txt b/src/AzureStack/_metadata/azsadmin_resource-manager_infrastructureinsights.txt
new file mode 100644
index 000000000000..e6d137d42119
--- /dev/null
+++ b/src/AzureStack/_metadata/azsadmin_resource-manager_infrastructureinsights.txt
@@ -0,0 +1,14 @@
+Installing AutoRest version: latest
+AutoRest installed successfully.
+Commencing code generation
+Generating CSharp code
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azsadmin/resource-manager/infrastructureinsights/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\Git\azure-sdk-for-net\src\AzureStack\Admin\InfrastructureInsightsAdmin\InfrastructureInsights.Admin
+2018-11-14 15:56:06 UTC
+Azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: 7df0ce599e8d6579acd109ed9f4805954304969f
+AutoRest information
+Requested version: latest
+Bootstrapper version: autorest@2.0.4283
diff --git a/src/SDKs/_metadata/azsadmin_resource-manager_infrastructureinsights.txt b/src/SDKs/_metadata/azsadmin_resource-manager_infrastructureinsights.txt
deleted file mode 100644
index 7411663e4b73..000000000000
--- a/src/SDKs/_metadata/azsadmin_resource-manager_infrastructureinsights.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Executing AutoRest command
-cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/azsadmin/resource-manager/infrastructureinsights/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\github\azure-sdk-for-net\src\AzureStack\InfrastructureInsightsAdmin\InfrastructureInsights.Admin
-2018-04-20 22:08:15 UTC
-1) azure-rest-api-specs repository information
-GitHub fork: Azure
-Branch: master
-Commit: d052f8bd7524def7a6de1eb3aae315aec8bf7925
-
-2) AutoRest information
-Requested version: latest
-Bootstrapper version: C:\Users\jerobins.REDMOND\AppData\Roaming\npm `-- autorest@2.0.4262
-
-
-Latest installed version:
-.\tools\generate.ps1 was invoked by generate.ps1
-
-