Dela via


Uppdatera kvoten för en plan

 

Gäller för: Windows Azure Pack

Uppdateringar kvoten för en plan.

Förfrågan

Ange begäran om uppdateringsplankvot på följande sätt. Ersätt <ServiceMgmt> med din Service Management API-slutpunktsadress. <PlanId> bör ersättas med planidentifieraren för planen som hämtas.

Metod

URI för förfrågan

HTTP-version

PUT

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

HTTP/1.1

URI-parametrar

Inga.

Rubriker för begäran

I följande tabell beskrivs obligatoriska och valfria begärandehuvuden.

Begärandehuvud

Beskrivning

Auktorisering: Bärare

Krävs. Token för auktoriseringsbärare.

x-ms-principal-id

Krävs. Huvudidentifieraren.

x-ms-client-request-id

Valfritt. Identifieraren för klientbegäran.

x-ms-client-session-id

Valfritt. Klientsessionsidentifieraren.

x-ms-principal-liveid

Valfritt. Huvudidentifieraren live.

Begärandetext

I följande tabell beskrivs begäranderubrikerna.

Elementnamn

Beskrivning

ServiceQuota

En lista över ServiceQuota-objekt (administratörsobjekt).

Svarsåtgärder

Svaret innehåller en HTTP-statuskod, en uppsättning svarshuvuden och en svarstext.

Statuskod

En lyckad åtgärd returnerar statuskoden 200 (OK).

Information om statuskoder finns i Status- och felkoder (Windows Azure Pack Service Management).

Svarsrubriker

Svaret för den här åtgärden innehåller HTTP-standardhuvuden. Alla standardhuvuden överensstämmer med HTTP/1.1-protokollspecifikationen.

Svarstext

I följande tabell beskrivs elementen i begärandetexten.

Elementnamn

Beskrivning

Planera

Den uppdaterade planen. Mer information finns i Planera (administratörsobjekt).

Exempel

I följande kodexempel visas en begäran om kvot för uppdateringsplan .

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

I följande kodexempel visas ett kvotsvar för uppdateringsplan .

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

Se även

Gränssnitt för administratörsplan