Skip to content

Commit

Permalink
Added new receivers to action group document. (#2077)
Browse files Browse the repository at this point in the history
* Added new receivers to action group document.

* fixed few comments.

* Corrected the file syntactically using openapi-linter

* Add required patch operation for which it is flagging this documentation

* Fixed some liter format validation issues, added patch example

* Fixed couple for validation errors

* Fixed new validation error for runbook receiver

* fixed the description field for ITSM Ticket configuration field.

* Added new receivers to action group document.

* fixed few comments.

* Corrected the file syntactically using openapi-linter

* Add required patch operation for which it is flagging this documentation

* Fixed some liter format validation issues, added patch example

* Fixed couple for validation errors

* Fixed new validation error for runbook receiver

* fixed the description field for ITSM Ticket configuration field.

* Added example file for patch operation to new directory called stable.
  • Loading branch information
shriku11 authored and veronicagg committed Jan 9, 2018
1 parent 9967bca commit e446753
Show file tree
Hide file tree
Showing 4 changed files with 318 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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": {
"type": "string",
"description": "JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well."
},
"region": {
"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": {
"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": [
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,31 @@
"name": "Sample webhook",
"serviceUri": "http://www.example.com/webhook"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d"
}
]
}
}
Expand Down Expand Up @@ -84,6 +109,31 @@
"name": "Sample webhook",
"serviceUri": "http://www.example.com/webhook"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d"
}
]
}
}
Expand Down Expand Up @@ -130,6 +180,31 @@
"name": "Sample webhook",
"serviceUri": "http://www.example.com/webhook"
}
],
"itsmReceivers": [
{
"name": "Sample itsm",
"workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c",
"connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1",
"ticketConfiguration": "{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}",
"region": "westcentralus"
}
],
"azureAppPushReceivers": [
{
"name": "Sample azureAppPush",
"emailAddress": "johndoe@email.com"
}
],
"automationRunbookReceivers": [
{
"automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest",
"runbookName": "Sample runbook",
"webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084",
"isGlobalRunbook": false,
"name": "testRunbook",
"serviceUri": "https://s13events.azure-automation.net/webhooks?token=iimE%2fD19Eg%2bvDy22yUMecIZY6Uiz%2bHfuQ67r8r1wY%2fI%3d"
}
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
}
}
}
}

1 comment on commit e446753

@AutorestCI
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a commit to SDK for Python:
Azure/azure-sdk-for-python@f3538c3

Please sign in to comment.