你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Disks - Get
返回磁盘。
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/disks/{DiskId}?api-version=2018-07-30-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
Disk
|
path | True |
string |
磁盘 guid 作为标识。 |
location
|
path | True |
string |
资源的位置。 |
subscription
|
path | True |
string |
唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
正常 -- 磁盘已返回。 |
|
Other Status Codes |
对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式.) 。 |
安全性
azure_auth
授权使用 Azure Active Directory OAuth2 流。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Returns the requested disk.
Sample Request
GET https://management.azure.com/subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/423e4eb4-f791-4d13-ad5b-4d415733b0d6?api-version=2018-07-30-preview
Sample Response
{
"id": "/subscriptions/04666444-56f0-4d4f-afc5-dbd6b134b084/providers/Microsoft.Compute.Admin/locations/redmond/disks/423e4eb4-f791-4d13-ad5b-4d415733b0d6",
"name": "redmond/423e4eb4-f791-4d13-ad5b-4d415733b0d6",
"type": "Microsoft.Compute.Admin/locations/disks",
"location": "redmond",
"properties": {
"diskId": "423e4eb4-f791-4d13-ad5b-4d415733b0d6",
"status": "Unattached",
"sharePath": "\\\\SU1FileServer.mydomain.com\\SU1_ObjStore_4",
"actualSizeGB": 183,
"provisionSizeGB": 200,
"userResourceId": "/subscriptions/4496690e-348e-4dc0-addc-17395c3966ba/resourceGroups/DISKRG6ECD14E6/providers/Microsoft.Compute/Disks/diskrptest9vb55sb15w",
"diskType": "Disk",
"diskSku": "Standard_LRS"
}
}
定义
名称 | 说明 |
---|---|
Account |
磁盘 SKU。 |
Crp |
错误响应 |
Disk |
托管磁盘。 |
Disk |
磁盘资源类型。 |
Disk |
磁盘状态。 |
Error |
错误详细信息。 |
AccountType
磁盘 SKU。
名称 | 类型 | 说明 |
---|---|---|
Premium_LRS |
string |
|
StandardSSD_LRS |
string |
|
Standard_GRS |
string |
|
Standard_LRS |
string |
|
Standard_RAGRS |
string |
|
Standard_ZRS |
string |
|
UltraSSD_LRS |
string |
CrpErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
Disk
托管磁盘。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的 ID。 |
location |
string |
资源的位置。 |
name |
string |
资源的名称。 |
properties.actualSizeGB |
integer |
磁盘的实际大小(以 GB 为单位)。 |
properties.diskId |
string |
磁盘 ID。 |
properties.diskSku |
磁盘 SKU。 |
|
properties.diskType |
磁盘资源的类型。 |
|
properties.managedBy |
string |
拥有此磁盘的计算资源 URI。 |
properties.provisionSizeGB |
integer |
磁盘的预配大小(以 GB 为单位)。 |
properties.sharePath |
string |
磁盘共享路径。 |
properties.status |
磁盘状态。 |
|
properties.userResourceId |
string |
用户视图中的磁盘资源 URI。 |
type |
string |
资源类型。 |
DiskResourceType
磁盘资源类型。
名称 | 类型 | 说明 |
---|---|---|
Disk |
string |
|
ManagedBlob |
string |
|
RestorePoint |
string |
|
Snapshot |
string |
|
Undefined |
string |
DiskState
磁盘状态。
名称 | 类型 | 说明 |
---|---|---|
ActiveSAS |
string |
|
All |
string |
|
Attached |
string |
|
OfflineMigration |
string |
|
OnlineMigration |
string |
|
Recommended |
string |
|
Reserved |
string |
|
Unattached |
string |
|
Undefined |
string |
|
Unknown |
string |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
message |
string |
错误消息。 |
target |
string |
错误目标。 |