云备份 CBR-创建存储库:请求示例

时间:2024-12-16 09:24:13

请求示例

  • 创建一个云服务器存储库,存储库容量为100G,按需计费,且同时绑定资源和添加标签。

    POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults
    
    {
      "vault" : {
        "backup_policy_id" : "6dd81d7d-a4cb-443e-b8ed-1af0bd3a261b",
        "billing" : {
          "cloud_type" : "public",
          "consistent_level" : "crash_consistent",
          "object_type" : "server",
          "protect_type" : "backup",
          "size" : 100,
          "charging_mode" : "post_paid",
          "is_auto_renew" : false,
          "is_auto_pay" : false,
          "console_url" : "https://console.demo.com/cbr/?agencyId=97fcd896b7914cb98f553a087232e243&region=testregion/cbr/manager/csbs/vaultList"
        },
        "description" : "vault_description",
        "name" : "vault_name",
        "resources" : [ {
          "extra_info" : {
            "exclude_volumes" : [ "43a320a5-3efd-4568-b1aa-8dd9183cc64b" ]
          },
          "id" : "23a320a5-3efd-4568-b1aa-8dd9183cc64c",
          "type" : "OS::Nova::Server"
        } ],
        "tags" : [ {
          "key" : "key01",
          "value" : "value01"
        } ],
        "enterprise_project_id" : "0"
      }
    }
  • 创建一个云硬盘备份存储库,存储库容量为40G,按需计费。

    POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults
    
    {
      "vault" : {
        "billing" : {
          "consistent_level" : "crash_consistent",
          "object_type" : "disk",
          "protect_type" : "backup",
          "size" : 40,
          "charging_mode" : "post_paid",
          "is_auto_renew" : false,
          "is_auto_pay" : false
        },
        "name" : "test",
        "resources" : [ ]
      }
    }
support.huaweicloud.com/api-cbr/CreateVault.html