You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/managed-applications/publish-notifications.md
+36-36Lines changed: 36 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Azure Managed Applications with Notifications
3
-
description: Configure Managed Application with webhook endpoints to receive notifications about creates, updates, deletes, and errors on the managed application instances.
2
+
title: Azure managed applications with notifications
3
+
description: Configure managed applications with webhook endpoints to receive notifications about creates, updates, deletes, and errors on the managed application instances.
4
4
services: managed-applications
5
5
ms.service: managed-applications
6
6
ms.topic: conceptual
@@ -9,30 +9,31 @@ ms.author: ilahat
9
9
author: ilahat
10
10
ms.date: 11/01/2019
11
11
---
12
-
# Azure Managed Applications with Notifications
12
+
# Azure managed applications with notifications
13
13
14
-
Azure managed application notifications allow publishers to automate actions based on lifecycle events of the managed application instances. Publishers can specify custom notification webhook endpoints to receive event notifications about new and existing managed application instances. It allows the publisher to set up custom workflows at the time of application provisioning, updates, and deletion.
14
+
Azure managed application notifications allow publishers to automate actions based on lifecycle events of the managed application instances. Publishers can specify custom notification webhook endpoints to receive event notifications about new and existing managed application instances. Publishers can set up custom workflows at the time of application provisioning, updates, and deletion.
15
15
16
16
## Getting started
17
-
To start receiving managed applications, spin up a public HTTPS endpoint and specify it when publishing the Service Catalog application definition or the Marketplace offer.
17
+
To start receiving managed applications, spin up a public HTTPS endpoint and specify it when you publish the service catalog application definition or Azure Marketplace offer.
18
18
19
-
Here are the recommended series of steps to get up and running quickly:
19
+
Here are the recommended steps to get started quickly:
20
20
1. Spin up a public HTTPS endpoint that logs the incoming POST requests and returns `200 OK`.
21
-
2. Add the endpoint to service catalog application definition or marketplace offer as explained below.
22
-
3. Create a managed application instance that references the application definition or the marketplace offer.
23
-
4. Validate that the notifications are being received successfully.
24
-
5. Enable authorization as explained in the **Endpoint Authentication** section below.
25
-
6. Follow the **Notification Schema**documentation below to parse the notification requests and implement your business logic based on the notification.
21
+
2. Add the endpoint to the service catalog application definition or Azure Marketplace offer as explained later in this article.
22
+
3. Create a managed application instance that references the application definition or Azure Marketplace offer.
23
+
4. Validate that the notifications are being received.
24
+
5. Enable authorization as explained in the **Endpoint authentication** section of this article.
25
+
6. Follow the instructions in the **Notification schema**section of this article to parse the notification requests and implement your business logic based on the notification.
26
26
27
-
## Adding service catalog application definition notifications
27
+
## Add service catalog application definition notifications
28
28
#### Azure portal
29
-
Please read [Publish a service catalog application through Azure portal](./publish-portal.md) to get started.
29
+
To get started, see [Publish a service catalog application through Azure portal](./publish-portal.md).
30
+
31
+

30
32
31
-

32
33
#### REST API
33
34
34
35
> [!NOTE]
35
-
> Currentlyonly one endpoint is supported as part of the **notificationEndpoints** in the application definition properties
36
+
> Currently, you can supply only one endpoint in the `notificationEndpoints` in the application definition properties.
36
37
37
38
```JSON
38
39
{
@@ -56,27 +57,27 @@ Please read [Publish a service catalog application through Azure portal](./publi
For more information, see [Create an Azure application offer](../marketplace/cloud-partner-portal/azure-applications/cpp-create-offer.md).
61
62
62
-

63
+

63
64
## Event triggers
64
-
The following table describes all the possible combinations of EventType + ProvisioningState and their triggers:
65
+
The following table describes all the possible combinations of EventType and ProvisioningState and their triggers:
65
66
66
67
EventType | ProvisioningState | Trigger for notification
67
68
---|---|---
68
-
PUT | Accepted | Managed resource group has been created and projected successfully after application PUT. (Before the deployment inside the managed RG is kicked off.)
69
+
PUT | Accepted | Managed resource group has been created and projected successfully after application PUT (before the deployment inside the managed resource group is kicked off).
69
70
PUT | Succeeded | Full provisioning of the managed application succeeded after a PUT.
70
71
PUT | Failed | Failure of PUT of application instance provisioning at any point.
71
-
PATCH | Succeeded | After successful PATCH on managed application instance to update tags, jit access policy, or managed identity.
72
+
PATCH | Succeeded | After a successful PATCH on the managed application instance to update tags, JIT access policy, or managed identity.
72
73
DELETE | Deleting | As soon as the user initiates a DELETE of a managed app instance.
73
74
DELETE | Deleted | After the full and successful deletion of the managed application.
74
75
DELETE | Failed | After any error during the deprovisioning process that blocks the deletion.
75
76
## Notification schema
76
-
When you spin up your webhook endpoint to handle notifications, you'll need to parse the payload to get important properties to then act upon the notification. Both Service Catalog and Marketplace managed application notifications provide many of the same properties with the small difference outlined below.
77
+
When you spin up your webhook endpoint to handle notifications, you'll need to parse the payload to get important properties to then act upon the notification. Service catalog and Azure Marketplace managed application notifications provide many of the same properties. Two small differences are outlined in the table that follows the samples.
77
78
78
79
#### Service catalog application notification schema
79
-
Here's a sample service catalog notification after a successful provisioning of a managed application instance.
80
+
Here's a sample service catalog notification after the successful provisioning of a managed application instance:
80
81
``` HTTP
81
82
POST https://{your_endpoint_URI}/resource?{optional_parameter}={optional_parameter_value} HTTP/1.1
82
83
@@ -115,9 +116,9 @@ POST https://{your_endpoint_URI}/resource?{optional_parameter}={optional_paramet
Here's a sample service catalog notification after a successful provisioning of a managed application instance.
121
+
Here's a sample service catalog notification after the successful provisioning of a managed application instance:
121
122
```HTTP
122
123
POST https://{your_endpoint_URI}/resource?{optional_parameter}={optional_parameter_value} HTTP/1.1
123
124
@@ -174,21 +175,20 @@ POST https://{your_endpoint_URI}/resource?{optional_parameter}={optional_paramet
174
175
175
176
Parameter | Description
176
177
---|---
177
-
eventType | The type of event that triggered the notification. (e.g. "PUT", "PATCH", "DELETE")
178
-
applicationId | The fully qualified resource identifier of the managed application for which the notification was triggered.
178
+
eventType | The type of event that triggered the notification. (For example, PUT, PATCH, DELETE.)
179
+
applicationId | The fully qualified resource identifier of the managed application for which the notification was triggered.
179
180
eventTime | The timestamp of the event that triggered the notification. (Date and time in UTC ISO 8601 format.)
180
-
provisioningState | The provisioning state of the managed application instance. (e.g. "Succeeded", "Failed", "Deleting", "Deleted")
181
-
billingDetails | The billing details of the managed application instance. Contains the resourceUsageId that can be used to query marketplace for usage details.
182
-
error | *Only specified when the provisioningState is Failed*. Contains the error code, message, and details of the issue that caused the failure.
183
-
applicationDefinitionId | *Only specified for Service Catalog managed applications*. Represents the fully qualified resource identifier of the application definition for which the managed application instance was provisioned.
184
-
plan | *Only specified for Marketplace managed applications*. Represents the publisher, offer, sku, and version of the managed application instance.
181
+
provisioningState | The provisioning state of the managed application instance. (For example, Succeeded, Failed, Deleting, Deleted.)
182
+
error | *Specified only when the provisioningState is Failed*. Contains the error code, message, and details of the issue that caused the failure.
183
+
applicationDefinitionId | *Specified only for service catalog managed applications*. Represents the fully qualified resource identifier of the application definition for which the managed application instance was provisioned.
184
+
plan | *Specified only for Azure Marketplace managed applications*. Represents the publisher, offer, SKU, and version of the managed application instance.
185
+
billingDetails | *Specified only for Azure Marketplace managed applications.* The billing details of the managed application instance. Contains the resourceUsageId that you can use to query Azure Marketplace for usage details.
185
186
186
187
## Endpoint authentication
187
188
To secure the webhook endpoint and ensure the authenticity of the notification:
188
-
- Provide a query parameter on top of the webhook URI like https://your-endpoint.com?sig=Guid. With each notification, do a quick check that the query parameter `sig` has the expected value `Guid`.
189
-
- Issue a GET on the managed application instance with applicationId. Validate that the provisioningState matches the provisioningState of the notification to ensure consistency.
189
+
1. Provide a query parameter on top of the webhook URI, like this: https://your-endpoint.com?sig=Guid. With each notification, check that the query parameter `sig` has the expected value `Guid`.
190
+
2. Issue a GET on the managed application instance by using applicationId. Validate that the provisioningState matches the provisioningState of the notification to ensure consistency.
190
191
191
192
## Notification retries
192
193
193
-
The Managed Application Notification service expects a `200 OK` response from the webhook endpoint to the notification. The notification service will retry if the webhook endpoint returns an HTTP error code >=500, 429 or if the endpoint is temporarily unreachable. If the webhook endpoint doesn't become available within 10 hours, the notification message will be dropped and the retries will stop.
194
-
194
+
The Managed Application Notification service expects a `200 OK` response from the webhook endpoint to the notification. The notification service will retry if the webhook endpoint returns an HTTP error code greater than or equal to 500, if it returns an error code of 429, or if the endpoint is temporarily unreachable. If the webhook endpoint doesn't become available within 10 hours, the notification message will be dropped and the retries will stop.
0 commit comments