Skip to content
Merged
Prev Previous commit
Next Next commit
Adding Metadata Tags attributes to Events APIs. Added Billing related…
… properties to Events APIs. (#34658)

* Adding Metadata Tags attributes to Events APIs.

* Adding changes to Metadata API.

* Added priority in MetadataSupportedValueDetail object at correct level.

* Adding billing feature changes.

* removing Billing event type from Metadata list response.

* Added latest example of ListOperations api.

* adding billing properties in billing example.

* Change type of MetadataSupportedValueDetail.priority to Integer from string.

* Changed type of newRate and oldRate to double from string.

* Fixed LintDiff errors.

* Fix prettier issues.
  • Loading branch information
abhishek-corp authored May 20, 2025
commit 49b4f4fe70c0887744bb94e72df2be0ff00dd21f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check notice on line 1 in specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2025-05-01/ResourceHealth.json

View workflow job for this annotation

GitHub Actions / TypeSpec Requirement

Brownfield services will soon be required to convert from OpenAPI to TypeSpec. See https://aka.ms/azsdk/typespec.
"swagger": "2.0",
"info": {
"version": "2025-05-01",
Expand Down Expand Up @@ -714,6 +714,45 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events/{eventTrackingId}/fetchBillingCommunicationDetails": {
"post": {
"tags": [
"Event"
],
"operationId": "Event_fetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingId",
"description": "Service health event details specific in the subscription by event tracking id. This can be used to fetch sensitive properties for Billing event type.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/EventTrackingIdParameter"
}
],
"responses": {
"200": {
"description": "Service Health Event details in the subscription requested by tracking id.",
"schema": {
"$ref": "#/definitions/event"
}
},
"default": {
"description": "DefaultErrorResponse",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
"BillingEventDetailsBySubscriptionIdAndTrackingId": {
"$ref": "./examples/Event_fetchBillingCommunicationDetailsBySubscriptionIdAndTrackingId.json"
}
}
}
},
"/providers/Microsoft.ResourceHealth/events": {
"get": {
"tags": [
Expand Down Expand Up @@ -1141,13 +1180,32 @@
"HealthAdvisory",
"RCA",
"EmergingIssues",
"SecurityAdvisory"
"SecurityAdvisory",
"Billing"
],
"x-ms-enum": {
"name": "EventTypeValues",
"modelAsString": true
}
},
"eventSubType": {
"type": "string",
"description": "Sub-type of event.",
"enum": [
"Retirement",
"ForeignExchangeRateChange",
"Underbilling",
"Overbilling",
"PriceChanges",
"TaxChanges",
"MeterIDChanges",
"UnauthorizedPartyAbuse"
],
"x-ms-enum": {
"name": "EventSubTypeValues",
"modelAsString": true
}
},
"eventSource": {
"type": "string",
"description": "Source of event.",
Expand Down Expand Up @@ -1360,6 +1418,27 @@
"impactType": {
"type": "string",
"description": "The type of the impact"
},
"eventTags": {
"$ref": "#/definitions/eventTags"
},
"newRate": {
"type": "number",
"format": "double",
"description": "Billing rate change information - new rate"
},
"oldRate": {
"type": "number",
"format": "double",
"description": "Billing rate change information - old rate"
},
"currencyType": {
"type": "string",
"description": "Billing currency type information. Example: USD, CAD"
},
"billingId": {
"type": "string",
"description": "Billing identifier information."
}
}
}
Expand Down Expand Up @@ -1501,9 +1580,19 @@
"type": "string",
"description": "It provides the Timestamp for the given update for the service health event.",
"format": "date-time"
},
"eventTags": {
"$ref": "#/definitions/eventTags"
}
}
},
"eventTags": {
"type": "array",
"description": "A list of metadata tags associated with the event. Possible values include:\n -Action Recommended: Action may be required by you to avoid possible disruptions or mitigate risks for your services. It is recommended to evaluate these actions and the potential impact on your services. \n- False Positive: After investigation, we've determined your service is healthy and service issues did not impact your services as originally communicated.\n- Preliminary PIR: For our largest, most impactful service issues a Preliminary Post Incident Review (PIR) is published generally within 72 hours of mitigation, to summarize what we have learned so far from the still-in-progress investigation.\n- Final PIR: For service issues, a Final Post Incident Review (PIR) may be published to provide additional details or learnings. Sometimes this requires us to complete an internal retrospective, generally within 14 days of mitigation.",
"items": {
"type": "string"
}
},
"faq": {
"type": "object",
"description": "Frequently asked question for the service health event",
Expand Down Expand Up @@ -1677,6 +1766,11 @@
"items": {
"type": "string"
}
},
"priority": {
"description": "Priority of this metadata supported value. Lower number is given higher preference.",
"type": "integer",
"format": "int32"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"eventTrackingId": "eventTrackingId",
"api-version": "2025-05-01",
"$filter": "properties/status eq 'Active'",
"queryStartTime": "7/10/2022"
"queryStartTime": "5/12/2025"
},
"responses": {
"200": {
Expand Down Expand Up @@ -50,9 +50,10 @@
}
],
"level": "Warning",
"eventLevel": "Informational",
"impactStartTime": "2018-11-07T00:00:00Z",
"impactMitigationTime": "2018-11-08T00:00:00Z",
"eventLevel": "Warning",
"isEventSensitive": false,
"impactStartTime": "2025-05-12T14:45:48.1203530Z",
"impactMitigationTime": "2025-05-14T15:43:48.1203530Z",
"impact": [
{
"impactedService": "Virtual Machines",
Expand All @@ -65,11 +66,41 @@
"{subscriptionId}"
],
"impactedTenants": [],
"lastUpdateTime": "2017-12-05T21:05:00Z"
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"updates": [
{
"summary": "Update 3 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-13T15:43:48.1203530Z",
"eventTags": [
"Final PIR"
]
},
{
"summary": "Update 2 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-13T10:32:48.1203530Z",
"eventTags": [
"False Positive",
"Preliminary PIR"
]
},
{
"summary": "Update 1 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-12T15:00:48.1203530Z",
"eventTags": [
"Action Recommended"
]
}
]
}
]
}
],
"eventTags": [
"Action Recommended",
"False Positive",
"Preliminary PIR",
"Final PIR"
],
"recommendedActions": {
"message": "Recommended actions title",
"actions": [
Expand All @@ -95,7 +126,7 @@
"enableMicrosoftSupport": true,
"enableChatWithUs": false,
"priority": 2,
"lastUpdateTime": "2018-11-08T00:00:00Z",
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"hirStage": "resolved"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"eventTrackingId": "eventTrackingId",
"api-version": "2025-05-01"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.ResourceHealth/events/{eventTrackingId}",
"name": "{eventTrackingId}",
"type": "/providers/Microsoft.ResourceHealth/events",
"properties": {
"eventType": "Billing",
"eventSubType": "Underbilling",
"eventSource": "ServiceHealth",
"status": "Active",
"title": "Upcoming billing changes to your resources",
"summary": "Upcoming billing changes to your resources.",
"header": "Your service might have been impacted by an Azure service issue",
"article": {
"articleContent": "<html>Upcoming billing changes to your resources</html>"
},
"links": [
{
"type": "Hyperlink",
"displayText": {
"value": "Request RCA",
"localizedValue": "Request RCA"
},
"extensionName": "Microsoft_Azure_Health",
"bladeName": "RequestRCABlade",
"parameters": {
"trackingId": "{eventTrackingId}",
"rcaRequested": "False"
}
},
{
"type": "Button",
"displayText": {
"value": "Sign up for updates",
"localizedValue": "Sign up for updates"
},
"extensionName": "Microsoft_Azure_Health",
"bladeName": "AzureHealthBrowseBlade",
"parameters": {
"trackingId": "{eventTrackingId}"
}
}
],
"level": "Warning",
"eventLevel": "Warning",
"isEventSensitive": false,
"impactStartTime": "2025-06-12T14:45:48.1203530Z",
"impactMitigationTime": "2025-07-14T15:43:48.1203530Z",
"impact": [
{
"impactedService": "Microsoft Cost Management",
"impactedServiceGuid": "80853877-1df8-40c2-9c79-44c0d1c95e01",
"impactedRegions": [
{
"impactedRegion": "Global",
"status": "Active",
"impactedSubscriptions": [
"{subscriptionId}"
],
"impactedTenants": [],
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"updates": [
{
"summary": "Upcoming billing changes to your resources.",
"updateDateTime": "2025-05-13T15:43:48.1203530Z"
}
]
}
]
}
],
"recommendedActions": {
"message": "Recommended actions title",
"actions": [
{
"groupId": 23243,
"actionText": "action 1"
},
{
"groupId": 23432,
"actionText": "action 2"
}
],
"localeCode": "en"
},
"faqs": [
{
"question": "This is a question",
"answer": "This is an answer",
"localeCode": "en"
}
],
"newRate": 1.0,
"oldRate": 0.88,
"currencyType": "USD",
"billingId": "595959",
"isHIR": false,
"enableMicrosoftSupport": true,
"enableChatWithUs": false,
"priority": 2,
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"hirStage": "resolved"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
}
],
"level": "Warning",
"eventLevel": "Informational",
"impactStartTime": "2018-11-07T00:00:00Z",
"impactMitigationTime": "2018-11-08T00:00:00Z",
"eventLevel": "Warning",
"isEventSensitive": false,
"impactStartTime": "2025-05-12T14:45:48.1203530Z",
"impactMitigationTime": "2025-05-14T15:43:48.1203530Z",
"impact": [
{
"impactedService": "Virtual Machines",
Expand All @@ -63,11 +64,41 @@
"{subscriptionId}"
],
"impactedTenants": [],
"lastUpdateTime": "2017-12-05T21:05:00Z"
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"updates": [
{
"summary": "Update 3 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-13T15:43:48.1203530Z",
"eventTags": [
"Final PIR"
]
},
{
"summary": "Update 2 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-13T10:32:48.1203530Z",
"eventTags": [
"False Positive",
"Preliminary PIR"
]
},
{
"summary": "Update 1 - An outage alert is being investigated. More information will be provided as it is known.",
"updateDateTime": "2025-05-12T15:00:48.1203530Z",
"eventTags": [
"Action Recommended"
]
}
]
}
]
}
],
"eventTags": [
"Action Recommended",
"False Positive",
"Preliminary PIR",
"Final PIR"
],
"recommendedActions": {
"message": "Recommended actions title",
"actions": [
Expand All @@ -93,7 +124,7 @@
"enableMicrosoftSupport": true,
"enableChatWithUs": false,
"priority": 2,
"lastUpdateTime": "2018-11-08T00:00:00Z",
"lastUpdateTime": "2025-05-13T15:43:48.1203530Z",
"hirStage": "resolved"
}
}
Expand Down
Loading