Update a Subscription for a Notification
Applies To: Windows Azure Pack
Updates the state of subscription for a notification.
Request
Replace <NotificationEndpoint> with the endpoint address for the Windows Azure Pack Custom Resource Provider Notification REST API. Replace <Id> with the identifier of the subscription to update.
Method |
Request URI |
HTTP version |
---|---|---|
PUT |
http://<NotificationEndpoint>/subscriptions/<Id> |
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-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 |
---|---|
Subscription |
The subscription to update. For more information, see Subscription (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).
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 |
---|---|
Subscription |
The updated subscription. For more information, see Subscription (Notification Endpoint Object). |
Example
The following example shows a Update a Subscription for a Notification request.
PUT https://<NotificationEndpoint>:30010/subscriptions/ec66ec96-8edd-4916-be45-607959155c2a HTTP/1.1
Referer: https://<Computer>:30004/subscriptions/ec66ec96-8edd-4916-be45-607959155c2a
Accept-Language: en-US
x-ms-client-request-id: ef2c5d93-a957-439b-9210-de52107322c1-2014-07-09 23:45:22Z
x-ms-client-session-id: a519f0aa-53e9-4522-94fd-3c55607a6b65
x-ms-principal-id: <Computer>%5cAdministrator
x-ms-request-id: 684b6822d29e4aac96fe45110881e525.2014-07-09T23:45:24.2267567Z
Authorization: Basic <encoded username and password>
Content-Type: application/json; charset=utf-8
Host: <Computer>:30010
Content-Length: 219
Expect: 100-continue
The following code example shows the JSON response for Update a Subscription for a Notification.
{
"SubscriptionId": "ec66ec96-8edd-4916-be45-607959155c2a",
"SubscriptionName": "My very cool plan",
"State": 1,
"LifecycleState": 0,
"LastErrorMessage": null,
"QuotaSettings": null,
"AdminId": "notauser@contoso.com",
"CoAdminIds": [
]
}
Remarks
This API can only be used to update the State elements of a subscription.
When calling TBD, the Service Management API waits one minute for a response. If no response is received the subscription is marked as being out of synchronization.
See Also
Windows Azure Pack Custom Resource Provider Notification REST API Reference