huawei-cloud-api-definitions-CBR 0.1.20251031

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"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"]},"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"]},"ErrorResponse":{"description":"","properties":{"error_code":{"description":"请参见[错误码](ErrorCode.xml)。","type":"string","x-huawei-extraAnnotation":""},"error_msg":{"description":"错误信息","type":"string"}},"required":["error_code","error_msg"]},"InstancesResourceDetail":{"description":"","properties":{"vault":{"$ref":"#/definitions/Vault","description":"存储库"}}},"Match":{"description":"","properties":{"key":{"description":"键。\nkey取值范围为:\"resource_name\",资源名称","type":"string"},"value":{"description":"值。\n最大长度255个字符。\nkey为\"resource_name\"时,value为空字符串时精确匹配,为非空字符串时模糊匹配。","type":"string"}},"required":["key","value"]},"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"]},"SysTag":{"description":"","properties":{"key":{"description":"键。 \n系统标签的key,从白名单中取,不能随意定义。\n目前仅支持 _sys_enterprise_project_id字段,对应 的value为企业项目ID。","type":"string"},"value":{"description":"值。 \n目前仅会用到企业项目ID,其中默认的企业项目ID为“0”。","type":"string"}},"required":["key","value"]},"SysTags":{"description":"","properties":{"key":{"description":"键。 \n系统标签的key,从白名单中取,不能随意定义。\n目前仅支持 _sys_enterprise_project_id字段,对应 的value为企业项目ID。","type":"string"},"values":{"description":"值列表。 \n目前仅会用到企业项目ID,其中默 认的企业项目ID为“0”。","items":{"type":"string"},"type":"array"}},"required":["key","values"]},"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"]},"TagResource":{"description":"","properties":{"resource_detail":{"$ref":"#/definitions/InstancesResourceDetail","description":"资源详情"},"resource_id":{"description":"资源ID","type":"string"},"resource_name":{"description":"资源名称","type":"string"},"sys_tags":{"description":"仅op_service权限才可以获取此字段:\n\n目前只包含一个resource_tag 结构体。\n\nkey:_sys_enterprise_project_id\n\nvalue:企业项目id,0表示默认企业项目\n\n非op_service场景不能返回此字段。","items":{"$ref":"#/definitions/SysTag","description":""},"type":"array","x-huawei-extraAnnotation":""},"tags":{"description":"标签列表\n没有标签默认为空数字。","items":{"$ref":"#/definitions/Tag"},"type":"array"}},"required":["resource_detail","resource_id","resource_name","sys_tags","tags"]},"TagsReq":{"description":"","properties":{"key":{"description":"键。\n\n最大长度127个unicode字符。\n\n不允许为空字符串。\n\n前后的空格会被丢弃。","type":"string","x-huawei-extraAnnotation":""},"values":{"description":"值列表。\n\nvalues中最多包含10个value。\n\n每个value最大长度255个unicode字符。前后的空格会被丢弃。\n\nvalues中value不允许重复。\n\nvalues中多个value之间是\"或\"的关系。\n\nvalues允许为空列表,value允许为空字符串。\n\nvalues如果为空列表,表示任意值。\n\n\\*为系统保留字符,如果value是以\\*开头表示按照\\*后面的值全模糊匹配,不能只传入“\\*”。","items":{"description":"","type":"string"},"type":"array","x-huawei-extraAnnotation":""}},"required":["key","values"]},"Vault":{"properties":{"auto_bind":{"description":"是否自动绑定,默认为false,不支持。","type":"boolean"},"auto_expand":{"description":"是否开启存储库自动扩容能力(只支持按需存储库)。","type":"boolean","x-huawei-extraAnnotation":""},"availability_zone":{"description":"存储库可用区信息,最大支持32字符。","maxLength":32,"minLength":1,"type":"string","x-open-region-cloud":"hc,hk"},"billing":{"$ref":"#/definitions/Billing","description":"运营信息"},"bind_rules":{"$ref":"#/definitions/VaultBindRules","description":"绑定规则","x-huawei-extraAnnotation":""},"created_at":{"description":"创建时间,例如:\"2020-02-05T10:38:34.209782\"","type":"string","x-huawei-extraAnnotation":""},"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"},"id":{"description":"存储库ID","type":"string"},"locked":{"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","x-huawei-extraAnnotation":""},"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"]},"VaultBindRules":{"properties":{"tags":{"description":"按tags过滤自动绑定的资源\n\n最小长度:1\n\n最大长度:5","items":{"$ref":"#/definitions/BindRulesTags","description":""},"type":"array"}}},"VaultResourceInstancesReq":{"description":"","properties":{"action":{"description":"操作标识取值范围为:\"filter\", \"count\"。如果是filter就是分页查询,如果是count只需按照条件将总条数返回即可","type":"string","x-huawei-extraAnnotation":""},"cloud_type":{"description":"云类型","enum":["public","hybrid"],"type":"string"},"limit":{"description":"查询记录数(action为count时无此参数)如果action为filter时,默认为1000,limit最小值为1,limit最大值为1000, 不在范围内报错。返回的结果中记录数不超过limit。","type":"string"},"matches":{"description":"资源本身支持的查询条件。\n\nmatches中key不允许重复。\n\n数组长度最大值为 1,后续再扩展。","items":{"$ref":"#/definitions/Match","description":""},"maxItems":1,"minItems":0,"type":"array","x-huawei-extraAnnotation":""},"not_tags":{"description":"不包含标签。\n\ntags不允许为空列表。\n\ntags中最多包含10个key。\n\ntags中key不允许重复。\n\n结果返回不包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。\n\n无过滤条件时返回全量数据。","items":{"$ref":"#/definitions/TagsReq","description":""},"type":"array","x-huawei-extraAnnotation":""},"not_tags_any":{"description":"不包含任一标签。\n\ntags不允许为空列表。\n\ntags中最多包含10个key。\n\ntags中key不允许重复。\n\n结果返回不包含任一标签的资源列表,key之间是或的关系,key-value结构张value是或的关系。\n\n无过滤条件时返回全量数据。","items":{"$ref":"#/definitions/TagsReq","description":""},"type":"array","x-huawei-extraAnnotation":""},"object_type":{"description":"资源类型","enum":["server","disk","turbo","workspace","vmware","rds","file"],"type":"string"},"offset":{"description":"索引位置(action为count时无此参数)如果action为filter时,默认为0,offset最小值为0。返回的结果中第一条记录为符合查询条件的第offset+1条记录。","type":"string"},"sys_tags":{"description":"仅op_service权限可以使用此字段做资源实例过滤条件。\n\n目前TMS调用时只包含一个tag结构体。\n\n* key: _sys_enterprise_project_id\n\n* values:企业项目id列表\n\n目前TMS调用时,key下面只包含一个value,0表示默认企业项目。\n\nsys_tags和租户标签过滤条件(tags、tags_any、not_tags、not_tags_any)不能同时使用。\n\n无sys_tags时按照tag接口处理,无tag过滤条件时返回全量数据。\n\nsys_tags不能为空列表","items":{"$ref":"#/definitions/SysTags","description":""},"type":"array","x-huawei-extraAnnotation":""},"tags":{"description":"包含标签。\n\ntags不允许为空列表。\n\ntags中最多包含10个key。\n\ntags中key不允许重复。\n\ntags中多个key之间是“与”的关系。\n\n结果返回包含所有标签的资源列表,key之间是与的关系,key-value结构中value是或的关系。\n\n无过滤条件时返回全量数据。","items":{"$ref":"#/definitions/TagsReq","description":""},"type":"array","x-huawei-extraAnnotation":""},"tags_any":{"description":"包含任一标签。\n\ntags不允许为空列表。\n\ntags中最多包含10个key。\n\ntags中key不允许重复。\n\n结果返回包含任一标签的资源列表,key之间是或的关系,key-value结构中value是或的关系。\n\n无过滤条件时返回全量数据。","items":{"$ref":"#/definitions/TagsReq","description":""},"type":"array","x-huawei-extraAnnotation":""},"without_any_tag":{"description":"不包含任意一个标签,该字段为true时查询所有不带标签的资源,此时忽略 “tags”、“tags_any”、“not_tags”、“not_tags_any”字段。","type":"boolean"}},"required":["action"]},"VaultResourceIntancesResp":{"description":"","properties":{"resources":{"description":"符合查询条件的资源列表(action为count时无此参数)。","items":{"$ref":"#/definitions/TagResource"},"type":"array"},"total_count":{"description":"符合查询条件的资源总个数","format":"int32","type":"integer"}}}},"description":null,"group_id":"11b1e4b30d524dacb6891902e04115dd","host":"cbr.cn-north-4.myhuaweicloud.com","id":"88658c5aa7f847aea9ec7c0e27467d68","info_version":"v1","method":"post","name":"ShowVaultResourceInstances","parameters":{},"paths":{"/v3/{project_id}/vault/resource_instances/action":{"post":{"consumes":[],"deprecated":false,"description":"使用标签过滤实例\n标签管理服务需要提供按标签过滤各服务实例并汇总显示在列表中,需要各服务提供查询能力","operationId":"ShowVaultResourceInstances","parameters":[{"description":"项目id","in":"path","name":"project_id","required":true,"type":"string","x-order":1},{"description":"查询存储库资源实例参数","in":"body","name":"ShowVaultResourceInstancesRequestBody","required":true,"schema":{"$ref":"#/definitions/VaultResourceInstancesReq"},"x-order":2}],"produces":[],"responses":{"200":{"description":"OK","examples":{"application/json":{"resources":[{"resource_detail":{"vault":{"auto_bind":false,"auto_expand":false,"billing":{"allocated":0,"charging_mode":"pre_paid","cloud_type":"public","consistent_level":"crash_consistent","frozen_scene":null,"is_multi_az":false,"object_type":"server","order_id":"CS23042116192E6CZ","partner_bp_id":null,"product_id":"00301-231151-0--0","protect_type":"backup","size":100,"spec_code":"vault.backup.server.normal","status":"available","storage_unit":null,"used":0},"bind_rules":{},"created_at":"2023-04-21T08:20:43.021936","description":null,"enterprise_project_id":"0","id":"e54f7854-8de8-4f98-acf1-65f330bfe877","name":"vault-7698-api-test","project_id":"667230ba418f48f1996329f174693053","provider_id":"0daac4c5-6707-4851-97ba-169e36266b66","resources":[],"smn_notify":true,"tags":[],"threshold":80,"user_id":"0ae13f012b80d2d81f11c0129285d34b"}},"resource_id":"e54f7854-8de8-4f98-acf1-65f330bfe877","resource_name":"vault-7698-api-test","tags":[]}],"total_count":7}},"schema":{"$ref":"#/definitions/VaultResourceIntancesResp"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}}},"summary":"查询存储库资源实例","tags":["标签"],"x-apiexplorer-hide":"false","x-constraint":"","x-first-open-time":"","x-hybridcloud":"","x-is-registered":"Y","x-name":"查询存储库资源实例","x-open-region-cloud":"obc,hc,hk","x-order":61,"x-publishpath":"","x-request-examples-1":"","x-request-examples-description-1":"","x-request-examples-text-1":"","x-request-examples-url-1":"POST  https://{endpoint}/v3/{project_id}/vault/resource_instances/action","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"}