-
Notifications
You must be signed in to change notification settings - Fork 5.8k
adding new scopes for alerts #5540
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8ba848f
adding new scopes for alerts
olrakovs 3f909df
Update specification/cost-management/resource-manager/Microsoft.CostM…
nschonni 74aaf05
Adding examples
olrakovs f6c2bf8
Merge branch 'master' of https://github.com/olrakovs/azure-rest-api-s…
olrakovs c90e921
formmating
olrakovs 85d31f7
formatting
olrakovs 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -2114,6 +2114,130 @@ | |
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}/alerts": { | ||
| "get": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_ListByExternalBillingAccounts", | ||
| "description": "List all alerts for external billing account.", | ||
| "x-ms-examples": { | ||
| "Alert_List": { | ||
| "$ref": "./examples/ExternalBillingAccountAlertList.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalBillingAccountIdParameter" | ||
| }, | ||
| { | ||
| "name": "$filter", | ||
| "description": "May be used to filter alerts by properties/definition/type, properties/definition/category, properties/definition/criteria, properties/costEntityId, properties/creationTime, properties/closeTime, properties/status, properties/source. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "$skiptoken", | ||
| "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "$top", | ||
| "description": "May be used to limit the number of results to the most recent N alerts.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "maximum": 1000 | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/AlertListResult" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionId}/alerts": { | ||
| "get": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_ListByExternalSubscriptions", | ||
| "description": "List all alerts for external subscription.", | ||
| "x-ms-examples": { | ||
| "Alert_List": { | ||
| "$ref": "./examples/ExternalSubscriptionAlertList.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalSubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "name": "$filter", | ||
| "description": "May be used to filter alerts by properties/definition/type, properties/definition/category, properties/definition/criteria, properties/costEntityId, properties/creationTime, properties/closeTime, properties/status, properties/source. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "$skiptoken", | ||
| "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "name": "$top", | ||
| "description": "May be used to limit the number of results to the most recent N alerts.", | ||
| "in": "query", | ||
| "required": false, | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "maximum": 1000 | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/AlertListResult" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| }, | ||
| "x-ms-pageable": { | ||
| "nextLinkName": "nextLink" | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/alerts/{alertId}": { | ||
| "get": { | ||
| "tags": [ | ||
|
|
@@ -2374,6 +2498,90 @@ | |
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}/alerts/{alertId}": { | ||
| "get": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_GetAlertByExternalBillingAccounts", | ||
| "description": "Gets an alert for external billing account by alert ID.", | ||
| "externalDocs": { | ||
| "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" | ||
| }, | ||
| "x-ms-examples": { | ||
| "Alert": { | ||
| "$ref": "./examples/ExternalBillingAccountAlert.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalBillingAccountIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/alertIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionId}/alerts/{alertId}": { | ||
| "get": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_GetAlertByExternalSubscriptions", | ||
| "description": "Gets an alert for external subscription by alert ID.", | ||
| "externalDocs": { | ||
| "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" | ||
|
olrakovs-zz marked this conversation as resolved.
|
||
| }, | ||
| "x-ms-examples": { | ||
| "Alert": { | ||
| "$ref": "./examples/ExternalSubscriptionAlert.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalSubscriptionIdParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/alertIdParameter" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/alerts/{alertId}/updateStatus": { | ||
| "patch": { | ||
|
|
@@ -2672,6 +2880,102 @@ | |
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountId}/alerts/{alertId}/UpdateStatus": { | ||
| "patch": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_UpdateExternalBillingAccountAlertStatus", | ||
| "description": "Update alerts status for external billing accounts.", | ||
| "x-ms-examples": { | ||
| "Alert": { | ||
| "$ref": "./examples/ExternalBillingAccountAlert.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalBillingAccountIdParameter" | ||
| }, | ||
| { | ||
|
olrakovs-zz marked this conversation as resolved.
Outdated
|
||
| "$ref": "#/parameters/alertIdParameter" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| }, | ||
| "description": "Parameters supplied to the update alerts status operation." | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionId}/alerts/{alertId}/UpdateStatus": { | ||
| "patch": { | ||
| "tags": [ | ||
| "Alerts" | ||
| ], | ||
| "operationId": "Alerts_UpdateExternalSubscriptionAlertStatus", | ||
| "description": "Update alerts status for external subscription.", | ||
| "x-ms-examples": { | ||
| "Alert": { | ||
| "$ref": "./examples/ExternalSubscriptionAlert.json" | ||
| } | ||
| }, | ||
| "parameters": [ | ||
| { | ||
| "$ref": "#/parameters/apiVersionParameter" | ||
| }, | ||
| { | ||
| "$ref": "#/parameters/externalSubscriptionIdParameter" | ||
| }, | ||
| { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Formatting |
||
| "$ref": "#/parameters/alertIdParameter" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| }, | ||
| "description": "Parameters supplied to the update alerts status operation." | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK. The request has succeeded.", | ||
| "schema": { | ||
| "$ref": "#/definitions/Alert" | ||
| } | ||
| }, | ||
| "default": { | ||
| "description": "Error response describing why the operation failed.", | ||
| "schema": { | ||
| "$ref": "#/definitions/ErrorResponse" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.CostManagement/operations": { | ||
| "get": { | ||
| "tags": [ | ||
|
|
@@ -3886,6 +4190,22 @@ | |
| "required": true, | ||
| "type": "string", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "externalBillingAccountIdParameter": { | ||
| "name": "externalBillingAccountId", | ||
| "in": "path", | ||
| "description": "External Billing Account ID", | ||
| "required": true, | ||
| "type": "string", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "externalSubscriptionIdParameter": { | ||
| "name": "externalSubscriptionId", | ||
| "in": "path", | ||
| "description": "External Subscription ID", | ||
| "required": true, | ||
| "type": "string", | ||
| "x-ms-parameter-location": "method" | ||
| }, | ||
| "enrollmentAccountIdParameter": { | ||
| "name": "enrollmentAccountId", | ||
|
|
@@ -3920,4 +4240,4 @@ | |
| "x-ms-parameter-location": "method" | ||
| } | ||
| } | ||
| } | ||
| } | ||
38 changes: 38 additions & 0 deletions
38
...osoft.CostManagement/preview/2018-08-01-preview/examples/ExternalBillingAccountAlert.json
This file contains hidden or 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,38 @@ | ||
| { | ||
| "parameters": { | ||
| "api-version": "2018-08-01-preview", | ||
| "externalBillingAccountId": "aws-45645646", | ||
| "alertId": "0e1d6ee7-0052-4996-89e2-023263106885" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "/providers/Microsoft.CostManagement/externalBillingAccounts/aws-45645646/alerts/0e1d6ee7-0052-4996-89e2-023263106885", | ||
| "name": "0e1d6ee7-0052-4996-89e2-023263106885", | ||
| "type": "Microsoft.CostManagement/alerts", | ||
| "properties": { | ||
| "definition": { | ||
| "type": "Budget", | ||
| "category": "Cost", | ||
| "criteria": "CostThresholdExceeded" | ||
| }, | ||
| "description": "This is an example alert", | ||
| "source": "User", | ||
| "details": { | ||
| "amountDue": "500.0", | ||
| "billedAmount": "680.36" | ||
| }, | ||
| "costEntityId": "123", | ||
| "creationTime": "2018-09-03T11:21:43.3495582+03:00", | ||
| "status": "Active", | ||
| "closeTime": "2018-09-10T11:21:43.3495582+03:00", | ||
| "modificationTime": "2018-12-05T10:04:36.0321998Z", | ||
|
olrakovs-zz marked this conversation as resolved.
Outdated
|
||
| "statusModificationUserName": "Ido Ben", | ||
| "statusModificationTime": "2018-12-05T10:04:36.0321998Z" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
I think this is not needed (same for other parameters).
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.
Why not? we did it like other scopes. We want to be consistent to other scopes
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.
Sure, no harm done, it's just redundant.