Share via


Update a Plan

 

Applies To: Windows Azure Pack

Updates a plan.

Request

Specify the Update Plan request as follows: Replace <ServiceMgmt> with your Service Management API endpoint address. <PlanId> should be replaced with the plan identifier for the plan being retrieved.

Method

Request URI

HTTP version

PUT

https://<ServiceMgmt>:30004/plans/<PlanId>

HTTP/1.1

URI Parameters

None.

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 following table describes the request body.

Element name

Description

Plan

The plan that is to be updated. For more information, see Plan (Administrator 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 elements of the request body.

Element Name

Description

Plan

The updated plan. For more information, See Plan (Administrator object).

Example

The following code example shows an Update Plan request.

PUT https://<Computer>:30004/plans/GoldPhihoq8oa HTTP/1.1
Authorization: Bearer <Token>
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: 1132
Expect: 100-continue

{
  "Id": "GoldPhihoq8oa",
  "DisplayName": "Gold_Plan-1",
  "State": 1,
  "ConfigState": 1,
  "QuotaSyncState": 2,
  "LastErrorMessage": null,
  "Advertisements": [
    {
      "LanguageCode": "en-us",
      "DisplayName": "Gold_Plan-1",
      "Description": null
    }
  ],
  "ServiceQuotas": [
    {
      "ServiceName": "webspaces",
      "ServiceInstanceId": "0EA2F3E5-90D1-4CF0-B53D-5A111FF43122",
      "ServiceDisplayName": "Web Site Cloud",
      "ServiceInstanceDisplayName": null,
      "ConfigState": 1,
      "QuotaSyncState": 2,
      "Settings": [

      ]
    },
"SubscriptionCount": 0,
  "MaxSubscriptionsPerAccount": 1,
  "AddOnReferences": [
    {
      "AddOnId": "SqlAOwlcnkya2zmcn1xhz",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    },
    {
      "AddOnId": "SqlAOtqjctbuhtvmjmkyg",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    }
  ],
  "AddOns": [

  ],
  "InvitationCode": null,
  "Price": null
}

The following code example shows an Update Plan response.

{
  "Id": "GoldPhihoq8oa",
  "DisplayName": "Gold_Plan-1",
  "State": 1,
  "ConfigState": 1,
  "QuotaSyncState": 0,
  "LastErrorMessage": null,
  "Advertisements": [
    {
      "LanguageCode": "en-us",
      "DisplayName": "Gold_Plan-1",
      "Description": null
    }
  ],
  "ServiceQuotas": [
    {
      "ServiceName": "webspaces",
      "ServiceInstanceId": "0EA2F3E5-90D1-4CF0-B53D-5A111FF43122",
      "ServiceDisplayName": "Web Site Cloud",
      "ServiceInstanceDisplayName": "autotest1",
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "Settings": [
        {
          "Key": "BytesReceived_Shared_WebSpace_Limited",
          "Value": "{\"ComputeMode\":0,\"CustomActionName\":null,\"EnforcementScope\":0,\"ExceededAction\":0,\"Limit\":-1,\"Period\":1440,\"QuotaName\":\"BytesReceived\",\"ResourceName\":\"BytesReceived\",\"SiteMode\":\"Limited\",\"Unit\":1,\"WebPlan\":null}"
        },

      ]
    }

  ],
  "SubscriptionCount": 0,
  "MaxSubscriptionsPerAccount": 1,
  "AddOnReferences": [
    {
      "AddOnId": "SqlAOwlcnkya2zmcn1xhz",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    },
    {
      "AddOnId": "SqlAOtqjctbuhtvmjmkyg",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    }
  ],
  "AddOns": [
    {
      "Id": "SqlAOwlcnkya2zmcn1xhz",
      "DisplayName": "SqlAOwlcnkya2",
      "State": 0,
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "LastErrorMessage": null,
      "Advertisements": [
        {
          "LanguageCode": "en-us",
          "DisplayName": "SqlAOwlcnkya2",
          "Description": null
        }
      ],
       "SubscriptionCount": 1,
      "AssociatedPlans": [

      ],
      "MaxOccurrencesPerPlan": 1,
      "Price": null
    },

  ],
  "InvitationCode": null,
  "Price": null
}

See Also

Administrator Plan Interfaces