Retrieve the Default Service Quota for a Resource Provider

 

Applies To: Windows Azure Pack

Retrieves the default service quota for a resource provider.

Request

Replace <NotificationEndpoint> with the endpoint address for the Windows Azure Pack Custom Resource Provider Notification REST API.

Method

Request URI

HTTP version

GET

http://<NotificationEndpoint>/defaultquota

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.

x-ms-client-request-id

Optional. The client request identifier.

x-ms-client-session-id

Optional. The client session identifier.

x-ms-client-principal-id

Optional. The principal identifier.

x-ms-principal-liveid

Optional. The principal Live identifier.

Request Body

None.

Response

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

Status Code

A successful operation returns status code 200 (OK) meaning that there is a default quota and the service is marked as active and configured in the plan dashboard.

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

The following table describes the key elements of the response body:

Element name

Description

ServiceQuotaSettingList

The retrieved service quota settings. For more information, see ServiceQuotaSettingList (Notification Endpoint Object).

Example

The following example shows a Retrieve the Default Service Quota for a Resource Provider request.

GET https://<NotificationEndpoint>:30012/defaultquota HTTP/1.1
Referer: https://<Computer>:30004/plans/MyServicePlanX18aa6bac-5e8d-439e-b4d9-4a7dea4e843a/quota
Accept-Language: en-US
x-ms-client-request-id: 0ee49d13-7b86-4840-b0e1-046106a8d813-2014-07-09 23:16:21Z
x-ms-client-session-id: a519f0aa-53e9-4522-94fd-3c55607a6b65
x-ms-principal-id: <Computer>%5cAdministrator
x-ms-request-id: 840de34d9d9a484a8ddd7255a44cb1fd.2014-07-09T23:16:22.6545190Z
Authorization: Basic <encoded username and password>
Content-Type: application/json; charset=utf-8
Host: <Computer>:30012
Content-Length: 0
Expect: 100-continue

The following code example shows the JSON response for Retrieve the Default Service Quota for a Resource Provider.

[
  {
    "Key": "Editions",
    "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"20140710120235\",\"groupType\":null}]"
  }
]

Remarks

Retrieve the Default Service Quota for a Resource Provider is called during plan creation by the Service Management API to ask the resource provider if it has a default quota. A status code of 200 means that there is a default quota and the service is marked as active and configured in the plan dashboard. Return 404 if you want your resource provider to be marked as not configured and not activated by default.

Note

The HelloWorld sample has an empty list as a default quota, returns 200 by default and is therefore marked active and configured.

See Also

Windows Azure Pack Custom Resource Provider Notification REST API Reference