Skip to content

Commit

Permalink
Adding support for RU Alerts in new Budgets API version (#23140)
Browse files Browse the repository at this point in the history
* Updating budgets swagger definition to include modifications from RU Alert category

* Adding new examples for all scenarios of RU Alerts, added new examples for all scopes for Cost Budgets

* Spelling & lintdiff fixes

* prettier-fix

* Added more descriptions, and some light markdown to larger descripitons

* Addressing comments

* prettier-fix

* Updating description for amount property

* addressing Shravan's offline comments

* spell check

* removing aws scopes from scope description

* Addressing comments from internal review, removed legacy tags for EA
  • Loading branch information
alprosms authored Mar 28, 2023
1 parent 09d1231 commit 04dc8f5
Show file tree
Hide file tree
Showing 24 changed files with 2,220 additions and 99 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2024-10-31T00:00:00Z"
},
"filter": {
"and": [
Expand Down Expand Up @@ -84,8 +84,8 @@
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2024-10-31T00:00:00Z"
},
"filter": {
"and": [
Expand Down Expand Up @@ -159,8 +159,8 @@
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2024-10-31T00:00:00Z"
},
"filter": {
"and": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"parameters": {
"api-version": "2023-04-01-preview",
"billingAccountId": "123456",
"budgetName": "TestAlertRule",
"scope": "providers/Microsoft.Billing/billingAccounts/123456",
"parameters": {
"eTag": "\"1d34d016a593709\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservationId",
"operator": "In",
"values": [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"responses": {
"201": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservationId",
"operator": "In",
"values": [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"200": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservationId",
"operator": "In",
"values": [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"parameters": {
"api-version": "2023-04-01-preview",
"billingAccountId": "123456",
"budgetName": "TestAlertRule",
"scope": "providers/Microsoft.Billing/billingAccounts/123456",
"parameters": {
"eTag": "\"1d34d016a593709\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservedResourceType",
"operator": "In",
"values": [
"VirtualMachines",
"SqlDatabases",
"CosmosDb"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"responses": {
"201": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservedResourceType",
"operator": "In",
"values": [
"VirtualMachines",
"SqlDatabases",
"CosmosDb"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"200": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {
"dimensions": {
"name": "ReservedResourceType",
"operator": "In",
"values": [
"VirtualMachines",
"SqlDatabases",
"CosmosDb"
]
}
},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"parameters": {
"api-version": "2023-04-01-preview",
"billingAccountId": "123456",
"budgetName": "TestAlertRule",
"scope": "providers/Microsoft.Billing/billingAccounts/123456",
"parameters": {
"eTag": "\"1d34d016a593709\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"responses": {
"201": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
},
"200": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.CostManagement/budgets/TestAlertRule",
"name": "TestAlertRule",
"type": "Microsoft.CostManagement/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "ReservationUtilization",
"timeGrain": "Last7Days",
"timePeriod": {
"startDate": "2023-04-01T00:00:00Z",
"endDate": "2025-04-01T00:00:00Z"
},
"filter": {},
"notifications": {
"Actual_LessThan_99_Percent": {
"enabled": true,
"operator": "LessThan",
"threshold": 99,
"frequency": "Weekly",
"locale": "en-us",
"contactEmails": [
"[email protected]",
"[email protected]"
]
}
}
}
}
}
}
}
Loading

0 comments on commit 04dc8f5

Please sign in to comment.