验证资源提供程序

 

适用于:Windows Azure Pack

使用指定的资源提供程序验证测试验证资源提供程序。

请求

将 ServiceMgmt> 替换为<服务管理 API 终结点地址。

方法

请求 URI

HTTP 版本

POST

<https:// ServiceMgmt>:30004/resourceproviderverification

HTTP/1.1

URI 参数

无。

请求标头

下表介绍必需的和可选的请求标头。

请求标头

说明

授权:持有者

必需。 授权持有者令牌。

x-ms-principal-id

必需。 主体标识符。

x-ms-client-request-id

可选。 客户端请求标识符。

x-ms-client-session-id

可选。 客户端会话标识符。

x-ms-principal-liveid

可选。 主体 Live 标识符。

请求正文

下表说明了请求正文的元素。

元素名称

说明

ResourceProvider

要验证的资源提供程序。

测试

验证测试的列表。 有关详细信息,请参阅 ResourceProviderVerificationTest (Administrator 对象)

响应

响应包括 HTTP 状态代码、一组响应标头和响应正文。

状态代码

此操作成功后返回状态代码 200(正常)。

有关状态代码的信息,请参阅状态和错误代码 (Windows Azure Pack Service Management)

响应标头

此操作的响应包括标准 HTTP 标头。 所有标准标头都符合 HTTP/1.1 协议规范

响应正文

下表介绍了响应正文中的主要元素:

元素名称

说明

HasFailures

如果验证有一个或多个失败,则为 True

DetailedResults

验证结果列表。 有关详细信息,请参阅 ResourceProviderVerificationTestResult (Administrator 对象)

示例

下面的代码示例演示 了验证资源提供程序 请求。

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
    }
  ]
}

下面的代码示例演示 了验证资源提供程序 响应。

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

另请参阅

管理员资源提供程序接口