Share via


Delete Subscription Approval Event Notification

 

Applies To: Windows Azure Pack

Creates a subscription deletion approval event notification. A request for subscription deletion approval can be determined from the Subscription UsageEvent notification object Method element passed with the request body. The value will be “DELETE” for a subscription deletion 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

Subscription event information. For more information, see UsageEvent (Usage Metering Object).

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 Delete 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: 680
Expect: 100-continue
{
  "EventId": 6545,
  "State": 2,
  "Method": "DELETE",
  "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": [
      {
        "Type": "mysqlservers",
        "State": "registered",
        "QuotaSyncState": 0,
        "ActivationSyncState": 0,
        "BaseQuotaSettings": null
      }
    ],
    "LastErrorMessage": null,
    "Features": null,
    "OfferFriendlyName": null,
    "OfferCategory": null,
    "Created": "2013-09-25T00:32:09.31Z"
  },
  "EntityParentId": null,
  "NotificationEventTimeCreated": "2013-09-25T00:38:11.075609Z"
}

See Also

Windows Azure Pack Usage Service Usage REST API Reference