Validate the Service Quota for a Resource Provider
Applies To: Windows Azure Pack
Validates the 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 |
---|---|---|
PUT |
http://<NotificationEndpoint>/quota?validateOnly=true |
HTTP/1.1 |
URI Parameters
The following table describes the URI parameters.
URI parameter |
Description |
---|---|
validateOnly |
Set to true to validate the quota. |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Basic |
Required. The basic authorization token. |
x-ms-principal-id |
Required. The principal identifier. |
x-ms-client-request-id |
Optional. The client request identifier. |
x-ms-client-session-id |
Optional. The client session identifier. |
x-ms-principal-liveid |
Optional. The principal Live identifier. |
Request Body
The following table describes the elements of the request body.
Element name |
Description |
---|---|
QuotaUpdateBatchSubscription |
A batch of quota settings that is to be ignored by validation. For more information, see QuotaUpdateBatch (Notification Endpoint Object). |
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) if the quota is valid. If the quota is invalid, 400 is returned with a ResourceProviderError (Notification Endpoint Object) object containing a localized error message that explains the reason for the validation error.
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 example shows a Validate the Service Quota for a Resource Provider request.
PUT https://<NotificationEndpoint>:30012/quota?validateOnly=true 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: 273
Expect: 100-continue
{
"BaseQuota": [
{
"Key": "Editions",
"Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":11,\"resourceSize\":1024,\"offerEditionId\":\"040814101717\",\"groupType\":null,\"resourceSizeLimit\":null}]"
}
],
"AddOnQuotas": [
],
"SubscriptionIdsToUpdate": [
]
}
The following code example shows the JSON response for Validate the Service Quota for a Resource Provider.
{
"BaseQuota": [
{
"Key": "Editions",
"Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":11,\"resourceSize\":1024,\"offerEditionId\":\"040814101717\",\"groupType\":null,\"resourceSizeLimit\":null}]"
}
],
"AddOnQuotas": [
],
"SubscriptionIdsToUpdate": [
]
}
Summary
Whenever there is a change in quota Validate the Service Quota for a Resource Provider is called to confirm that the new quota is valid. The call is made before Update the Quota Settings for a Resource Provider is called on each existing subscription.
See Also
Windows Azure Pack Custom Resource Provider Notification REST API Reference