更新计划的配额

 

适用于:Windows Azure Pack

更新计划的配额。

请求

按如下所示指定 更新计划配额 请求。 将 ServiceMgmt> 替换为<服务管理 API 终结点地址。 <应将 PlanId> 替换为要检索的计划的计划标识符。

方法

请求 URI

HTTP 版本

PUT

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

HTTP/1.1

URI 参数

无。

请求标头

下表介绍必需的和可选的请求标头。

请求标头

说明

授权:持有者

必需。 授权持有者令牌。

x-ms-principal-id

必需。 主体标识符。

x-ms-client-request-id

可选。 客户端请求标识符。

x-ms-client-session-id

可选。 客户端会话标识符。

x-ms-principal-liveid

可选。 主体 Live 标识符。

请求正文

下表介绍请求标头。

元素名称

说明

ServiceQuota

ServiceQuota (Administrator 对象列表) 对象。

响应

响应包括 HTTP 状态代码、一组响应标头和响应正文。

状态代码

此操作成功后返回状态代码 200(正常)。

有关状态代码的信息,请参阅状态和错误代码 (Windows Azure Pack Service Management)

响应标头

此操作的响应包括标准 HTTP 标头。 所有标准标头都符合 HTTP/1.1 协议规范

响应正文

下表说明了请求正文的元素。

元素名称

说明

计划

更新的计划。 有关详细信息,请参阅 Plan (Administrator 对象)

示例

下面的代码示例演示 更新计划配额 请求。

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: 1136
Expect: 100-continue

以下代码示例演示 更新计划配额 响应。

{
  "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}"
        }

      ]
    },
    {
      "ServiceName": "sqlservers",
      "ServiceInstanceId": "7BAD5022-79CA-4B53-8177-1ACAEEAFA099",
      "ServiceDisplayName": "SQL Servers",
      "ServiceInstanceDisplayName": "SQL Servers",
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "Settings": [
        {
          "Key": "Editions",
          "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"resourceSizeLimit\":\"1024\",\"offerEditionId\":\"062813055853\",\"groupType\":null}]"
        }
      ]
    },
    {
      "ServiceName": "mysqlservers",
      "ServiceInstanceId": "33CC0954-8412-4CE1-924F-B9CB1525FA96",
      "ServiceDisplayName": "MySQL Servers",
      "ServiceInstanceDisplayName": "MySQL Servers",
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "Settings": [
        {
          "Key": "Editions",
          "Value": "[{\"displayName\":\"Default\",\"groupName\":\"Default\",\"resourceCount\":\"10\",\"resourceSize\":\"1024\",\"offerEditionId\":\"062813060541\",\"groupType\":null}]"
        }
      ]
    }
  ],
  "SubscriptionCount": 0,
  "MaxSubscriptionsPerAccount": 2,
  "AddOnReferences": [
    {
      "AddOnId": "SqlAOtqjctbuhtvmjmkyg",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    },
    {
      "AddOnId": "SqlAOsgdgwe034j1vrdgw",
      "AddOnInstanceId": null,
      "AcquisitionTime": null
    }
  ],
  "AddOns": [
    {
      "Id": "SqlAOtqjctbuhtvmjmkyg",
      "DisplayName": "SqlAOtqjctbuh",
      "State": 0,
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "LastErrorMessage": null,
      "Advertisements": [
        {
          "LanguageCode": "en-us",
          "DisplayName": "SqlAOtqjctbuh",
          "Description": null
        }
      ],
      "ServiceQuotas": [
        {
          "ServiceName": "sqlservers",
          "ServiceInstanceId": "7BAD5022-79CA-4B53-8177-1ACAEEAFA099",
          "ServiceDisplayName": "SQL Servers",
          "ServiceInstanceDisplayName": "SQL Servers",
          "ConfigState": 1,
          "QuotaSyncState": 0,
          "Settings": [
            {
              "Key": "Editions",
              "Value": "[{\"groupName\":\"Default\",\"resourceCount\":\"2\",\"resourceSize\":\"10\",\"offerEditionId\":\"1367541399669\"}]"
            }
          ]
        }
      ],
      "SubscriptionCount": 1,
      "AssociatedPlans": [

      ],
      "MaxOccurrencesPerPlan": 1,
      "Price": null
    },
    {
      "Id": "SqlAOsgdgwe034j1vrdgw",
      "DisplayName": "SqlAOsgdgwe03",
      "State": 0,
      "ConfigState": 1,
      "QuotaSyncState": 0,
      "LastErrorMessage": null,
      "Advertisements": [
        {
          "LanguageCode": "en-us",
          "DisplayName": "SqlAOsgdgwe03",
          "Description": null
        }
      ],
      "ServiceQuotas": [
        {
          "ServiceName": "sqlservers",
          "ServiceInstanceId": "7BAD5022-79CA-4B53-8177-1ACAEEAFA099",
          "ServiceDisplayName": "SQL Servers",
          "ServiceInstanceDisplayName": "SQL Servers",
          "ConfigState": 1,
          "QuotaSyncState": 0,
          "Settings": [
            {
              "Key": "Editions",
              "Value": "[{\"groupName\":\"Default\",\"resourceCount\":\"2\",\"resourceSize\":\"10\",\"offerEditionId\":\"1367541399669\"}]"
            }
          ]
        }
      ],
      "SubscriptionCount": 1,
      "AssociatedPlans": [

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

另请参阅

管理员计划接口