Share via


Create Subscription Approval Event Notification

 

Applies To: Windows Azure Pack

Creates a subscription creation approval event notification. A request for subscription creation approval can be determined from the Subscription 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

POST

http://<BillingAdapterEndpoint>/subscriptions

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

AdminSubscription (Administrator object) 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 Create Subscription 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": 6530,
  "State": 2,
  "Method": "POST",
  "Entity": {
    "SubscriptionID": "0a53e53d-1334-424e-8c63-ade05c361be2",
    "SubscriptionName": "ExamplePlan",
    "AccountAdminLiveEmailId": "user@example.com",
    "ServiceAdminLiveEmailId": null,
    "CoAdminNames": [

    ],
    "AddOnReferences": [

    ],
    "AddOns": [

    ],
    "State": 0,
    "QuotaSyncState": 0,
    "ActivationSyncState": 0,
    "PlanId": "Examphlztfpgi",
    "Services": [

    ],
    "LastErrorMessage": null,
    "Features": null,
    "OfferFriendlyName": null,
    "OfferCategory": null,
    "Created": "0001-01-01T00:00:00Z"
  },
  "EntityParentId": null,
  "NotificationEventTimeCreated": "2013-09-25T00:32:08.8724845Z"
}

See Also

Windows Azure Pack Usage Service Usage REST API Reference