Aktualizowanie planu
Dotyczy: Windows Azure Pack
Aktualizacje planu.
Żądanie
Określ żądanie planu aktualizacji w następujący sposób: zastąp element <ServiceMgmt> adresem punktu końcowego interfejsu API zarządzania usługami. < > Identyfikator planu powinien zostać zastąpiony identyfikatorem planu pobieranego planu.
Metoda |
Identyfikator URI żądania |
Wersja PROTOKOŁU HTTP |
---|---|---|
PUT |
<https:// ServiceMgmt>:30004/plans/<PlanId> |
HTTP/1.1 |
Parametry identyfikatora URI
Brak.
Nagłówki żądań
W poniższej tabeli opisano wymagane i opcjonalne nagłówki żądań.
Nagłówek żądania |
Opis |
---|---|
Autoryzacja: elementu nośnego |
Wymagane. Token elementu nośnego autoryzacji. |
x-ms-principal-id |
Wymagane. Identyfikator podmiotu zabezpieczeń. |
x-ms-client-request-id |
Opcjonalny. Identyfikator żądania klienta. |
x-ms-client-session-id |
Opcjonalny. Identyfikator sesji klienta. |
x-ms-principal-liveid |
Opcjonalny. Główny identyfikator na żywo. |
Treść żądania
W poniższej tabeli opisano treść żądania.
Nazwa elementu |
Opis |
---|---|
Planowanie |
Plan, który ma zostać zaktualizowany. Aby uzyskać więcej informacji, zobacz Plan (obiekt administratora). |
Reakcja
Odpowiedź zawiera kod stanu HTTP, zestaw nagłówków odpowiedzi i treść odpowiedzi.
Kod stanu
Pomyślna operacja zwraca kod stanu 200 (OK).
Aby uzyskać informacje o kodach stanu, zobacz Status and Error Codes (Windows Azure Pack Service Management).
Nagłówki odpowiedzi
Odpowiedź dla tej operacji obejmuje standardowe nagłówki HTTP. Wszystkie standardowe nagłówki są zgodne ze specyfikacją protokołu HTTP/1.1.
Treść odpowiedzi
W poniższej tabeli opisano elementy treści żądania.
Nazwa elementu |
Opis |
---|---|
Planowanie |
Zaktualizowany plan. Aby uzyskać więcej informacji, zobacz Plan (obiekt administratora). |
Przykład
Poniższy przykład kodu przedstawia żądanie planu aktualizacji .
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
}
Poniższy przykład kodu przedstawia odpowiedź na plan aktualizacji .
{
"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
}