【问题标题】:Azure RestAPI call to disable backup schedule in Recovery Services VaultAzure Rest API 调用以禁用恢复服务保管库中的备份计划
【发布时间】:2017-06-28 15:24:00
【问题描述】:

我正在使用此 URL 尝试禁用 Azure 恢复服务库中的计划备份作业:

https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}/DisableBackup?api-版本=2016-06-01

不幸的是,我收到这样的错误消息:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>

我需要使用什么语法来禁用我的工作?

【问题讨论】:

    标签: rest azure backup


    【解决方案1】:

    在 Azure 门户中,我们可以通过单击停止备份菜单项来禁用备份计划。

    通过IE开发工具(按F12打开)捕获流量后,我发现请求消息应该是以下格式。

    请求网址:

    POST https://main.recoveryservices.ext.azure.com/api//Subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.RecoveryServices/vaults/{recovery-services-vault-name}/backupFabrics/Azure/protectionContainers/IaasVMContainer;{containerName};{resource-group};{protected-item-name}/protectedItems/VM;{containerName};{resource-group};{protected-item-name}/DisableBackup
    

    请求正文:

    {"virtualMachineId":"/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Compute/virtualMachines/{VM-name}"}
    

    我建议你自己捕获流量,并将请求消息用作 REST 请求。

    【讨论】:

    • 当我发送此请求时,Azure 返回此消息:{"message":"处理您的请求时出错。请稍后重试。","httpStatusCode":"InternalServerError" ,"xMsServerRequestId":null,"stackTrace":null}
    猜你喜欢
    • 2021-08-05
    • 2017-03-09
    • 2020-10-21
    • 2017-02-01
    • 1970-01-01
    • 2019-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多