{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"Billing":{"properties":{"allocated":{"description":"已分配容量,单位GB","format":"int32","type":"integer"},"charging_mode":{"description":"创建模式","enum":["pre_paid","post_paid"],"type":"string"},"cloud_type":{"description":"云平台","enum":["public","hybrid"],"type":"string","x-huawei-extraAnnotation":""},"consistent_level":{"description":"崩溃一致性(crash_consistent)或应用一致性(app_consistent)","enum":["app_consistent","crash_consistent"],"type":"string"},"frozen_scene":{"description":"冻结场景","type":"string","x-huawei-extraAnnotation":""},"is_multi_az":{"default":false,"description":"存储库多az属性","type":"boolean","x-open-region-cloud":"hc,hk,tlf","x-support-field-sdk":false},"object_type":{"description":"对象类型:云服务器(server),云硬盘(disk),文件系统(turbo),云桌面(workspace),VMware(vmware),关系型数据库(rds),文件(file)。","enum":["server","disk","turbo","workspace","vmware","rds","file"],"type":"string"},"order_id":{"description":"订单ID","type":"string"},"product_id":{"description":"产品ID","type":"string"},"protect_type":{"description":"保护类型","enum":["backup","replication","hybrid"],"type":"string"},"size":{"description":"容量,单位GB","format":"int32","maximum":10485760,"minimum":1,"type":"integer"},"spec_code":{"description":"规格编码: 云服务备份存储库:vault.backup.server.normal;云硬盘备份存储库:vault.backup.volume.normal;文件备份存储库:vault.backup.turbo.normal;数据库备份存储库:vault.backup.database.normal;混合云备份存储库:vault.hybrid.server.normal;复制备份存储库:vault.replication.server.normal","enum":["vault.backup.server.normal","vault.backup.volume.normal","vault.backup.turbo.normal","vault.backup.database.normal","vault.hybrid.server.normal","vault.replication.server.normal"],"type":"string","x-huawei-extraAnnotation":""},"status":{"description":"存储库状态","enum":["available","lock","frozen","deleting","error"],"type":"string"},"storage_unit":{"description":"存储库桶名","type":"string"},"used":{"description":"已使用容量,单位MB","format":"int32","type":"integer"}},"required":["allocated","charging_mode","consistent_level","protect_type","size","spec_code","status","used"]},"BillingCreate":{"description":"创建参数","properties":{"charging_mode":{"default":"post_paid","description":"创建模式,按需:post_paid,包周期:pre_paid,默认为post_paid","enum":["post_paid","pre_paid"],"type":"string"},"cloud_type":{"description":"云平台,公有云或者混合云","enum":["public","hybrid"],"type":"string"},"consistent_level":{"description":"规格,崩溃一致性(crash_consistent)或应用一致性(app_consistent)","enum":["app_consistent","crash_consistent"],"type":"string","x-huawei-extraAnnotation":""},"console_url":{"description":"跳转URL","maxLength":255,"minLength":1,"type":"string"},"is_auto_pay":{"default":false,"description":"是否自动付费,默认为不自动付费","type":"boolean"},"is_auto_renew":{"default":false,"description":"到期后是否自动续期,默认不续期","type":"boolean"},"is_multi_az":{"default":false,"description":"存储库多az属性,默认为false","type":"boolean","x-open-region-cloud":"hc,hk"},"object_type":{"description":"对象类型:云服务器(server),云硬盘(disk),文件系统(turbo),云桌面(workspace),VMware(vmware),关系型数据库(rds),文件(file)。","enum":["server","disk","turbo","workspace","vmware","rds","file"],"type":"string","x-huawei-extraAnnotation":""},"period_num":{"description":"创建类型的数量,charging_mode为pre_paid必填","format":"int32","type":"integer","x-open-region-cloud":"hc,hk"},"period_type":{"description":"创建类型,charging_mode为pre_paid必填,按年(year)或者按月(month)","enum":["year","month"],"type":"string","x-open-region-cloud":"hk,hc"},"protect_type":{"description":"保护类型:备份(backup)、复制(replication)","enum":["backup","replication"],"type":"string","x-huawei-extraAnnotation":""},"size":{"description":"容量,单位GB","format":"int32","maximum":10485760,"minimum":10,"type":"integer"}},"required":["consistent_level","object_type","protect_type","size"]},"BindRulesTags":{"description":"自动绑定规则标签","properties":{"key":{"description":"key不能包含非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\\\”,“,”,“|”,“/”。\nkey只能由中文,字母,数字,“-”,“_”组成。","type":"string","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc,hcso_dt"},"value":{"description":"value不能包含非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。\n\nvalue只能由中文,字母,数字,“-”,“_”,“.”组成。","type":"string","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc,hcso_dt"}},"required":["key","value"]},"CbcOrderResult":{"properties":{"cloudServiceId":{"description":"云服务ID","type":"string"},"orderId":{"description":"订单ID","type":"string"},"resourceId":{"description":"包周期资源预生成资源id。","type":"string"},"subscribeResult":{"description":"订购结果,1:成功;0:失败","format":"int32","type":"integer"}},"required":["orderId","subscribeResult"]},"ErrorResponse":{"description":"","properties":{"error_code":{"description":"请参见[错误码](ErrorCode.xml)。","type":"string","x-huawei-extraAnnotation":""},"error_msg":{"description":"错误信息","type":"string"}},"required":["error_code","error_msg"]},"ResourceCreate":{"properties":{"extra_info":{"$ref":"#/definitions/ResourceExtraInfo","description":"资源附加信息","x-open-region-cloud":"hc,hk"},"id":{"description":"待备份资源id","type":"string","x-huawei-extraAnnotation":""},"name":{"description":"名称","maxLength":255,"minLength":0,"type":"string","x-huawei-extraAnnotation":""},"type":{"description":"待备份资源的类型, 云服务器: OS::Nova::Server, 云硬盘: OS::Cinder::Volume, 裸金属服务器: OS::Ironic::BareMetalServer, 线下本地服务器: OS::Native::Server, 弹性文件系统: OS::Sfs::Turbo, 云桌面:OS::Workspace::DesktopV2","type":"string","x-huawei-extraAnnotation":""}},"required":["id","type"]},"ResourceExtraInfo":{"properties":{"exclude_volumes":{"description":"需要排除备份的卷id。仅在多系统盘备份特性中有效,排除不需要备份的磁盘。当虚拟机新绑定磁盘时,也能继续排除之前设置不用备份的卷。","items":{"description":"","type":"string"},"type":"array","x-open-region-cloud":"hc,hk,otc,ocb,hcso,sbc,g42,hcso_dt"}}},"ResourceExtraInfoIncludeVolumes":{"description":"","properties":{"id":{"description":"卷ID,仅支持uuid","type":"string","x-open-region-cloud":"hc,hk"},"os_version":{"description":"操作系统类型","type":"string","x-open-region-cloud":"hc,hk"}},"required":["id"]},"ResourceResp":{"description":"资源详情","properties":{"backup_count":{"description":"副本数量","format":"int32","type":"integer","x-huawei-extraAnnotation":""},"backup_size":{"description":"副本大小","format":"int32","type":"integer","x-huawei-extraAnnotation":""},"extra_info":{"$ref":"#/definitions/ResourceExtraInfo","description":"资源附加信息","x-open-region-cloud":"hc,hk,otc,ocb,hcso,sbc,g42,hcso_dt,tlf,hcso_g42_b"},"id":{"description":"待备份资源id","type":"string"},"name":{"description":"待备份资源名称","maxLength":255,"minLength":0,"type":"string"},"protect_status":{"description":"保护状态","enum":["available","error","protecting","restoring","removing"],"type":"string","x-huawei-extraAnnotation":""},"size":{"description":"资源已分配容量,单位为GB","format":"int32","type":"integer","x-huawei-extraAnnotation":""},"type":{"description":"待备份资源的类型, 云服务器: OS::Nova::Server, 云硬盘: OS::Cinder::Volume, 裸金属服务器: OS::Ironic::BareMetalServer, 线下本地服务器: OS::Native::Server, 弹性文件系统: OS::Sfs::Turbo, 云桌面:OS::Workspace::DesktopV2","type":"string"}},"required":["id","name","type"]},"Tag":{"description":"","properties":{"key":{"description":"键。\nkey最大长度为36个字符。\nkey不能为空字符串。\nkey前后空格会被丢弃。\nkey不能包含非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。\nkey只能由中文,字母,数字,“-”,“_”组成。","type":"string","x-huawei-extraAnnotation":"","x-obc":"Y","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc"},"value":{"description":"值。\n\n添加标签时value值必选,删除标签时value值可选。\n\nvalue最大长度为43个字符。\n\nvalue可以为空字符串。\n\nvalue前后的空格会被丢弃。\n\nvalue不能包含非打印字符ASCII(0-31),“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。\nvalue只能由中文,字母,数字,“-”,“_”,“.”组成。","type":"string","x-huawei-extraAnnotation":"","x-obc":"Y","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc"}},"required":["key","value"]},"VaultBindRules":{"properties":{"tags":{"description":"按tags过滤自动绑定的资源\n\n最小长度:1\n\n最大长度:5","items":{"$ref":"#/definitions/BindRulesTags","description":""},"type":"array"}}},"VaultCreate":{"properties":{"auto_bind":{"description":"是否支持自动挂载。","type":"boolean"},"auto_expand":{"description":"是否开启存储库自动扩容能力(只支持按需存储库)。","type":"boolean","x-open-region-cloud":"hc,hk"},"availability_zone":{"description":"存储库可用区信息,最大支持32字符。","maxLength":32,"minLength":1,"type":"string","x-open-region-cloud":"hc,hk"},"backup_name_prefix":{"description":"备份名称前缀,设置后该存储库自动备份产生的备份副本都将携带该备份名称前缀","maxLength":32,"minLength":0,"type":"string"},"backup_policy_id":{"description":"备份策略ID,不设置时为null,不自动备份。","type":"string"},"billing":{"$ref":"#/definitions/BillingCreate","description":"创建参数信息"},"bind_rules":{"$ref":"#/definitions/VaultBindRules","description":"自动挂载的规则","x-huawei-extraAnnotation":""},"demand_billing":{"default":false,"description":"存储库使用是否允许超出容量,只有创建包周期存储库时才允许该值为 true","type":"boolean","x-open-region-cloud":"hc,hk"},"description":{"description":"描述","maxLength":64,"minLength":0,"pattern":"^[^<>]*$","type":"string"},"enterprise_project_id":{"description":"企业项目ID,默认为‘0’。","type":"string","x-open-region-cloud":"hc,hk,hcso,tm"},"locked":{"default":false,"description":"用于标识该存储库是否已锁定","type":"boolean","x-huawei-extraAnnotation":"","x-open-region-cloud":"hc,hk"},"name":{"description":"存储库名称","maxLength":64,"minLength":1,"pattern":"^[\\u4E00-\\u9FA5\\uf900-\\ufa2da-zA-Z0-9_\\-]*$","type":"string","x-huawei-extraAnnotation":""},"resources":{"description":"绑定的备份资源,未在创建时绑定资源填[]","items":{"$ref":"#/definitions/ResourceCreate","description":""},"maxItems":255,"minItems":0,"type":"array"},"smn_notify":{"default":true,"description":"存储库smn消息通知开关。\n默认值为 true。","type":"boolean","x-open-region-cloud":"hc,hk"},"sys_lock_source_service":{"description":"用于标识SMB服务,您可以设置为SMB或者空","type":"string"},"tags":{"description":"标签列表\ntags不允许为空列表。\ntags中最多包含10个key。\ntags中key不允许重复。","items":{"$ref":"#/definitions/Tag","description":""},"type":"array"},"threshold":{"default":80,"description":"存储库容量阈值,已用容量占总容量达到此百分比,将根据 smn_notify 参数设置选择是否发送相关通知。\n默认值为:80\n最大值:100\n最小值:1","format":"int32","maximum":100,"minimum":1,"type":"integer","x-open-region-cloud":"hc,hk"}},"required":["billing","name","resources"]},"VaultCreateReq":{"properties":{"vault":{"$ref":"#/definitions/VaultCreate","description":"存储库创建参数"}},"required":["vault"]},"VaultCreateResource":{"properties":{"auto_bind":{"description":"是否自动绑定,默认为false,不支持。","type":"boolean"},"auto_expand":{"description":"是否开启存储库自动扩容能力(只支持按需存储库)。","type":"boolean"},"availability_zone":{"description":"存储库可用区信息,最大支持32字符。","maxLength":32,"minLength":1,"type":"string","x-open-region-cloud":"hc,hk"},"backup_name_prefix":{"description":"备份名称前缀","maxLength":32,"minLength":0,"type":"string"},"billing":{"$ref":"#/definitions/Billing","description":"运营信息"},"bind_rules":{"$ref":"#/definitions/VaultBindRules","description":"绑定规则","x-huawei-extraAnnotation":""},"cbc_delete_count":{"default":0,"description":"存储库删除次数","format":"int32","type":"integer"},"created_at":{"description":"创建时间,例如:\"2020-02-05T10:38:34.209782\"","type":"string","x-huawei-extraAnnotation":""},"demand_billing":{"default":false,"description":"是否允许使用超出存储库容量","type":"boolean"},"description":{"description":"存储库自定义描述信息。","maxLength":255,"minLength":0,"pattern":"^[^<>]*$","type":"string","x-huawei-extraAnnotation":""},"enterprise_project_id":{"description":"企业项目id,默认为‘0’。","type":"string","x-open-region-cloud":"hc,hk,hcso,tm"},"frozen":{"default":false,"description":"存储库是否冻结","type":"boolean"},"id":{"description":"存储库ID","type":"string"},"locked":{"default":false,"description":"用于标识该存储库是否已锁定","type":"boolean","x-huawei-extraAnnotation":"","x-open-region-cloud":"hc,hk"},"name":{"description":"存储库名称","maxLength":64,"minLength":1,"pattern":"^[\\u4E00-\\u9FA5\\uf900-\\ufa2da-zA-Z0-9_\\-]*$","type":"string"},"project_id":{"description":"项目ID","type":"string"},"provider_id":{"description":"存储库资源类型id","type":"string"},"resources":{"description":"存储库资源","items":{"$ref":"#/definitions/ResourceResp"},"type":"array"},"smn_notify":{"default":true,"description":"存储库smn消息通知开关","type":"boolean","x-open-region-cloud":"hc,hk"},"sys_lock_source_service":{"description":"用于标识SMB服务","type":"string"},"tags":{"description":"存储库标签","items":{"$ref":"#/definitions/Tag","description":""},"type":"array"},"threshold":{"default":80,"description":"存储库容量阈值,已用容量占总容量达到此百分比即发送相关通知","format":"int32","maximum":100,"minimum":1,"type":"integer","x-open-region-cloud":"hc,hk"},"user_id":{"description":"用户id","type":"string","x-huawei-extraAnnotation":""}},"required":["billing","id","name","project_id","provider_id","resources"]},"VaultCreateResp":{"properties":{"errText":{"description":"包周期创建错误信息(仅包周期创建时显示)","type":"string"},"error_code":{"description":"包周期创建错误码(仅包周期创建时显示)","type":"string"},"orders":{"description":"包周期创建订单信息(仅包周期创建时显示)","items":{"$ref":"#/definitions/CbcOrderResult"},"type":"array"},"retCode":{"description":"包周期订购结果(仅包周期创建时显示)","format":"int32","type":"integer"},"vault":{"$ref":"#/definitions/VaultCreateResource","description":"存储库查询返回对象"}}}},"description":null,"group_id":"11b1e4b30d524dacb6891902e04115dd","host":"cbr.cn-north-4.myhuaweicloud.com","id":"1064fe99324d402b9be474bfb9008615","info_version":"v1","method":"post","name":"CreateVault","parameters":{},"paths":{"/v3/{project_id}/vaults":{"post":{"consumes":[],"deprecated":false,"description":"创建存储库","operationId":"CreateVault","parameters":[{"description":"项目ID","in":"path","name":"project_id","required":true,"type":"string","x-order":1},{"description":"存储库创建参数","in":"body","name":"CreateVaultRequestBody","required":true,"schema":{"$ref":"#/definitions/VaultCreateReq"},"x-order":2},{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXX...","x-order":3}],"produces":[],"responses":{"200":{"description":"OK","examples":{"application/json":{"vault":{"auto_bind":false,"billing":{"allocated":40,"charging_mode":"post_paid","cloud_type":"public","consistent_level":"crash_consistent","object_type":"server","order_id":null,"product_id":null,"protect_type":"backup","size":100,"spec_code":"vault.backup.server.normal","status":"available","storage_unit":null,"used":0},"created_at":"2019-05-23T12:51:10.071232","description":"vault_description","enterprise_project_id":"0","id":"ad7627ae-5b0b-492e-b6bd-cd809b745197","name":"vault_name","project_id":"fc347bc64ccd4589ae52e4f44b7433c7","provider_id":"0daac4c5-6707-4851-97ba-169e36266b66","resources":[{"backup_count":0,"backup_size":0,"extra_info":{"exclude_volumes":["1855eb9a-2b5e-4938-a9f0-aea08b6f9243","5a51e8b3-2f65-4045-896f-f8ffae14b064"]},"id":"23a320a5-3efd-4568-b1aa-8dd9183cc64c","name":"ecs-b977-0002","protect_status":"available","size":40,"type":"OS::Nova::Server"}],"tags":[{"key":"key01","value":"value01"}],"user_id":"38d65be2ecd840d19046e239e841a734"}}},"schema":{"$ref":"#/definitions/VaultCreateResp"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}}},"summary":"创建存储库","tags":["存储库"],"x-apiErrorCodes":[{"errorCode":"6100","errorDescription":"存储库资源超出限制","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"减少存储库资源个数"},{"errorCode":"6101","errorDescription":"存储库大小超出限制","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"减小存储库大小"},{"errorCode":"6102","errorDescription":"存储库资源与类型不匹配","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"选择正确类型资源"},{"errorCode":"6103","errorDescription":"资源已经存在于其他存储库","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"不支持一个资源添加到不同存储库"},{"errorCode":"6104","errorDescription":"资源重复","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"删除重复资源"},{"errorCode":"6205","errorDescription":"资源在老服务已经产生备份","httpStatus":"400","parentId":"b23e43a06bd94053a16206492e6136ed","solution":"请先进行服务迁移"}],"x-apiexplorer-hide":"false","x-constraint":"","x-first-open-time":"","x-hybridcloud":"","x-is-registered":"Y","x-name":"创建存储库","x-open-region-cloud":"hc,hk,otc,obc,ctc,hcso,sbc,g42,tm,cmcc,hk-g42,hcso_dt","x-order":22,"x-publishpath":"","x-request-examples-1":{"vault":{"backup_policy_id":"6dd81d7d-a4cb-443e-b8ed-1af0bd3a261b","billing":{"charging_mode":"post_paid","cloud_type":"public","consistent_level":"crash_consistent","console_url":"https://console.demo.com/cbr/?agencyId=97fcd896b7914cb98f553a087232e243®ion=testregion/cbr/manager/csbs/vaultList","is_auto_pay":false,"is_auto_renew":false,"object_type":"server","protect_type":"backup","size":100},"description":"vault_description","enterprise_project_id":"0","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"}]}},"x-request-examples-2":{"vault":{"billing":{"charging_mode":"post_paid","consistent_level":"crash_consistent","is_auto_pay":false,"is_auto_renew":false,"object_type":"disk","protect_type":"backup","size":40},"name":"test","resources":[]}},"x-request-examples-description-1":"创建云服务器存储库且同时绑定资源和添加tag","x-request-examples-description-2":"创建云硬盘存储库,只包含必备参数","x-request-examples-text-1":"{ \n\t\"vault\": {\n\t\t\"backup_policy_id\": \"6dd81d7d-a4cb-443e-b8ed-1af0bd3a261b\",\n\t\t\"billing\": {\n\t\t\t\"cloud_type\": \"public\",\n\t\t\t\"consistent_level\": \"crash_consistent\",\n\t\t\t\"object_type\": \"server\",\n\t\t\t\"protect_type\": \"backup\",\n\t\t\t\"size\": 100,\n\t\t\t\"charging_mode\": \"post_paid\",\n\t\t\t\"is_auto_renew\": false,\n\t\t\t\"is_auto_pay\": false,\n\t\t\t\"console_url\": \"https://console.demo.com/cbr/?agencyId=97fcd896b7914cb98f553a087232e243®ion=testregion/cbr/manager/csbs/vaultList\"\n\t\t},\n\t\t\"description\": \"vault_description\",\n\t\t\"name\": \"vault_name\",\n\t\t\"resources\": [{\n\t\t\t\"extra_info\": {\n\t\t\t\t\"exclude_volumes\": [\"43a320a5-3efd-4568-b1aa-8dd9183cc64b\"]\n\t\t\t},\n\t\t\t\"id\": \"23a320a5-3efd-4568-b1aa-8dd9183cc64c\",\n\t\t\t\"type\": \"OS::Nova::Server\"\n\t\t}],\n\t\t\"tags\": [{\n\t\t\t\"key\": \"key01\",\n\t\t\t\"value\": \"value01\"\n\t\t}],\n\t\t\"enterprise_project_id\": \"0\"\n\t}\n}","x-request-examples-text-2":"{\n\t\"vault\": {\n\t\t\"billing\": {\n\t\t\t\"consistent_level\": \"crash_consistent\",\n\t\t\t\"object_type\": \"disk\",\n\t\t\t\"protect_type\": \"backup\",\n\t\t\t\"size\": 40,\n\t\t\t\"charging_mode\": \"post_paid\",\n\t\t\t\"is_auto_renew\": false,\n\t\t\t\"is_auto_pay\": false\n\t\t},\n\t\t\"name\": \"test\",\n\t\t\"resources\": []\n\t}\n}\n","x-request-examples-url-1":"POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults","x-request-examples-url-2":"POST https://{endpoint}/v3/f841e01fd2b14e7fa41b6ae7aa6b0594/vaults","x-scope":"Commercial","x-source":"","x-support-sdk":"Y"}}},"product_short":"CBR","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建存储库","tags":"存储库","uri":null,"version":"2.0"}