Disk Restore Point - Grant Access
授予对 diskRestorePoint 的访问权限。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess?api-version=2024-03-02
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
disk
|
path | True |
string |
DiskRestorePoint 的名称 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
restore
|
path | True |
string |
磁盘还原点所属的还原点集合的名称。 |
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
vm
|
path | True |
string |
磁盘磁盘还原点所属的 VM 还原点的名称。 |
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
access | True |
Access Level(访问级别)接受的值包括 None、Read、Write。 |
|
durationInSeconds | True |
integer (int32) |
SAS 访问过期前的持续时间(以秒为单位)。 |
fileFormat |
用于在 VHDX 文件格式快照上请求 SAS 时指定文件格式 |
||
getSecureVMGuestStateSAS |
boolean |
将此标志设置为 true 以获取 VM 来宾状态的其他 SAS |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
Azure作已成功完成。 |
|
202 Accepted |
已接受资源作。 标头
|
|
Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流程。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
grants access to a diskRestorePoint.
示例请求
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745/beginGetAccess?api-version=2024-03-02
{
"access": "Read",
"durationInSeconds": 300,
"fileFormat": "VHDX"
}
示例响应
{
"accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r"
}
Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2024-03-02
定义
名称 | 说明 |
---|---|
Access |
Access Level(访问级别)接受的值包括 None、Read、Write。 |
Access |
磁盘访问 SAS URI。 |
Api |
Api 错误。 |
Api |
Api 错误基数。 |
Cloud |
来自计算服务的错误响应。 |
File |
用于在 VHDX 文件格式快照上请求 SAS 时指定文件格式 |
Grant |
用于请求 SAS 的数据。 |
Inner |
内部错误详细信息。 |
AccessLevel
Access Level(访问级别)接受的值包括 None、Read、Write。
值 | 说明 |
---|---|
None | |
Read | |
Write |
AccessUri
磁盘访问 SAS URI。
名称 | 类型 | 说明 |
---|---|---|
accessSAS |
string |
用于访问磁盘的 SAS URI。 |
securityDataAccessSAS |
string |
用于访问 VM 来宾状态的 SAS URI。 |
ApiError
Api 错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
API 错误详细信息 |
|
innererror |
Api 内部错误 |
|
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
ApiErrorBase
Api 错误基数。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
message |
string |
错误消息。 |
target |
string |
特定错误的目标。 |
CloudError
来自计算服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
Api 错误。 |
FileFormat
用于在 VHDX 文件格式快照上请求 SAS 时指定文件格式
值 | 说明 |
---|---|
VHD |
VHD 文件是虚拟硬盘文件格式的磁盘映像文件。 |
VHDX |
VHDX 文件是虚拟硬盘 v2 文件格式的磁盘映像文件。 |
GrantAccessData
用于请求 SAS 的数据。
名称 | 类型 | 说明 |
---|---|---|
access |
Access Level(访问级别)接受的值包括 None、Read、Write。 |
|
durationInSeconds |
integer (int32) |
SAS 访问过期前的持续时间(以秒为单位)。 |
fileFormat |
用于在 VHDX 文件格式快照上请求 SAS 时指定文件格式 |
|
getSecureVMGuestStateSAS |
boolean |
将此标志设置为 true 以获取 VM 来宾状态的其他 SAS |
InnerError
内部错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
errordetail |
string |
内部错误消息或异常转储。 |
exceptiontype |
string |
异常类型。 |