Enable a Subscription
Applies To: Windows Azure Pack
Enables a subscription.
Request
Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <SubscriptionId> with the subscription identifier for the subscription to be enabled.
Method |
Request URI |
HTTP Version |
---|---|---|
PATCH |
https://<ServiceMgmt>:30004/subscriptions/<SubscriptionId> |
HTTP/1.1 |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Bearer |
Required. The authorization bearer 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 request body is an AdminSubscription (Administrator object). The following elements are required to enable a subscription. Other elements are ignored.
Element name |
Description |
---|---|
Status |
Set to Active to enable the subscription. |
SubscriptionId |
The identifier of the subscription to be enabled. |
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 |
---|---|
AdminSubscription |
The enabled subscription. For more information, see AdminSubscription (Administrator object). |
Example
The following code example shows an Enable Subscription request.
PATCH https://<Computer>:30004/subscriptions/512d113d-44e0-4fb4-81d1-2770be611d14 HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 5ae1cbd1-beeb-47f3-a517-31442c609ae4-2013-06-28 19:29:35Z
x-ms-client-session-id: 36d65d7b-42b5-4fc0-8334-93c10e7a90f2
x-ms-principal-id: <COMPUTER>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <COMPUTER>\Administrator
Content-Type: application/json; charset=utf-8
Host: <Computer>:30004
Content-Length: 368
Expect: 100-continue
{
"AccountAdminLiveEmailId": null,
"AccountAdminLivePuid": null,
"AccountId": "00000000-0000-0000-0000-000000000000",
"FriendlyName": null,
"OfferCategory": null,
"OfferInfo": null,
"OfferType": 0,
"ReasonCode": null,
"ServiceAdminLiveEmailId": null,
"ServiceAdminLivePuid": null,
"SubscriptionId": "512d113d-44e0-4fb4-81d1-2770be611d14",
"Status": "Active",
"PlanId": null,
"CoAdminNames": null
}