Delen via


Een resourceprovider maken

 

Van toepassing op: Windows Azure Pack

Hiermee maakt u een resourceprovider.

Aanvraag

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

Methode

Aanvraag-URI

HTTP-versie

POST

<https:// ServiceMgmt>:30004/resourceproviders

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 gemaakt. Zie ResourceProvider (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

ResourceProvider

De nieuwe resourceprovider. Zie ResourceProvider (Administrator-object) voor meer informatie.

Voorbeeld

In het volgende codevoorbeeld ziet u een aanvraag voor een resourceprovider maken .

POST https://<computer>:30004/resourceproviders 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: 1027
Expect: 100-continue

{
  "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": [

  ]
}

In het volgende codevoorbeeld ziet u het antwoord Resourceprovider maken .

{
  "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": "4A941E8A-FEE6-4CA4-A1F1-B3BA30AF49F9",
  "InstanceDisplayName": "Virtual Machine Clouds",
  "MaxQuotaUpdateBatchSize": 1,
  "SubscriptionStatusPollingInterval": "00:00:10",
  "Type": 0,
  "Settings": [

  ]
}

Zie ook

Interfaces voor resourceproviders voor beheerders