Delen via


Een plan bijwerken

 

Van toepassing op: Windows Azure Pack

Updates een plan.

Aanvraag

Geef de aanvraag Updateplan als volgt op: Vervang <ServiceMgmt> door het eindpuntadres van uw Service Management-API. <PlanId> moet worden vervangen door de plan-id voor het plan dat wordt opgehaald.

Methode

Aanvraag-URI

HTTP-versie

PUT

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

HTTP/1.1

URI-parameters

Geen.

Aanvraagheaders

In de volgende tabel worden de vereiste en optionele aanvraagheaders beschreven.

Aanvraagheader

Beschrijving

Autorisatie: Bearer

Vereist. Het bearer-token voor autorisatie.

x-ms-principal-id

Vereist. De principal-id.

x-ms-client-request-id

Optioneel. De clientaanvraag-id.

x-ms-client-session-id

Optioneel. De clientsessie-id.

x-ms-principal-liveid

Optioneel. De principal Live-id.

Aanvraagbody

In de volgende tabel wordt de hoofdtekst van de aanvraag beschreven.

Elementnaam

Beschrijving

Plannen

Het plan dat moet worden bijgewerkt. Zie Plan (Administrator-object) voor meer informatie.

Antwoord

Het antwoord bevat een HTTP-statuscode, een set antwoordheaders en een antwoordtekst.

Statuscode

Een geslaagde bewerking retourneert statuscode 200 (OK).

Zie Status- en Foutcodes (Windows Azure Pack Service Management) voor informatie over statuscodes.

Antwoordheaders

Het antwoord voor deze bewerking bevat standaard HTTP-headers. Alle standaardheaders voldoen aan de http/1.1-protocolspecificatie.

Hoofdtekst van antwoord

In de volgende tabel worden de elementen van de aanvraagbody beschreven.

Naam van element

Description

Plannen

Het bijgewerkte plan. Zie Plan (Administrator-object) voor meer informatie.

Voorbeeld

In het volgende codevoorbeeld ziet u een aanvraag voor een updateplan .

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
}

In het volgende codevoorbeeld ziet u een reactie van het updateplan .

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

Zie ook

Interfaces voor beheerdersplannen