-
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
Added new receivers to action group document. #2077
Changes from 7 commits
59af5b9
8cd8b0c
283f3ad
68748c5
8e429b0
d00501b
0ef0531
3ffbce8
519230d
4782243
dbd23df
6563da7
db04cc2
dcc811e
e9e4271
eada97a
c002bd9
83964be
7a323fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,52 @@ | |
} | ||
} | ||
} | ||
}, | ||
"patch": { | ||
"description": "Updates an existing action group's tags. To update other fields use the CreateOrUpdate method.", | ||
"operationId": "ActionGroups_Update", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ActionGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"name": "actionGroupPatch", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/ActionGroupPatchBody" | ||
}, | ||
"description": "Parameters supplied to the operation." | ||
} | ||
], | ||
"responses": { | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorResponse" | ||
} | ||
}, | ||
"200": { | ||
"description": "An existing action group was successfully updated.", | ||
"schema": { | ||
"$ref": "#/definitions/ActionGroupResource" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Patch an action group": { | ||
"$ref": "./examples/patchActionGroup.json" | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups": { | ||
|
@@ -391,6 +437,27 @@ | |
"$ref": "#/definitions/WebhookReceiver" | ||
}, | ||
"description": "The list of webhook receivers that are part of this action group." | ||
}, | ||
"itsmReceivers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/ItsmReceiver" | ||
}, | ||
"description": "The list of ITSM receivers that are part of this action group." | ||
}, | ||
"azureAppPushReceivers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/AzureAppPushReceiver" | ||
}, | ||
"description": "The list of AzureAppPush receivers that are part of this action group." | ||
}, | ||
"automationRunbookReceivers": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/AutomationRunbookReceiver" | ||
}, | ||
"description": "The list of AutomationRunbook receivers that are part of this action group." | ||
} | ||
}, | ||
"required": [ | ||
|
@@ -464,6 +531,90 @@ | |
"serviceUri" | ||
] | ||
}, | ||
"ItsmReceiver": { | ||
"description": "An Itsm receiver.", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the Itsm receiver. Names must be unique across all receivers within an action group." | ||
}, | ||
"workspaceId": { | ||
"type": "string", | ||
"description": "OMS LA instance identifier." | ||
}, | ||
"connectionId": { | ||
"type": "string", | ||
"description": "Unique identification of ITSM connection among multiple defined in above workspace." | ||
}, | ||
"ticketConfiguration": { | ||
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. What is this property? Is this xml? 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. It is JSON configuration string. 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. Good catch, the description is fixed in new iteration. |
||
"type": "string", | ||
"description": "XML blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well." | ||
}, | ||
"region": { | ||
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. make this an enum 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. You mean region field? It is already released as string field for better readability. |
||
"type": "string", | ||
"description": "Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"workspaceId", | ||
"connectionId", | ||
"ticketConfiguration", | ||
"region" | ||
] | ||
}, | ||
"AzureAppPushReceiver": { | ||
"description": "The Azure mobile App push notification receiver.", | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group." | ||
}, | ||
"emailAddress": { | ||
"type": "string", | ||
"description": "The email address registered for the Azure mobile app." | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"emailAddress" | ||
] | ||
}, | ||
"AutomationRunbookReceiver": { | ||
"description": "The Azure Automation Runbook notification receiver.", | ||
"properties": { | ||
"automationAccountId": { | ||
"type": "string", | ||
"description": "The Azure automation account Id which holds this runbook and authenticate to Azure resource." | ||
}, | ||
"runbookName": { | ||
"type": "string", | ||
"description": "The name for this runbook." | ||
}, | ||
"webhookResourceId": { | ||
"type": "string", | ||
"description": "The resource id for webhook linked to this runbook." | ||
}, | ||
"isGlobalRunbook": { | ||
"type": "boolean", | ||
"description": "Indicates whether this instance is global runbook." | ||
}, | ||
"name": { | ||
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. webhookResourceId property contains the name of the webhook. Why is the name needed as a separate property also? 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. This can be used as friendly name by user also webhookResourceId format is different with subscriptionid resourcegroup details etc. |
||
"type": "string", | ||
"description": "Indicates name of the webhook." | ||
}, | ||
"serviceUri": { | ||
"type": "string", | ||
"description": "The URI where webhooks should be sent." | ||
} | ||
}, | ||
"required": [ | ||
"automationAccountId", | ||
"runbookName", | ||
"webhookResourceId", | ||
"isGlobalRunbook" | ||
] | ||
}, | ||
"ReceiverStatus": { | ||
"type": "string", | ||
"enum": [ | ||
|
@@ -502,6 +653,32 @@ | |
"type": "string" | ||
} | ||
} | ||
}, | ||
"ActionGroupPatchBody": { | ||
"description": "An action group object for the body of patch operations.", | ||
"properties": { | ||
"tags": { | ||
"additionalProperties": { | ||
"type": "string" | ||
}, | ||
"description": "Resource tags" | ||
}, | ||
"properties": { | ||
"x-ms-client-flatten": true, | ||
"$ref": "#/definitions/ActionGroupPatch", | ||
"description": "The action group settings for an update operation." | ||
} | ||
} | ||
}, | ||
"ActionGroupPatch": { | ||
"description": "An Azure action group for patch operations.", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean", | ||
"default": true, | ||
"description": "Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated." | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ | |
"200": { | ||
"headers": {}, | ||
"body": null | ||
}, | ||
"409": { | ||
"headers": {}, | ||
"body": null | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", | ||
"resourceGroupName": "Default-NotificationRules", | ||
"actionGroupName": "SampleActionGroup", | ||
"api-version": "2017-04-01", | ||
"actionGroupPatch": { | ||
"tags": { "key1": "value1", "key2": "value2" }, | ||
"properties": { | ||
"enabled": false | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": { }, | ||
"body": { | ||
"id": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/Default-NotificationRules/providers/microsoft.insights/actionGroups/SampleActionGroup", | ||
"type": "Microsoft.Insights/ActionGroups", | ||
"name": "SampleActionGroup", | ||
"location": "Global", | ||
"tags": { "key1": "value1", "key2": "value2" }, | ||
"properties": { | ||
"groupShortName": "sample", | ||
"enabled": true, | ||
"emailReceivers": [ | ||
{ | ||
"name": "John Doe's email", | ||
"emailAddress": "johndoe@email.com", | ||
"status": "Enabled" | ||
}, | ||
{ | ||
"name": "Jane Smith's email", | ||
"emailAddress": "janesmith@email.com", | ||
"status": "Enabled" | ||
} | ||
], | ||
"smsReceivers":[ | ||
{ | ||
"name": "John Doe's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "1234567890", | ||
"status": "Enabled" | ||
}, | ||
{ | ||
"name": "Jane Smith's mobile", | ||
"countryCode": "1", | ||
"phoneNumber": "0987654321", | ||
"status": "Enabled" | ||
} | ||
], | ||
"webhookReceivers":[ | ||
{ | ||
"name": "Sample webhook", | ||
"serviceUri": "http://www.example.com/webhook" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
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.
Because these are not required properties, I don't believe this is a breaking change.
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.
Adding new properties - required or optional is considered a breaking change. This could result in clients unitentionally overriding the properties on the server. Imagine a resource got created with this new property. Then the GET on the resource happened from a client which did not understand this property and so ignored it. Now if the PUT happens from the same client using the resource that was obtained via GET, the value of this property on the server will be overridden.
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.
So it is advisable to increment the api-version for this.
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.
This is already released for this API version and is almost like a baseline now. In future we are planning to support patch operation for individual receiver types. We will change the version then.