Create Subscription Add-on Approval Event Notification
Applies To: Windows Azure Pack
Creates a Subscription Add-on creation approval notification event. A request for subscription Add-on creation approval can be determined from the Plan Add-on Reference UsageEvent notification object Method element passed with the request body. The value will be “POST” for a subscription creation request.
<BillingAdapterEndpoint> is the name of the computer that hosts the billing adapter endpoint.
Method | Request URI | HTTP version |
|---|---|---|
PUT | http:// <BillingAdapterEndpoint>/ subscriptionAddons | HTTP/1.1 |
None.
The following table describes required and optional request headers.
Request header | Description |
|---|---|
Authorization: Basic | Required. The basic authorization token. |
The following table describes the key elements of the request body.
Element name | Description |
|---|---|
UsageEvent | Plan Add-on reference event information. For more information, see UsageEvent (Usage Metering Object). For creation, the Method element value will be “Post”. |
The response includes an HTTP status code, a set of response headers, and a response body.
This call is registered as blocking. Windows Azure Pack for Windows Server waits until a response is received. Return a status code less than 400 to indicate approval of the event. Return a status code greater than or equal to 400 to indicate the event is not approved.
For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).
The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
None.
The following code example shows a Get Subscription Add-on Approval Event Notification request.
POST /usage/subscriptions HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: 10.121.217.127:8888
Content-Length: 564
Expect: 100-continue
{
"EventId": 6539,
"State": 2,
"Method": "POST",
"Entity": {
"AddOnId": "Examphlztgjzw",
"AddOnInstanceId": null,
"AcquisitionTime": null
},
"EntityParentId": "0a53e53d-1334-424e-8c63-ade05c361be2",
"NotificationEventTimeCreated": "2013-09-25T00:37:41.8881111Z"
}