你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Cloud Services - Get Instance View
获取云服务的状态。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView?api-version=2024-11-04
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
cloud
|
path | True |
string |
云服务的名称。 |
resource
|
path | True |
string |
资源组的名称。 |
subscription
|
path | True |
string |
唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
还行 |
|
Other Status Codes |
错误 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Get Cloud Service Instance View with Multiple Roles
示例请求
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/instanceView?api-version=2024-11-04
示例响应
{
"roleInstance": {
"statusesSummary": [
{
"code": "ProvisioningState/succeeded",
"count": 4
},
{
"code": "PowerState/started",
"count": 4
},
{
"code": "RoleState/RoleStateStarted",
"count": 4
}
]
},
"sdkVersion": "2.9.6496.3",
"privateIds": [
"3491bc0c-1f6c-444f-b1d0-ec0751a74e3e"
],
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"time": "2021-01-12T16:50:07.0953535+05:30"
},
{
"code": "PowerState/started",
"level": "Info",
"displayStatus": "Started",
"time": "2021-01-12T16:50:07.0953535+05:30"
},
{
"code": "CurrentUpgradeDomain/-1",
"level": "Info",
"displayStatus": "Current Upgrade Domain of cloud service is -1."
},
{
"code": "MaxUpgradeDomain/1",
"level": "Info",
"displayStatus": "Max Upgrade Domain of cloud service is 1."
}
]
}
定义
名称 | 说明 |
---|---|
Api |
Api 错误。 |
Api |
Api 错误基数。 |
Cloud |
来自计算服务的错误响应。 |
Cloud |
整个 CloudService 的 InstanceView |
Inner |
内部错误详细信息。 |
Instance |
实例视图状态。 |
Resource |
实例视图状态。 |
Status |
云服务实例视图状态的状态代码和计数 |
Status |
级别代码。 |
ApiError
Api 错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
API 错误详细信息 |
|
innererror |
Api 内部错误 |
|
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
ApiErrorBase
Api 错误基数。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
CloudError
来自计算服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
Api 错误。 |
CloudServiceInstanceView
整个 CloudService 的 InstanceView
名称 | 类型 | 说明 |
---|---|---|
privateIds |
string[] |
指定为云服务内部生成的唯一标识符的列表。 |
roleInstance |
实例视图状态。 |
|
sdkVersion |
string |
用于为云服务生成包的 SDK 版本。 |
statuses |
实例视图状态。 |
InnerError
内部错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
errordetail |
string |
内部错误消息或异常转储。 |
exceptiontype |
string |
异常类型。 |
InstanceViewStatusesSummary
实例视图状态。
名称 | 类型 | 说明 |
---|---|---|
statusesSummary |
摘要。 |
ResourceInstanceViewStatus
实例视图状态。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
状态代码。 |
displayStatus |
string |
状态的简短可本地化标签。 |
level |
级别代码。 |
|
message |
string |
详细状态消息,包括警报和错误消息。 |
time |
string |
状态的时间。 |
StatusCodeCount
云服务实例视图状态的状态代码和计数
名称 | 类型 | 说明 |
---|---|---|
code |
string |
实例视图状态代码 |
count |
integer |
具有此状态代码的实例数 |
StatusLevelTypes
级别代码。
名称 | 类型 | 说明 |
---|---|---|
Error |
string |
|
Info |
string |
|
Warning |
string |