通过


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Cloud Service Roles - Get

从云服务获取角色。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}?api-version=2024-11-04

URI 参数

名称 必需 类型 说明
cloudServiceName
path True

string

云服务的名称。

resourceGroupName
path True

string

资源组的名称。

roleName
path True

string

角色的名称。

subscriptionId
path True

string

唯一标识 azure 订阅Microsoft的订阅凭据。 订阅 ID 构成了每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

响应

名称 类型 说明
200 OK

CloudServiceRole

好的

Other Status Codes

CloudError

错误

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Get Cloud Service Role

示例请求

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}?api-version=2024-11-04

示例响应

{
  "name": "{role-name}",
  "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}",
  "type": "Microsoft.Compute/cloudServices/roles",
  "location": "eastus2euap",
  "sku": {
    "name": "Standard_D1_v2",
    "tier": "Standard",
    "capacity": 2
  },
  "properties": {
    "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:{role-name}"
  }
}

定义

名称 说明
ApiError

API 错误。

ApiErrorBase

Api 错误库。

CloudError

来自计算服务的错误响应。

CloudServiceRole

描述云服务的角色。

CloudServiceRoleProperties

云服务角色属性。

CloudServiceRoleSku

描述云服务角色 SKU。

InnerError

内部错误详细信息。

ApiError

API 错误。

名称 类型 说明
code

string

错误代码。

details

ApiErrorBase[]

Api 错误详细信息

innererror

InnerError

Api 内部错误

message

string

错误消息。

target

string

特定错误的目标。

ApiErrorBase

Api 错误库。

名称 类型 说明
code

string

错误代码。

message

string

错误消息。

target

string

特定错误的目标。

CloudError

来自计算服务的错误响应。

名称 类型 说明
error

ApiError

API 错误。

CloudServiceRole

描述云服务的角色。

名称 类型 说明
id

string

资源 ID

location

string

资源位置

name

string

资源名称

properties

CloudServiceRoleProperties

云服务角色属性。

sku

CloudServiceRoleSku

描述云服务角色 SKU。

type

string

资源类型

CloudServiceRoleProperties

云服务角色属性。

名称 类型 说明
uniqueId

string

指定唯一标识云服务角色的 ID。

CloudServiceRoleSku

描述云服务角色 SKU。

名称 类型 说明
capacity

integer (int64)

指定云服务中的角色实例数。

name

string

SKU 名称。 注意:如果云服务当前在硬件上不支持新 SKU,则需要删除并重新创建云服务或移回旧 SKU。

tier

string

指定云服务的层。 可能的值为

Standard

基本

InnerError

内部错误详细信息。

名称 类型 说明
errordetail

string

内部错误消息或异常转储。

exceptiontype

string

异常类型。