{"base_path":"/","components":null,"consumes":"","definitions":{"ErrorResp":{"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"]},"SwitchStatusResp":{"properties":{"retention_days":{"description":"SQL数据保存天数。","format":"int64","type":"integer"},"status":{"description":"开关状态。取值: Enabled:已开启, Disabled:已关闭, Switching:开关切换中","type":"string"}},"required":["status","retention_days"]}},"description":null,"group_id":"7f831fc0dd494cfe86eff0b79e4f207d","host":"das.cn-north-4.myhuaweicloud.com","id":"b0b4e8d46555489cadd4b1ff1380d9a5","info_version":"v3","method":"get","name":"ShowSqlSwitchStatus","parameters":{},"paths":{"/v3/{project_id}/instances/{instance_id}/sql/switch":{"get":{"description":"查询DAS收集全量SQL和慢SQL的开关状态。该功能仅支持付费实例。","operationId":"ShowSqlSwitchStatus","parameters":[{"description":"项目ID。","in":"path","name":"project_id","required":true,"type":"string"},{"description":"实例ID。","in":"path","name":"instance_id","required":true,"type":"string"},{"description":"开关类型。取值DAS SQL Explorer和DAS Slow Query Log,分别表示DAS收集全量SQL开关和DAS收集慢SQL开关。","in":"query","name":"type","required":true,"type":"string"},{"description":"数据库类型。当前全量SQL支持的数据库类型包括MySQL和GaussDB(for MySQL),慢SQL支持的类型:MySQL、GaussDB(for MySQL)、PostgreSQL。","in":"query","name":"datastore_type","required":true,"type":"string"},{"description":"用户Token。","in":"header","name":"X-Auth-Token","required":true,"type":"string"},{"description":"请求语言类型。","enum":["en-us","zh-cn"],"in":"header","name":"X-Language","required":false,"type":"string"}],"responses":{"200":{"description":"Success.","examples":{"application/json":{"retention_days":7,"status":"Enabled"}},"schema":{"$ref":"#/definitions/SwitchStatusResp"}},"400":{"description":"Client error.","schema":{"$ref":"#/definitions/ErrorResp"}},"500":{"description":"Server error.","schema":{"$ref":"#/definitions/ErrorResp"}}},"summary":"查询全量SQL和慢SQL的开关状态。","tags":["云DBA"],"x-das-is-publish":"#ShowSqlSwitchStatus_Placeholder#","x-is-registered":"Y","x-order":14,"x-request-examples-url-1":"GET https://das.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/da304cd5bbb944de828759bc7be3d3fein01/sql/switch?type=DAS Slow Query Log&datastore_type=MySQL","x-support-sdk":"Y"}}},"product_short":"DAS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"查询全量SQL和慢SQL的开关状态。","tags":"云DBA","uri":null,"version":"2.0"}