-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Hub Generated] Review request for Microsoft.CostManagement to add version stable/2019-11-01 #9263
Merged
lirenhe
merged 6 commits into
Azure:master
from
sashahdo:dev-cost-management-Microsoft.CostManagement-2019-11-01
May 5, 2020
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b43b9ce
added forecast api and all of it's scopes
sashahdo 293fe37
added alerts path and it's example files
sashahdo 71f7cf8
fixed typos in alertProperties
sashahdo cc6178d
fixed spacing as per prettier script
sashahdo 115b3ab
differentiated forecastDefinition x-ms-enums
sashahdo f1e585c
changed forecast operationID and forecast fixed response ids to corre…
sashahdo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
488 changes: 488 additions & 0 deletions
488
...anagement/resource-manager/Microsoft.CostManagement/stable/2019-11-01/costmanagement.json
Large diffs are not rendered by default.
Oops, something went wrong.
98 changes: 98 additions & 0 deletions
98
...rce-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingAccountAlerts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-08-01-preview", | ||
"billingAccountId": "12345:6789", | ||
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", | ||
"name": "00000000-0000-0000-0000-000000000000", | ||
"type": "Microsoft.CostManagement/alerts", | ||
"properties": { | ||
"definition": { | ||
"type": "Budget", | ||
"category": "Cost", | ||
"criteria": "CostThresholdExceeded" | ||
}, | ||
"description": "", | ||
"source": "Preset", | ||
"details": { | ||
"timeGrainType": "Quarterly", | ||
"periodStartDate": "2020-03-01T00:00:00Z", | ||
"triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", | ||
"resourceGroupFilter": [], | ||
"resourceFilter": [], | ||
"meterFilter": [], | ||
"tagFilter": {}, | ||
"threshold": 0.8, | ||
"operator": "GreaterThan", | ||
"amount": 200000.0, | ||
"unit": "USD", | ||
"currentSpend": 161000.12, | ||
"contactEmails": [ | ||
"[email protected]" | ||
], | ||
"contactGroups": [], | ||
"contactRoles": [], | ||
"overridingAlert": null | ||
}, | ||
"costEntityId": "budget1", | ||
"status": "Active", | ||
"creationTime": "2020-04-27T11:07:52.7143901Z", | ||
"closeTime": "0001-01-01T00:00:00", | ||
"modificationTime": "2020-04-28T11:06:02.8999373Z", | ||
"statusModificationUserName": null, | ||
"statusModificationTime": "0001-01-01T00:00:00" | ||
} | ||
}, | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", | ||
"name": "11111111-1111-1111-111111111111", | ||
"type": "Microsoft.CostManagement/alerts", | ||
"properties": { | ||
"definition": { | ||
"type": "Budget", | ||
"category": "Cost", | ||
"criteria": "CostThresholdExceeded" | ||
}, | ||
"description": "", | ||
"source": "Preset", | ||
"details": { | ||
"timeGrainType": "Quarterly", | ||
"periodStartDate": "2020-03-01T00:00:00Z", | ||
"triggeredBy": "11111111-1111-1111-111111111111_1_01", | ||
"resourceGroupFilter": [], | ||
"resourceFilter": [], | ||
"meterFilter": [], | ||
"tagFilter": {}, | ||
"threshold": 0.8, | ||
"operator": "GreaterThan", | ||
"amount": 200000.0, | ||
"unit": "USD", | ||
"currentSpend": 171000.32, | ||
"contactEmails": [ | ||
"[email protected]" | ||
], | ||
"contactGroups": [], | ||
"contactRoles": [], | ||
"overridingAlert": null | ||
}, | ||
"costEntityId": "budget1", | ||
"status": "Active", | ||
"creationTime": "2019-06-24T05:51:52.8713179Z", | ||
"closeTime": "0001-01-01T00:00:00", | ||
"modificationTime": "2019-08-31T17:51:55.1808807Z", | ||
"statusModificationUserName": null, | ||
"statusModificationTime": "0001-01-01T00:00:00" | ||
} | ||
} | ||
], | ||
"nextLink": null | ||
} | ||
} | ||
} | ||
} |
117 changes: 117 additions & 0 deletions
117
...e-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingAccountForecast.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2019-11-01", | ||
"billingAccountId": "12345:6789", | ||
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789", | ||
"parameters": { | ||
"type": "Usage", | ||
"timeframe": "MonthToDate", | ||
"dataset": { | ||
"granularity": "Daily", | ||
"filter": { | ||
"and": [ | ||
{ | ||
"or": [ | ||
{ | ||
"dimension": { | ||
"name": "ResourceLocation", | ||
"operator": "In", | ||
"values": [ | ||
"East US", | ||
"West Europe" | ||
] | ||
} | ||
}, | ||
{ | ||
"tag": { | ||
"name": "Environment", | ||
"operator": "In", | ||
"values": [ | ||
"UAT", | ||
"Prod" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"dimension": { | ||
"name": "ResourceGroup", | ||
"operator": "In", | ||
"values": [ | ||
"API" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"includeActualCost": false, | ||
"includeFreshPartialCost": false | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", | ||
"name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", | ||
"type": "microsoft.costmanagement/Query", | ||
"properties": { | ||
"nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D", | ||
"columns": [ | ||
{ | ||
"name": "PreTaxCost", | ||
"type": "Number" | ||
}, | ||
{ | ||
"name": "ResourceGroup", | ||
"type": "String" | ||
}, | ||
{ | ||
"name": "UsageDate", | ||
"type": "Number" | ||
}, | ||
{ | ||
"name": "CostStatus", | ||
"type": "String" | ||
}, | ||
{ | ||
"name": "Currency", | ||
"type": "String" | ||
} | ||
], | ||
"rows": [ | ||
[ | ||
2.10333307059661, | ||
"JapanUnifia-Trial", | ||
20180331, | ||
"Forecast", | ||
"USD" | ||
], | ||
[ | ||
218.68795741935486, | ||
"RVIIOT-TRIAL", | ||
20180331, | ||
"Forecast", | ||
"USD" | ||
], | ||
[ | ||
0.14384913581657052, | ||
"VSTSHOL-1595322048000", | ||
20180401, | ||
"Forecast", | ||
"USD" | ||
], | ||
[ | ||
0.009865586851323632, | ||
"gs-stms-dev", | ||
20180429, | ||
"Forecast", | ||
"USD" | ||
] | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
99 changes: 99 additions & 0 deletions
99
...rce-manager/Microsoft.CostManagement/stable/2019-11-01/examples/BillingProfileAlerts.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-08-01-preview", | ||
"billingAccountId": "12345:6789", | ||
"billingProfileId": "13579", | ||
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000", | ||
"name": "00000000-0000-0000-0000-000000000000", | ||
"type": "Microsoft.CostManagement/alerts", | ||
"properties": { | ||
"definition": { | ||
"type": "Budget", | ||
"category": "Cost", | ||
"criteria": "CostThresholdExceeded" | ||
}, | ||
"description": "", | ||
"source": "Preset", | ||
"details": { | ||
"timeGrainType": "Quarterly", | ||
"periodStartDate": "2020-03-01T00:00:00Z", | ||
"triggeredBy": "00000000-0000-0000-0000-000000000000_1_01", | ||
"resourceGroupFilter": [], | ||
"resourceFilter": [], | ||
"meterFilter": [], | ||
"tagFilter": {}, | ||
"threshold": 0.8, | ||
"operator": "GreaterThan", | ||
"amount": 200000.0, | ||
"unit": "USD", | ||
"currentSpend": 161000.12, | ||
"contactEmails": [ | ||
"[email protected]" | ||
], | ||
"contactGroups": [], | ||
"contactRoles": [], | ||
"overridingAlert": null | ||
}, | ||
"costEntityId": "budget1", | ||
"status": "Active", | ||
"creationTime": "2020-04-27T11:07:52.7143901Z", | ||
"closeTime": "0001-01-01T00:00:00", | ||
"modificationTime": "2020-04-28T11:06:02.8999373Z", | ||
"statusModificationUserName": null, | ||
"statusModificationTime": "0001-01-01T00:00:00" | ||
} | ||
}, | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111", | ||
"name": "11111111-1111-1111-111111111111", | ||
"type": "Microsoft.CostManagement/alerts", | ||
"properties": { | ||
"definition": { | ||
"type": "Budget", | ||
"category": "Cost", | ||
"criteria": "CostThresholdExceeded" | ||
}, | ||
"description": "", | ||
"source": "Preset", | ||
"details": { | ||
"timeGrainType": "Quarterly", | ||
"periodStartDate": "2020-03-01T00:00:00Z", | ||
"triggeredBy": "11111111-1111-1111-111111111111_1_01", | ||
"resourceGroupFilter": [], | ||
"resourceFilter": [], | ||
"meterFilter": [], | ||
"tagFilter": {}, | ||
"threshold": 0.8, | ||
"operator": "GreaterThan", | ||
"amount": 200000.0, | ||
"unit": "USD", | ||
"currentSpend": 171000.32, | ||
"contactEmails": [ | ||
"[email protected]" | ||
], | ||
"contactGroups": [], | ||
"contactRoles": [], | ||
"overridingAlert": null | ||
}, | ||
"costEntityId": "budget1", | ||
"status": "Active", | ||
"creationTime": "2019-06-24T05:51:52.8713179Z", | ||
"closeTime": "0001-01-01T00:00:00", | ||
"modificationTime": "2019-08-31T17:51:55.1808807Z", | ||
"statusModificationUserName": null, | ||
"statusModificationTime": "0001-01-01T00:00:00" | ||
} | ||
} | ||
], | ||
"nextLink": null | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when the user does a GET on the resource ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they receive the correct object response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, the swagger does not declare a path for .../alerts/{name}
In reply to: 419817404 [](ancestors = 419817404)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does your service implement this path and it's just missing from swagger.
In reply to: 419824483 [](ancestors = 419824483,419817404)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed over IM: The service implements this but it's missing from the swagger.
In reply to: 419824926 [](ancestors = 419824926,419824483,419817404)