Share via


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.

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

URI Parameters

None.

Request Headers

The following table describes required and optional request headers.

Request header

Description

Authorization: Basic

Required. The basic authorization token.

Request Body

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”.

Response

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

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).

Response Headers

The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Body

None.

Example

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"
}

See Also

Windows Azure Pack Usage Service Usage REST API Reference