检索资源提供程序实例
适用于:Windows Azure Pack
检索资源提供程序的实例。
请求
将 ServiceMgmt> 替换为<服务管理 API 终结点地址。 将 Name> 替换为<资源提供程序名称。 将 InstanceIdentifier> 替换为<要检索的资源提供程序实例的实例标识符。
方法 |
请求 URI |
HTTP 版本 |
---|---|---|
GET |
<https:// ServiceMgmt>:30004/resourceproviders/<Name>/<InstanceIdentifier> |
HTTP/1.1 |
URI 参数
无。
请求标头
下表介绍必需的和可选的请求标头。
请求标头 |
说明 |
---|---|
授权:持有者 |
必需。 授权持有者令牌。 |
x-ms-principal-id |
必需。 主体标识符。 |
x-ms-client-request-id |
可选。 客户端请求标识符。 |
x-ms-client-session-id |
可选。 客户端会话标识符。 |
x-ms-principal-liveid |
可选。 主体 Live 标识符。 |
请求正文
无。
响应
响应包括 HTTP 状态代码、一组响应标头和响应正文。
状态代码
此操作成功后返回状态代码 200(正常)。
有关状态代码的信息,请参阅状态和错误代码 (Windows Azure Pack Service Management) 。
响应标头
此操作的响应包括标准 HTTP 标头。 所有标准标头都符合 HTTP/1.1 协议规范。
响应正文
下表介绍了响应正文中的主要元素:
元素名称 |
说明 |
---|---|
ResourceProvider |
检索的资源提供程序。 有关详细信息,请参阅 ResourceProvider (Administrator 对象) 。 |
示例
下面的代码示例演示 获取资源提供程序实例 请求。
GET https://<computer>:30004/resourceproviders/monitoring/3E92E3A1-1FC1-4AB1-BAB1-6A556DE9BAE9 HTTP/1.1
Authorization: Bearer
x-ms-client-request-id: a382fdb4-42f3-46fb-a9e7-83f26de17a0c-2013-07-09 23:37:29Z
x-ms-client-session-id: 78441bcf-1ac1-4216-82f0-81f21875567c
x-ms-principal-id: <computer>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <computer>\Administrator
Host: <computer>:30004
Content-Length: 0
下面的代码示例显示了 获取资源提供程序实例 响应。
{
"Name": "monitoring",
"DisplayName": "Monitoring Service",
"Description": null,
"Enabled": true,
"PassThroughEnabled": true,
"AllowAnonymousAccess": true,
"AllowMultipleInstances": false,
"AdminEndpoint": {
"ForwardingAddress": "https:\/\/computer:30020\/",
"AuthenticationMode": 1,
"AuthenticationUsername": "MonitoringClient",
"AuthenticationPassword": null
},
"TenantEndpoint": {
"ForwardingAddress": "https:\/\/computer:30020\/",
"AuthenticationMode": 1,
"AuthenticationUsername": "MonitoringClient",
"AuthenticationPassword": null,
"SourceUriTemplate": "{subid}\/services\/monitoring\/{*path}",
"TargetUriTemplate": "{subid}\/{*path}"
},
"UsageEndpoint": null,
"HealthCheckEndpoint": null,
"NotificationEndpoint": null,
"InstanceId": "3E92E3A1-1FC1-4AB1-BAB1-6A556DE9BAE9",
"InstanceDisplayName": "Monitoring Service",
"MaxQuotaUpdateBatchSize": 5,
"SubscriptionStatusPollingInterval": "00:00:10",
"Type": 0
}