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

Resources - Get

获取资源。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}?api-version=2021-04-01

URI 参数

名称 必需 类型 说明
parentResourcePath
path True

string

父资源标识。

resourceGroupName
path True

string

包含要获取的资源的资源组的名称。 此名称不区分大小写。

Regex pattern: ^[-\w\._\(\)]+$

resourceName
path True

string

要获取的资源名。

resourceProviderNamespace
path True

string

资源提供程序的命名空间。

resourceType
path True

string

资源的资源类型。

subscriptionId
path True

string

Microsoft Azure 订阅 ID。

api-version
query True

string

要用于操作的 API 版本。

响应

名称 类型 说明
200 OK

GenericResource

正常 - 返回有关资源的信息。

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

定义

名称 说明
CloudError

资源管理请求的错误响应。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorResponse

错误响应

ExtendedLocation

资源扩展位置。

ExtendedLocationType

扩展位置类型。

GenericResource

资源信息。

Identity

资源的标识。

Plan

资源计划。

ResourceIdentityType

标识类型。

Sku

资源的 SKU。

UserAssignedIdentities

与资源关联的用户标识列表。 用户标识字典密钥引用将是 ARM 资源 ID,格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

CloudError

资源管理请求的错误响应。

名称 类型 说明
error

ErrorResponse

错误响应
对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式。)

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorResponse

错误响应

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorResponse[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ExtendedLocation

资源扩展位置。

名称 类型 说明
name

string

扩展位置名称。

type

ExtendedLocationType

扩展位置类型。

ExtendedLocationType

扩展位置类型。

名称 类型 说明
EdgeZone

string

GenericResource

资源信息。

名称 类型 说明
extendedLocation

ExtendedLocation

资源扩展位置。

id

string

资源 ID

identity

Identity

资源的标识。

kind

string

资源的种类。

location

string

资源位置

managedBy

string

管理此资源的资源的 ID。

name

string

资源名称

plan

Plan

资源的计划。

properties

object

资源属性。

sku

Sku

资源的 SKU。

tags

object

资源标记

type

string

资源类型

Identity

资源的标识。

名称 类型 说明
principalId

string

资源标识的主体 ID。

tenantId

string

资源的租户 ID。

type

ResourceIdentityType

标识类型。

userAssignedIdentities

UserAssignedIdentities

与资源关联的用户标识列表。 用户标识字典密钥引用将是 ARM 资源 ID,格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

Plan

资源计划。

名称 类型 说明
name

string

计划 ID。

product

string

产品/服务 ID。

promotionCode

string

促销代码。

publisher

string

发布者 ID。

version

string

计划的版本。

ResourceIdentityType

标识类型。

名称 类型 说明
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

Sku

资源的 SKU。

名称 类型 说明
capacity

integer

SKU 容量。

family

string

SKU 系列。

model

string

SKU 模型。

name

string

SKU 名称。

size

string

SKU 大小。

tier

string

SKU 层。

UserAssignedIdentities

与资源关联的用户标识列表。 用户标识字典密钥引用将是 ARM 资源 ID,格式为:“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。

名称 类型 说明