huawei-cloud-api-definitions-COC 0.1.20251024

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":"/","components":null,"consumes":"","definitions":{"CreateAttackTaskRequest":{"description":"创建攻击任务请求","properties":{"attack_target_number":{"description":"pod攻击数量,不指定pod时需填","format":"int32","type":"integer"},"attack_targets":{"items":{"properties":{"agent_id":{"example":"xxx","type":"string"},"agent_state":{"example":"ONLINE","type":"string"},"application_code":{"example":"coc-cdr","type":"string"},"application_id":{"example":"6481c607c6848a4a8ca37861","type":"string"},"application_name":{"type":"string"},"cache_mode":{"description":"DCS实例类型,single,单机;ha,主备;ha_rw_split,读写分离;proxy,Proxy集群;cluster,原生集群","type":"string"},"cmdb_resource_id":{"example":"xxx","type":"string"},"engine_name":{"description":"mysql,MySQL;postgresql,PostgreSQL;sqlserver,Microsoft SQL Server。","type":"string"},"engine_version":{"description":"DCS缓存类型,4.0、5.0、6.0","type":"string"},"ep_id":{"example":0,"type":"string"},"fixed_ip":{"example":"10.0.1.2","type":"string"},"floating_ip":{"example":"x.x.x.x","type":"string"},"group_id":{"example":"6fe008ce-555f-4109-bd95-e950fed29a83","type":"string"},"group_name":{"example":"sg-d713","type":"string"},"ha_mode":{"description":"Ha,主备;Replica,只读;Single,单机。","type":"string"},"instance_status":{"description":"normal,正常;abnormal,异常;creating,创建中;createfail,创建失败;data_disk_full,磁盘满;deleted,删除; shutdown,关机。","type":"string"},"name":{"example":"crawler-1c2g-0027","type":"string"},"namespace":{"description":"命名空间","type":"string"},"os_ext_az":{"example":"","type":"string"},"pod_name":{"description":"pod名称","type":"string"},"pod_status":{"description":"pod状态,Running/Pending/Succeeded/Failed/Unknown","type":"string"},"pod_uid":{"description":"pod uid","type":"string"},"project_id":{"example":"062c1113208026c62f21c01429edbf77","type":"string"},"provider":{"description":"ecs/cce/rds","example":"ecs","type":"string"},"redis_status":{"description":"DCS redis状态,RUNNING等","type":"string"},"region_id":{"example":"cn-north-4","type":"string"},"resource_id":{"example":"resource_id","type":"string"},"type":{"description":"cloudservers/pods/instances","example":"cloudservers","type":"string"},"workload":{"description":"工作负载","type":"string"},"workload_type":{"description":"工作负载类型,Deployment/StatefulSet/DaemonSet","type":"string"}},"required":["application_name"]},"type":"array"},"monitor_metric_request":{"items":{"properties":{"expected_max":{"description":"预期最大值","type":"string"},"expected_min":{"description":"预期最小值","type":"string"},"host_resource_id":{"description":"监控目标资源id","type":"string"},"metric_namespace":{"description":"监控数据来源的命名空间","type":"string"},"name":{"description":"指标名","type":"string"},"pod_name":{"description":"pod名称","type":"string"},"pod_namespace":{"description":"pod的命名空间","type":"string"},"pod_uid":{"description":"pod的uid","type":"string"},"type":{"description":"指标类型","type":"string"},"unit":{"description":"指标单位","type":"string"}}},"type":"array"},"name":{"example":"xxx","type":"string"},"target_category":{"description":"host/cluster/rds/all","example":"host","type":"string"},"type":{"description":"chaos","example":"chaos","type":"string"},"weapon":{"properties":{"duration":{"example":10,"format":"int32","type":"integer"},"param":{"example":{"duration":"60"},"type":"string"},"probe":{"example":"CFE","type":"string"},"type":{"example":"LITTLE_TRY","type":"string"}}}},"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"]}},"description":null,"group_id":"82af75d8fb894fc2b06ca4175859ba53","host":"coc-open.myhuaweicloud.com","id":"5a93407831954464ba2338521de40514","info_version":"v1","method":"post","name":"CreateAttackTask","parameters":{},"paths":{"/v1/attack-tasks":{"post":{"description":"创建攻击任务","operationId":"CreateAttackTask","parameters":[{"in":"body","name":"CreateAttackTaskRequest","required":true,"schema":{"$ref":"#/definitions/CreateAttackTaskRequest"}}],"responses":{"200":{"description":"","examples":{"application/json":{"data":{"attack_record_id":null,"id":"ATK20230609195419584017555"},"error_code":"0001","error_msg":"成功.","provider_code":"047"}},"schema":{"type":"string"}},"400":{"description":"错误返回结果","schema":{"$ref":"#/definitions/ErrorRsp"}},"500":{"description":"错误返回结果","schema":{"$ref":"#/definitions/ErrorRsp"}}},"summary":"创建攻击任务","tags":["AttackTask"],"x-api-type":"open-api","x-is-registered":"Y","x-request-examples-1":{"attack_targets":[{"application_code":"COC-CDR-1","application_id":"649abf9a4a0ae94187315824","application_name":"COC-CDR","cluster_name":"coc-gamma","cmdb_resource_id":"64c7f03a03f52e2984bcb341","domain_id":"dc2d76541f754d68a4c8d150262d92c2","ep_id":"b022c6d1-4af5-46dd-8e23-f0b2574c0d11","group_id":"649abf9abf087b78f7d5f9dd","group_name":"COC-CDR-1","name":"coc-gamma","namespace":"namespcace","pod_name":"pod_name123","pod_status":"Running","pod_uid":"pod_uid123","project_id":"10a6c23c2a1044779794798beb067c94","provider":"cce","region_id":"cn-north-7","resource_id":"5c9ca522-f06d-11ed-af18-0255ac100b0e","type":"pods","workload":"workload","workload_type":"StatefulSet"}],"name":"阮帅牛刀小试0809-1","target_category":"cluster","type":"chaos","weapon":{"duration":"60","param":"{\"duration\":\"60\"}","probe":"CFE","type":"LITTLE_TRY"}},"x-request-examples-text-1":{"attack_targets":[{"application_code":"COC-CDR-1","application_id":"649abf9a4a0ae94187315824","application_name":"COC-CDR","cluster_name":"coc-gamma","cmdb_resource_id":"64c7f03a03f52e2984bcb341","domain_id":"dc2d76541f754d68a4c8d150262d92c2","ep_id":"b022c6d1-4af5-46dd-8e23-f0b2574c0d11","group_id":"649abf9abf087b78f7d5f9dd","group_name":"COC-CDR-1","name":"coc-gamma","namespace":"namespcace","pod_name":"pod_name123","pod_status":"Running","pod_uid":"pod_uid123","project_id":"10a6c23c2a1044779794798beb067c94","provider":"cce","region_id":"cn-north-7","resource_id":"5c9ca522-f06d-11ed-af18-0255ac100b0e","type":"pods","workload":"workload","workload_type":"StatefulSet"}],"name":"阮帅牛刀小试0809-1","target_category":"cluster","type":"chaos","weapon":{"duration":"60","param":"{\"duration\":\"60\"}","probe":"CFE","type":"LITTLE_TRY"}},"x-request-examples-url-1":"/v1/attack-tasks","x-support-sdk":"N"}}},"product_short":"COC","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建攻击任务","tags":"AttackTask","uri":null,"version":"2.0"}