{"base_path":"/","components":null,"consumes":"","definitions":{"ComplianceRule":{"properties":{"backup_type":{"description":"备份类型","maxLength":36,"minLength":1,"type":"string"},"created":{"description":"规则创建时间","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"},"description":{"description":"规则描述","maxLength":65532,"minLength":0,"type":"string"},"domain_id":{"description":"账号ID","example":"d1234567890","maxLength":36,"minLength":1,"type":"string"},"id":{"description":"id","example":"123e4567-e89b-12d3-a456-426614174000","maxLength":512,"minLength":1,"type":"string"},"is_cross_account_backup_forced":{"description":"是否开启强制跨账号备份","example":false,"type":"boolean"},"is_system_embedded":{"description":"是否系统内置规则","example":false,"type":"boolean"},"local_backup_enabled":{"description":"是否启用本地备份","type":"boolean"},"local_backup_frequency":{"description":"本地备份频率,如按天 2次/天,按周 周一,三,五每天执行2次","properties":{"days_of_week":{"description":"如果type是weekly必选,表示一周内那些天备份 如:[\"MO\", \"TU\", \"WE\", \"TH\", \"FR\", \"SA\", \"SU\"]","example":["MO","TU","WE","TH","FR","SA","SU"],"items":{"maxLength":2,"minLength":2,"type":"string"},"maxItems":7,"minItems":1,"type":"array"},"interval":{"default":1,"description":"daily类型下,间隔多少天,默认值:1","example":1,"format":"int32","maximum":30,"minimum":1,"type":"integer"},"times_per_day":{"description":"每日执行次数","example":1,"format":"int32","maximum":24,"minimum":1,"type":"integer"},"type":{"description":"备份频率类型,可选daily weekly","example":"weekly","maxLength":16,"minLength":1,"type":"string"}},"required":["times_per_day"]},"local_backup_retention":{"description":"本地备份副本保留时长","format":"int32","maximum":2147483647,"minimum":1,"type":"integer"},"local_worm_enabled":{"description":"本地副本是否启用WORM特性。","example":true,"type":"boolean"},"name":{"description":"合规规则名称","maxLength":128,"minLength":1,"type":"string"},"remote_backup_enabled":{"description":"是否启用异地复制。","type":"boolean"},"remote_backup_retention":{"description":"异地复制副本保留时长。","format":"int32","maximum":2147483647,"minimum":1,"type":"integer"},"remote_worm_enabled":{"description":"异地复制副本是否启用WORM特性。","example":false,"type":"boolean"},"resource_type":{"description":"资源类型","example":"virtual_machine","maxLength":32,"minLength":1,"type":"string"},"updated":{"description":"规则更新时间","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"}},"type":"object"},"ErrorRsp":{"description":"失败时返回的错误对象","properties":{"error_code":{"description":"错误码","maxLength":36,"minLength":8,"type":"string"},"error_msg":{"description":"错误描述","maxLength":512,"minLength":2,"type":"string"}},"required":["error_code","error_msg"]},"ResourceItem":{"description":"单个资源的列表属性","properties":{"compliance_detail":{"description":"资产合规盘点明细,合规校验针对local_backup_enabled,local_backup_frequency, local_worm_enabled, local_backup_retention 等每一项都给出规则要求值,资源实际值,是否满足匹配。结合多项给出最终的匹配结果。","maxLength":1024,"minLength":1,"type":"string"},"compliance_result":{"description":"资产合规盘点结果","maxLength":64,"minLength":1,"type":"string"},"compliance_rule":{"$ref":"#/definitions/ComplianceRule","description":"备份合规规则"},"copies_count":{"description":"副本数量","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"},"domain_id":{"description":"账号ID","maxLength":64,"minLength":1,"type":"string"},"ep_id":{"description":"企业项目ID","maxLength":64,"minLength":1,"type":"string"},"ep_name":{"description":"企业项目名称","maxLength":1024,"minLength":1,"type":"string"},"id":{"description":"资源ID","maxLength":512,"minLength":1,"type":"string"},"inventory_result":{"description":"资源保护状态","maxLength":64,"minLength":1,"type":"string"},"is_level_manual":{"description":"等级是否手动指定","type":"boolean"},"local_backup_flag":{"description":"本地备份是否开启","type":"boolean"},"local_backup_policy_ids":{"description":"本地备份策略","items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":1,"minItems":0,"type":"array"},"local_vaults_brief":{"description":"本地备份存储库","items":{"$ref":"#/definitions/VaultItem"},"maxItems":1,"minItems":0,"type":"array"},"project_id":{"description":"Openstack中的项目ID","maxLength":64,"minLength":1,"type":"string"},"project_name":{"description":"Openstack中的项目名称","maxLength":1024,"minLength":1,"type":"string"},"provider":{"description":"云服务名称","maxLength":64,"minLength":1,"type":"string"},"region_id":{"description":"区域ID","maxLength":64,"minLength":1,"type":"string"},"remote_backup_flag":{"description":"异地备份是否开启","type":"boolean"},"remote_backup_policy_ids":{"description":"异地备份策略","items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":1,"minItems":0,"type":"array"},"remote_vaults_brief":{"description":"异地备份存储库","items":{"$ref":"#/definitions/VaultItem"},"maxItems":1,"minItems":0,"type":"array"},"resource_created":{"description":"资源创建事时间","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"},"resource_detail":{"additionalProperties":{"type":"object"},"description":"资源详细属性","type":"object"},"resource_level":{"$ref":"#/definitions/ResourceLevelBase","description":"资源等级信息"},"resource_name":{"description":"资源名称","maxLength":512,"minLength":1,"type":"string"},"resource_type":{"description":"资源类型","maxLength":64,"minLength":1,"type":"string"},"resource_updated":{"description":"资源更新时间","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"},"snapshot_backup_flag":{"description":"快照备份是否开启","type":"boolean"},"state":{"description":"资源状态,保有中(Normal)/已删除(Deleted)","maxLength":64,"minLength":1,"type":"string"},"tags":{"description":"标签","items":{"additionalProperties":{"description":"标签键值对","maxLength":1024,"minLength":1,"type":"string"},"type":"object"},"maxItems":20,"minItems":0,"type":"array"}},"type":"object"},"ResourceLevelBase":{"properties":{"apply_rule":{"description":"应用规则","maxLength":65536,"minLength":1,"type":"string"},"apply_type":{"description":"应用方式","format":"int32","maximum":4,"minimum":1,"type":"integer"},"compliance_rule_id":{"description":"合规规则ID","maxLength":36,"minLength":1,"type":"string"},"description":{"description":"描述","maxLength":65536,"minLength":1,"type":"string"},"domain_id":{"description":"账户ID","maxLength":36,"minLength":1,"type":"string"},"id":{"description":"ID","maxLength":36,"minLength":1,"type":"string"},"providers":{"description":"云服务","items":{"maxLength":36,"minLength":1,"type":"string"},"maxItems":10,"minItems":1,"type":"array"},"resource_level":{"description":"重要程度","format":"int32","maximum":5,"minimum":1,"type":"integer"},"resource_level_name":{"description":"资源等级名称","maxLength":36,"minLength":2,"type":"string"}},"type":"object"},"ResourceListRsp":{"description":"查询资源列表的返回体","properties":{"count":{"description":"资源总数","format":"int64","maximum":2147483647,"minimum":0,"type":"integer"},"next_marker":{"description":"下一页的marker","maxLength":64,"minLength":1,"type":"string"},"resources":{"description":"资源列表","items":{"$ref":"#/definitions/ResourceItem"},"maxItems":100,"minItems":0,"type":"array"}},"type":"object"},"VaultItem":{"properties":{"id":{"description":"CBR存储库ID","maxLength":512,"minLength":1,"type":"string"},"name":{"description":"CBR存储库名称","maxLength":512,"minLength":1,"type":"string"}},"type":"object"}},"description":null,"group_id":"0cb6191c2c524d62be604224b207d979","host":"bcc.cn-north-4.myhuaweicloud.com","id":"66baa1a6652f42beb80631f68dcbfe55","info_version":"v1","method":"get","name":"ListResources","parameters":{},"paths":{"/v1/{domain_id}/resources":{"get":{"description":"查询资源列表","operationId":"ListResources","parameters":[{"description":"账号ID","in":"path","maxLength":36,"minLength":1,"name":"domain_id","required":true,"type":"string"},{"description":"区域ID","in":"query","maxLength":36,"minLength":1,"name":"region_id","required":false,"type":"string"},{"description":"云服务类型,如ecs,evs,sfsturbo,workspace,rds,gaussdb","enum":["ecs","evs","sfsturbo","workspace","rds","gaussdb"],"in":"query","maxLength":20,"minLength":1,"name":"provider","required":false,"type":"string"},{"description":"资源ID","in":"query","maxLength":512,"minLength":1,"name":"id","required":false,"type":"string"},{"description":"资源名称","in":"query","maxLength":256,"minLength":1,"name":"name","required":false,"type":"string"},{"description":"标签列表, 标签值的格式为key或key=value,用英文逗号分隔,最多支持5对标签的查询,超过5对的只生效前5对","in":"query","maxLength":512,"minLength":1,"name":"tags","required":false,"type":"string"},{"description":"CBR存储库ID","in":"query","maxLength":512,"minLength":1,"name":"vault_id","required":false,"type":"string"},{"description":"CBR存储库名称","in":"query","maxLength":512,"minLength":1,"name":"vault_name","required":false,"type":"string"},{"description":"资源等级定义ID","in":"query","maxLength":64,"minLength":1,"name":"resource_level_id","required":false,"type":"string"},{"description":"资源等级名称","in":"query","maxLength":32,"minLength":1,"name":"resource_level_name","required":false,"type":"string"},{"description":"资源合规结果,complete_match,partial_match,no_match","enum":["complete_match","partial_match","no_match"],"in":"query","maxLength":32,"minLength":1,"name":"compliance_result","required":false,"type":"string"},{"description":"资源保护状态,unprotected,protected","enum":["unprotected","protected"],"in":"query","maxLength":32,"minLength":1,"name":"inventory_result","required":false,"type":"string"},{"description":"合规规则类型,local_backup_enabled,local_backup_retention,local_backup_frequency,remote_backup_enabled,remote_backup_retention,local_worm_enabledd,remote_worm_enabled,is_cross_account_backup_forced","enum":["local_backup_enabled","local_backup_retention","local_backup_frequency","remote_backup_enabled","remote_backup_retention","local_worm_enabledd","remote_worm_enabled","is_cross_account_backup_forced"],"in":"query","maxLength":32,"minLength":1,"name":"compliance_rule_type","required":false,"type":"string"},{"default":false,"description":"合规规则是否符合,必须搭配compliance_rule_type使用","in":"query","name":"compliance_rule_matched","required":false,"type":"boolean"},{"default":10,"description":"最大的返回数量","format":"int32","in":"query","maximum":100,"minimum":1,"name":"limit","required":false,"type":"integer"},{"description":"分页参数,通过上一个请求中返回的marker信息作为输入,获取当前页。","in":"query","maxLength":512,"minLength":1,"name":"marker","required":false,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"Demo Information","examples":{"application/json":{"count":1,"resources":[{"compliance_detail":null,"compliance_result":null,"compliance_rule":null,"copies_count":0,"domain_id":"3e11d1ca792a47f2b1367fe4xxxxxxxx","ep_id":"0","ep_name":"default","id":"33f4c9db-9bc5-4140-853e-665a70561cdc","inventory_result":"unprotected","is_level_manual":false,"local_backup_flag":false,"local_vaults_brief":null,"project_id":"1d9c62d1534b4f7394e4a0a363560826","project_name":"cn-southwest-242","provider":"ecs","region_id":"cn-southwest-242","remote_backup_flag":false,"remote_vaults_brief":null,"resource_detail":{"flavor":{"disk":"0","id":"s6.small.1","name":"s6.small.1","ram":"1024","vcpus":"1"},"metadata":{"chargingMode":"0","imageName":"test","meteringImageId":"b113b522-cab5-4702-91bc-47e7daa85684","meteringImageType":"private","meteringResourcesPerCode":"s6.small.1.linux","osBit":"64","osType":"Linux","vpcId":"6308e508-d9b6-4d30-9110-8001ae51f206"},"osextsrvattr":{"host":"69cc4c3c9bdf9ab5880cc3d24f0076d2568beedaa7a51c5127f1e906","hostName":"ecs-a60d-ims","hypervisorHostName":"69cc4c3c9bdf9ab5880cc3d24f0076d2568beedaa7a51c5127f1e906","instanceName":"instance-001982ea","kernelId":"","launchIndex":"0","ramdiskId":"","reservationId":"r-bmlhsr0r","rootDeviceName":"/dev/vda"},"schedulerHints":{}},"resource_level":null,"resource_name":"ecs-a60d-ims","resource_type":"cloudservers","snapshot_backup_flag":false,"state":"Failed","tags":[{"key":"test","value":"test"}]}]}},"schema":{"$ref":"#/definitions/ResourceListRsp"}},"400":{"description":"请求错误","schema":{"$ref":"#/definitions/ErrorRsp"}},"401":{"description":"未提供认证信息或认证信息错误。","schema":{"$ref":"#/definitions/ErrorRsp"}},"403":{"description":"请求页面被禁止访问。","schema":{"$ref":"#/definitions/ErrorRsp"}},"404":{"description":"未找到资源。","schema":{"$ref":"#/definitions/ErrorRsp"}},"408":{"description":"请求超出了服务器的等待时间。","schema":{"$ref":"#/definitions/ErrorRsp"}},"429":{"description":"当前请求过多。","schema":{"$ref":"#/definitions/ErrorRsp"}},"500":{"description":"请求未完成,服务异常。","schema":{"$ref":"#/definitions/ErrorRsp"}},"503":{"description":"系统暂时不可用,请求受限。","schema":{"$ref":"#/definitions/ErrorRsp"}}},"summary":"查询资源列表","tags":["资源管理"],"x-api-type":"open-api","x-iam-auth-meta-anno":{"abacAction":"bcc::listResource","authContextInitializerName":"iamAuthListContextInitializer","authLevel":"NO_INSTANCE","model":"v5","needAbacCheck":true,"needAbacResourceCheck":false,"needApigwJwtAuthCheck":false,"needCbcCheck":false,"needRbacCheck":false,"needResourceTagCheck":false,"supportAllGrantedEps":false},"x-is-registered":"Y","x-method-annotations":["@CtsMeta(resourceType = \"Resources\", traceName = \"ListResources\", operationId = \"ListResources\", isReadOnly=true)"],"x-support-sdk":"Y"}}},"product_short":"BCC","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"查询资源列表","tags":"资源管理","uri":null,"version":"2.0"}