Delen via


Een resourceprovider verifiëren

 

Van toepassing op: Windows Azure Pack

Verifieert een resourceprovider met behulp van de verificatietests van de opgegeven resourceprovider.

Aanvraag

Vervang <ServiceMgmt> door het eindpuntadres van uw Service Management-API.

Methode

Aanvraag-URI

HTTP-versie

POST

<https:// ServiceMgmt>:30004/resourceproviderverification

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 worden de elementen van de aanvraagbody beschreven.

Elementnaam

Beschrijving

ResourceProvider

De resourceprovider die moet worden geverifieerd.

Testen

Een lijst met verificatietests. Zie ResourceProviderVerificationTest (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 belangrijkste elementen van de hoofdtekst van het antwoord beschreven:

Elementnaam

Beschrijving

HasFailures

Waar als de verificatie een of meer fouten heeft.

DetailedResults

Een lijst met verificatieresultaten. Zie ResourceProviderVerificationTestResult (Administrator-object) voor meer informatie.

Voorbeeld

In het volgende codevoorbeeld ziet u een aanvraag voor de resourceprovider verifiëren .

POST https://<computer>:30004/resourceproviderverification HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 99baf1fe-1f90-4a3f-942f-4b88c9cbeed5-2013-07-12 20:30:35Z
x-ms-client-session-id: e29feff7-fa09-483a-b786-a90c62020cef
x-ms-principal-id: %e5%b8%83%e6%b4%be
Accept-Language: en-US
Content-Type: application/json; charset=utf-8
Host: <computer>:30004
Content-Length: 1182
Expect: 100-continue

{
  "ResourceProvider": {
    "Name": "systemcenter",
    "DisplayName": "Virtual Machine Clouds",
    "Description": null,
    "Enabled": true,
    "PassThroughEnabled": true,
    "AllowAnonymousAccess": false,
    "AllowMultipleInstances": false,
    "AdminEndpoint": {
      "ForwardingAddress": "https:\/\/spfn-059:8090\/",
      "AuthenticationMode": 1,
      "AuthenticationUsername": "spfuser",
      "AuthenticationPassword": "123Abcde"
    },
    "TenantEndpoint": {
      "ForwardingAddress": "https:\/\/spfn-059:8090\/SC2012R2\/VMM\/",
      "AuthenticationMode": 1,
      "AuthenticationUsername": "spfuser",
      "AuthenticationPassword": "123Abcde",
      "SourceUriTemplate": "{subid}\/services\/systemcenter\/vmm\/{*path}",
      "TargetUriTemplate": "{subid}\/Microsoft.Management.Odata.svc\/{*path}"
    },
    "UsageEndpoint": null,
    "HealthCheckEndpoint": null,
    "NotificationEndpoint": {
      "ForwardingAddress": "https:\/\/spfn-059:8090\/provider\/",
      "AuthenticationMode": 1,
      "AuthenticationUsername": "spfuser",
      "AuthenticationPassword": "123Abcde"
    },
    "InstanceId": null,
    "InstanceDisplayName": "Virtual Machine Clouds",
    "MaxQuotaUpdateBatchSize": 1,
    "SubscriptionStatusPollingInterval": "00:00:10",
    "Type": 0,
    "Settings": [

    ]
  },
  "Tests": [
    {
      "TestUri": "https:\/\/<computer>:30004\/\/services\/systemcenter\/SC2012R2\/Admin\/Microsoft.Management.Odata.svc\/",
      "IsAdmin": true
    }
  ]
}

In het volgende codevoorbeeld ziet u een antwoord van de resourceprovider verifiëren .

{
  "HasFailures": false,
  "DetailedResults": [
    {
      "TestUri": "https:\/\/<computer>:30004\/\/services\/systemcenter\/SC2012R2\/Admin\/Microsoft.Management.Odata.svc\/",
      "ResponseStatusCode": "OK"
    }
  ]
}

Zie ook

Interfaces voor resourceproviders voor beheerders