'1.0',
'info' => [
'style' => 'RPC',
'product' => 'DAS',
'version' => '2020-01-16',
],
'directories' => [
[
'id' => 400976,
'title' => '实例接入',
'type' => 'directory',
'children' => [
'AddHDMInstance',
],
],
[
'id' => 400978,
'title' => '巡检评分',
'type' => 'directory',
'children' => [
'GetInstanceInspections',
],
],
[
'id' => 400980,
'title' => '事件通知',
'type' => 'directory',
'children' => [
'SetEventSubscription',
'GetEventSubscription',
'GetAutonomousNotifyEventContent',
'GetAutonomousNotifyEventsInRange',
],
],
[
'id' => 400985,
'title' => '诊断报告',
'type' => 'directory',
'children' => [
'CreateDiagnosticReport',
'DescribeDiagnosticReportList',
'GetDBInstanceConnectivityDiagnosis',
],
],
[
'id' => 400989,
'title' => '缓存分析',
'type' => 'directory',
'children' => [
'CreateCacheAnalysisJob',
'DescribeCacheAnalysisJob',
'DescribeCacheAnalysisJobs',
],
],
[
'id' => 400993,
'title' => 'SQL限流',
'type' => 'directory',
'children' => [
'EnableSqlConcurrencyControl',
'DisableSqlConcurrencyControl',
'DisableAllSqlConcurrencyControlRules',
'GetRunningSqlConcurrencyControlRules',
'GetSqlConcurrencyControlRulesHistory',
'GetSqlConcurrencyControlKeywordsFromSqlText',
],
],
[
'id' => 401000,
'title' => 'SQL诊断',
'type' => 'directory',
'children' => [
'CreateRequestDiagnosis',
'GetRequestDiagnosisResult',
'GetRequestDiagnosisPage',
'DescribeQueryExplain',
],
],
[
'id' => 401005,
'title' => 'Key分析',
'type' => 'directory',
'children' => [
'DescribeHotBigKeys',
'DescribeTopHotKeys',
'DescribeTopBigKeys',
'DescribeHotKeys',
],
],
[
'id' => 401010,
'title' => '查询治理',
'type' => 'directory',
'children' => [
'CreateQueryOptimizeTag',
'GetQueryOptimizeExecErrorStats',
'GetQueryOptimizeExecErrorSample',
'GetQueryOptimizeSolution',
'GetQueryOptimizeRuleList',
'GetQueryOptimizeDataTrend',
'GetQueryOptimizeDataTop',
'GetQueryOptimizeDataStats',
'GetQueryOptimizeTag',
'GetQueryOptimizeShareUrl',
],
],
[
'id' => 401021,
'title' => 'SQL洞察',
'type' => 'directory',
'children' => [
'GetErrorRequestSample',
'GetAsyncErrorRequestStatResult',
'GetAsyncErrorRequestListByCode',
'GetAsyncErrorRequestStatByCode',
'GetFullRequestOriginStatByInstanceId',
'GetFullRequestStatResultByInstanceId',
'GetFullRequestSampleByInstanceId',
],
],
[
'id' => 401029,
'title' => '企业版管理',
'type' => 'directory',
'children' => [
'DescribeSqlLogConfig',
'ModifySqlLogConfig',
'DescribeSqlLogStatistic',
'GetDasSQLLogHotData',
'CreateSqlLogTask',
'DescribeSqlLogTask',
'DescribeSqlLogTasks',
],
],
[
'id' => 401037,
'title' => '实例会话',
'type' => 'directory',
'children' => [
'GetRedisAllSession',
'GetMongoDBCurrentOp',
'KillInstanceAllSession',
'CreateKillInstanceSessionTask',
'GetKillInstanceSessionTaskResult',
'GetMySQLAllSessionAsync',
],
],
[
'id' => 401044,
'title' => '空间分析',
'type' => 'directory',
'children' => [
'CreateStorageAnalysisTask',
'GetStorageAnalysisResult',
'GetAutoIncrementUsageStatistic',
],
],
[
'id' => 401048,
'title' => '锁优化',
'type' => 'directory',
'children' => [
'GetDeadLockDetailList',
'GetBlockingDetailList',
'CreateLatestDeadLockAnalysis',
'GetDeadLockHistory',
'GetDeadLockDetail',
'GetDeadlockHistogram',
],
],
[
'id' => 401055,
'title' => '索引诊断',
'type' => 'directory',
'children' => [
'GetInstanceMissingIndexList',
],
],
[
'id' => 401057,
'title' => '慢日志',
'type' => 'directory',
'children' => [
'DescribeSlowLogHistogramAsync',
'DescribeSlowLogStatistic',
'DescribeSlowLogRecords',
],
],
[
'id' => 401061,
'title' => '自动SQL限流',
'type' => 'directory',
'children' => [
'UpdateAutoThrottleRulesAsync',
'DisableAutoThrottleRules',
'GetAutoThrottleRules',
],
],
[
'id' => 401065,
'title' => '自动SQL优化',
'type' => 'directory',
'children' => [
'UpdateAutoSqlOptimizeStatus',
'GetSqlOptimizeAdvice',
'GetInstanceSqlOptimizeStatistic',
],
],
[
'id' => 401069,
'title' => '自动空间优化',
'type' => 'directory',
'children' => [
'UpdateAutoResourceOptimizeRulesAsync',
'DisableAutoResourceOptimizeRules',
'GetAutoResourceOptimizeRules',
],
],
[
'id' => 401073,
'title' => '自动弹性伸缩',
'type' => 'directory',
'children' => [
'ModifyAutoScalingConfig',
'DescribeAutoScalingConfig',
'DescribeAutoScalingHistory',
'DisableInstanceDasConfig',
],
],
[
'id' => 401078,
'title' => '分区热力图',
'type' => 'directory',
'children' => [
'GetPartitionsHeatmap',
],
],
[
'id' => 401080,
'title' => '性能洞察(新版)',
'type' => 'directory',
'children' => [
'GetPfsSqlSample',
'GetPfsMetricTrends',
'GetPfsSqlSummaries',
],
],
[
'id' => 401084,
'title' => '错误日志',
'type' => 'directory',
'children' => [
'DescribeErrorLogRecords',
],
],
[
'id' => 401086,
'title' => 'DAS Agent',
'type' => 'directory',
'children' => [
'GetDasAgentSSE',
'GetInstanceGroupInspectReportList',
'GetInstanceGroupInspectReportDetail',
],
],
[
'id' => 401090,
'title' => '跨产品白名单',
'type' => 'directory',
'children' => [
'CreateSecurityIPGroup',
'DescribeSecurityIPGroup',
'DescribeSecurityIPGroupRelation',
'ModifySecurityIPGroup',
'ModifySecurityIPGroupRelation',
'DeleteSecurityIPGroup',
],
],
[
'id' => 401097,
'title' => '其他',
'type' => 'directory',
'children' => [
'GetHDMAliyunResourceSyncResult',
'GetEndpointSwitchTask',
'GetHDMLastAliyunResourceSyncResult',
'DescribeSqlLogRecords',
'EnableDasPro',
'DisableDasPro',
'DescribeInstanceDasPro',
'GetDasProServiceUsage',
'RunCloudBenchTask',
'DescribeCloudbenchTask',
'DescribeCloudBenchTasks',
'CreateCloudBenchTasks',
'DescribeCloudbenchTaskConfig',
'DeleteCloudBenchTask',
'DeleteStopGateway',
],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'AddHDMInstance' => [
'summary' => '调用AddHDMInstance接口,将数据库实例接入DAS。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => '__context',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceArea',
'in' => 'query',
'schema' => [
'description' => '实例所属的数据库产品,取值:'."\n"
."\n"
.'- **RDS**:云实例。'."\n"
.'- **ECS**:ECS自建实例。'."\n"
.'- **IDC**:非公有云自建实例。'."\n"
."\n"
.'> IDC为用户数据中心。',
'type' => 'string',
'required' => true,
'example' => 'ECS',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'Ip',
'in' => 'query',
'schema' => [
'description' => '待接入实例的内网连接地址。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****.mysql.rds.aliyuncs.com',
],
],
[
'name' => 'Port',
'in' => 'query',
'schema' => [
'description' => '实例的内网连接端口。',
'type' => 'string',
'required' => false,
'example' => '3306',
],
],
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PostgreSQL**'."\n"
.'- **SQLServer**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PolarDBPostgreSQL**'."\n"
.'- **Redis**'."\n"
.'- **MongoDB**'."\n"
.'- **PolarDBOracle**'."\n"
.'- **PolarDBX**',
'type' => 'string',
'required' => false,
'example' => 'MySQL',
],
],
[
'name' => 'Username',
'in' => 'query',
'schema' => [
'description' => '用户名。',
'type' => 'string',
'required' => false,
'example' => 'test****',
],
],
[
'name' => 'Password',
'in' => 'query',
'schema' => [
'description' => '用户名的密码。',
'type' => 'string',
'required' => false,
'example' => '122****',
],
],
[
'name' => 'InstanceAlias',
'in' => 'query',
'schema' => [
'description' => '实例名称。',
'type' => 'string',
'required' => false,
'example' => 'yuecq--test****',
],
],
[
'name' => 'NetworkType',
'in' => 'query',
'schema' => [
'description' => '实例的网络类型。',
'type' => 'string',
'required' => false,
'example' => 'VPC',
],
],
[
'name' => 'VpcId',
'in' => 'query',
'schema' => [
'description' => 'VPC ID。',
'type' => 'string',
'required' => false,
'example' => 'vpc-m5e666n89m2bx8jar****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属的地域。',
'type' => 'string',
'required' => false,
'example' => 'cn-hangzhou',
],
],
[
'name' => 'FlushAccount',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Synchro' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'object',
'properties' => [
'VpcId' => [
'description' => 'VPC ID。',
'type' => 'string',
'example' => 'vpc-m5e666n89m2bx8jar****',
],
'Token' => [
'description' => '客户端token(即自定义的唯一随机字符串)。',
'type' => 'string',
'example' => 'tokenID',
],
'Ip' => [
'description' => '实例的IP连接地址。',
'type' => 'string',
'example' => 'rm-de21209****.mysql.rds.aliyuncs.com',
],
'CallerUid' => [
'description' => '调用者用户ID。',
'type' => 'string',
'example' => '31063db679****',
],
'InstanceId' => [
'description' => '实例的ID。',
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'Port' => [
'description' => '目标实例的端口。',
'type' => 'integer',
'format' => 'int32',
'example' => '3306',
],
'OwnerId' => [
'description' => '所有者ID。',
'type' => 'string',
'example' => '325352345',
],
'Uuid' => [
'description' => '实例的唯一标识符号。',
'type' => 'string',
'example' => 'hdm_3063db6792965c080a4bcb6e6304****',
],
'Error' => [
'description' => '错误消息。',
'type' => 'string',
'example' => 'InvalidRequestURL',
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int32',
'example' => '200',
],
'Role' => [
'description' => '角色信息。',
'type' => 'string',
'example' => 'master',
],
'TenantId' => [
'description' => '所属的租户ID。',
'type' => 'string',
'example' => 'L0EPfLS****=SCE00000*****',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Synchro\\": \\"None\\",\\n \\"Data\\": {\\n \\"VpcId\\": \\"vpc-m5e666n89m2bx8jar****\\",\\n \\"Token\\": \\"tokenID\\",\\n \\"Ip\\": \\"rm-de21209****.mysql.rds.aliyuncs.com\\",\\n \\"CallerUid\\": \\"31063db679****\\",\\n \\"InstanceId\\": \\"rm-2ze1jdv45i7l6****\\",\\n \\"Port\\": 3306,\\n \\"OwnerId\\": \\"325352345\\",\\n \\"Uuid\\": \\"hdm_3063db6792965c080a4bcb6e6304****\\",\\n \\"Error\\": \\"InvalidRequestURL\\",\\n \\"Code\\": 200,\\n \\"Role\\": \\"master\\",\\n \\"TenantId\\": \\"L0EPfLS****=SCE00000*****\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n None\\n \\n vpc-m5e666n89m2bx8jar****\\n tokenID\\n rm-de21209****.mysql.rds.aliyuncs.com\\n 31063db679****\\n rm-2ze1jdv45i7l6****\\n 3306\\n 325352345\\n hdm_3063db6792965c080a4bcb6e6304****\\n InvalidRequestURL\\n 200\\n master\\n L0EPfLS****=SCE00000*****\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '接入数据库实例',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetInstanceInspections' => [
'summary' => '调用GetInstanceInspections接口,获取数据库实例巡检评分的结果。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'abilityTreeCode' => '24190',
'abilityTreeNodes' => [
'FEATUREhdmB8MM4L',
],
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **Redis**'."\n"
.'- **PolarDB MySQL**',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'MySQL',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1655416825000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'>任务结束时间需晚于任务开始时间。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1655427625000',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,默认值为10。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '10',
],
],
[
'name' => 'InstanceArea',
'in' => 'query',
'schema' => [
'description' => '实例所属的数据库产品,取值:'."\n"
."\n"
.'* **RDS**:云实例。'."\n"
.'* **ECS**:ECS自建实例。'."\n"
.'* **IDC**:非公有云自建实例。'."\n"
."\n"
.'> IDC为用户数据中心。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'RDS',
],
],
[
'name' => 'SearchMap',
'in' => 'query',
'schema' => [
'description' => '过滤条件,可以按照如下条件进行过滤:'."\n"
."\n"
.'- 以单个实例ID为过滤条件时,输入格式为:{"InstanceId":"实例ID"}。'."\n"
.'- 以多个实例ID为过滤条件时,输入格式为:{"InstanceIds":\\["实例ID1","实例ID2"\\]},其中实例ID间以英文逗号(,)分隔。'."\n"
.'- 以实例所在地域为过滤条件时,输入格式为:{"region":"实例所在地域"}。',
'type' => 'string',
'required' => false,
'example' => '{"InstanceId":"rm-bp10usoc1erj7****"}',
],
],
[
'name' => 'ResourceGroupId',
'in' => 'query',
'schema' => [
'description' => '资源组ID。',
'type' => 'string',
'required' => false,
'example' => 'rg-aek2eil6npi****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => '详细信息。',
'type' => 'object',
'properties' => [
'List' => [
'description' => '详细信息列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'EndTime' => [
'description' => '任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'>任务结束时间需晚于任务开始时间。',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296001',
],
'StartTime' => [
'description' => '任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'Data' => [
'description' => '返回的数据。',
'type' => 'object',
'example' => '"data": { "hasDeadLock": false, "exceptionTableMap": {}, "bigTransactionCount": 0, "cpu": 4, "isRds": true, "rdsEnable": true, "enable": false, "activeSessions": [], "bigTransactionList": [], "bigSessionList": [ { "blockDuration": 0, "active": false, "Time": 0, "db": "" },',
],
'Instance' => [
'description' => '实例信息。',
'type' => 'object',
'properties' => [
'VpcId' => [
'description' => '实例的VPC ID。',
'type' => 'string',
'example' => 'vpc-bp1knt7m55z9exoo7****',
],
'Uuid' => [
'description' => '实例的唯一标识符号。',
'type' => 'string',
'example' => 'hdm_3063db6792965c080a4bcb6e6304****',
],
'InstanceArea' => [
'description' => '实例所属的数据库产品,取值:'."\n"
."\n"
.'- **RDS**:云实例。'."\n"
.'- **ECS**:ECS自建实例。'."\n"
.'- **IDC**:非公有云自建实例。'."\n"
.'> IDC为用户数据中心。',
'type' => 'string',
'example' => 'RDS',
],
'InstanceClass' => [
'description' => '实例的规格。',
'type' => 'string',
'example' => 'rds.mysql.s2.xlarge',
],
'Region' => [
'description' => '实例所属的地域ID。',
'type' => 'string',
'example' => 'cn-hangzhou',
],
'AccountId' => [
'description' => '账号ID,您可在阿里云**账号管理**的**安全设置**页面获取登录账号的ID。',
'type' => 'string',
'example' => '108398049688****',
],
'NetworkType' => [
'description' => '实例的网络类型。',
'type' => 'string',
'example' => 'VPC',
],
'Engine' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **Redis**'."\n"
.'- **PolarDBMySQL**',
'type' => 'string',
'example' => 'MySQL',
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-bp10usoc1erj7****',
],
'NodeId' => [
'description' => '实例的节点ID。',
'type' => 'string',
'example' => 'rm-bp10usoc1erj7****',
],
'EngineVersion' => [
'description' => '数据库引擎的版本号。',
'type' => 'string',
'example' => '8.0',
],
'InstanceAlias' => [
'description' => '实例名称',
'type' => 'string',
'example' => 'test-01',
],
'Cpu' => [
'description' => 'CPU规格,例如返回8时代表CPU规格为8核。',
'type' => 'string',
'example' => '8',
],
'Memory' => [
'description' => '数据库内存,单位为MB。',
'type' => 'integer',
'format' => 'int32',
'example' => '32768',
],
'Storage' => [
'description' => '存储空间,单位为GB。',
'type' => 'integer',
'format' => 'int32',
'example' => '150',
],
'Category' => [
'description' => '实例的访问模式,取值:'."\n"
.'- **standard**:标准访问模式。'."\n"
.'- **safe**:数据库代理模式。',
'type' => 'string',
'example' => 'standard',
],
],
],
'ScoreMap' => [
'description' => '扣分详情。',
'type' => 'object',
],
'GmtCreate' => [
'description' => '任务的创建时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1603247192000',
],
'Score' => [
'description' => '巡检得分。',
'type' => 'integer',
'format' => 'int32',
'example' => '100',
],
'AutoFunction' => [
'description' => '自治功能开启情况。',
'type' => 'object',
'properties' => [
'EventSubscription' => [
'description' => '事件订阅:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'AutoIndex' => [
'description' => '自动索引创建和删除:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'AutoLimitedSql' => [
'description' => '自动限流:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'AutoResourceOptimize' => [
'description' => '空间碎片自动回收:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'AutoScale' => [
'description' => '自动弹性伸缩:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
],
],
'EnableDasPro' => [
'description' => 'DAS企业版:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。'."\n"
.'- **2**:不支持。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'State' => [
'description' => '巡检任务状态:'."\n"
."\n"
.'- **0**:等待执行。'."\n"
.'- **1**:正在执行。'."\n"
.'- **2**:巡检完成。',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'TaskType' => [
'description' => '巡检任务发起类型:'."\n"
."\n"
.'- **0**:自动。'."\n"
.'- **1**:手动。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
],
],
],
'PageNo' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => '每页最大记录数,默认值为10。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Total' => [
'description' => '总记录数。',
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"List\\": [\\n {\\n \\"EndTime\\": 1608888296001,\\n \\"StartTime\\": 1608888296000,\\n \\"Data\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n },\\n \\"Instance\\": {\\n \\"VpcId\\": \\"vpc-bp1knt7m55z9exoo7****\\",\\n \\"Uuid\\": \\"hdm_3063db6792965c080a4bcb6e6304****\\",\\n \\"InstanceArea\\": \\"RDS\\",\\n \\"InstanceClass\\": \\"rds.mysql.s2.xlarge\\",\\n \\"Region\\": \\"cn-hangzhou\\",\\n \\"AccountId\\": \\"108398049688****\\",\\n \\"NetworkType\\": \\"VPC\\",\\n \\"Engine\\": \\"MySQL\\",\\n \\"InstanceId\\": \\"rm-bp10usoc1erj7****\\",\\n \\"NodeId\\": \\"rm-bp10usoc1erj7****\\",\\n \\"EngineVersion\\": \\"8.0\\",\\n \\"InstanceAlias\\": \\"test-01\\",\\n \\"Cpu\\": \\"8\\",\\n \\"Memory\\": 32768,\\n \\"Storage\\": 150,\\n \\"Category\\": \\"standard\\"\\n },\\n \\"ScoreMap\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n },\\n \\"GmtCreate\\": 1603247192000,\\n \\"Score\\": 100,\\n \\"AutoFunction\\": {\\n \\"EventSubscription\\": 0,\\n \\"AutoIndex\\": 2,\\n \\"AutoLimitedSql\\": 2,\\n \\"AutoResourceOptimize\\": 0,\\n \\"AutoScale\\": 0\\n },\\n \\"EnableDasPro\\": 0,\\n \\"State\\": 2,\\n \\"TaskType\\": 0\\n }\\n ],\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 10,\\n \\"Total\\": 4\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n \\n 1608888296001\\n 1608888296000\\n \\n vpc-bp1knt7m55z9exoo7****\\n hdm_3063db6792965c080a4bcb6e6304****\\n RDS\\n rds.mysql.s2.xlarge\\n cn-hangzhou\\n 108398049688****\\n VPC\\n MySQL\\n rm-bp10usoc1erj7****\\n rm-bp10usoc1erj7****\\n 8.0\\n test-01\\n 8\\n 32768\\n 150\\n standard\\n \\n 1603247192000\\n 100\\n \\n 0\\n 2\\n 2\\n 0\\n 0\\n \\n 0\\n 2\\n 0\\n
\\n 1\\n 10\\n 4\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '获取数据库实例巡检评分结果',
'description' => 'DAS支持巡检评分功能,可以对目标实例进行定期巡检并给出健康评分,帮助您清楚地了解数据库运行情况,更多信息,请参见[巡检评分](~~205659~~)。'."\n"
."\n"
.'使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 本接口只适用于RDS MySQL、ECS上的MySQL自建库、IDC MySQL自建库、云数据库 Tair(兼容 Redis)、PolarDB MySQL版。'."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.3或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'SetEventSubscription' => [
'summary' => '调用SetEventSubscription接口,配置数据库实例的事件订阅设置。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmETIPZF',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'title' => '实例ID',
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'EventContext',
'in' => 'query',
'schema' => [
'title' => '事件场景',
'description' => '支持的事件场景,当前仅支持**AllContext**,表示支持所有场景。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'AllContext',
],
],
[
'name' => 'Lang',
'in' => 'query',
'schema' => [
'title' => '语言',
'description' => '事件通知的语言,当前仅支持**zh-CN**,表示事件通知为中文。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'zh-CN',
],
],
[
'name' => 'MinInterval',
'in' => 'query',
'schema' => [
'title' => '通知最小间隔',
'description' => '通知最小间隔时间,单位为秒(s)。',
'type' => 'string',
'required' => false,
'example' => '60',
],
],
[
'name' => 'ContactName',
'in' => 'query',
'schema' => [
'title' => '告警订阅人',
'description' => '告警事件订阅人名称,多个名称间以英文逗号分隔。',
'type' => 'string',
'required' => false,
'example' => '默认联系人',
],
],
[
'name' => 'ChannelType',
'in' => 'query',
'schema' => [
'title' => '通知方式',
'description' => '通知方式。'."\n"
.'- **hdm\\_alarm\\_sms**:手机短信。'."\n"
.'- **dingtalk**:钉钉机器人。'."\n"
.'- **hdm\\_alarm\\_sms\\_and\\_email**:手机短信+邮件。'."\n"
.'- **hdm\\_alarm\\_sms,dingtalk**:手机短信+钉钉机器人。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'hdm_alarm_sms,dingtalk',
],
],
[
'name' => 'ContactGroupName',
'in' => 'query',
'schema' => [
'title' => '告警订阅组',
'description' => '告警事件订阅组名称,多个名称以英文逗号分隔。',
'type' => 'string',
'required' => false,
'example' => '默认联系组',
],
],
[
'name' => 'Level',
'in' => 'query',
'schema' => [
'title' => '事件风险级别',
'description' => '需要进行通知的事件级别,取值:'."\n"
.'- **Notice**:通知(包含**Notice**、**Optimization**、**Warn**和**Critical**级别的事件)。'."\n"
.'- **Optimization**:优化(包含**Optimization**、**Warn**和**Critical**级别的事件)。'."\n"
.'- **Warn**:警告(包含**Warn**和**Critical**级别的事件)。'."\n"
.'- **Critical**:严重(仅包含**Critical**级别的事件)。'."\n"
."\n"
.'各个级别事件的含义如下:'."\n"
."\n"
.'- 通知:暂无建议的数据库异常事件。'."\n"
.'- 优化:根据数据库运行情况给出优化建议的事件。'."\n"
.'- 警告:需要关注的可能会影响数据库的事件。'."\n"
.'- 严重:影响数据库运行的事件。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'Optimization',
],
],
[
'name' => 'Active',
'in' => 'query',
'schema' => [
'title' => '是否启用',
'description' => '是否启用事件订阅功能:'."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => '1',
],
],
[
'name' => 'Severity',
'in' => 'query',
'schema' => [
'description' => '按照事件类型设置事件的告警级别。'."\n"
."\n"
.'输入格式:`{"事件类型1":"告警级别", "事件类型2":"告警级别"}`。'."\n"
."\n"
.'事件类型:'."\n"
."\n"
.'- **AutoScale**:弹性伸缩事件。'."\n"
.'- **SQLThrottle**:限流事件。'."\n"
.'- **TimeSeriesAbnormal**:时序异常检测事件。'."\n"
.'- **SQLOptimize**:SQL优化事件。'."\n"
.'- **ResourceOptimize**:空间优化事件。'."\n"
."\n"
.'告警级别:'."\n"
.'- **info**:一般。'."\n"
.'- **noticed**:通知。'."\n"
.'- **warning**:警告。'."\n"
.'- **critical**:严重。',
'type' => 'string',
'required' => false,
'example' => '{"AutoScale":"critical","SQLThrottle":"info","TimeSeriesAbnormal":"warning"}',
],
],
[
'name' => 'DispatchRule',
'in' => 'query',
'schema' => [
'description' => '按照事件类型设置事件的消息通知规则,此参数为空时,以**MinInterval**和**ChannelType**设置为准。'."\n"
."\n"
.'输入格式:`{"silenced": {"事件类型1":是否打开自适应静默, "事件类型2":是否打开自适应静默},"min_interval":{"事件类型1":通知最小间隔, "事件类型2":通知最小间隔},"alert_type": {"事件类型1":"通知方式", "事件类型2":"通知方式"}}`。'."\n"
."\n"
.'- **silenced**:是否打开自适应静默。打开自适应静默后,事件中连续告警的发送间隔变为**min\\_interval**设置值和该事件持续时间1/3中的最大值。'."\n"
.' - 1:打开。'."\n"
.' - 2:关闭。'."\n"
.'- **min\\_interval**:通知最小间隔时间,单位为秒(s)。'."\n"
.'- **alert_type**:通知方式,取值:'."\n"
.' - **hdm\\_alarm\\_sms**:手机短信。'."\n"
.' - **dingtalk**:钉钉机器人。'."\n"
.' - **hdm\\_alarm\\_sms\\_and\\_email**:手机短信+邮件。'."\n"
.' - **hdm\\_alarm\\_sms,dingtalk**:手机短信+钉钉机器人。',
'type' => 'string',
'required' => false,
'example' => '{"silenced": {"AutoScale":1, "SQLThrottle":0, "TimeSeriesAbnormal": 1}, "min_interval": {"AutoScale":300, "SQLThrottle":360, "TimeSeriesAbnormal": 120}, "alert_type": {"AutoScale":"hdm_alarm_sms", "SQLThrottle":"hdm_alarm_sms_and_email", "TimeSeriesAbnormal": "hdm_alarm_sms,dingtalk"}}',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'description' => '返回信息列表。',
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '097F0C56-B252-515A-B602-FC56EF93EF8A',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'userId' => [
'title' => '用户ID ',
'description' => '用户ID。',
'type' => 'string',
'example' => '1088760496****',
],
'instanceId' => [
'title' => '实例ID',
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'eventContext' => [
'title' => '事件场景',
'description' => '支持的事件场景,当前仅支持**AllContext**,表示支持所有场景。',
'type' => 'string',
'example' => 'AllContext',
],
'lang' => [
'title' => '语言',
'description' => '事件通知的语言,当前仅支持**zh-CN**,表示事件通知为中文。',
'type' => 'string',
'example' => 'zh_CN',
],
'active' => [
'title' => '是否启用',
'description' => '是否启用事件订阅:'."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。',
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'minInterval' => [
'title' => '通知最小间隔',
'description' => '通知最小间隔时间,单位秒(s)。',
'type' => 'integer',
'format' => 'int32',
'example' => '60',
],
'contactName' => [
'title' => '告警订阅人',
'description' => '告警事件订阅人名称,多个名称间以英文逗号分隔。',
'type' => 'string',
'example' => '默认联系人',
],
'contactGroupName' => [
'title' => '告警订阅组',
'description' => '告警事件订阅组名称,多个名称间以英文逗号分隔。',
'type' => 'string',
'example' => '默认联系组',
],
'channelType' => [
'title' => '通知方式',
'description' => '通知方式:'."\n"
.'- **hdm\\_alarm\\_sms**:手机短信。'."\n"
.'- **dingtalk**:钉钉机器人。'."\n"
.'- **hdm\\_alarm\\_sms\\_and\\_email**:手机短信+邮件。'."\n"
.'- **hdm\\_alarm\\_sms,dingtalk**:手机短信+钉钉机器人。',
'type' => 'string',
'example' => 'hdm_alarm_sms,dingtalk',
],
'level' => [
'title' => '事件风险级别',
'description' => '事件风险级别:'."\n"
.'- **Notice**:通知。'."\n"
.'- **Optimization**:优化。'."\n"
.'- **Warn**:警告。'."\n"
.'- **Critical**:严重。'."\n",
'type' => 'string',
'example' => 'Optimization',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"097F0C56-B252-515A-B602-FC56EF93EF8A\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"userId\\": \\"1088760496****\\",\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"eventContext\\": \\"AllContext\\",\\n \\"lang\\": \\"zh_CN\\",\\n \\"active\\": 1,\\n \\"minInterval\\": 60,\\n \\"contactName\\": \\"默认联系人\\",\\n \\"contactGroupName\\": \\"默认联系组\\",\\n \\"channelType\\": \\"hdm_alarm_sms,dingtalk\\",\\n \\"level\\": \\"Optimization\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 097F0C56-B252-515A-B602-FC56EF93EF8A\\n Successful\\n \\n 1088760496****\\n rm-2ze8g2am97624****\\n AllContext\\n zh_CN\\n 1\\n 60\\n 默认联系人\\n 默认联系组\\n hdm_alarm_sms,dingtalk\\n Optimization\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '配置事件订阅设置',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 数据库实例已接入DAS。'."\n"
."\n"
.' 事件订阅已集成至告警功能。如果在控制台配置了事件告警,通过该API接口配置的事件订阅设置将被事件告警覆盖。配置事件告警请参见[配置告警](~~87017~~)。',
],
'GetEventSubscription' => [
'summary' => '调用GetEventSubscription接口,获取数据库实例的事件订阅设置。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'title' => '实例ID。',
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****'."\n",
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'userId' => [
'title' => '用户ID。',
'description' => '用户ID。',
'type' => 'string',
'example' => '1088760496****',
],
'instanceId' => [
'title' => '实例ID。',
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'eventContext' => [
'title' => '事件场景。',
'description' => '支持的事件场景,当前仅支持**AllContext**,表示支持所有场景。',
'type' => 'string',
'example' => 'AllContext',
],
'lang' => [
'title' => '语言',
'description' => '事件通知的语言,当前仅支持**zh-CN**,表示事件通知为中文。',
'type' => 'string',
'example' => 'zh_CN',
],
'active' => [
'title' => '是否开启。',
'description' => '是否启用事件订阅:'."\n"
."\n"
.'- **0**:关闭。'."\n"
.'- **1**:开启。',
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'minInterval' => [
'title' => '通知最小间隔。',
'description' => '通知最小间隔时间,单位秒(s)。',
'type' => 'string',
'example' => '60',
],
'contactName' => [
'title' => '告警订阅人。',
'description' => '告警事件订阅人名称,多个名称间以英文逗号分隔。',
'type' => 'string',
'example' => '默认联系人',
],
'contactGroupName' => [
'title' => '告警订阅组',
'description' => '告警事件订阅组名称,多个名称间以英文逗号分隔。',
'type' => 'string',
'example' => '默认联系组',
],
'channelType' => [
'title' => '通知方式。',
'description' => '通知方式:'."\n"
."\n"
.'- **hdm\\_alarm\\_sms**:手机短信。'."\n"
.'- **dingtalk**:钉钉机器人。'."\n"
.'- **hdm\\_alarm\\_sms\\_and\\_email**:手机短信+邮件。'."\n"
.'- **hdm\\_alarm\\_sms,dingtalk**:手机短信+钉钉机器人。',
'type' => 'string',
'example' => 'hdm_alarm_sms,dingtalk',
],
'level' => [
'title' => '事件风险级别。',
'description' => '事件风险级别,即触发哪种级别的事件后需要通知您:'."\n"
."\n"
.'- **Notice**:通知。'."\n"
.'- **Optimization**:优化。'."\n"
.'- **Warn**:警告。'."\n"
.'- **Critical**:严重。',
'type' => 'string',
'example' => 'Optimization',
],
'contacts' => [
'title' => '告警联系人信息。',
'description' => '告警联系人列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'name' => [
'title' => '告警联系人名称。',
'description' => '告警联系人名称。',
'type' => 'string',
'example' => '张先生',
],
'phone' => [
'title' => '告警联系人电话',
'description' => '告警联系人电话。',
'type' => 'string',
'example' => '1390000****',
],
'email' => [
'title' => '告警联系人邮箱。',
'description' => '告警联系人邮箱。',
'type' => 'string',
'example' => 'a***@example.net',
],
'dingtalkHook' => [
'title' => '告警联系人钉钉机器人webhook。',
'description' => '钉钉机器人的Webhook地址。',
'type' => 'string',
'example' => 'https://oapi.dingtalk.com/robot/send?access_token=68fa29a9eaf3ba9994f54fxxxc1aa9879700308f90e9c23ebfb3663642c9****',
],
'groups' => [
'title' => '告警联系人所属联系组列表。',
'description' => '告警联系人所属的联系组列表。',
'type' => 'array',
'items' => [
'description' => '告警联系人名称。',
'type' => 'string',
'example' => '张先生',
],
],
'isCmsReduplicated' => [
'title' => '是否和云监控上的联系人重名。',
'description' => '是否和云监控上的联系人姓名相同。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'userId' => [
'title' => '用户ID。',
'description' => '用户ID。',
'type' => 'string',
'example' => '1088760496****',
],
],
],
],
'contactGroups' => [
'description' => '告警联系组列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'name' => [
'title' => '告警联系人组姓名。',
'description' => '告警联系组名称。',
'type' => 'string',
'example' => '张先生',
],
'description' => [
'title' => '告警联系人组描述。',
'description' => '告警联系组描述。',
'type' => 'string',
'example' => '默认联系人',
],
'contacts' => [
'title' => '告警联系人组内成员。',
'description' => '告警联系组成员列表。',
'type' => 'string',
'example' => '"[\\"张先生\\",\\"王女士\\",\\"李先生\\"]"',
],
'userId' => [
'title' => '用户ID。',
'description' => '用户ID。',
'type' => 'string',
'example' => '1088760496****',
],
],
],
],
'eventSendGroup' => [
'title' => '对应事件订阅的场景。',
'description' => '支持发送的事件场景列表。',
'type' => 'array',
'items' => [
'description' => '支持发送的事件场景,当前仅支持**AllContext**,表示支持所有场景。',
'type' => 'string',
'example' => 'AllContext',
],
],
'id' => [
'title' => '订阅关系序号。',
'description' => '数据库主键ID。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'gmtCreate' => [
'title' => '创建时间。',
'description' => '开启事件订阅的时间,格式为Unix时间戳,单位为毫秒(ms)。',
'type' => 'integer',
'format' => 'int64',
'example' => '1633071840000',
],
'gmtModified' => [
'title' => '最后修改时间。',
'description' => '最后修改事件订阅设置的时间,格式为Unix时间戳,单位为毫秒(ms)。',
'type' => 'integer',
'format' => 'int64',
'example' => '1633071850000',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"userId\\": \\"1088760496****\\",\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"eventContext\\": \\"AllContext\\",\\n \\"lang\\": \\"zh_CN\\",\\n \\"active\\": 1,\\n \\"minInterval\\": \\"60\\",\\n \\"contactName\\": \\"默认联系人\\",\\n \\"contactGroupName\\": \\"默认联系组\\",\\n \\"channelType\\": \\"hdm_alarm_sms,dingtalk\\",\\n \\"level\\": \\"Optimization\\",\\n \\"contacts\\": [\\n {\\n \\"name\\": \\"张先生\\",\\n \\"phone\\": \\"1390000****\\",\\n \\"email\\": \\"a***@example.net\\",\\n \\"dingtalkHook\\": \\"https://oapi.dingtalk.com/robot/send?access_token=68fa29a9eaf3ba9994f54fxxxc1aa9879700308f90e9c23ebfb3663642c9****\\",\\n \\"groups\\": [\\n \\"张先生\\"\\n ],\\n \\"isCmsReduplicated\\": true,\\n \\"userId\\": \\"1088760496****\\"\\n }\\n ],\\n \\"contactGroups\\": [\\n {\\n \\"name\\": \\"张先生\\",\\n \\"description\\": \\"默认联系人\\",\\n \\"contacts\\": \\"\\\\\\"[\\\\\\\\\\\\\\"张先生\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"王女士\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"李先生\\\\\\\\\\\\\\"]\\\\\\"\\",\\n \\"userId\\": \\"1088760496****\\"\\n }\\n ],\\n \\"eventSendGroup\\": [\\n \\"AllContext\\"\\n ],\\n \\"id\\": 1,\\n \\"gmtCreate\\": 1633071840000,\\n \\"gmtModified\\": 1633071850000\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n Successful\\n \\n 1088760496****\\n rm-2ze8g2am97624****\\n AllContext\\n zh_CN\\n 1\\n 60\\n 默认联系人\\n 默认联系组\\n hdm_alarm_sms,dingtalk\\n Optimization\\n \\n 张先生\\n 1390000****\\n a***@example.net\\n https://oapi.dingtalk.com/robot/send?access_token=68fa29a9eaf3ba9994f54fxxxc1aa9879700308f90e9c23ebfb3663642c9****\\n 张先生\\n true\\n 1088760496****\\n \\n \\n 张先生\\n 默认联系人\\n \\"[\\\\\\"张先生\\\\\\",\\\\\\"王女士\\\\\\",\\\\\\"李先生\\\\\\"]\\"\\n 1088760496****\\n \\n AllContext\\n 1\\n 1633071840000\\n 1633071850000\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '获取事件订阅设置',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 数据库实例已接入DAS。',
],
'GetAutonomousNotifyEventContent' => [
'summary' => '调用GetAutonomousNotifyEventContent接口,获取指定数据库实例自治事件的内容。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '23868',
'abilityTreeNodes' => [
'FEATUREhdmETIPZF',
],
],
'parameters' => [
[
'name' => '__context',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-18ff4a195d****',
],
],
[
'name' => 'SpanId',
'in' => 'query',
'schema' => [
'description' => '事件的唯一标识,您可调用[GetAutonomousNotifyEventsInRange](~~288371~~)接口查看返回参数中的SpanId。',
'type' => 'string',
'required' => true,
'example' => '7e7b2774-95b8-4fa3-bd9c-0ab47cb7****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'string',
'example' => '{\\"taskId\\":\\"7e1ba595-0889-48ff-a6ff-010f54991d****\\",\\"taskType\\":\\"SQL_OPTIMIZE\\",\\"advisorId\\":\\"636dc5f34664dd56ff0****\\",\\"sqlId\\":\\"e2b1d6c1ee1bb29555a828b59f16****\\",\\"indexAdviceCount\\":1,\\"indexAdvices\\":[{\\"schemaName\\":\\"das\\",\\"tableName\\":\\"students\\",\\"indexName\\":\\"idx_name\\",\\"columns\\":[\\"name\\"],\\"unique\\":false,\\"ddlAddIndex\\":\\"ALTER TABLE `das`.`students` ADD INDEX `idx_name` (`name`)\\",\\"priority\\":0,\\"optimizeId\\":\\"96232794517277511\\"}],\\"tuningAdvices\\":[],\\"improvement\\":8127.25,\\"supportLevel\\":3,\\"priority\\":\\"HIGH\\"}',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Data\\": \\"{\\\\\\\\\\\\\\"taskId\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"7e1ba595-0889-48ff-a6ff-010f54991d****\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"taskType\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"SQL_OPTIMIZE\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"advisorId\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"636dc5f34664dd56ff0****\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"sqlId\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"e2b1d6c1ee1bb29555a828b59f16****\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"indexAdviceCount\\\\\\\\\\\\\\":1,\\\\\\\\\\\\\\"indexAdvices\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\"schemaName\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"das\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"tableName\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"students\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"indexName\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"idx_name\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"columns\\\\\\\\\\\\\\":[\\\\\\\\\\\\\\"name\\\\\\\\\\\\\\"],\\\\\\\\\\\\\\"unique\\\\\\\\\\\\\\":false,\\\\\\\\\\\\\\"ddlAddIndex\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"ALTER TABLE `das`.`students` ADD INDEX `idx_name` (`name`)\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"priority\\\\\\\\\\\\\\":0,\\\\\\\\\\\\\\"optimizeId\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"96232794517277511\\\\\\\\\\\\\\"}],\\\\\\\\\\\\\\"tuningAdvices\\\\\\\\\\\\\\":[],\\\\\\\\\\\\\\"improvement\\\\\\\\\\\\\\":8127.25,\\\\\\\\\\\\\\"supportLevel\\\\\\\\\\\\\\":3,\\\\\\\\\\\\\\"priority\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"HIGH\\\\\\\\\\\\\\"}\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n {\\"taskId\\":\\"7e1ba595-0889-48ff-a6ff-010f54991d****\\",\\"taskType\\":\\"SQL_OPTIMIZE\\",\\"advisorId\\":\\"636dc5f34664dd56ff0****\\",\\"sqlId\\":\\"e2b1d6c1ee1bb29555a828b59f16****\\",\\"indexAdviceCount\\":1,\\"indexAdvices\\":[{\\"schemaName\\":\\"das\\",\\"tableName\\":\\"students\\",\\"indexName\\":\\"idx_name\\",\\"columns\\":[\\"name\\"],\\"unique\\":false,\\"ddlAddIndex\\":\\"ALTER TABLE `das`.`students` ADD INDEX `idx_name` (`name`)\\",\\"priority\\":0,\\"optimizeId\\":\\"96232794517277511\\"}],\\"tuningAdvices\\":[],\\"improvement\\":8127.25,\\"supportLevel\\":3,\\"priority\\":\\"HIGH\\"}\\n 200\\n true\\n","errorExample":""}]',
'title' => '获取实例自治事件内容',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 当您的实例接入DAS之后,DAS异常检测发现数据库相关的监控指标发生变化,就会触发快照抓取等通知类事件。'."\n"
."\n"
.' '."\n"
.'>只有开启[自治中心](~~152139~~)才能获取通知事件的详情。',
],
'GetAutonomousNotifyEventsInRange' => [
'summary' => '调用GetAutonomousNotifyEventsInRange接口,获取指定类型或范围的通知事件。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '23871',
'abilityTreeNodes' => [
'FEATUREhdm56JBRC',
],
],
'parameters' => [
[
'name' => '__context',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => false,
'example' => 'rm-18ff4a195d****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1568269711000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'>查询任务结束时间需晚于查询任务开始时间。',
'type' => 'string',
'required' => true,
'example' => '1568265711221',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'PolarDB的节点ID,您可以通过调用[DescribeDBClusters](~~98094~~)接口查看返回参数的DBNodeId。'."\n"
.'>仅支持PolarDB MySQL版实例。',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'EventContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Level',
'in' => 'query',
'schema' => [
'description' => '指定事件紧急程度,当该字段设置时,MinLevel参数将无效。取值:'."\n"
."\n"
.'- **Notice**:通知类事件。'."\n"
.'- **Optimization**:优化类事件。'."\n"
.'- **Warn**:警告类事件。'."\n"
.'- **Critical**:危机类事件。',
'type' => 'string',
'required' => false,
'example' => 'Warn',
],
],
[
'name' => 'MinLevel',
'in' => 'query',
'schema' => [
'description' => '最小事件紧急程度。取值:'."\n"
."\n"
.'- **Notice**:通知类事件。'."\n"
.'- **Optimization**:优化类事件。'."\n"
.'- **Warn**:警告类事件。'."\n"
.'- **Critical**:危机类事件。',
'type' => 'string',
'required' => false,
'example' => 'Notice',
],
],
[
'name' => 'PageOffset',
'in' => 'query',
'schema' => [
'description' => '分页查询,页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询,每页大小。',
'type' => 'string',
'required' => false,
'example' => '30',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'object',
'properties' => [
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'T' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'array',
'items' => [
'description' => '详细信息列表。',
'type' => 'string',
'example' => '"T": []',
],
],
],
],
'PageNo' => [
'description' => '页码。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => '每页最大记录数。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Total' => [
'description' => '总记录数。',
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Data\\": {\\n \\"Extra\\": \\"None\\",\\n \\"List\\": {\\n \\"T\\": [\\n \\"\\\\\\"T\\\\\\": []\\"\\n ]\\n },\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 10,\\n \\"Total\\": 4\\n },\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n \\n
\\n 1\\n 10\\n None\\n 4\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '获取指定类型或范围的通知事件',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 当您的实例接入DAS之后,DAS异常检测发现数据库相关的监控指标发生变化,就会触发快照抓取等通知类事件。'."\n"
."\n"
.' '."\n"
.'>只有开启[自治中心](~~152139~~)才能获取通知事件的详情。',
],
'CreateDiagnosticReport' => [
'summary' => '调用CreateDiagnosticReport接口,创建诊断报告。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'DBInstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '创建任务开始时间,格式为Unix时间戳(UTC时间),单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '创建任务结束时间,格式为Unix时间戳(UTC时间),单位为毫秒。'."\n"
.'>创建任务结束时间需晚于创建任务开始时间。',
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'ac544623-f6ad-45fd-9a74-9be3db65****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '返回的数据。',
'type' => 'string',
'example' => '70af71852fcdf2c5dc7b90596e2cf05b',
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"ac544623-f6ad-45fd-9a74-9be3db65****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"70af71852fcdf2c5dc7b90596e2cf05b\\",\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n ac544623-f6ad-45fd-9a74-9be3db65****\\n Successful\\n 70af71852fcdf2c5dc7b90596e2cf05b\\n 200\\n true\\n","errorExample":""}]',
'title' => '创建诊断报告',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.3或以上。'."\n"
.'- 在调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - Redis',
],
'DescribeDiagnosticReportList' => [
'summary' => '调用DescribeDiagnosticReportList接口,查询诊断报告。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'DBInstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,默认值为10。',
'type' => 'string',
'required' => false,
'example' => '10',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务开始时间,格式为Unix时间戳(UTC时间),单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1668398892000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'> 查询任务结束时间需晚于查询任务开始时间。',
'type' => 'string',
'required' => true,
'example' => '1668420492000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'D00DB161-FEF6-5428-B37A-8D29A4C2****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Synchro' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'Data' => [
'description' => '返回的数据:'."\n"
."\n"
.'- **total**:数据量。'."\n"
.'- **score**:诊断分数。'."\n"
.'- **diagnosticTime**:诊断生成时间(UTC 时间)。'."\n"
.'- **startTime**:查询开始时间(UTC 时间)。'."\n"
.'- **endTime**:查询结束时间(UTC 时间)。',
'type' => 'string',
'example' => '{ "total": 1, "list": [ { "score": 100, "diagnosticTime": "2022-11-14T08:17:00Z", "startTime": "2022-11-14T07:16:59Z", "endTime": "2022-11-14T08:16:59Z" } ] }',
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"D00DB161-FEF6-5428-B37A-8D29A4C2****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Synchro\\": \\"None\\",\\n \\"Data\\": \\"{ \\\\\\"total\\\\\\": 1, \\\\\\"list\\\\\\": [ { \\\\\\"score\\\\\\": 100, \\\\\\"diagnosticTime\\\\\\": \\\\\\"2022-11-14T08:17:00Z\\\\\\", \\\\\\"startTime\\\\\\": \\\\\\"2022-11-14T07:16:59Z\\\\\\", \\\\\\"endTime\\\\\\": \\\\\\"2022-11-14T08:16:59Z\\\\\\" } ] }\\",\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n D00DB161-FEF6-5428-B37A-8D29A4C2****\\n Successful\\n \\n 1\\n \\n 100\\n 2022-11-14T08:17:00Z\\n 2022-11-14T07:16:59Z\\n 2022-11-14T08:16:59Z\\n
\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '查询诊断报告',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - Redis',
],
'GetDBInstanceConnectivityDiagnosis' => [
'summary' => '获取用户输入IP地址到指定数据库实例的网络连通性诊断结果。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'title' => '实例ID',
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SrcIp',
'in' => 'query',
'schema' => [
'title' => '源IP',
'description' => '源IP地址。',
'type' => 'string',
'required' => true,
'example' => '47.100.XX.XX',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '返回信息列表。',
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'instanceId' => [
'title' => '实例ID',
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'success' => [
'title' => '是否检测通过',
'description' => '是否检测通过:'."\n"
."\n"
.'- **true**:检测通过。'."\n"
.'- **false**:检测不通过。',
'type' => 'boolean',
'enumValueTitles' => [],
'example' => 'false',
],
'failType' => [
'title' => '异常类型',
'description' => '异常类型:'."\n"
."\n"
.'- **0**:用户可自助处理的。'."\n"
.'- **1**:需要联系值班人员处理的。',
'type' => 'string',
'example' => '0',
],
'connCheckErrorCode' => [
'title' => '异常检测项',
'description' => '异常检测项:'."\n"
."\n"
.'- **SRC\\_IP\\_NOT\\_IN\\_USER\\_WHITELIST**:源IP地址没有配置在用户白名单中。'."\n"
.'- **VIP\\_NOT\\_EXISTS**:VIP对应的ALB实例不存在。'."\n"
.'- **RS\\_NOT\\_EXISTS**:RS不正常挂载。'."\n"
.'- **VIP\\_TUNNEL\\_ID\\_NOT\\_CONSISTENT**:VPC类型VIP使用的TUNNEL ID与VPC对应的实际TUNNEL ID不一致。'."\n"
.'- **VIP\\_VPC\\_CLOUD\\_INSTANCE\\_NOT\\_EXISTS**:VPC类型VIP不存在。'."\n"
.'- **VIP\\_IS\\_NOT\\_NGLB**:VIP关闭了NGLB模式。'."\n"
.'- **CUSTINS\\_NOT\\_ASSOCIATE\\_ECS\\_SECURITY\\_GROUP**:实例没有关联安全组。'."\n"
.'- **SRC\\_IP\\_NOT\\_IN\\_USER\\_WHITELIST**:源IP地址没有配置在用户白名单中。'."\n"
.'- **SRC\\_IP\\_NOT\\_IN\\_ADMIN\\_WHITELIST**:源IP地址没有配置在管理机白名单中。'."\n"
.'- **SRC\\_IP\\_NOT\\_IN\\_ECS\\_SECURITY\\_GROUP**:源IP地址没有配置在实例关联的安全组中。'."\n"
.'- **VPC\\_INSTANCE\\_IP\\_NOT\\_WORKING\\_STATUS**:VPC IP地址状态异常。',
'type' => 'string',
'example' => 'SRC_IP_NOT_IN_USER_WHITELIST',
],
'connCheckErrorMessage' => [
'title' => '异常检测详情信息',
'description' => '异常检测详情信息。',
'type' => 'string',
'example' => 'Src ip:47.100.XX.XX not in user whitelist',
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
.'* **true**:执行成功。'."\n"
.'* **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"success\\": false,\\n \\"failType\\": \\"0\\",\\n \\"connCheckErrorCode\\": \\"SRC_IP_NOT_IN_USER_WHITELIST\\",\\n \\"connCheckErrorMessage\\": \\"Src ip:47.100.XX.XX not in user whitelist\\"\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","type":"json"}]',
'title' => '获取数据库实例网络连通性诊断结果',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 数据库实例已接入DAS。',
],
'CreateCacheAnalysisJob' => [
'summary' => '调用CreateCacheAnalysisJob接口,创建缓存分析任务。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例ID。',
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '实例的数据节点ID,传入本参数可查询指定节点的监控信息。'."\n"
.'>当您传入BackupSetId参数,系统会忽略此参数,您可调用[DescribeLogicInstanceTopology](~~473786~~)接口查询节点ID。',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'BackupSetId',
'in' => 'query',
'schema' => [
'description' => '备份文件ID,可以通过[DescribeBackups](~~473823~~)接口获取。'."\n"
."\n"
.'- 如需传入多个备份文件ID,请使用英文逗号(,)分隔,例如`12345,67890`。'."\n"
.'- 如果不传入本参数,系统会自动执行备份并对该备份文件执行缓存分析。',
'type' => 'string',
'required' => false,
'example' => '12345',
],
],
[
'name' => 'Separators',
'in' => 'query',
'schema' => [
'description' => '用于识别Key前缀的分隔符。当分隔符为默认的`:;,_-+@=|#`时,不需要输入。',
'type' => 'string',
'required' => false,
'example' => '&',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => '缓存分析任务的状态:'."\n"
."\n"
.'- **BACKUP**:备份中。'."\n"
.'- **ANALYZING**:分析中。'."\n"
.'- **FINISHED**:分析完成。'."\n"
.'- **FAILED**:出现错误。',
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => '缓存分析任务ID。'."\n"
.'>此参数可用于查询缓存分析任务使用,当您调用该API时,由于创建缓存分析任务需要一定的时间,不会立即返回分析结果,您需要通过此参数,结合[DescribeCacheAnalysisJob](~~180983~~)接口,查询具体的分析结果。',
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '大Key详细信息,根据Key占用字节数降序排列。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,单位:毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"TaskState\\": \\"BACKUP\\",\\n \\"JobId\\": \\"sf79-sd99-sa37-****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"BigKeys\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_x****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"r-bp18ff4a195d****\\",\\n \\"NodeId\\": \\"r-x****-db-0\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n BACKUP\\n sf79-sd99-sa37-****\\n Successful\\n \\n hash\\n 0\\n 1596256542547\\n task_x****\\n hashtable\\n 12345\\n r-x****-db-0\\n 127\\n \\n r-bp18ff4a195d****\\n r-x****-db-0\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '创建缓存分析任务',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 只支持分析Redis数据结构和以下Tair自研数据结构:TairString、TairHash、TairGIS、TairBloom、TairDoc、TairCpc、TairZset,暂不支持分析其他Tair自研数据结构。'."\n"
.'- 如果目标实例规格已发生变更,则不支持分析实例变更前的备份文件。'."\n"
.'- 暂不支持Tair磁盘型实例。',
],
'DescribeCacheAnalysisJob' => [
'summary' => '调用DescribeCacheAnalysisJob接口,查询缓存分析任务详情。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'abilityTreeCode' => '23813',
'abilityTreeNodes' => [
'FEATUREhdmJC65CS',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'JobId',
'in' => 'query',
'schema' => [
'description' => '缓存分析任务ID,您可通过调用[CreateCacheAnalysisJob](~~180982~~)接口获取返回参数的JobId。',
'type' => 'string',
'required' => true,
'example' => 'sf79-sd99-sa37-****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => '缓存分析任务的状态:'."\n"
."\n"
.'- **BACKUP**:备份中。'."\n"
.'- **ANALYZING**:分析中。'."\n"
.'- **FINISHED**:分析完成。'."\n"
.'- **FAILED**:出现错误。',
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => '缓存分析任务ID。',
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '大Key详细信息,根据Key占用字节数降序排列。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,格式为 Unix 时间戳,单位为毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'KeyPrefixes' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'Prefix' => [
'description' => 'Key前缀列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'KeyNum' => [
'description' => '该前缀Key的数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '123',
],
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'Prefix' => [
'description' => 'Key的前缀。',
'type' => 'string',
'example' => 'task_',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'BigKeysOfNum' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '大Key详细信息,根据Key数量降序排列。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,格式为 Unix 时间戳,单位为毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'UnexBigKeysOfBytes' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '永不过期Key的详细信息,根据Key占用字节数降序排列。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,格式为 Unix 时间戳,单位为毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'UnexBigKeysOfNum' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '永不过期Key的详细信息,根据Key数量降序排列。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,格式为 Unix 时间戳,单位为毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'ExpiryKeysLevelCount' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'ExpiryLevel' => [
'description' => '按过期时间分类的Key统计信息。',
'type' => 'array',
'items' => [
'description' => '按过期时间分类的Key统计信息。',
'type' => 'object',
'properties' => [
'AnalysisTs' => [
'description' => '分析完成的时间,格式为 Unix 时间戳,单位为毫秒(ms)。',
'type' => 'integer',
'format' => 'int64',
'example' => '1717469347000',
],
'Level' => [
'description' => '过期时间级别。取值:'."\n"
."\n"
.'- **0**:不过期。'."\n"
.'- **1**:已过期。'."\n"
.'- **2**:过期0~1小时。'."\n"
.'- **3**:过期1~3小时。'."\n"
.'- **4**:过期3~12小时。'."\n"
.'- **5**:过期12~24小时。'."\n"
.'- **6**:过期1~2天。'."\n"
.'- **7**:过期3~7天。'."\n"
.'- **8**:过期超过7天。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'TotalBytes' => [
'description' => '按过期时间分类统计的Key占用的字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '8064',
],
'TotalKeys' => [
'description' => '按过期时间分类统计的Key总数。',
'type' => 'integer',
'format' => 'int64',
'example' => '62',
],
],
],
],
],
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"TaskState\\": \\"BACKUP\\",\\n \\"JobId\\": \\"sf79-sd99-sa37-****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"BigKeys\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_x****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"KeyPrefixes\\": {\\n \\"Prefix\\": [\\n {\\n \\"KeyNum\\": 123,\\n \\"Type\\": \\"hash\\",\\n \\"Bytes\\": 12345,\\n \\"Prefix\\": \\"task_\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"BigKeysOfNum\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_x****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"UnexBigKeysOfBytes\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_x****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"UnexBigKeysOfNum\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_x****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"r-bp18ff4a195d****\\",\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"ExpiryKeysLevelCount\\": {\\n \\"ExpiryLevel\\": [\\n {\\n \\"AnalysisTs\\": 1717469347000,\\n \\"Level\\": 0,\\n \\"TotalBytes\\": 8064,\\n \\"TotalKeys\\": 62\\n }\\n ]\\n }\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n BACKUP\\n sf79-sd99-sa37-****\\n Successful\\n \\n hash\\n 0\\n 1596256542547\\n task_x****\\n hashtable\\n 12345\\n r-x****-db-0\\n 127\\n \\n \\n 123\\n hash\\n 12345\\n task_\\n 127\\n \\n \\n hash\\n 0\\n 1596256542547\\n task_x****\\n hashtable\\n 12345\\n r-x****-db-0\\n 127\\n \\n \\n hash\\n 0\\n 1596256542547\\n task_x****\\n hashtable\\n 12345\\n r-x****-db-0\\n 127\\n \\n \\n hash\\n 0\\n 1596256542547\\n task_x****\\n hashtable\\n 12345\\n r-x****-db-0\\n 127\\n \\n r-bp18ff4a195d****\\n r-x****-db-0\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '查询缓存分析任务详情',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于Redis引擎。'."\n"
."\n"
.'> 调用本接口可查询实例缓存分析任务中排名前500的Key信息。',
],
'DescribeCacheAnalysisJobs' => [
'summary' => '调用DescribeCacheAnalysisJobs接口,查询缓存分析任务列表。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'>查询任务结束时间需晚于查询任务开始时间。',
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,默认值为10。',
'type' => 'string',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => '信息列表。',
'type' => 'object',
'properties' => [
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'CacheAnalysisJob' => [
'description' => '信息详情。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => '缓存分析任务的状态:'."\n"
."\n"
.'- **BACKUP**:备份中。'."\n"
.'- **ANALYZING**:分析中。'."\n"
.'- **FINISHED**:分析完成。'."\n"
.'- **FAILED**:出现错误。',
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => '缓存分析任务ID。',
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => '大Key详细信息。'."\n"
."\n"
.'>当前已不再返回该参数的子参数及其内容,请调用[DescribeCacheAnalysisJob](~~180983~~)接口查询缓存分析任务的详细信息。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'Redis数据结构类型。',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => '数据库名称。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'Key过期时间,单位:毫秒(ms),0表示不过期。',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'Key的名称。',
'type' => 'string',
'example' => 'task_*****',
],
'Encoding' => [
'description' => 'Key内部数据类型。',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'Key占用字节数。',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-****-db-0',
],
'Count' => [
'description' => 'Key的元素个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => '实例的数据节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'PageNo' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => '每页最大记录数,默认值为10。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'Total' => [
'description' => '结果数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"List\\": {\\n \\"CacheAnalysisJob\\": [\\n {\\n \\"TaskState\\": \\"BACKUP\\",\\n \\"JobId\\": \\"sf79-sd99-sa37-****\\",\\n \\"Message\\": \\"Successful\\",\\n \\"BigKeys\\": {\\n \\"KeyInfo\\": [\\n {\\n \\"Type\\": \\"hash\\",\\n \\"Db\\": 0,\\n \\"ExpirationTimeMillis\\": 1596256542547,\\n \\"Key\\": \\"task_*****\\",\\n \\"Encoding\\": \\"hashtable\\",\\n \\"Bytes\\": 12345,\\n \\"NodeId\\": \\"r-****-db-0\\",\\n \\"Count\\": 127\\n }\\n ]\\n },\\n \\"InstanceId\\": \\"r-bp18ff4a195d****\\",\\n \\"NodeId\\": \\"r-x****-db-0\\"\\n }\\n ]\\n },\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 10,\\n \\"Extra\\": \\"None\\",\\n \\"Total\\": 4\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n \\n BACKUP\\n sf79-sd99-sa37-****\\n Successful\\n \\n hash\\n 0\\n 1596256542547\\n task_*****\\n hashtable\\n 12345\\n r-****-db-0\\n 127\\n \\n r-bp18ff4a195d****\\n r-x****-db-0\\n
\\n 1\\n 10\\n None\\n 4\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '查询缓存分析任务列表',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于Redis引擎。',
],
'EnableSqlConcurrencyControl' => [
'summary' => '调用EnableSqlConcurrencyControl接口,启用SQL限流来控制数据库请求访问量和SQL并发量。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'>仅支持RDS MySQL和 PolarDB MySQL版实例。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => '选择SQL的类型。取值:'."\n"
.'- **SELECT**'."\n"
.'- **UPDATE**'."\n"
.'- **DELETE**',
'type' => 'string',
'required' => true,
'example' => 'SELECT',
],
],
[
'name' => 'MaxConcurrency',
'in' => 'query',
'schema' => [
'description' => 'SQL最大并发数,取值为大于或等于1的整数。'."\n"
.'>当包含关键词的SQL达到最大并发数时会触发限流规则。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '3',
],
],
[
'name' => 'SqlKeywords',
'in' => 'query',
'schema' => [
'description' => '需要限流的SQL关键词。'."\n"
.'>多个关键词间用波浪线(~)分隔,SQL语句中需要同时包含这些关键词才会触发限流规则。',
'type' => 'string',
'required' => true,
'example' => 'call~open~api~test~4~from~POP',
],
],
[
'name' => 'ConcurrencyControlTime',
'in' => 'query',
'schema' => [
'description' => 'SQL限流的生效时长,单位为秒。'."\n"
.'>限流规则仅在生效时间内开启。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '300',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'string',
'example' => 'Null',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"Null\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\"Data\\": { \\"total\\": 1, \\"list\\":[...] }, \\"Code\\": 200, \\"Success\\": true }\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '启用SQL限流',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
],
'DisableSqlConcurrencyControl' => [
'summary' => '调用DisableSqlConcurrencyControl接口,关闭指定限流规则。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'update',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'>仅支持RDS MySQL和PolarDB MySQL版实例。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'ItemId',
'in' => 'query',
'schema' => [
'description' => '当前实例限流规则ID,可调用[GetRunningSqlConcurrencyControlRules](~~223538~~)接口获取。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'string',
'example' => 'Null',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"Null\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n Null\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '关闭指定限流规则',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
],
'DisableAllSqlConcurrencyControlRules' => [
'summary' => '调用DisableAllSqlConcurrencyControlRules接口,关闭全部正在执行的限流规则。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'update',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'>仅支持RDS MySQL和 PolarDB MySQL版实例。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"None\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => ' 关闭全部正在执行的限流规则',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
],
'GetRunningSqlConcurrencyControlRules' => [
'summary' => '调用GetRunningSqlConcurrencyControlRules接口,获取正在执行的限流规则。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'>仅支持RDS MySQL和 PolarDB MySQL版实例。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,取值大于0且不超过Integer数据类型的最大值,默认值为10。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总记录数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'runningRules' => [
'description' => '返回信息列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ItemId' => [
'description' => '当前实例的限流规则ID。',
'type' => 'integer',
'format' => 'int64',
'example' => '16',
],
'SqlType' => [
'description' => '选择SQL的类型。取值:'."\n"
.'- **SELECT**'."\n"
.'- **UPDATE**'."\n"
.'- **DELETE**',
'type' => 'string',
'example' => 'SELECT',
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'SqlKeywords' => [
'description' => '需要限流的SQL关键词。'."\n"
.'>多个关键词间用波浪线(~)分隔,SQL语句中需要同时包含这些关键词才会触发限流规则。',
'type' => 'string',
'example' => 'call~open~api~test~4~from~POP',
],
'StartTime' => [
'description' => '获取正在执行的限流规则的开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'KeywordsHash' => [
'description' => '哈希值,根据输入的限流关键词计算出来的值。',
'type' => 'string',
'example' => 'b0b8aceeb43baea87b219c81767b****',
],
'ConcurrencyControlTime' => [
'description' => 'SQL限流的生效时长,单位为秒。'."\n"
.'>限流规则仅在生效时间内开启。',
'type' => 'integer',
'format' => 'int64',
'example' => '600',
],
'UserId' => [
'description' => '阿里云账号ID。',
'type' => 'string',
'example' => 'testxxx',
],
'MaxConcurrency' => [
'description' => 'SQL最大并发数,取值为大于或等于1的整数。'."\n"
.'>当包含关键词的SQL达到最大并发数时会触发限流策略。',
'type' => 'string',
'example' => '2',
],
'Status' => [
'description' => '限流规则的生效状态,取值为**Open**:限流规则正在生效中。',
'type' => 'string',
'example' => 'Open',
],
],
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 2,\\n \\"List\\": {\\n \\"runningRules\\": [\\n {\\n \\"ItemId\\": 16,\\n \\"SqlType\\": \\"SELECT\\",\\n \\"InstanceId\\": \\"rm-2ze1jdv45i7l6****\\",\\n \\"SqlKeywords\\": \\"call~open~api~test~4~from~POP\\",\\n \\"StartTime\\": 1608888296000,\\n \\"KeywordsHash\\": \\"b0b8aceeb43baea87b219c81767b****\\",\\n \\"ConcurrencyControlTime\\": 600,\\n \\"UserId\\": \\"testxxx\\",\\n \\"MaxConcurrency\\": \\"2\\",\\n \\"Status\\": \\"Open\\"\\n }\\n ]\\n }\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 2\\n \\n 16\\n SELECT\\n rm-2ze1jdv45i7l6****\\n call~open~api~test~4~from~POP\\n 1608888296000\\n b0b8aceeb43baea87b219c81767b****\\n 600\\n testxxx\\n 2\\n Open\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取正在执行的限流规则',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
],
'GetSqlConcurrencyControlRulesHistory' => [
'summary' => '调用GetSqlConcurrencyControlRulesHistory接口,获取正在执行或被触发过的限流规则。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'>仅支持RDS MySQL和 PolarDB MySQL版实例。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,取值大于0且不超过Integer数据类型的最大值,默认值为10。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总记录数。',
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'rules' => [
'description' => '详细信息列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ItemId' => [
'description' => '当前实例的限流规则ID。',
'type' => 'integer',
'format' => 'int64',
'example' => '16',
],
'SqlType' => [
'description' => '选择SQL的类型。取值:'."\n"
.'- **SELECT**'."\n"
.'- **UPDATE**'."\n"
.'- **DELETE**',
'type' => 'string',
'example' => 'SELECT',
],
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'SqlKeywords' => [
'description' => '需要限流的SQL关键词。'."\n"
.'>多个关键词间以波浪线(~)分隔,SQL语句中需要同时包含这些关键词才会触发限流规则。',
'type' => 'string',
'example' => 'call~open~api~test~4~from~POP',
],
'StartTime' => [
'description' => '获取限流规则历史的开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'KeywordsHash' => [
'description' => '哈希值,根据输入的限流关键词计算出来的值。',
'type' => 'string',
'example' => 'b0b8aceeb43baea87b219c81767b****',
],
'ConcurrencyControlTime' => [
'description' => 'SQL限流的生效时长,单位为秒。'."\n"
.'>限流规则仅在生效时间内开启。',
'type' => 'integer',
'format' => 'int64',
'example' => '600',
],
'UserId' => [
'description' => '用户ID。',
'type' => 'string',
'example' => 'testxxx',
],
'MaxConcurrency' => [
'description' => 'SQL最大并发数,取值为大于或等于1的整数。'."\n"
.'>当包含关键词的SQL达到最大并发数时会触发限流策略。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'Status' => [
'description' => '限流规则的生效状态,取值:'."\n"
."\n"
.'- **Open**:限流规则正在生效中。'."\n"
.'- **Closed**:限流规则已执行结束。',
'type' => 'string',
'example' => 'Open',
],
],
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 4,\\n \\"List\\": {\\n \\"rules\\": [\\n {\\n \\"ItemId\\": 16,\\n \\"SqlType\\": \\"SELECT\\",\\n \\"InstanceId\\": \\"rm-2ze1jdv45i7l6****\\",\\n \\"SqlKeywords\\": \\"call~open~api~test~4~from~POP\\",\\n \\"StartTime\\": 1608888296000,\\n \\"KeywordsHash\\": \\"b0b8aceeb43baea87b219c81767b****\\",\\n \\"ConcurrencyControlTime\\": 600,\\n \\"UserId\\": \\"testxxx\\",\\n \\"MaxConcurrency\\": 2,\\n \\"Status\\": \\"Open\\"\\n }\\n ]\\n }\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 4\\n \\n 16\\n SELECT\\n rm-2ze1jdv45i7l6****\\n call~open~api~test~4~from~POP\\n 1608888296000\\n b0b8aceeb43baea87b219c81767b****\\n 600\\n testxxx\\n 2\\n Open\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取正在执行或被触发过的限流规则',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
],
'GetSqlConcurrencyControlKeywordsFromSqlText' => [
'summary' => '调用GetSqlConcurrencyControlKeywordsFromSqlText接口,根据原始SQL语句,生成限流关键词串。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze5hpn2b99d2****',
],
],
[
'name' => 'SqlText',
'in' => 'query',
'schema' => [
'description' => '待生成限流关键词的SQL文本。',
'type' => 'string',
'required' => true,
'example' => 'SELECT * FROM test where name = \'das\'',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '根据模板化后的SQL生成的限流关键词串。',
'type' => 'string',
'example' => 'SELECT~FROM~test~where~name',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '30A643F5-D7A6-55F5-AB75-DF501427****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"SELECT~FROM~test~where~name\\",\\n \\"RequestId\\": \\"30A643F5-D7A6-55F5-AB75-DF501427****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n SELECT~FROM~test~where~name\\n 30A643F5-D7A6-55F5-AB75-DF501427****\\n true\\n","errorExample":""}]',
'title' => '根据SQL语句生成限流关键词',
'description' => '本接口适用的数据库引擎为:'."\n"
.'- RDS MySQL'."\n"
.'- PolarDB MySQL版',
'responseParamsDescription' => '返回的限流关键词串,是根据模板化后的SQL生成的,如果需要限流某个特定值,则需要带上相应的参数。例如:原始SQL语句为`SELECT \\* FROM test where name = \'das\'`,返回的限流关键词串是`SELECT~FROM~test~where~name`,如果需要限流`name = \'das\'`,则需要在返回的限流关键词串中增加`~das`,即限流关键词串为`SELECT~FROM~test~where~name~das`。',
],
'CreateRequestDiagnosis' => [
'summary' => '调用CreateRequestDiagnosis接口,发起SQL诊断请求。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
.'> 对于PolarDB MySQL版、PolarDB PostgreSQL版(兼容Oracle)和云数据库MongoDB等集群实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'Database',
'in' => 'query',
'schema' => [
'description' => '数据库名。',
'type' => 'string',
'required' => true,
'example' => 'das',
],
],
[
'name' => 'Sql',
'in' => 'query',
'schema' => [
'description' => '待诊断的SQL。',
'type' => 'string',
'required' => true,
'example' => 'select * from test where name = \'mockUser\'',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回的消息。'."\n"
."\n"
.'> 请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '诊断ID,是诊断的唯一标识,后续用于查询诊断结果。',
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": \\"61820b594664275c4429****\\",\\n \\"RequestId\\": \\"800FBAF5-A539-5B97-A09E-C63AB2F7****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n 61820b594664275c4429****\\n 800FBAF5-A539-5B97-A09E-C63AB2F7****\\n true\\n","errorExample":""}]',
'title' => '发起SQL诊断请求',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
."\n"
.' - RDS MySQL'."\n"
.' - RDS PostgreSQL'."\n"
.' - RDS SQL Server'."\n"
.' - PolarDB MySQL版'."\n"
.' - PolarDB PostgreSQL版(兼容Oracle)'."\n"
.' - 云数据库MongoDB版'."\n"
."\n"
.'> RDS PostgreSQL实例内核小版本为20221230及以上。查看和升级内核小版本,请参见[升级内核小版本](~~146895~~)。',
],
'GetRequestDiagnosisResult' => [
'summary' => '调用GetRequestDiagnosisResult接口,查询SQL诊断的结果。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版、PolarDB PostgreSQL版(兼容Oracle)和云数据库MongoDB等集群实例,需要提供节点ID。'."\n",
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'MessageId',
'in' => 'query',
'schema' => [
'description' => '诊断ID,[CreateRequestDiagnosis](~~341609~~)接口返回的诊断唯一标识。'."\n"
.'>当MessageId为自动SQL优化的诊断ID时,该接口无法返回诊断结果',
'type' => 'string',
'required' => true,
'example' => '61820b594664275c4429****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'title' => 'SQL模板ID',
'description' => 'SQL模板ID。'."\n"
."\n"
.'> 此参数是DAS控制台调用API时使用,用户使用此API时无需传入。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Source',
'in' => 'query',
'schema' => [
'title' => '诊断来源',
'description' => '任务来源。'."\n"
."\n"
.'> 此参数是DAS控制台调用API时使用,用户使用此API时无需传入。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。'."\n"
."\n",
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Data' => [
'description' => '返回数据',
'type' => 'object',
'properties' => [
'messageId' => [
'description' => '诊断ID,唯一标识。',
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'uuid' => [
'description' => '诊断实例唯一标识。',
'type' => 'string',
'example' => 'hdm_51fe9bc19ec413f4d530431af87a****',
],
'accountId' => [
'description' => '用户ID。',
'type' => 'string',
'example' => '2093****',
],
'sqlId' => [
'description' => 'SQL模板ID。',
'type' => 'string',
'example' => '0c95dae3afef77be06572612df9b****',
],
'engine' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PostgreSQL**'."\n"
.'- **SQLServer**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PolarDBOracle**'."\n"
.'- **MongoDB**'."\n"
."\n\n"
."\n\n"
."\n\n"
."\n\n"
."\n\n",
'type' => 'string',
'example' => 'MySQL',
],
'dbSchema' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'das',
],
'param' => [
'description' => '额外信息。',
'type' => 'string',
'example' => '{"":""}',
],
'state' => [
'description' => '诊断状态:'."\n"
."\n"
.'- **0**:诊断中。'."\n"
.'- **1**:诊断错误。'."\n"
.'- **2**:诊断完成。'."\n"
.'- **3**:SQL错误。'."\n"
.'- **4**:引擎错误。',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'result' => [
'description' => 'SQL诊断结果。'."\n"
."\n"
.'- **endTime**:SQL诊断的结束时间。'."\n"
.'- **errorCode**:错误码。'."\n"
.' - **0001**:诊断成功。'."\n"
.' - **0003**:诊断失败。'."\n"
.'- **errorMessage**:错误信息。'."\n"
.'- **estimateCost**:预估得消耗。'."\n"
.' - **cpu**:索引的CPU消耗预估值。'."\n"
.' - **io**:索引的IO消耗预估值。'."\n"
.' - **rows**:索引的返回列预估值。'."\n"
.'- **improvement**:性能提升比。'."\n"
.'- **indexAdvices**:索引建议。'."\n"
.' - **columns**:索引列。'."\n"
.' - **ddlAddIndex**:索引DDL语句。'."\n"
.' - **indexName**:索引名。'."\n"
.' - **schemaName**:数据库名。'."\n"
.' - **tableName**:表名。'."\n"
.' - **unique**:是否唯一索引。'."\n"
.'- **ip**:实例的IP地址。'."\n"
.'- **messageId**:诊断ID。'."\n"
.'- **port**:实例的端口。'."\n"
.'- **sqlTag**:SQL标签。'."\n"
.'- **startTime**:SQL诊断的开始时间。'."\n"
.'- **success**:请求是否执行成功。'."\n"
.'- **support**:SQL语句是否支持诊断。'."\n"
.' - **true**:支持。'."\n"
.' - **false**:不支持。'."\n"
.'- **tuningAdvices**:SQL改写建议。',
'type' => 'string',
'example' => '{ "endTime":1636354256000, "errorCode":"0001", "errorMessage":"TFX成功", "estimateCost":{ "cpu":1.7878745150389268, "io":9.948402604746128, "rows":8.889372575194633 }, "improvement":12933.97, "indexAdvices":[ { "columns":[ "work_no" ], "ddlAddIndex":"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)", "indexName":"idx_workno", "schemaName":"test", "tableName":"work_order", "unique":false } ], "ip":"****.mysql.rds.aliyuncs.com", "messageId":"6188c8cb2f1365b16aee****", "port":3306, "sqlTag":"{\\"PRED_EQUAL\\":\\"Y\\",\\"CNT_QB\\":\\"1\\",\\"CNT_TB\\":\\"1\\"}", "startTime":1636354252000, "success":true, "support":true, "tuningAdvices":[ ] }',
],
'gmtCreate' => [
'description' => 'SQL诊断创建时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'example' => '1633071840000',
],
'gmtModified' => [
'description' => 'SQL诊断修改时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'example' => '1633071850000',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"800FBAF5-A539-5B97-A09E-C63AB2F7****\\",\\n \\"Data\\": {\\n \\"messageId\\": \\"61820b594664275c4429****\\",\\n \\"uuid\\": \\"hdm_51fe9bc19ec413f4d530431af87a****\\",\\n \\"accountId\\": \\"2093****\\",\\n \\"sqlId\\": \\"0c95dae3afef77be06572612df9b****\\",\\n \\"engine\\": \\"MySQL\\",\\n \\"dbSchema\\": \\"das\\",\\n \\"param\\": \\"{\\\\\\"\\\\\\":\\\\\\"\\\\\\"}\\",\\n \\"state\\": 2,\\n \\"result\\": \\"{ \\\\\\"endTime\\\\\\":1636354256000, \\\\\\"errorCode\\\\\\":\\\\\\"0001\\\\\\", \\\\\\"errorMessage\\\\\\":\\\\\\"TFX成功\\\\\\", \\\\\\"estimateCost\\\\\\":{ \\\\\\"cpu\\\\\\":1.7878745150389268, \\\\\\"io\\\\\\":9.948402604746128, \\\\\\"rows\\\\\\":8.889372575194633 }, \\\\\\"improvement\\\\\\":12933.97, \\\\\\"indexAdvices\\\\\\":[ { \\\\\\"columns\\\\\\":[ \\\\\\"work_no\\\\\\" ], \\\\\\"ddlAddIndex\\\\\\":\\\\\\"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)\\\\\\", \\\\\\"indexName\\\\\\":\\\\\\"idx_workno\\\\\\", \\\\\\"schemaName\\\\\\":\\\\\\"test\\\\\\", \\\\\\"tableName\\\\\\":\\\\\\"work_order\\\\\\", \\\\\\"unique\\\\\\":false } ], \\\\\\"ip\\\\\\":\\\\\\"****.mysql.rds.aliyuncs.com\\\\\\", \\\\\\"messageId\\\\\\":\\\\\\"6188c8cb2f1365b16aee****\\\\\\", \\\\\\"port\\\\\\":3306, \\\\\\"sqlTag\\\\\\":\\\\\\"{\\\\\\\\\\\\\\"PRED_EQUAL\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Y\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"CNT_QB\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"CNT_TB\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\"}\\\\\\", \\\\\\"startTime\\\\\\":1636354252000, \\\\\\"success\\\\\\":true, \\\\\\"support\\\\\\":true, \\\\\\"tuningAdvices\\\\\\":[ ] }\\",\\n \\"gmtCreate\\": \\"1633071840000\\",\\n \\"gmtModified\\": \\"1633071850000\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n 800FBAF5-A539-5B97-A09E-C63AB2F7****\\n \\n 61820b594664275c4429****\\n hdm_51fe9bc19ec413f4d530431af87a****\\n 2093****\\n 0c95dae3afef77be06572612df9b****\\n MySQL\\n das\\n {\\"\\":\\"\\"}\\n 2\\n { \\"endTime\\":1636354256000, \\"errorCode\\":\\"0001\\", \\"errorMessage\\":\\"TFX成功\\", \\"estimateCost\\":{ \\"cpu\\":1.7878745150389268, \\"io\\":9.948402604746128, \\"rows\\":8.889372575194633 }, \\"improvement\\":12933.97, \\"indexAdvices\\":[ { \\"columns\\":[ \\"work_no\\" ], \\"ddlAddIndex\\":\\"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)\\", \\"indexName\\":\\"idx_workno\\", \\"schemaName\\":\\"test\\", \\"tableName\\":\\"work_order\\", \\"unique\\":false } ], \\"ip\\":\\"****.mysql.rds.aliyuncs.com\\", \\"messageId\\":\\"6188c8cb2f1365b16aee****\\", \\"port\\":3306, \\"sqlTag\\":\\"{\\\\\\"PRED_EQUAL\\\\\\":\\\\\\"Y\\\\\\",\\\\\\"CNT_QB\\\\\\":\\\\\\"1\\\\\\",\\\\\\"CNT_TB\\\\\\":\\\\\\"1\\\\\\"}\\", \\"startTime\\":1636354252000, \\"success\\":true, \\"support\\":true, \\"tuningAdvices\\":[ ] }\\n 1633071840000\\n 1633071850000\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '查询SQL诊断的结果',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 该接口不支持查询自动SQL优化的诊断结果'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
."\n"
.' - RDS MySQL'."\n"
.' - RDS PostgreSQL'."\n"
.' - RDS SQL Server'."\n"
.' - PolarDB MySQL版'."\n"
.' - PolarDB PostgreSQL版(兼容Oracle)'."\n"
.' - 云数据库MongoDB版'."\n"
."\n"
.'> RDS PostgreSQL实例内核小版本为20220130及以上。查看和升级内核小版本,请参见[升级内核小版本](~~146895~~)。',
],
'GetRequestDiagnosisPage' => [
'summary' => '调用GetRequestDiagnosisPage接口,分页获取SQL诊断历史记录。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版、PolarDB PostgreSQL版(兼容Oracle)和云数据库MongoDB等集群实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '每页最大记录数,取值大于0且不超过Integer数据类型的最大值,默认值为10。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '10',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务的开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1633071840000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务的结束时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1634972640000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求的ID。',
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Data' => [
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'list' => [
'description' => 'SQL诊断历史记录列表。',
'type' => 'array',
'items' => [
'description' => 'SQL诊断历史记录列表。',
'type' => 'object',
'properties' => [
'messageId' => [
'description' => '诊断ID,唯一标识。',
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'uuid' => [
'description' => '诊断实例的唯一标识。',
'type' => 'string',
'example' => 'hdm_51fe9bc19ec413f4d530431af87a****',
],
'accountId' => [
'description' => '用户ID。',
'type' => 'string',
'example' => '2093****',
],
'sqlId' => [
'description' => 'SQL模板ID。',
'type' => 'string',
'example' => '0c95dae3afef77be06572612df9b****',
],
'engine' => [
'description' => '数据库引擎:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PostgreSQL**'."\n"
.'- **SQLServer**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PolarDBOracle**'."\n"
.'- **MongoDB**',
'type' => 'string',
'example' => 'MySQL',
],
'dbSchema' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'das',
],
'param' => [
'description' => '额外信息。',
'type' => 'string',
'example' => '{"":""}',
],
'state' => [
'description' => '诊断状态:'."\n"
."\n"
.'- **0**:诊断中。'."\n"
."\n"
.'- **1**:诊断错误。'."\n"
."\n"
.'- **2**:诊断完成。'."\n"
."\n"
.'- **3**:SQL错误。'."\n"
."\n"
.'- **4**:引擎错误。',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'result' => [
'description' => 'SQL诊断结果:'."\n"
."\n"
.'- **endTime**:SQL诊断的结束时间。'."\n"
.'- **errorCode**:错误码。'."\n"
.' - **0001**:诊断成功。'."\n"
.' - **0003**:诊断失败。'."\n"
.'- **errorMessage**:错误信息。'."\n"
.'- **estimateCost**:预估得消耗。'."\n"
.' - **cpu**:索引的CPU消耗预估值。'."\n"
.' - **io**:索引的IO消耗预估值。'."\n"
.' - **rows**:索引的返回列预估值。'."\n"
.'- **improvement**:性能提升比。'."\n"
.'- **indexAdvices**:索引建议。'."\n"
.' - **columns**:索引列。'."\n"
.' - **ddlAddIndex**:索引DDL语句。'."\n"
.' - **indexName**:索引名。'."\n"
.' - **schemaName**:数据库名。'."\n"
.' - **tableName**:表名。'."\n"
.' - **unique**:是否唯一索引。'."\n"
.'- **ip**:实例的IP地址。'."\n"
.'- **messageId**:诊断ID。'."\n"
.'- **port**:实例的端口。'."\n"
.'- **sqlTag**:SQL标签。'."\n"
.'- **startTime**:SQL诊断的开始时间。'."\n"
.'- **success**:请求是否执行成功。'."\n"
.'- **support**:SQL语句是否支持诊断。'."\n"
.' - **true**:支持。'."\n"
.' - **false**:不支持。'."\n"
.'- **tuningAdvices**:SQL改写建议。'."\n"
."\n",
'type' => 'string',
'example' => '{ "endTime":1636354256000, "errorCode":"0001", "errorMessage":"TFX成功", "estimateCost":{ "cpu":1.7878745150389268, "io":9.948402604746128, "rows":8.889372575194633 }, "improvement":12933.97, "indexAdvices":[ { "columns":[ "work_no" ], "ddlAddIndex":"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)", "indexName":"idx_workno", "schemaName":"test", "tableName":"work_order", "unique":false } ], "ip":"****.mysql.rds.aliyuncs.com", "messageId":"6188c8cb2f1365b16aee****", "port":3306, "sqlTag":"{\\"PRED_EQUAL\\":\\"Y\\",\\"CNT_QB\\":\\"1\\",\\"CNT_TB\\":\\"1\\"}", "startTime":1636354252000, "success":true, "support":true, "tuningAdvices":[ ] }',
],
'gmtCreate' => [
'description' => 'SQL诊断创建时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'example' => '1633071840000',
],
'gmtModified' => [
'description' => 'SQL诊断修改时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'example' => '1633071850000',
],
],
],
],
'pageNo' => [
'description' => '页码,取值大于0且不超过Integer数据类型的最大值,默认值为1。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'pageSize' => [
'description' => '每页最大记录数,取值大于0且不超过Integer数据类型的最大值,默认值为10。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'total' => [
'description' => '查询到的总数。',
'type' => 'integer',
'format' => 'int64',
'example' => '100',
],
'extra' => [
'description' => '其他信息。',
'type' => 'string',
'example' => '{"":""}',
],
],
],
'Code' => [
'description' => '状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"800FBAF5-A539-5B97-A09E-C63AB2F7****\\",\\n \\"Data\\": {\\n \\"list\\": [\\n {\\n \\"messageId\\": \\"61820b594664275c4429****\\",\\n \\"uuid\\": \\"hdm_51fe9bc19ec413f4d530431af87a****\\",\\n \\"accountId\\": \\"2093****\\",\\n \\"sqlId\\": \\"0c95dae3afef77be06572612df9b****\\",\\n \\"engine\\": \\"MySQL\\",\\n \\"dbSchema\\": \\"das\\",\\n \\"param\\": \\"{\\\\\\"\\\\\\":\\\\\\"\\\\\\"}\\",\\n \\"state\\": 2,\\n \\"result\\": \\"{ \\\\\\"endTime\\\\\\":1636354256000, \\\\\\"errorCode\\\\\\":\\\\\\"0001\\\\\\", \\\\\\"errorMessage\\\\\\":\\\\\\"TFX成功\\\\\\", \\\\\\"estimateCost\\\\\\":{ \\\\\\"cpu\\\\\\":1.7878745150389268, \\\\\\"io\\\\\\":9.948402604746128, \\\\\\"rows\\\\\\":8.889372575194633 }, \\\\\\"improvement\\\\\\":12933.97, \\\\\\"indexAdvices\\\\\\":[ { \\\\\\"columns\\\\\\":[ \\\\\\"work_no\\\\\\" ], \\\\\\"ddlAddIndex\\\\\\":\\\\\\"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)\\\\\\", \\\\\\"indexName\\\\\\":\\\\\\"idx_workno\\\\\\", \\\\\\"schemaName\\\\\\":\\\\\\"test\\\\\\", \\\\\\"tableName\\\\\\":\\\\\\"work_order\\\\\\", \\\\\\"unique\\\\\\":false } ], \\\\\\"ip\\\\\\":\\\\\\"****.mysql.rds.aliyuncs.com\\\\\\", \\\\\\"messageId\\\\\\":\\\\\\"6188c8cb2f1365b16aee****\\\\\\", \\\\\\"port\\\\\\":3306, \\\\\\"sqlTag\\\\\\":\\\\\\"{\\\\\\\\\\\\\\"PRED_EQUAL\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"Y\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"CNT_QB\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\",\\\\\\\\\\\\\\"CNT_TB\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"1\\\\\\\\\\\\\\"}\\\\\\", \\\\\\"startTime\\\\\\":1636354252000, \\\\\\"success\\\\\\":true, \\\\\\"support\\\\\\":true, \\\\\\"tuningAdvices\\\\\\":[ ] }\\",\\n \\"gmtCreate\\": \\"1633071840000\\",\\n \\"gmtModified\\": \\"1633071850000\\"\\n }\\n ],\\n \\"pageNo\\": 1,\\n \\"pageSize\\": 10,\\n \\"total\\": 100,\\n \\"extra\\": \\"{\\\\\\"\\\\\\":\\\\\\"\\\\\\"}\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n 800FBAF5-A539-5B97-A09E-C63AB2F7****\\n \\n \\n 61820b594664275c4429****\\n hdm_51fe9bc19ec413f4d530431af87a****\\n 2093****\\n 0c95dae3afef77be06572612df9b****\\n MySQL\\n das\\n {\\"\\":\\"\\"}\\n 2\\n { \\"endTime\\":1636354256000, \\"errorCode\\":\\"0001\\", \\"errorMessage\\":\\"TFX成功\\", \\"estimateCost\\":{ \\"cpu\\":1.7878745150389268, \\"io\\":9.948402604746128, \\"rows\\":8.889372575194633 }, \\"improvement\\":12933.97, \\"indexAdvices\\":[ { \\"columns\\":[ \\"work_no\\" ], \\"ddlAddIndex\\":\\"ALTER TABLE `test`.`work_order` ADD INDEX `idx_workno` (`work_no`)\\", \\"indexName\\":\\"idx_workno\\", \\"schemaName\\":\\"test\\", \\"tableName\\":\\"work_order\\", \\"unique\\":false } ], \\"ip\\":\\"****.mysql.rds.aliyuncs.com\\", \\"messageId\\":\\"6188c8cb2f1365b16aee****\\", \\"port\\":3306, \\"sqlTag\\":\\"{\\\\\\"PRED_EQUAL\\\\\\":\\\\\\"Y\\\\\\",\\\\\\"CNT_QB\\\\\\":\\\\\\"1\\\\\\",\\\\\\"CNT_TB\\\\\\":\\\\\\"1\\\\\\"}\\", \\"startTime\\":1636354252000, \\"success\\":true, \\"support\\":true, \\"tuningAdvices\\":[ ] }\\n 1633071840000\\n 1633071850000\\n
\\n 1\\n 10\\n 100\\n {\\"\\":\\"\\"}\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '分页获取SQL诊断历史记录',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
."\n"
.' - RDS MySQL'."\n"
.' - RDS PostgreSQL'."\n"
.' - RDS SQL Server'."\n"
.' - PolarDB MySQL版'."\n"
.' - PolarDB PostgreSQL版(兼容Oracle)'."\n"
.' - 云数据库MongoDB版'."\n"
."\n"
.'> RDS PostgreSQL实例内核小版本为20220130及以上。查看和升级内核小版本,请参见[升级内核小版本](~~146895~~)。'."\n",
],
'DescribeQueryExplain' => [
'summary' => '查询SQL的执行计划。',
'path' => '',
'methods' => [
'post',
'get',
],
'schemes' => [
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmI71917',
],
'tenantRelevance' => 'tenant',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'formData',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版实例,若提供节点ID,将到指定节点查询执行计划,否则将在备节点查询执行计划。'."\n"
.'> 对于RDS MySQL高可用实例,若将实例ID传入,将到指定节点查询执行计划,否则将在备节点查询执行计划。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp1v203xzzh0a****',
],
],
[
'name' => 'Sql',
'in' => 'formData',
'schema' => [
'description' => '待查询执行计划的SQL。',
'type' => 'string',
'required' => true,
'example' => 'select * from test where name = \'mockUser\'',
],
],
[
'name' => 'DbName',
'in' => 'formData',
'schema' => [
'description' => '数据库名。',
'type' => 'string',
'required' => false,
'example' => 'dbtest01',
],
],
[
'name' => 'Schema',
'in' => 'formData',
'schema' => [
'description' => 'schema信息,预留参数。',
'type' => 'string',
'required' => false,
'example' => '无',
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码,200表示成功。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'List',
'description' => 'List',
'type' => 'array',
'items' => [
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'Id' => [
'description' => '查询ID。',
'type' => 'string',
'example' => '1',
],
'SelectType' => [
'description' => '查询类型。',
'type' => 'string',
'example' => 'SIMPLE',
],
'Table' => [
'description' => '表名。',
'type' => 'string',
'example' => 'test',
],
'Type' => [
'description' => 'Join类型。',
'type' => 'string',
'example' => 'eq_ref',
],
'PossibleKeys' => [
'description' => '可能被选择的索引。',
'type' => 'string',
'example' => 'test_idx',
],
'Key' => [
'description' => '执行计划中,实际选择的索引。',
'type' => 'string',
'example' => 'PRIMARY',
],
'KeyLen' => [
'description' => '实际选择索引的长度。',
'type' => 'string',
'example' => '3',
],
'Ref' => [
'description' => '索引所用的列。',
'type' => 'string',
'example' => 'test_column',
],
'Rows' => [
'description' => '待扫描行数。',
'type' => 'string',
'example' => '1000',
],
'Extra' => [
'description' => '附加信息。',
'type' => 'string',
'example' => '无',
],
'QueryPlan' => [
'title' => 'QUEYR_PLAN展示用',
'description' => '保留字段,用于PG引擎。',
'type' => 'string',
'example' => '无',
],
'TableList' => [
'title' => 'queryPlan中用到的表名',
'description' => '保留字段,用于PG引擎。',
'type' => 'array',
'items' => [
'description' => '保留字段,用于PG引擎。',
'type' => 'string',
'example' => '无',
],
],
'IndexList' => [
'title' => 'queryPlan中用到的索引名',
'description' => '保留字段,用于PG引擎。',
'type' => 'array',
'items' => [
'description' => '保留字段,用于PG引擎。',
'type' => 'string',
'example' => '无',
],
],
'LogicalPlanList' => [
'description' => '保留字段,用于PolarDB X引擎。',
'type' => 'array',
'items' => [
'description' => '保留字段,用于PolarDB X引擎。',
'type' => 'string',
'example' => '无',
],
],
'StmtText' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'StmtId' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'NodeId' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'Parent' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'PhysicalOp' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'LogicalOp' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'Argument' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'DefinedValues' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'EstimateRows' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'EstimateIO' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'EstimateCPU' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'AvgRowSize' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'TotalSubtreeCost' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'OutputList' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'Warnings' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'Parallel' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
'EstimateExecutions' => [
'description' => '保留字段,用于SQLServer引擎。',
'type' => 'string',
'example' => '无',
],
],
],
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\",\\n \\"Data\\": [\\n {\\n \\"Id\\": \\"1\\",\\n \\"SelectType\\": \\"SIMPLE\\",\\n \\"Table\\": \\"test\\",\\n \\"Type\\": \\"eq_ref\\",\\n \\"PossibleKeys\\": \\"test_idx\\",\\n \\"Key\\": \\"PRIMARY\\",\\n \\"KeyLen\\": \\"3\\",\\n \\"Ref\\": \\"test_column\\",\\n \\"Rows\\": \\"1000\\",\\n \\"Extra\\": \\"无\\",\\n \\"QueryPlan\\": \\"无\\",\\n \\"TableList\\": [\\n \\"无\\"\\n ],\\n \\"IndexList\\": [\\n \\"无\\"\\n ],\\n \\"LogicalPlanList\\": [\\n \\"无\\"\\n ],\\n \\"StmtText\\": \\"无\\",\\n \\"StmtId\\": \\"无\\",\\n \\"NodeId\\": \\"无\\",\\n \\"Parent\\": \\"无\\",\\n \\"PhysicalOp\\": \\"无\\",\\n \\"LogicalOp\\": \\"无\\",\\n \\"Argument\\": \\"无\\",\\n \\"DefinedValues\\": \\"无\\",\\n \\"EstimateRows\\": \\"无\\",\\n \\"EstimateIO\\": \\"无\\",\\n \\"EstimateCPU\\": \\"无\\",\\n \\"AvgRowSize\\": \\"无\\",\\n \\"TotalSubtreeCost\\": \\"无\\",\\n \\"OutputList\\": \\"无\\",\\n \\"Warnings\\": \\"无\\",\\n \\"Parallel\\": \\"无\\",\\n \\"EstimateExecutions\\": \\"无\\"\\n }\\n ]\\n}","type":"json"}]',
'title' => '查询SQL执行计划',
'description' => '- 当前仅支持RDS MySQL和PolarDB MySQL实例查询SQL的执行计划。'."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'DescribeHotBigKeys' => [
'summary' => '调用DescribeHotBigKeys接口,实时获取当前内存中的热Key和大Key。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmROFBLE',
],
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'required' => false,
'example' => 'r-****-db-0',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => '详情信息列表。',
'type' => 'object',
'properties' => [
'HotKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => '按QPS统计的热Key列表。',
'type' => 'array',
'items' => [
'description' => '按QPS统计的热Key列表。',
'type' => 'object',
'properties' => [
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Hot' => [
'description' => 'Key的访问频次,即Key的每秒访问数。',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'Key的类型。',
'type' => 'string',
'example' => 'zset',
],
'Lfu' => [
'description' => 'LFU算法的统计值。',
'type' => 'integer',
'format' => 'int32',
'example' => '253',
],
'NodeId' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Size' => [
'description' => '元素的个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
],
],
],
],
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'BigKey' => [
'description' => '按子元素数量统计的大Key列表。',
'type' => 'array',
'items' => [
'description' => '按子元素数量统计的大Key列表。',
'type' => 'object',
'properties' => [
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'KeyType' => [
'description' => 'Key类型。',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => '元素的个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'NodeId' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'HotKeyMsg' => [
'description' => '获取按QPS统计的热Key失败的原因。',
'type' => 'string',
'example' => 'current version doesn\'t support',
],
'BigKeyMsg' => [
'description' => '获取按子元素数量统计的大Key失败的原因。',
'type' => 'string',
'example' => 'current version doesn\'t support',
],
'HighTrafficKeyMsg' => [
'description' => '获取按流量统计的热Key失败的原因。',
'type' => 'string',
'example' => 'current version doesn\'t support',
],
'HighTrafficKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HighTrafficKey' => [
'description' => '按流量统计的热Key列表。',
'type' => 'array',
'items' => [
'description' => '按流量统计的热Key列表。',
'type' => 'object',
'properties' => [
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Hot' => [
'description' => 'Key的访问频次,即Key的每秒访问数。',
'type' => 'string',
'example' => '1988',
],
'KeyType' => [
'description' => 'Key的类型。',
'type' => 'string',
'example' => 'string',
],
'NodeId' => [
'description' => '节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0'."\n",
],
'inBytes' => [
'description' => '入流量,单位:Byte。',
'type' => 'integer',
'format' => 'int64',
'example' => '85767',
],
'outBytes' => [
'description' => '出流量,单位:Byte。',
'type' => 'integer',
'format' => 'int64',
'example' => '1054684',
],
'Size' => [
'description' => '元素的个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
],
],
],
],
],
'LargeKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'LargeKey' => [
'description' => '按内存占用统计的大Key列表。',
'type' => 'array',
'items' => [
'description' => '按内存占用统计的大Key列表。',
'type' => 'object',
'properties' => [
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'string',
'example' => '0',
],
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'KeyType' => [
'description' => 'Key的类型。',
'type' => 'string',
'example' => 'string',
],
'DataSize' => [
'description' => 'Key的内存占用,单位:Byte。',
'type' => 'string',
'example' => '33554439',
],
'NodeId' => [
'description' => '节点ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'LargeKeyMsg' => [
'description' => '获取按内存占用统计的大Key失败的原因。',
'type' => 'string',
'example' => 'current version doesn\'t support',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"HotKeys\\": {\\n \\"HotKey\\": [\\n {\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"Db\\": 0,\\n \\"Hot\\": \\"5500~6000\\",\\n \\"KeyType\\": \\"zset\\",\\n \\"Lfu\\": 253,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Size\\": 2\\n }\\n ]\\n },\\n \\"BigKeys\\": {\\n \\"BigKey\\": [\\n {\\n \\"Db\\": 0,\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"KeyType\\": \\"zset\\",\\n \\"Size\\": 2,\\n \\"NodeId\\": \\"r-x****-db-0\\"\\n }\\n ]\\n },\\n \\"HotKeyMsg\\": \\"current version doesn\'t support\\",\\n \\"BigKeyMsg\\": \\"current version doesn\'t support\\",\\n \\"HighTrafficKeyMsg\\": \\"current version doesn\'t support\\",\\n \\"HighTrafficKeys\\": {\\n \\"HighTrafficKey\\": [\\n {\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"Db\\": 0,\\n \\"Hot\\": \\"1988\\",\\n \\"KeyType\\": \\"string\\",\\n \\"NodeId\\": \\"r-x****-db-0\\\\n\\",\\n \\"inBytes\\": 85767,\\n \\"outBytes\\": 1054684,\\n \\"Size\\": 2\\n }\\n ]\\n },\\n \\"LargeKeys\\": {\\n \\"LargeKey\\": [\\n {\\n \\"Db\\": \\"0\\",\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"KeyType\\": \\"string\\",\\n \\"DataSize\\": \\"33554439\\",\\n \\"NodeId\\": \\"r-x****-db-0\\"\\n }\\n ]\\n },\\n \\"LargeKeyMsg\\": \\"current version doesn\'t support\\"\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n \\n abc:def:eng\\n 0\\n 5500~6000\\n zset\\n 253\\n r-x****-db-0\\n \\n \\n 0\\n abc:def:eng\\n zset\\n 2\\n r-x****-db-0\\n \\n current version doesn\'t support\\n current version doesn\'t support\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '实时获取当前热Key和大Key',
'description' => '对数据结构为List、Hash、Set、Zset的Key,按照Key中元素的数量排序并展示排名前3的Key,记录为大Key;当某个Key的QPS大于3,000时会被记录为热点Key。'."\n"
."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.2或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于如下Redis实例:'."\n"
.' - 实例为Redis开源版或Tair(企业版)内存型。'."\n"
.' - 实例的小版本为最新。',
],
'DescribeTopHotKeys' => [
'summary' => '调用DescribeTopHotKeys接口,获取一段时间内排名前100的热Key。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmROFBLE',
],
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'required' => false,
'example' => 'r-****-db-0',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'> - 查询任务结束时间需晚于查询任务开始时间。'."\n"
.'> - 仅支持最大查询时间范围为4天内的数据。'."\n"
.'> - **StartTime**和**EndTime**最大查询间隔为3小时内。',
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => '热Key详细信息列表。',
'type' => 'array',
'items' => [
'description' => '热key详细信息列表。',
'type' => 'object',
'properties' => [
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Hot' => [
'description' => 'Key的访问频次,即Key的每秒访问数。',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'Key类型。',
'type' => 'string',
'example' => 'zset',
],
'Lfu' => [
'description' => 'LFU算法的统计值。',
'type' => 'integer',
'format' => 'int32',
'example' => '253',
],
'NodeId' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'InBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'OutBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'Category' => [
'type' => 'string',
],
],
],
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"HotKey\\": [\\n {\\n \\"Db\\": 0,\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"Hot\\": \\"5500~6000\\",\\n \\"KeyType\\": \\"zset\\",\\n \\"Lfu\\": 253,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"InBytes\\": 0,\\n \\"OutBytes\\": 0,\\n \\"Category\\": \\"\\"\\n }\\n ]\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n 0\\n abc:def:eng\\n 5500~6000\\n zset\\n 253\\n r-x****-db-0\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '获取排名前100的热Key',
'description' => '当某个Key的QPS大于3,000时会被记录为热点Key。'."\n"
."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.2或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于如下Redis实例:'."\n"
.' - 实例为Redis开源版或Tair(企业版)内存型。'."\n"
.' - 实例的小版本为最新。',
],
'DescribeTopBigKeys' => [
'summary' => '调用DescribeTopBigKeys接口,获取一段时间内排名前100的大Key。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => '查询任务开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => '查询任务结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.'> - 查询任务结束时间需晚于查询任务开始时间。'."\n"
.'> - 仅支持最大查询时间范围为4天内的数据。'."\n"
.'> - **StartTime**和**EndTime**最大查询间隔为3小时内。',
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'BigKey' => [
'description' => '大Key详细信息列表。'."\n"
."\n"
.'> 查询时间段内没有大Key时,返回为空。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'KeyType' => [
'description' => 'Key的类型。',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => '元素的个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'NodeId' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"BigKey\\": [\\n {\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"Db\\": 0,\\n \\"KeyType\\": \\"zset\\",\\n \\"Size\\": 2,\\n \\"NodeId\\": \\"r-x****-db-0\\"\\n }\\n ]\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n abc:def:eng\\n 0\\n zset\\n 2\\n r-x****-db-0\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => ' 获取排名前100的大Key',
'description' => '对数据结构为List、Hash、Set、Zset的Key,按照Key中元素的数量排序并展示排名前3的Key,记录为大Key。'."\n"
."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.2或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于如下Redis实例:'."\n"
.' - 实例为Redis开源版或Tair(企业版)内存型。'."\n"
.' - 实例的小版本为最新。',
],
'DescribeHotKeys' => [
'summary' => '调用DescribeHotKeys接口,查询Redis实例的热Key。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例ID。',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'Redis实例的数据分片ID。',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => '详细信息列表。',
'type' => 'array',
'items' => [
'description' => '结果集。',
'type' => 'object',
'properties' => [
'Key' => [
'description' => '具体的Key。',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'Key所在的DB。',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Hot' => [
'description' => 'Key的访问频次,即Key的每秒访问数。',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'Key的类型。',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => '元素的个数。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'InBytes' => [
'description' => '入流量,单位Byte。',
'type' => 'integer',
'format' => 'int64',
'example' => '85766',
],
'OutBytes' => [
'description' => '出流量,单位Byte。',
'type' => 'integer',
'format' => 'int64',
'example' => '1054688',
],
'NodeId' => [
'description' => '节点id。',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Category' => [
'description' => '热Key类别:'."\n"
.'- **qps**:按QPS统计的热Key。'."\n"
.'- **traffic**:按流量统计的热Key。',
'type' => 'string',
'example' => 'qps',
],
],
],
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Data\\": {\\n \\"HotKey\\": [\\n {\\n \\"Key\\": \\"abc:def:eng\\",\\n \\"Db\\": 0,\\n \\"Hot\\": \\"5500~6000\\",\\n \\"KeyType\\": \\"zset\\",\\n \\"Size\\": 2,\\n \\"InBytes\\": 85766,\\n \\"OutBytes\\": 1054688,\\n \\"NodeId\\": \\"r-x****-db-0\\",\\n \\"Category\\": \\"qps\\"\\n }\\n ]\\n },\\n \\"Code\\": \\"200\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n \\n abc:def:eng\\n 0\\n 5500~6000\\n zset\\n 2\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '查询实例当前的热Key',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于4.3.3,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为1.0.2或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口只适用于如下Redis实例:'."\n"
.' - 实例为Redis开源版或Tair(企业版)内存型。'."\n"
.' - 实例的小版本为最新。',
],
'CreateQueryOptimizeTag' => [
'summary' => '调用CreateQueryOptimizeTag接口,对目标SQL进行打标。',
'methods' => [
'post',
],
'schemes' => [
'https',
'http',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'write',
'deprecated' => false,
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**:RDS MySQL'."\n"
.'- **PolarDBMySQL**:PolarDB MySQL版'."\n"
.'- **PostgreSQL**:RDS PostgreSQL',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID,您可以调用[GetQueryOptimizeDataStats](~~405261~~)接口查询SQL模板ID。支持英文逗号(,)分隔传入多个模板ID,进行批量打标。',
'type' => 'string',
'required' => true,
'example' => '6068ce044e3dc9b903979672fb0b69df,d12515c015fc9f41a0778a9e1de0****',
],
],
[
'name' => 'Tags',
'in' => 'query',
'schema' => [
'description' => 'SQL标签。支持英文逗号(,)分隔传入多个值。'."\n"
."\n"
.'- **DAS\\_IMPORTANT**:重要SQL。'."\n"
.'- **DAS\\_NOT\\_IMPORTANT**:不重要SQL。'."\n"
.'- **USER\\_IGNORE**:无需优化。'."\n"
.'- **DAS\\_IN\\_PLAN**:排期优化。',
'type' => 'string',
'required' => true,
'enumValueTitles' => [],
'example' => 'DAS_IN_PLAN,DAS_NOT_IMPORTANT',
],
],
[
'name' => 'Status',
'in' => 'query',
'schema' => [
'description' => '设置请求参数**Tags**的状态:'."\n"
."\n"
.'- **0**:清空请求参数**SqlIds**对应的全部标签,忽略请求参数**Tags**设置。'."\n"
.'- **1**:设置请求参数**SqlIds**对应的标签为请求参数**Tags**的值。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'Comments',
'in' => 'query',
'schema' => [
'description' => '备注。'."\n"
."\n"
.'长度为1~300个字符。',
'type' => 'string',
'required' => false,
'example' => '离线同步类慢SQL,无需优化。',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '阿里云为该请求生成的唯一标识符。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'Boolean',
'description' => '打标操作是否执行成功:'."\n"
."\n"
.'- **true**:打标成功。'."\n"
.'- **false**:打标失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\",\\n \\"Data\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n true\\n","errorExample":""}]',
'title' => '对目标SQL进行打标',
'description' => '- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeExecErrorStats' => [
'summary' => '调用GetQueryOptimizeExecErrorStats接口,获取执行失败的模板数据。',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID间用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'SQL文本关键词,多个关键词以空格分隔。',
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => '多个SQL文本关键词逻辑关系,当前支持:'."\n"
."\n"
.'- **or**:或。'."\n"
.'- **and**:与。',
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => '需要查询的数据库名。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => '查询数据的日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询每页数据量,默认为10。',
'type' => 'string',
'required' => true,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'string',
'required' => true,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => '排序字段,当前仅支持error_count(SQL执行错误次数)。',
'type' => 'string',
'required' => false,
'example' => 'error_count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => '是否升序排序,默认为**true**。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'string',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表,包括信息总数、错误码等。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '19',
],
'PageNo' => [
'description' => '页码。',
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'PageSize' => [
'description' => '每页数量。',
'type' => 'integer',
'format' => 'int32',
'example' => '10',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '执行失败的模板数据列表。',
'type' => 'array',
'items' => [
'description' => '执行失败的模板数据列表。',
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'InstanceName' => [
'description' => '实例别名。',
'type' => 'string',
'example' => 'test01',
],
'Dbname' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'SQL模板ID。',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlText' => [
'description' => '执行错误的SQL文本。',
'type' => 'string',
'example' => 'select * from test1',
],
'ErrorCode' => [
'description' => '错误码。',
'type' => 'string',
'example' => '1146',
],
'ErrorCount' => [
'description' => '错误次数。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 19,\\n \\"PageNo\\": 1,\\n \\"PageSize\\": 10,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"InstanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"InstanceName\\": \\"test01\\",\\n \\"Dbname\\": \\"testdb01\\",\\n \\"SqlId\\": \\"2e8147b5ca2dfc640dfd5e43d96a****\\",\\n \\"SqlText\\": \\"select * from test1\\",\\n \\"ErrorCode\\": \\"1146\\",\\n \\"ErrorCount\\": 10\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 19\\n 1\\n 10\\n None\\n \\n rm-2ze8g2am97624****\\n test01\\n testdb01\\n 2e8147b5ca2dfc640dfd5e43d96a****\\n select * from test1\\n 1146\\n 10\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取执行失败的模板数据',
'description' => '- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeExecErrorSample' => [
'summary' => '调用GetQueryOptimizeExecErrorSample接口,获取执行失败的样本数据。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmTQGIFY',
],
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID,您可调用[GetQueryOptimizeExecErrorStats](~~405235~~)接口查询SQL模板ID。',
'type' => 'string',
'required' => true,
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => '查询数据的日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '返回信息列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'OrigHost' => [
'description' => '执行SQL的客户端IP地址。',
'type' => 'string',
'example' => '100.104.XX.XX',
],
'User' => [
'description' => '执行SQL的客户端用户名。',
'type' => 'string',
'example' => 'test01',
],
'Dbname' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'SQL模板ID。',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlText' => [
'description' => '执行错误的SQL文本。',
'type' => 'string',
'example' => 'select * from test1',
],
'ErrorCode' => [
'description' => '错误码。',
'type' => 'string',
'example' => '1146',
],
'Timestamp' => [
'description' => '错误SQL执行的时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1643020306739',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 2,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"OrigHost\\": \\"100.104.XX.XX\\",\\n \\"User\\": \\"test01\\",\\n \\"Dbname\\": \\"testdb01\\",\\n \\"SqlId\\": \\"2e8147b5ca2dfc640dfd5e43d96a****\\",\\n \\"SqlText\\": \\"select * from test1\\",\\n \\"ErrorCode\\": \\"1146\\",\\n \\"Timestamp\\": 1643020306739\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 2\\n None\\n \\n 100.104.XX.XX\\n test01\\n testdb01\\n 2e8147b5ca2dfc640dfd5e43d96a****\\n select * from test1\\n 1146\\n 1643020306739\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取执行失败的样本数据',
'description' => '- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于2.1.8,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为2.1.8或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeSolution' => [
'summary' => '调用GetQueryOptimizeSolution接口,获取治理建议。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmTQGIFY',
],
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID。'."\n"
.'您可调用[GetQueryOptimizeDataStats](~~405261~~)接口查询SQL模板ID。',
'type' => 'string',
'required' => true,
'example' => '05fecf7e7b3efd123c4d5197035f****',
],
],
[
'name' => 'RuleIds',
'in' => 'query',
'schema' => [
'description' => '规则ID,具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'required' => true,
'example' => 'LARGE_ROWS_EXAMINED',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。'."\n"
.'您可调用[GetQueryOptimizeDataStats](~~405261~~)接口查询实例ID。',
'type' => 'string',
'required' => false,
'example' => 'rm-bp1o3z6beqpej****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '治理建议列表。',
'type' => 'array',
'items' => [
'description' => '治理建议列表。',
'type' => 'object',
'properties' => [
'Level' => [
'description' => '建议级别:'."\n"
."\n"
.'- **INFO**:提示。'."\n"
.'- **WARN**:警告。',
'type' => 'string',
'example' => 'INFO',
],
'RuleId' => [
'description' => '规则ID,具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED',
],
'Solution' => [
'description' => '解决方案,具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED_SOLUTION',
],
'SolutionExt' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '30FF4E40-17F3-5A51-AB23-43F30D9B****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"Level\\": \\"INFO\\",\\n \\"RuleId\\": \\"LARGE_ROWS_EXAMINED\\",\\n \\"Solution\\": \\"LARGE_ROWS_EXAMINED_SOLUTION\\",\\n \\"SolutionExt\\": \\"None\\"\\n }\\n ]\\n },\\n \\"RequestId\\": \\"30FF4E40-17F3-5A51-AB23-43F30D9B****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 1\\n None\\n \\n INFO\\n LARGE_ROWS_EXAMINED\\n LARGE_ROWS_EXAMINED_SOLUTION\\n None\\n
\\n \\n 30FF4E40-17F3-5A51-AB23-43F30D9B****\\n true\\n","errorExample":""}]',
'title' => '获取治理建议',
'description' => '- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeRuleList' => [
'summary' => '调用GetQueryOptimizeRuleList接口,获取规则列表。',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'title' => '',
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '规则数据列表。',
'type' => 'array',
'items' => [
'description' => '规则数据列表。',
'type' => 'object',
'properties' => [
'Type' => [
'description' => '规则类型,当前只支持 **Predefined**(系统预定义)。',
'type' => 'string',
'example' => 'Predefined',
],
'Name' => [
'description' => '规则名,具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED',
],
'RuleId' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 1,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"Type\\": \\"Predefined\\",\\n \\"Name\\": \\"LARGE_ROWS_EXAMINED\\",\\n \\"RuleId\\": \\"None\\"\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 1\\n None\\n \\n Predefined\\n LARGE_ROWS_EXAMINED\\n None\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取规则列表',
'description' => '- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于2.1.8,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为2.1.8或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeDataTrend' => [
'summary' => '调用GetQueryOptimizeDataTrend接口,获取查询治理趋势数据。',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询数据的起始日期,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间最大不能早于当前时间2个月。',
'type' => 'string',
'required' => true,
'example' => '1642435200000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询数据的终止日期,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,最晚只能查询到当天凌晨0点的数据。',
'type' => 'string',
'required' => true,
'example' => '1643040000000',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '趋势数据列表。',
'type' => 'array',
'items' => [
'description' => '趋势数据列表。',
'type' => 'object',
'properties' => [
'Kpi' => [
'description' => '指标名,指标名及其含义如下:'."\n"
."\n"
.'- **sqlExecuteCount**:慢SQL执行次数。'."\n"
.'- **sqlExecuteCountDiff**:慢SQL执行次数相较于前一天的差值。'."\n"
.'- **sqlCount**:慢SQL模板数据。'."\n"
.'- **sqlCountDiff**:慢SQL模板数相较于前一天的差值。'."\n"
.'- **optimizedSqlExecuteCount**:推荐优化的慢SQL执行次。'."\n"
.'- **optimizedSqlExecuteCountDiff**:推荐优化的慢SQL执行次数相较于前一天的差值。'."\n"
.'- **optimizedSqlCount**:推荐优化的慢SQL数。'."\n"
.'- **optimizedSqlCountDiff**:推荐优化的慢SQL数相较于前一天的差值。',
'type' => 'string',
'example' => 'sqlExecuteCount',
],
'Timestamp' => [
'description' => '数据日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1643040000000',
],
'Value' => [
'description' => '指标数据的值。',
'type' => 'number',
'format' => 'double',
'example' => '1000',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 10,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"Kpi\\": \\"sqlExecuteCount\\",\\n \\"Timestamp\\": 1643040000000,\\n \\"Value\\": 1000\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 10\\n None\\n \\n sqlExecuteCount\\n 1643040000000\\n 1000\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取查询治理趋势数据',
'description' => '- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于2.1.8,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为2.1.8或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeDataTop' => [
'summary' => '调用GetQueryOptimizeDataTop接口,获取查询治理实例红榜和实例黑榜的数据。',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => '查询数据的日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'Type',
'in' => 'query',
'schema' => [
'description' => '需要查询的榜单类型:'."\n"
."\n"
.'- **RED**:实例红榜。'."\n"
.'- **BLACK**:实例黑榜。',
'type' => 'string',
'required' => true,
'example' => 'RED',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '榜单信息列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'Type' => [
'description' => '指标名:'."\n"
."\n"
.'- **sqlExecuteCount**:慢SQL执行次数。'."\n"
.'- **optimizedSqlExecuteCount**:推荐优化的慢SQL执行次数。',
'type' => 'string',
'example' => 'sqlExecuteCount',
],
'Value' => [
'description' => '指标的数值。',
'type' => 'number',
'format' => 'double',
'example' => '100',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 10,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"InstanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"Type\\": \\"sqlExecuteCount\\",\\n \\"Value\\": 100\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 10\\n None\\n \\n rm-2ze8g2am97624****\\n sqlExecuteCount\\n 100\\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取查询治理实例红榜和实例黑榜的数据',
'description' => '- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于2.1.8,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为2.1.8或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeDataStats' => [
'summary' => '调用GetQueryOptimizeDataStats接口,获取查询治理模板数据。',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**'."\n"
.'- **PolarDBMySQL**'."\n"
.'- **PostgreSQL**',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'SQL文本关键词,多个关键词以空格分隔。',
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => '多个SQL文本关键词的逻辑关系。'."\n"
."\n"
.'- **or**:或。'."\n"
.'- **and**:与。',
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'Rules',
'in' => 'query',
'schema' => [
'description' => '需要过滤的规则,多个规则以逗号分隔。具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'required' => false,
'example' => 'DAS_NOT_IMPORTANT',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => '需要查询的数据库名。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => '查询数据的日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询每页最大记录数,默认为10。',
'type' => 'string',
'required' => false,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => '排序字段,默认为**count**。'."\n"
."\n"
.'- **count**:执行次数。'."\n"
.'- **maxQueryTime**:最大执行时间。'."\n"
.'- **avgQueryTime**:平均执行时间。'."\n"
.'- **maxLockTime**:最大锁等待时间。'."\n"
.'- **avgLockTime**:平均锁等待时间。'."\n"
.'- **maxRowsExamined**:最大扫描行数。'."\n"
.'- **avgRowsExamined**:平均扫描行数。'."\n"
.'- **maxRowsSent**:最大返回行数。'."\n"
.'- **avgRowsSent**:平均返回行数。',
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => '是否升序排序,默认为**true**。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'string',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'OnlyOptimizedSql',
'in' => 'query',
'schema' => [
'description' => '是否只查询待优化的SQL,默认为**false**。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'string',
'required' => false,
'example' => 'false',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID,您可调用[GetQueryOptimizeExecErrorStats](~~405235~~)接口查询SQL模板ID。',
'type' => 'string',
'required' => false,
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
[
'name' => 'User',
'in' => 'query',
'schema' => [
'description' => '需要查询的数据库账号。',
'type' => 'string',
'required' => false,
'example' => 'testUser',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '详细信息列表。',
'type' => 'object',
'properties' => [
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => '备用参数。',
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => '备用参数。',
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => '模板数据列表。',
'type' => 'array',
'items' => [
'description' => '模板数据列表。',
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'Dbname' => [
'description' => 'SQL所属数据库名。',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'SQL模板ID。',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlType' => [
'description' => 'SQL类别。',
'type' => 'string',
'example' => 'INSERT',
],
'Psql' => [
'description' => 'SQL模板。',
'type' => 'string',
'example' => 'select 1',
],
'SqlSample' => [
'description' => 'SQL模板下执行最慢的SQL样本。',
'type' => 'string',
'example' => 'select 2',
],
'Count' => [
'description' => 'SQL执行次数。',
'type' => 'integer',
'format' => 'int32',
'example' => '100',
],
'MaxQueryTime' => [
'description' => '最大查询时间,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '1.1',
],
'AvgQueryTime' => [
'description' => '平均查询时间,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '1.1',
],
'MaxLockTime' => [
'description' => '最大锁等待时间,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.1',
],
'AvgLockTime' => [
'description' => '平均锁等待时间,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.1',
],
'MaxRowsExamined' => [
'description' => '最大扫描行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'AvgRowsExamined' => [
'description' => '平均扫描行数。',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'MaxRowsSent' => [
'description' => '最大返回行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRowsSent' => [
'description' => '平均返回行数。',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'MaxRowsAffected' => [
'description' => '最大影响行数。'."\n"
."\n"
.'> 取值为-1说明暂未采集到该字段。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRowsAffected' => [
'description' => '平均影响行数。'."\n"
."\n"
.'> 取值为-1说明暂未采集到该字段。',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'RuleList' => [
'description' => '规则列表。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Name' => [
'description' => '规则名,具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'example' => 'DAS_NOT_IMPORTANT',
],
'Type' => [
'description' => '规则类别:'."\n"
."\n"
.'- **Predefined**:系统预定义。'."\n"
.'- **UserDefined**:用户自定义。',
'type' => 'string',
'example' => 'Predefined',
],
],
],
],
'User' => [
'description' => '数据库账号。',
'type' => 'string',
'example' => 'testUser',
],
],
],
],
],
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"Total\\": 10,\\n \\"PageNo\\": 0,\\n \\"PageSize\\": 0,\\n \\"Extra\\": \\"None\\",\\n \\"List\\": [\\n {\\n \\"InstanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"Dbname\\": \\"testdb01\\",\\n \\"SqlId\\": \\"2e8147b5ca2dfc640dfd5e43d96a****\\",\\n \\"SqlType\\": \\"INSERT\\",\\n \\"Psql\\": \\"select 1\\",\\n \\"SqlSample\\": \\"select 2\\",\\n \\"Count\\": 100,\\n \\"MaxQueryTime\\": 1.1,\\n \\"AvgQueryTime\\": 1.1,\\n \\"MaxLockTime\\": 0.1,\\n \\"AvgLockTime\\": 0.1,\\n \\"MaxRowsExamined\\": 100000,\\n \\"AvgRowsExamined\\": 100.1,\\n \\"MaxRowsSent\\": 10000,\\n \\"AvgRowsSent\\": 100.1,\\n \\"MaxRowsAffected\\": 10000,\\n \\"AvgRowsAffected\\": 100.1,\\n \\"RuleList\\": [\\n {\\n \\"Name\\": \\"DAS_NOT_IMPORTANT\\",\\n \\"Type\\": \\"Predefined\\"\\n }\\n ],\\n \\"User\\": \\"testUser\\"\\n }\\n ]\\n },\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 10\\n None\\n \\n rm-2ze8g2am97624****\\n testdb01\\n 2e8147b5ca2dfc640dfd5e43d96a****\\n INSERT\\n select 1\\n select 2\\n 100\\n 1.1\\n 1.1\\n 0.1\\n 0.1\\n 100000\\n 100.1\\n 10000\\n 100.1\\n 10000\\n 100.1\\n \\n DAS_NOT_IMPORTANT\\n Predefined\\n \\n
\\n \\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n","errorExample":""}]',
'title' => '获取查询治理模板数据',
'description' => '- 在使用阿里云SDK时,需要保证aliyun-sdk-core的版本大于2.1.8,建议使用最新版本。'."\n"
.'- 使用DAS的SDK的版本为2.1.8或以上。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeTag' => [
'summary' => '调用GetQueryOptimizeTag接口,获取指定SQL的标签。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmTQGIFY',
],
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**:RDS MySQL'."\n"
.'- **PolarDBMySQL**:PolarDB MySQL版'."\n"
.'- **PostgreSQL**:RDS PostgreSQL',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID。'."\n"
.'您可调用[GetQueryOptimizeDataStats](~~405261~~)接口查询SQL模板ID。',
'type' => 'string',
'required' => true,
'example' => '29d9fef63e347d39c3436658a5fe****',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '阿里云为该请求生成的唯一标识符。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'SqlTag',
'description' => '返回的SQL标签数据。',
'type' => 'object',
'properties' => [
'SqlId' => [
'description' => 'SQL模板ID',
'type' => 'string',
'example' => '29d9fef63e347d39c3436658a5fe****',
],
'Tags' => [
'title' => '逗号分隔的多个tag',
'description' => 'SQL标签,多个标签间使用英文逗号(,)分隔。',
'type' => 'string',
'example' => 'DAS_IN_PLAN,DAS_NOT_IMPORTANT',
],
'Comments' => [
'description' => '备注信息。',
'type' => 'string',
'example' => '离线同步类慢SQL,无需优化。',
],
],
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\",\\n \\"Data\\": {\\n \\"SqlId\\": \\"29d9fef63e347d39c3436658a5fe****\\",\\n \\"Tags\\": \\"DAS_IN_PLAN,DAS_NOT_IMPORTANT\\",\\n \\"Comments\\": \\"离线同步类慢SQL,无需优化。\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n \\n 29d9fef63e347d39c3436658a5fe****\\n DAS_IN_PLAN,DAS_NOT_IMPORTANT\\n 离线同步类慢SQL,无需优化。\\n \\n","errorExample":""}]',
'title' => '获取SQL标签',
'description' => '- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetQueryOptimizeShareUrl' => [
'summary' => '调用GetQueryOptimizeShareUrl接口,获取查询治理的分享链接。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmTQGIFY',
],
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => '数据库引擎,取值:'."\n"
."\n"
.'- **MySQL**:RDS MySQL'."\n"
.'- **PolarDBMySQL**:PolarDB MySQL版'."\n"
.'- **PostgreSQL**:RDS PostgreSQL',
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => '实例ID,多个实例ID间用逗号分隔。',
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => '备用参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'SQL文本关键词,多个关键词以空格分隔。',
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => '多个SQL文本关键词的逻辑关系。'."\n"
."\n"
.'- **or**:或。'."\n"
.'- **and**:与。',
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'Rules',
'in' => 'query',
'schema' => [
'description' => '需要过滤的规则,多个规则以逗号分隔。具体信息请参见[查询治理](~~290038~~)。',
'type' => 'string',
'required' => false,
'example' => 'DAS_NOT_IMPORTANT',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => '需要查询的数据库名。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => '查询数据的日期,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询每页最大记录数,默认为10。',
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => '排序字段,默认为**count**。'."\n"
."\n"
.'- **count**:执行次数。'."\n"
.'- **maxQueryTime**:最大执行时间。'."\n"
.'- **avgQueryTime**:平均执行时间。'."\n"
.'- **maxLockTime**:最大锁等待时间。'."\n"
.'- **avgLockTime**:平均锁等待时间。'."\n"
.'- **maxRowsExamined**:最大扫描行数。'."\n"
.'- **avgRowsExamined**:平均扫描行数。'."\n"
.'- **maxRowsSent**:最大返回行数。'."\n"
.'- **avgRowsSent**:平均返回行数。',
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => '是否升序排序,默认为**true**。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'OnlyOptimizedSql',
'in' => 'query',
'schema' => [
'description' => '是否只查询待优化的SQL,默认为**false**。'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'SQL模板ID,您可调用[GetQueryOptimizeDataStats](~~405261~~)接口查询SQL模板ID。',
'type' => 'string',
'required' => false,
'example' => '6068ce044e3dc9b903979672fb0b69df,d12515c015fc9f41a0778a9e1de0****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => '实例所属地域,取值:'."\n"
."\n"
.'- **cn-china**:中国内地。'."\n"
.'- **cn-hongkong**:中国香港。'."\n"
.'- **ap-southeast-1**:新加坡。'."\n"
."\n"
.'此参数只有在请求参数**InstanceIds**为空时有效。如果请求参数**InstanceIds**为空时,按照**Region**参数设置的地域获取数据,系统默认实例所属地域为**cn-china**;如果请求参数**InstanceIds**不为空时,即使设置了**Region**参数,也以**InstanceIds**所传入的第一个实例所在地域为准获取数据。'."\n"
."\n"
.'> 在中国内地各地域创建的实例,传入此参数时,都为**cn-china**。',
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
[
'name' => 'User',
'in' => 'query',
'schema' => [
'description' => '需要查询的数据库账号。',
'type' => 'string',
'required' => false,
'example' => 'testUser',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回Successful,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '阿里云为该请求生成的唯一标识符。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'String',
'description' => '分享链接',
'type' => 'string',
'example' => 'https://hdm.console.aliyun.com/#/queryOptimize****',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\",\\n \\"Data\\": \\"https://hdm.console.aliyun.com/#/queryOptimize****\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n B6D17591-B48B-4D31-9CD6-9B9796B2****\\n true\\n https://hdm.console.aliyun.com/#/queryOptimize****\\n","errorExample":""}]',
'title' => '获取查询治理的分享链接',
'description' => '- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 本接口适用的数据库引擎为:'."\n"
.' - RDS MySQL'."\n"
.' - PolarDB MySQL版'."\n"
.' - RDS PostgreSQL',
],
'GetErrorRequestSample' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'SQL ID,您可以调用[GetAsyncErrorRequestListByCode](~~410746~~)接口查询实例中产生MySQL错误码的SQL ID。',
'type' => 'string',
'required' => false,
'example' => '2cd4432556c3dab9d825ba363637****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => '数据库名称。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '返回的数据。',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'sqlId' => [
'description' => 'SQL ID。',
'type' => 'string',
'example' => '2cd4432556c3dab9d825ba363637****',
],
'database' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'dbgateway',
],
'originHost' => [
'description' => '执行SQL的客户端IP地址。',
'type' => 'string',
'example' => '172.16.1****',
],
'tables' => [
'description' => '表数据。',
'type' => 'array',
'items' => [
'description' => '表名。',
'type' => 'string',
'example' => 'meter_****',
],
],
'instanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'errorCode' => [
'description' => '错误码。',
'type' => 'string',
'example' => '1062',
],
'user' => [
'description' => '数据库用户名。',
'type' => 'string',
'example' => 'dbgat****',
],
'sql' => [
'description' => 'SQL语句。',
'type' => 'string',
'example' => 'insert into meter_****',
],
'timestamp' => [
'description' => '执行时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1644476100435',
],
],
],
'example' => '[ { "sqlId": "2cd4432556c3dab9d825ba363637****", "database": "dbgateway", "originHost": "172.16.1****", "tables": [ "meter_****" ], "instanceId": "rm-2ze8g2am97624****", "errorCode": "1062", "user": "dbgat****", "sql": "insert into meter_****\\n ( \\n ****\\n )\\n values (now(), now(), \'bbbc8624-5e19-455a-9714-8466f688****\', \'2022-02-10 14:00:00\', \'{\\"endTime\\":\\"2022-02-10 14:00:00\\",\\"endTimestamp\\":1644472800,\\"startTime\\":\\"2022-02-10 13:00:00\\",\\"startTimestamp\\":1644469200}\', null, null)", "timestamp": 1644476100435 }]',
],
'RequestId' => [
'description' => '请求的ID。',
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": [\\n {\\n \\"sqlId\\": \\"2cd4432556c3dab9d825ba363637****\\",\\n \\"database\\": \\"dbgateway\\",\\n \\"originHost\\": \\"172.16.1****\\",\\n \\"tables\\": [\\n \\"meter_****\\"\\n ],\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"errorCode\\": \\"1062\\",\\n \\"user\\": \\"dbgat****\\",\\n \\"sql\\": \\"insert into meter_****\\",\\n \\"timestamp\\": 1644476100435\\n }\\n ],\\n \\"RequestId\\": \\"7172BECE-588A-5961-8126-C216E16B****\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n 2cd4432556c3dab9d825ba363637****\\n dbgateway\\n 172.16.1****\\n meter_****\\n rm-2ze8g2am97624****\\n 1062\\n dbgat****\\n insert into meter_****\\n 1644476100435\\n \\n 7172BECE-588A-5961-8126-C216E16B****\\n true\\n","errorExample":""}]',
'title' => '查询执行错误的SQL样本数据',
'summary' => '调用GetErrorRequestSample接口,异步查询数据库实例SQL洞察结果中执行错误的SQL样本数据,最多返回指定时间范围内20条数据。',
'description' => '> 异步调用后不会立即返回完整结果,当返回数据中**isFinish**取值为**false**时,请等待1s后重新发起调用,直到**isFinish**取值为**true**时,返回完整结果。'."\n"
."\n\n"
.'- 目前仅支持RDS MySQL和PolarDB MySQL版实例,请确保在使用该接口前,该实例已经开启DAS企业版,具体请参见[购买DAS企业版](~~163298~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetAsyncErrorRequestStatResult' => [
'summary' => '调用GetAsyncErrorRequestStatResult接口,异步获取数据库实例SQL洞察结果中指定SQL的执行错误次数。',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'SqlIdList',
'in' => 'query',
'schema' => [
'description' => 'SQL ID,多个SQL ID请使用英文逗号分隔。您可以调用[GetAsyncErrorRequestListByCode](~~410746~~)接口查询实例中产生MySQL错误码的SQL ID。',
'type' => 'string',
'required' => false,
'example' => 'ad78a4e7d3ce81590c9dc2d5f4bc****,0f92feacd92c048b06a16617a633****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => '数据库名称。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '返回数据列表。',
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '返回的数据。',
'type' => 'object',
'properties' => [
'fail' => [
'description' => '请求是否失败:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'false',
],
'isFinish' => [
'description' => '异步请求是否执行完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'resultId' => [
'description' => '异步请求ID。',
'type' => 'string',
'example' => 'async__61f45ee381b2fa4e8a6545e3bee9****',
],
'state' => [
'description' => '异步请求的执行状态:'."\n"
."\n"
.'- **RUNNING**:正在运行。'."\n"
."\n"
.'- **SUCCESS**:成功。'."\n"
."\n"
.'- **FAIL**:失败。',
'type' => 'string',
'example' => 'SUCCESS',
],
'timestamp' => [
'description' => '执行时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1644558576717',
],
'complete' => [
'description' => '异步请求是否完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'result' => [
'description' => '异步请求的返回数据列表。',
'type' => 'object',
'additionalProperties' => [
'type' => 'object',
'properties' => [
'sqlId' => [
'type' => 'string',
],
'instanceId' => [
'type' => 'string',
],
'count' => [
'type' => 'integer',
'format' => 'int32',
],
],
],
],
],
'example' => '{ "fail": false, "data": { "ad78a4e7d3ce81590c9dc2d5f4bc****": { "sqlId": "ad78a4e7d3ce81590c9dc2d5f4bc****", "instanceId": "rm-2ze8g2am97624****", "count": 1 }, "0f92feacd92c048b06a16617a633****": { "sqlId": "0f92feacd92c048b06a16617a633****", "instanceId": "rm-2ze8g2am97624****", "count": 2 } }, "resultId": "async__61f45ee381b2fa4e8a6545e3bee9****", "isFinish": true, "state": "SUCCESS", "complete": true, "timestamp": 1644558576717 }',
],
'RequestId' => [
'description' => '请求的ID。',
'type' => 'string',
'example' => '3FC3F8EB-3564-5D1A-B187-3B03E5B0****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"fail\\": false,\\n \\"isFinish\\": true,\\n \\"resultId\\": \\"async__61f45ee381b2fa4e8a6545e3bee9****\\",\\n \\"state\\": \\"SUCCESS\\",\\n \\"timestamp\\": 1644558576717,\\n \\"complete\\": true,\\n \\"result\\": {\\n \\"key\\": {\\n \\"sqlId\\": \\"\\",\\n \\"instanceId\\": \\"\\",\\n \\"count\\": 0\\n }\\n }\\n },\\n \\"RequestId\\": \\"3FC3F8EB-3564-5D1A-B187-3B03E5B0****\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n false\\n true\\n async__61f45ee381b2fa4e8a6545e3bee9****\\n SUCCESS\\n 1644558576717\\n true\\n \\n \\n ad78a4e7d3ce81590c9dc2d5f4bc****\\n rm-2ze8g2am97624****\\n 1\\n \\n \\n \\n 3FC3F8EB-3564-5D1A-B187-3B03E5B0****\\n true\\n","errorExample":""}]',
'title' => '获取指定SQL的执行错误次数',
'description' => '> 异步调用后不会立即返回完整结果,当返回数据中**isFinish**取值为**false**时,请等待1s后重新发起调用,直到**isFinish**取值为**true**时,返回完整结果。'."\n"
."\n\n"
.'- 目前仅支持RDS MySQL和PolarDB MySQL版实例,请确保在使用该接口前,该实例已经开启DAS企业版,具体请参见[购买DAS企业版](~~163298~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetAsyncErrorRequestListByCode' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-wz9s658475e58****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需要在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'ErrorCode',
'in' => 'query',
'schema' => [
'description' => '错误码,您可调用[GetAsyncErrorRequestStatByCode](~~409804~~)接口查询实例的MySQL错误码。',
'type' => 'string',
'required' => false,
'example' => '1064',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '返回的数据。',
'type' => 'object',
'properties' => [
'fail' => [
'description' => '请求是否失败:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'false',
],
'result' => [
'description' => '产生指定MySQL错误码的SQL ID列表。',
'type' => 'array',
'items' => [
'description' => '产生指定MySQL错误码的SQL ID列表。',
'type' => 'object',
'properties' => [
'sqlId' => [
'description' => 'SQL ID。',
'type' => 'string',
'example' => 'ad78a4e7d3ce81590c9dc2d5f4bc****',
],
'instanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
],
],
],
'resultId' => [
'description' => '异步请求ID。',
'type' => 'string',
'example' => 'async__c39d43ece52d35267cc4b92a0c26****',
],
'isFinish' => [
'description' => '异步请求是否执行完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'state' => [
'description' => '异步请求的执行状态:'."\n"
."\n"
.'- **RUNNING**:正在运行。'."\n"
."\n"
.'- **SUCCESS**:成功。'."\n"
."\n"
.'- **FAIL**:失败。',
'type' => 'string',
'example' => 'SUCCESS',
],
'complete' => [
'description' => '异步请求是否完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'timestamp' => [
'description' => '执行时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1644559407740',
],
],
'example' => '{ "fail": false, "data": [ { "sqlId": "ad78a4e7d3ce81590c9dc2d5f4bc****", "instanceId": "rm-2ze8g2am97624****" }, { "sqlId": "0f92feacd92c048b06a16617a633****", "instanceId": "rm-2ze8g2am97624****" } ], "resultId": "async__c39d43ece52d35267cc4b92a0c26****", "isFinish": true, "state": "SUCCESS", "complete": true, "timestamp": 1644559407740 }',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '9CB97BC4-6479-55D0-B9D0-EA925AFE****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"fail\\": false,\\n \\"result\\": [\\n {\\n \\"sqlId\\": \\"ad78a4e7d3ce81590c9dc2d5f4bc****\\",\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\"\\n }\\n ],\\n \\"resultId\\": \\"async__c39d43ece52d35267cc4b92a0c26****\\",\\n \\"isFinish\\": true,\\n \\"state\\": \\"SUCCESS\\",\\n \\"complete\\": true,\\n \\"timestamp\\": 1644559407740\\n },\\n \\"RequestId\\": \\"9CB97BC4-6479-55D0-B9D0-EA925AFE****\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n false\\n \\n ad78a4e7d3ce81590c9dc2d5f4bc****\\n rm-2ze8g2am97624****\\n \\n async__c39d43ece52d35267cc4b92a0c26****\\n true\\n SUCCESS\\n true\\n 1644559407740\\n \\n 9CB97BC4-6479-55D0-B9D0-EA925AFE****\\n true\\n","errorExample":""}]',
'title' => '查询产生指定MySQL错误码的SQL ID',
'summary' => '调用GetAsyncErrorRequestListByCode接口,异步查询数据库实例SQL洞察结果中产生指定MySQL错误码的SQL ID。',
'description' => '> 异步调用后不会立即返回完整结果,当返回数据中**isFinish**取值为**false**时,请等待1s后重新发起调用,直到**isFinish**取值为**true**时,返回完整结果。'."\n"
."\n\n"
.'- 目前仅支持RDS MySQL和PolarDB MySQL版实例,请确保在使用该接口前,该实例已经开启DAS企业版,具体请参见[购买DAS企业版](~~163298~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 2024年09月01日起,由于SQL的模板化算法优化,调用本接口时,SqlId 字段的值将发生变更。详情请参见[【通知】SQL模板化算法优化](~~2845725~~)。',
],
'GetAsyncErrorRequestStatByCode' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-wz9s658475e58****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询的结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => '数据库名称。',
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => '返回的数据。'."\n"
."\n",
'type' => 'object',
'properties' => [
'fail' => [
'description' => '请求是否失败:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'false',
],
'isFinish' => [
'description' => '异步请求是否执行完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'resultId' => [
'description' => '异步请求ID。',
'type' => 'string',
'example' => 'async__fcd7c35788e62324622c3b4a03de****',
],
'state' => [
'description' => '异步请求的执行状态:'."\n"
."\n"
.'- **RUNNING**:正在运行。'."\n"
."\n"
.'- **SUCCESS**:成功。'."\n"
."\n"
.'- **FAIL**:失败。',
'type' => 'string',
'example' => 'SUCCESS',
],
'timestamp' => [
'description' => '执行时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1644560866961',
],
'complete' => [
'description' => '异步请求是否完成:'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'result' => [
'description' => '返回的错误码以及每个错误码对应的SQL数量列表。',
'type' => 'array',
'items' => [
'description' => '返回的错误码以及每个错误码对应的SQL数量列表。',
'type' => 'object',
'properties' => [
'instanceId' => [
'description' => '实例ID。',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'errorCode' => [
'description' => '错误码。',
'type' => 'string',
'example' => '1062',
],
'count' => [
'description' => '错误码对应SQL的数量。',
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
],
],
],
],
'example' => '{ "fail": false, "data": [ { "instanceId": "rm-2ze8g2am97624****", "count": 1, "errorCode": "1062" }, { "instanceId": "rm-2ze8g2am97624****", "count": 2, "errorCode": "1064" } ], "resultId": "async__fcd7c35788e62324622c3b4a03de****", "isFinish": true, "state": "SUCCESS", "complete": true, "timestamp": 1644560866961 }',
],
'RequestId' => [
'description' => '请求的ID。',
'type' => 'string',
'example' => '840F51F7-9C01-538D-94F6-AE712905****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Code\\": 200,\\n \\"Message\\": \\"Successful\\",\\n \\"Data\\": {\\n \\"fail\\": false,\\n \\"isFinish\\": true,\\n \\"resultId\\": \\"async__fcd7c35788e62324622c3b4a03de****\\",\\n \\"state\\": \\"SUCCESS\\",\\n \\"timestamp\\": 1644560866961,\\n \\"complete\\": true,\\n \\"result\\": [\\n {\\n \\"instanceId\\": \\"rm-2ze8g2am97624****\\",\\n \\"errorCode\\": \\"1062\\",\\n \\"count\\": 1\\n }\\n ]\\n },\\n \\"RequestId\\": \\"840F51F7-9C01-538D-94F6-AE712905****\\",\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n 200\\n Successful\\n \\n false\\n true\\n async__fcd7c35788e62324622c3b4a03de****\\n SUCCESS\\n 1644560866961\\n true\\n \\n rm-2ze8g2am97624****\\n 1062\\n 1\\n \\n \\n 840F51F7-9C01-538D-94F6-AE712905****\\n true\\n","errorExample":""}]',
'title' => '查询MySQL错误码以及每个错误码对应的SQL数量',
'summary' => '调用GetAsyncErrorRequestStatByCode接口,异步查询数据库实例SQL洞察结果中的MySQL错误码以及每个错误码对应的SQL数量。',
'description' => '> 异步调用后不会立即返回完整结果,当返回数据中**isFinish**取值为**false**时,请等待1s后重新发起调用,直到**isFinish**取值为**true**时,返回完整结果。'."\n"
."\n"
.'- 目前仅支持RDS MySQL和PolarDB MySQL版实例,请确保在使用该接口前,该实例已经开启DAS企业版,具体请参见[购买DAS企业版](~~163298~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetFullRequestOriginStatByInstanceId' => [
'methods' => [
'post',
],
'schemes' => [
'https',
'http',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'UserId',
'in' => 'query',
'schema' => [
'description' => '用户ID,即创建数据库实例的阿里云主账号ID。'."\n"
."\n"
.'> 非必填,输入目标数据库实例ID后,在调用API接口时,系统会自动获取用户ID。',
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp12v7243x012****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1644716649000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
.' '."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1644803409000',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => '排序字段,默认为**count**。'."\n"
."\n"
.'- **count**:执行次数。'."\n"
."\n"
.'- **avgRt**:平均执行时间。'."\n"
."\n"
.'- **rtRate**:耗时比例。'."\n"
."\n"
.'- **rowsExamined**:总扫描行数。'."\n"
."\n"
.'- **avgRowsExamined**:平均扫描行数。'."\n"
."\n"
.'- **avgRowsReturned**:平均返回行数。',
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => '升序排序开关,默认关闭。',
'type' => 'boolean',
'required' => false,
'example' => '关闭',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询每页最大记录数,默认为20。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '20',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => 'SQL语句的类型,取值包括:**SELECT**、**INSERT**、**UPDATE**、**DELETE**、**MERGE**、**ALTER**、**CREATEINDEX**、**DROPINDEX**、**CREATE**、**DROP**、**SET**、**DESC**、**REPLACE**、**CALL**、**BEGIN**、**DESCRIBE**、**ROLLBACK**、**FLUSH**、**USE**、**SHOW**、**START**、**COMMIT**和**RENAME**。'."\n"
."\n"
.'> 当数据库实例为RDS MySQL、PolarDB MySQL版、PolarDB-X 2.0时,可以通过SQL语句类型进行统计。',
'type' => 'string',
'required' => false,
'example' => 'SELECT',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'PolarDB-X 2.0数据库实例节点(角色)信息。'."\n"
."\n"
.'- **polarx_cn**:计算节点。'."\n"
."\n"
.'- **polarx_en**:数据节点。'."\n",
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '返回信息的详细列表。',
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Data' => [
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'List' => [
'description' => '全量请求数据列表。',
'type' => 'array',
'items' => [
'description' => '全量请求数据列表。',
'type' => 'object',
'properties' => [
'Key' => [
'description' => '执行SQL的客户端IP地址。',
'type' => 'string',
'example' => '172.26.6****',
],
'AvgFetchRows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点平均拉取数据节点的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgLockWaitTime' => [
'description' => '平均锁等待时长,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.00009589874265269765',
],
'AvgLogicalRead' => [
'description' => '平均逻辑读。',
'type' => 'number',
'format' => 'double',
'example' => '654.4470327860251',
],
'AvgPhysicalAsyncRead' => [
'description' => '平均物理异步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgPhysicalSyncRead' => [
'description' => '平均物理同步读取。',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'AvgRows' => [
'description' => '平均行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgExaminedRows' => [
'description' => '平均扫描行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、RDS PostgreSQL、PolarDB MySQL版。',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgReturnedRows' => [
'description' => '平均返回行数。',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgUpdatedRows' => [
'description' => '平均修改行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、PolarDB-X 2.0。',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgRt' => [
'description' => '平均执行耗时。',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'AvgSqlCount' => [
'description' => '平均SQL数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'Count' => [
'description' => '总执行次数。',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'CountRate' => [
'description' => '执行次数比例。',
'type' => 'number',
'format' => 'double',
'example' => '0.0586',
],
'Database' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'dbtest01',
],
'ErrorCount' => [
'description' => '执行错误次数。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'FetchRows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点拉取数据节点的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Ip' => [
'description' => '实例的网络地址。',
'type' => 'string',
'example' => 'rm-uf6dyi58dm6****.mysql.rds.aliy****.com',
],
'LockWaitTime' => [
'description' => '锁等待时长,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '1089.4177720290281',
],
'LogicalRead' => [
'description' => '逻辑读。',
'type' => 'integer',
'format' => 'int64',
'example' => '7.434573266E9',
],
'OriginHost' => [
'description' => '执行SQL的客户端IP地址。',
'type' => 'string',
'example' => '172.26.6****',
],
'PhysicalAsyncRead' => [
'description' => '物理异步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'PhysicalSyncRead' => [
'description' => '物理同步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Port' => [
'description' => '端口号。',
'type' => 'integer',
'format' => 'int64',
'example' => '3306',
],
'Rows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点总更新或返回的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'ExaminedRows' => [
'description' => '总扫描行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、RDS PostgreSQL、PolarDB MySQL版。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'RtGreaterThanOneSecondCount' => [
'description' => '执行时长大于1秒的SQL数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'RtRate' => [
'description' => '耗时比例。',
'type' => 'number',
'format' => 'double',
'example' => '0.1384',
],
'SqlCount' => [
'description' => 'SQL的数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'SumUpdatedRows' => [
'description' => '总变更行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Version' => [
'description' => '版本。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'VpcId' => [
'description' => 'VPC ID。',
'type' => 'string',
'example' => 'vpc-2zentqj1sk4qmolci****',
],
],
],
],
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"7172BECE-588A-5961-8126-C216E16B****\\",\\n \\"Data\\": {\\n \\"List\\": [\\n {\\n \\"Key\\": \\"172.26.6****\\",\\n \\"AvgFetchRows\\": 0,\\n \\"AvgLockWaitTime\\": 0.00009589874265269765,\\n \\"AvgLogicalRead\\": 654.4470327860251,\\n \\"AvgPhysicalAsyncRead\\": 0,\\n \\"AvgPhysicalSyncRead\\": 0,\\n \\"AvgRows\\": 0,\\n \\"AvgExaminedRows\\": 10000,\\n \\"AvgReturnedRows\\": 10000,\\n \\"AvgUpdatedRows\\": 10000,\\n \\"AvgRt\\": 2.499,\\n \\"AvgSqlCount\\": 10000,\\n \\"Count\\": 100000,\\n \\"CountRate\\": 0.0586,\\n \\"Database\\": \\"dbtest01\\",\\n \\"ErrorCount\\": 1,\\n \\"FetchRows\\": 200,\\n \\"Ip\\": \\"rm-uf6dyi58dm6****.mysql.rds.aliy****.com\\",\\n \\"LockWaitTime\\": 1089.4177720290281,\\n \\"LogicalRead\\": 7434573266,\\n \\"OriginHost\\": \\"172.26.6****\\",\\n \\"PhysicalAsyncRead\\": 0,\\n \\"PhysicalSyncRead\\": 0,\\n \\"Port\\": 3306,\\n \\"Rows\\": 0,\\n \\"ExaminedRows\\": 10000,\\n \\"RtGreaterThanOneSecondCount\\": 2,\\n \\"RtRate\\": 0.1384,\\n \\"SqlCount\\": 200,\\n \\"SumUpdatedRows\\": 200,\\n \\"Version\\": 1,\\n \\"VpcId\\": \\"vpc-2zentqj1sk4qmolci****\\"\\n }\\n ],\\n \\"Total\\": 1\\n },\\n \\"Code\\": 200,\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n 7172BECE-588A-5961-8126-C216E16B****\\n \\n \\n 172.26.6****\\n 0\\n 0.00009589874265269765\\n 654.4470327860251\\n 0\\n 0\\n 0\\n 10000\\n 10000\\n 10000\\n 2.499\\n 10000\\n 100000\\n 0.0586\\n dbtest01\\n 1\\n 200\\n rm-uf6dyi58dm6****.mysql.rds.aliy****.com\\n 1089.4177720290281\\n 172.26.6****\\n 0\\n 0\\n 3306\\n 0\\n 10000\\n 2\\n 0.1384\\n 200\\n 200\\n 1\\n vpc-2zentqj1sk4qmolci****\\n
\\n 1\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '按照访问来源统计全量请求数据',
'summary' => '调用GetFullRequestOriginStatByInstanceId接口,按照访问来源统计数据库实例SQL洞察结果中的全量请求数据。',
'description' => 'SQL洞察功能可对SQL进行健康情况诊断、性能问题排查,详情请参见[SQL洞察](~~204096~~)。'."\n"
."\n"
.'- 目前支持的数据库实例请参见[DAS企业版使用说明](~~190912~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetFullRequestStatResultByInstanceId' => [
'methods' => [
'post',
],
'schemes' => [
'https',
'http',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'UserId',
'in' => 'query',
'schema' => [
'description' => '用户ID,即创建数据库实例的阿里云主账号ID。'."\n"
."\n"
.'> 非必填,输入目标数据库实例ID后,在调用API接口时,系统会自动获取用户ID。',
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => '实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp12v7243x012****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'SQL ID。'."\n"
."\n"
.'> 填写SQL ID时,统计目标SQL ID的全量请求数据;为空时,统计整个数据库实例的全量请求数据。',
'type' => 'string',
'required' => false,
'example' => 'd71f82be1eef72bd105128204d2e****',
],
],
[
'name' => 'OriginHost',
'in' => 'query',
'schema' => [
'description' => '执行SQL的客户端IP地址。'."\n"
."\n"
.'> 非必填,输入目标客户端IP地址后,统计目标客户端IP地址的全量请求数据;为空时,统计整个数据库实例的全量请求数据。',
'type' => 'string',
'required' => false,
'example' => '172.26.XX.XXX',
],
],
[
'name' => 'Keyword',
'in' => 'query',
'schema' => [
'description' => '查询关键词。',
'type' => 'string',
'required' => false,
'example' => 'dbtest01',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需要在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1645581813000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1645668213000',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => '排序字段,默认为**count**。'."\n"
."\n"
.'- **count**:执行次数。'."\n"
."\n"
.'- **avgRt**:平均执行时间。'."\n"
."\n"
.'- **rtRate**:耗时比例。'."\n"
."\n"
.'- **rowsExamined**:总扫描行数。'."\n"
."\n"
.'- **avgRowsExamined**:平均扫描行数。'."\n"
."\n"
.'- **avgRowsReturned**:平均返回行数。'."\n"
."\n",
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => '升序排序开关,默认关闭。',
'type' => 'boolean',
'required' => false,
'example' => '关闭',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => '分页查询每页数据量,默认为20。',
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '20',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => 'SQL语句的类型,取值包括:**SELECT**、**INSERT**、**UPDATE**、**DELETE**、**LOGIN**、**LOGOUT**、**MERGE**、**ALTER**、**CREATEINDEX**、**DROPINDEX**、**CREATE**、**DROP**、**SET**、**DESC**、**REPLACE**、**CALL**、**BEGIN**、**DESCRIBE**、**ROLLBACK**、**FLUSH**、**USE**、**SHOW**、**START**、**COMMIT**和**RENAME**。'."\n"
."\n"
.'> 当数据库实例为RDS MySQL、PolarDB MySQL版、PolarDB-X 2.0时,可以通过SQL语句类型进行统计。',
'type' => 'string',
'required' => false,
'example' => 'SELECT',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => '数据库名。',
'type' => 'string',
'required' => false,
'example' => 'dbtest01',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'PolarDB-X 2.0数据库实例节点信息。'."\n"
."\n"
.'- **polarx_cn**:计算节点。'."\n"
."\n"
.'- **polarx_dn**:数据节点。',
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => '返回信息的详细列表。',
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Data' => [
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'Result' => [
'description' => '返回的全量请求数据。',
'type' => 'object',
'properties' => [
'List' => [
'description' => '全量请求数据列表。',
'type' => 'array',
'items' => [
'description' => '全量请求数据列表。',
'type' => 'object',
'properties' => [
'SqlId' => [
'description' => 'SQL ID。',
'type' => 'string',
'example' => 'd71f82be1eef72bd105128204d2e****',
],
'AvgFetchRows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点平均拉取数据节点的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgLockWaitTime' => [
'description' => '平均锁等待时长,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.00009589874265269765',
],
'AvgLogicalRead' => [
'description' => '平均逻辑读。',
'type' => 'number',
'format' => 'double',
'example' => '654.4470327860251',
],
'AvgPhysicalAsyncRead' => [
'description' => '平均物理异步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgPhysicalSyncRead' => [
'description' => '平均物理同步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgExaminedRows' => [
'description' => '平均扫描行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、RDS PostgreSQL、PolarDB MySQL版。',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgReturnedRows' => [
'description' => '平均返回行数。',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgUpdatedRows' => [
'description' => '平均修改行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、PolarDB-X 2.0。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRt' => [
'description' => '平均执行耗时。',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'AvgSqlCount' => [
'description' => '平均SQL计数。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'Count' => [
'description' => '总执行次数。',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'CountRate' => [
'description' => '执行次数比例。',
'type' => 'number',
'format' => 'double',
'example' => '0.0586',
],
'Database' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'dbtest01',
],
'ErrorCount' => [
'description' => '执行错误次数。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'FetchRows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点拉取数据节点的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Ip' => [
'description' => '实例的网络地址。',
'type' => 'string',
'example' => 'rm-uf6dyi58dm6****.mysql.rds.aliy****.com',
],
'LockWaitTime' => [
'description' => '锁等待时长,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '1089.4177720290281',
],
'LogicalRead' => [
'description' => '逻辑读。',
'type' => 'integer',
'format' => 'int64',
'example' => '7.434573266E9',
],
'PhysicalAsyncRead' => [
'description' => '物理异步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'PhysicalSyncRead' => [
'description' => '物理同步读取。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Port' => [
'description' => '端口号。',
'type' => 'integer',
'format' => 'int64',
'example' => '3306',
],
'Psql' => [
'description' => 'SQL模板。',
'type' => 'string',
'example' => 'select * from dbtest01 where ****',
],
'Rows' => [
'description' => 'PolarDB-X 2.0数据库实例计算节点总更新或返回的行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'ExaminedRows' => [
'description' => '总扫描行数。'."\n"
."\n"
.'> 目前支持该字段的数据库:RDS MySQL、RDS PostgreSQL、PolarDB MySQL版。',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'RtGreaterThanOneSecondCount' => [
'description' => '执行时长大于1秒的SQL数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '20',
],
'RtRate' => [
'description' => '耗时比例。',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'SqlCount' => [
'description' => 'SQL的数量。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'SumUpdatedRows' => [
'description' => '总变更行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '100',
],
'Tables' => [
'description' => '数据库表名。',
'type' => 'array',
'items' => [
'description' => '数据库表名。'."\n",
'type' => 'string',
'example' => 'tabletest01,tabletest02',
],
],
'Version' => [
'description' => '版本。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'VpcId' => [
'description' => 'VPC ID。',
'type' => 'string',
'example' => 'vpc-2zentqj1sk4qmolci****',
],
],
],
],
'Total' => [
'description' => '总数据量。',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
],
],
'Fail' => [
'description' => '请求是否失败。'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'false',
],
'IsFinish' => [
'description' => '异步请求是否执行完成。'."\n"
."\n"
.'- **true**:是。'."\n"
."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'ResultId' => [
'description' => '请求的ID。',
'type' => 'string',
'example' => '9CB97BC4-6479-55D0-B9D0-EA925AFE****',
],
'State' => [
'description' => '异步请求的执行状态。'."\n"
."\n"
.'- **RUNNING**:正在运行。'."\n"
."\n"
.'- **SUCCESS**:成功。'."\n"
."\n"
.'- **FAIL**:失败。',
'type' => 'string',
'example' => 'SUCCESS',
],
'Timestamp' => [
'description' => '执行时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1645668213000',
],
],
],
'Code' => [
'description' => '返回的状态码。',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"7172BECE-588A-5961-8126-C216E16B****\\",\\n \\"Data\\": {\\n \\"Result\\": {\\n \\"List\\": [\\n {\\n \\"SqlId\\": \\"d71f82be1eef72bd105128204d2e****\\",\\n \\"AvgFetchRows\\": 0,\\n \\"AvgLockWaitTime\\": 0.00009589874265269765,\\n \\"AvgLogicalRead\\": 654.4470327860251,\\n \\"AvgPhysicalAsyncRead\\": 0,\\n \\"AvgPhysicalSyncRead\\": 0,\\n \\"AvgExaminedRows\\": 10000,\\n \\"AvgReturnedRows\\": 10000,\\n \\"AvgUpdatedRows\\": 10000,\\n \\"AvgRt\\": 2.499,\\n \\"AvgSqlCount\\": 10000,\\n \\"Count\\": 100000,\\n \\"CountRate\\": 0.0586,\\n \\"Database\\": \\"dbtest01\\",\\n \\"ErrorCount\\": 1,\\n \\"FetchRows\\": 0,\\n \\"Ip\\": \\"rm-uf6dyi58dm6****.mysql.rds.aliy****.com\\",\\n \\"LockWaitTime\\": 1089.4177720290281,\\n \\"LogicalRead\\": 7434573266,\\n \\"PhysicalAsyncRead\\": 0,\\n \\"PhysicalSyncRead\\": 0,\\n \\"Port\\": 3306,\\n \\"Psql\\": \\"select * from dbtest01 where ****\\",\\n \\"Rows\\": 0,\\n \\"ExaminedRows\\": 10000,\\n \\"RtGreaterThanOneSecondCount\\": 20,\\n \\"RtRate\\": 2.499,\\n \\"SqlCount\\": 200,\\n \\"SumUpdatedRows\\": 100,\\n \\"Tables\\": [\\n \\"tabletest01,tabletest02\\"\\n ],\\n \\"Version\\": 1,\\n \\"VpcId\\": \\"vpc-2zentqj1sk4qmolci****\\"\\n }\\n ],\\n \\"Total\\": 1\\n },\\n \\"Fail\\": false,\\n \\"IsFinish\\": true,\\n \\"ResultId\\": \\"9CB97BC4-6479-55D0-B9D0-EA925AFE****\\",\\n \\"State\\": \\"SUCCESS\\",\\n \\"Timestamp\\": 1645668213000\\n },\\n \\"Code\\": 200,\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n 7172BECE-588A-5961-8126-C216E16B****\\n \\n \\n \\n d71f82be1eef72bd105128204d2e****\\n 0\\n 0.00009589874265269765\\n 654.4470327860251\\n 0\\n 0\\n 10000\\n 10000\\n 10000\\n 2.499\\n 10000\\n 100000\\n 0.0586\\n dbtest01\\n 1\\n 0\\n rm-uf6dyi58dm6****.mysql.rds.aliy****.com\\n 1089.4177720290281\\n 0\\n 0\\n 3306\\n select * from dbtest01 where ****\\n 0\\n 10000\\n 20\\n 2.499\\n 200\\n 100\\n tabletest01,tabletest02\\n 1\\n vpc-2zentqj1sk4qmolci****\\n
\\n 1\\n \\n false\\n true\\n 9CB97BC4-6479-55D0-B9D0-EA925AFE****\\n SUCCESS\\n 1645668213000\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '按照SQL ID异步统计全量请求数据',
'summary' => '调用GetFullRequestStatResultByInstanceId接口,按照SQL ID异步统计数据库实例SQL洞察结果中的全量请求数据。',
'description' => '> 异步调用后不会立即返回完整结果,当返回数据中isFinish取值为**false**时,请等待1s后重新发起调用,直到isFinish取值为**true**时,返回完整结果。'."\n"
."\n"
.'SQL洞察功能可对SQL进行健康情况诊断、性能问题排查,详情请参见[SQL洞察](~~204096~~)。'."\n"
."\n"
.'- 目前支持的数据库实例请参见[DAS企业版使用说明](~~190912~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 2024年09月01日起,由于SQL的模板化算法优化,调用本接口时,SqlId 字段的值将发生变更。详情请参见[【通知】SQL模板化算法优化](~~2845725~~)。',
],
'GetFullRequestSampleByInstanceId' => [
'summary' => '调用GetFullRequestSampleByInstanceId接口,按照SQL ID查询数据库实例SQL洞察结果中的SQL样本数据,最大返回20条样本数据。',
'methods' => [
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeNodes' => [
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'UserId',
'in' => 'formData',
'schema' => [
'description' => '用户ID,即创建数据库实例的阿里云主账号ID。'."\n"
."\n"
.'> 非必填,输入目标数据库实例ID后,在调用API接口时,系统会自动获取用户ID。',
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '实例ID。'."\n"
."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SqlId',
'in' => 'formData',
'schema' => [
'description' => 'SQL ID。',
'type' => 'string',
'required' => true,
'example' => '651b56fe9418d48edb8fdf0980ec****',
],
],
[
'name' => 'Start',
'in' => 'formData',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询开始时间需要在数据库实例SQL洞察存储时长范围内,最大不能早于当前时间90天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1660097421000',
],
],
[
'name' => 'End',
'in' => 'formData',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能小于1小时。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1660104621000',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'PolarDB-X 2.0数据库实例节点信息。'."\n"
."\n"
.'- **polarx_cn**:计算节点。'."\n"
.'- **polarx_en**:数据节点。',
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。'."\n"
."\n",
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Data' => [
'description' => '返回数据',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Timestamp' => [
'description' => '执行SQL的时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1660100753556',
],
'SqlId' => [
'description' => 'SQL ID。',
'type' => 'string',
'example' => '651b56fe9418d48edb8fdf0980ec****',
],
'Sql' => [
'description' => 'SQL样本。',
'type' => 'string',
'example' => 'select * from testdb01 where ****',
],
'Database' => [
'description' => '数据库名。',
'type' => 'string',
'example' => 'dbtest',
],
'Rt' => [
'description' => '执行耗时,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.409789',
],
'User' => [
'description' => '执行SQL的用户名称。',
'type' => 'string',
'example' => 'testuser',
],
'LockWaitTime' => [
'description' => '锁等待时长,单位为秒。',
'type' => 'number',
'format' => 'double',
'example' => '0.0137',
],
'LogicalRead' => [
'description' => '逻辑读。',
'type' => 'number',
'format' => 'double',
'example' => '165848',
],
'PhysicalSyncRead' => [
'description' => '物理同步读取。',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'PhysicalAsyncRead' => [
'description' => '物理异步读取。',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'RowsExamined' => [
'title' => '扫描行数',
'description' => '总扫描行数。'."\n"
.'> 目前支持该字段的数据库:RDS MySQL、RDS PostgreSQL、PolarDB MySQL版。',
'type' => 'integer',
'format' => 'int64',
'example' => '2048576',
],
'RowsReturned' => [
'description' => '返回行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '14',
],
'OriginHost' => [
'description' => '访问来源。',
'type' => 'string',
'example' => '172.17.XX.XX',
],
'ScanRows' => [
'title' => '扫描行数, RDS MySQL DescribeTemplateSqlDetail',
'description' => '扫描行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'UpdateRows' => [
'title' => '更新行数, RDS MySQL DescribeTemplateSqlDetail',
'description' => '更新行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'SqlType' => [
'description' => 'SQL语句的类型,取值包括:**SELECT**、**INSERT**、**UPDATE**、**DELETE**、**LOGIN**、**LOGOUT**、**MERGE**、**ALTER**、**CREATEINDEX**、**DROPINDEX**、**CREATE**、**DROP**、**SET**、**DESC**、**REPLACE**、**CALL**、**BEGIN**、**DESCRIBE**、**ROLLBACK**、**FLUSH**、**USE**、**SHOW**、**START**、**COMMIT**和**RENAME**。',
'type' => 'string',
'example' => 'SELECT',
],
'Scnt' => [
'title' => 'polarx cn节点,dn请求总数',
'description' => 'PolarDB-X 2.0计算节点(CN)的DN请求数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Rows' => [
'title' => 'polarx cn节点,总更新/返回行数',
'description' => 'PolarDB-X 2.0计算节点(CN)的更新/返回行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Frows' => [
'title' => 'polarx cn节点,拉取行数',
'description' => 'PolarDB-X 2.0计算节点(CN)的拉取行数。',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
],
],
],
'Code' => [
'description' => '返回的状态码。'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'boolean',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'responseDemo' => '[{"type":"json","example":"{\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"0A74B755-98B7-59DB-8724-1321B394****\\",\\n \\"Data\\": [\\n {\\n \\"Timestamp\\": 1660100753556,\\n \\"SqlId\\": \\"651b56fe9418d48edb8fdf0980ec****\\",\\n \\"Sql\\": \\"select * from testdb01 where ****\\",\\n \\"Database\\": \\"dbtest\\",\\n \\"Rt\\": 0.409789,\\n \\"User\\": \\"testuser\\",\\n \\"LockWaitTime\\": 0.0137,\\n \\"LogicalRead\\": 165848,\\n \\"PhysicalSyncRead\\": 0,\\n \\"PhysicalAsyncRead\\": 0,\\n \\"RowsExamined\\": 2048576,\\n \\"RowsReturned\\": 14,\\n \\"OriginHost\\": \\"172.17.XX.XX\\",\\n \\"ScanRows\\": 0,\\n \\"UpdateRows\\": 0,\\n \\"SqlType\\": \\"SELECT\\",\\n \\"Scnt\\": 0,\\n \\"Rows\\": 0,\\n \\"Frows\\": 0\\n }\\n ],\\n \\"Code\\": 200,\\n \\"Success\\": true\\n}","errorExample":""},{"type":"xml","example":"\\n Successful\\n 0A74B755-98B7-59DB-8724-1321B394****\\n \\n 1660100753556\\n 651b56fe9418d48edb8fdf0980ec****\\n select * from testdb01 where ****\\n dbtest\\n \\n testuser\\n 0.0137\\n 165848\\n 0\\n 0\\n 2048576\\n 14\\n 172.17.XX.XX\\n 0\\n 0\\n SELECT\\n 0\\n 0\\n 0\\n \\n 200\\n true\\n","errorExample":""}]',
'title' => '按照SQL ID查询SQL样本数据',
'description' => 'SQL洞察功能可对SQL进行健康情况诊断、性能问题排查,详情请参见[SQL洞察](~~204096~~)。'."\n"
."\n"
.'- 支持的数据库引擎请参见[SQL洞察](~~204096~~)。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'DescribeSqlLogConfig' => [
'summary' => '调用DescribeSqlLogConfig接口,查询数据库实例的DAS企业版配置信息。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '198881',
'abilityTreeNodes' => [
'FEATUREhdmPGXCEW',
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '数据库实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Data' => [
'title' => 'SqlLogConfig',
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'ColdEnable' => [
'description' => '是否开启数据冷存储。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'ColdRetention' => [
'title' => '冷数据存储周期(不落库),通过 retention - hotRetention 计算',
'description' => '数据冷存储时长,单位为天。',
'type' => 'integer',
'format' => 'int32',
'example' => '23',
],
'ColdStartTime' => [
'description' => '数据冷存储开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'CollectorVersion' => [
'description' => '采集器版本。'."\n"
."\n"
.'- **MYSQL_V0**:MySQL V0版。'."\n"
.'- **MYSQL_V1**:MySQL V1版。'."\n"
.'- **MYSQL_V2**:MySQL V2版。'."\n"
.'- **MYSQL_V3**:MySQL V3版。'."\n"
.'- **PG_V1**:PostgreSQL V1版。'."\n"
.'- **rdspg_v1**:RDS PostgreSQL V1版。'."\n"
.'- **polarpg_v1**:PolarDB PostgreSQL版 V1版。',
'type' => 'string',
'example' => 'MYSQL_V3',
],
'HotEnable' => [
'description' => '是否开启数据热存储。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'HotRetention' => [
'description' => '数据热存储时长,单位为天。',
'type' => 'integer',
'format' => 'int32',
'example' => '7',
],
'HotStartTime' => [
'description' => '数据热存储开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'LogFilter' => [
'description' => '预留参数。',
'type' => 'string',
'example' => 'None',
],
'RequestEnable' => [
'description' => '是否开启SQL洞察。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'RequestStartTime' => [
'description' => 'SQL洞察开启时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'RequestStopTime' => [
'description' => 'DAS企业版V1到期时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1715335200000',
],
'Retention' => [
'description' => '数据总存储时长,**HotRetention**与**ColdRetention**之和,单位为天。',
'type' => 'integer',
'format' => 'int32',
'example' => '30',
],
'SqlLogEnable' => [
'description' => '是否开启了DAS企业版。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'SqlLogSource' => [
'description' => '预留参数。',
'type' => 'string',
'example' => 'None',
],
'SqlLogState' => [
'description' => '数据迁移状态。'."\n"
."\n"
.'- **FINISH**: 历史数据迁移完成。'."\n"
.'- **RUNNING**: 历史数据迁移中。'."\n"
.'- **FAILURE**: 历史数据迁移失败。',
'type' => 'string',
'example' => 'FINISH',
],
'SqlLogVisibleTime' => [
'description' => 'DAS企业版开启的时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'SupportMigration' => [
'description' => '预留参数。',
'type' => 'boolean',
'example' => 'None',
],
'SupportVersion' => [
'title' => '当前实例支持的数据库版本(不落库)',
'description' => '当前支持的最新DAS企业版版本。'."\n"
.'- **SQL_LOG_V0**:企业版 V0。'."\n"
.'- **SQL_LOG_V1**:企业版 V1。'."\n"
.'- **SQL_LOG_V2**:企业版 V2。'."\n"
.'- **SQL_LOG_V3**:企业版 V3。'."\n"
.'- **SQL_LOG_NOT_ENABLE**:未开启企业版。'."\n"
.'- **SQL_LOG_NOT_SUPPORT**: 不支持企业版。',
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'Version' => [
'title' => '当前审计日志的版本',
'description' => '当前开启的DAS企业版版本。'."\n"
.'- **SQL_LOG_V0**:企业版 V0。'."\n"
.'- **SQL_LOG_V1**:企业版 V1。'."\n"
.'- **SQL_LOG_V2**:企业版 V2。'."\n"
.'- **SQL_LOG_V3**:企业版 V3。'."\n"
.'- **SQL_LOG_NOT_ENABLE**:未开启企业版。'."\n"
.'- **SQL_LOG_NOT_SUPPORT**: 不支持企业版。',
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
],
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'>请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
.'* **true**:执行成功'."\n"
.'* **false**:执行失败',
'type' => 'string',
'example' => 'true',
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Data\\": {\\n \\"ColdEnable\\": true,\\n \\"ColdRetention\\": 23,\\n \\"ColdStartTime\\": 1683712800000,\\n \\"CollectorVersion\\": \\"MYSQL_V3\\",\\n \\"HotEnable\\": true,\\n \\"HotRetention\\": 7,\\n \\"HotStartTime\\": 1683712800000,\\n \\"LogFilter\\": \\"None\\",\\n \\"RequestEnable\\": true,\\n \\"RequestStartTime\\": 1683712800000,\\n \\"RequestStopTime\\": 1715335200000,\\n \\"Retention\\": 30,\\n \\"SqlLogEnable\\": true,\\n \\"SqlLogSource\\": \\"None\\",\\n \\"SqlLogState\\": \\"FINISH\\",\\n \\"SqlLogVisibleTime\\": 1683712800000,\\n \\"SupportMigration\\": true,\\n \\"SupportVersion\\": \\"SQL_LOG_V3\\",\\n \\"Version\\": \\"SQL_LOG_V3\\"\\n },\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"0A74B755-98B7-59DB-8724-1321B394****\\",\\n \\"Success\\": \\"true\\"\\n}","type":"json"}]',
'title' => '查询DAS企业版配置信息',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
'responseParamsDescription' => '对于**SQL_LOG_V0**(企业版 V0)和**SQL_LOG_V1**(企业版 V1) ,其数据存储在CStore中,视为热存储。开通该版本的数据库实例,查询返回结果中`SqlLogEnable = HotEnable = true, Retention = HotRetention, ColdEnable = false, ColdRetention = 0`。',
],
'ModifySqlLogConfig' => [
'summary' => '调用ModifySqlLogConfig接口,为数据库实例开启或配置DAS企业版。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [
'operationType' => 'update',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '198880',
'abilityTreeNodes' => [
'FEATUREhdmPGXCEW',
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '数据库实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rr-2ze770smbq3tp****',
],
],
[
'name' => 'Enable',
'in' => 'formData',
'schema' => [
'description' => '是否开启DAS企业版:'."\n"
."\n"
.'- **true**:是。'."\n"
.'- **false**:否。'."\n"
.'> 开通企业版时必须配置,默认开启当前支持的最新版本。',
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'RequestEnable',
'in' => 'formData',
'schema' => [
'description' => '是否开启SQL洞察。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。'."\n"
."\n"
.'> 仅支持开通企业版 V3时,需要配置该参数。',
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'Retention',
'in' => 'formData',
'schema' => [
'description' => '数据总存储时长,单位为天,取值为:'."\n"
."\n"
.'- 7'."\n"
.'- 30'."\n"
.'- 180'."\n"
.'- 365'."\n"
."\n"
.'> 开通DAS企业版 V3时,该参数取值必须大于等于30。',
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '30',
],
],
[
'name' => 'HotRetention',
'in' => 'formData',
'schema' => [
'description' => '数据热存储时长,单位为天,取值为[1, 7]范围内的整数。'."\n"
."\n"
.'> 仅支持开通企业版 V3时,需要配置该参数。',
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '1',
],
],
[
'name' => 'Filters',
'in' => 'query',
'style' => 'repeatList',
'schema' => [
'description' => '预留参数。',
'type' => 'array',
'items' => [
'description' => '预留参数。',
'type' => 'object',
'properties' => [
'Key' => [
'description' => '预留参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
'Value' => [
'description' => '预留参数。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
'required' => false,
],
'required' => false,
'maxItems' => 100,
],
],
[
'name' => 'EnableAudit',
'in' => 'query',
'schema' => [
'description' => '开启安全审计。',
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => '03C88D8E-1541-518E-8BFF-BEC6589B6334',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功'."\n"
.'- **false**:执行失败',
'type' => 'string',
'example' => 'false',
],
'Data' => [
'title' => 'SqlLogConfig',
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'SqlLogVisibleTime' => [
'description' => 'DAS企业版开启的时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'RequestStopTime' => [
'description' => 'DAS企业版V1到期时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1715335200000',
],
'CollectorVersion' => [
'description' => '采集器版本。'."\n"
.'- **MYSQL_V0**:MySQL V0版。'."\n"
.'- **MYSQL_V1**:MySQL V1版。'."\n"
.'- **MYSQL_V2**:MySQL V2版。'."\n"
.'- **MYSQL_V3**:MySQL V3版。'."\n"
.'- **PG_V1**:PostgreSQL V1版。'."\n"
.'- **rdspg_v1**:RDS PostgreSQL V1版。'."\n"
.'- **polarpg_v1**:PolarDB PostgreSQL版 V1版。',
'type' => 'string',
'example' => 'MYSQL_V3',
],
'SupportVersion' => [
'title' => '当前实例支持的数据库版本(不落库)',
'description' => '当前支持的最新DAS企业版版本。'."\n"
."\n"
.'- **SQL_LOG_V0**:企业版 V0。'."\n"
.'- **SQL_LOG_V1**:企业版 V1。'."\n"
.'- **SQL_LOG_V2**:企业版 V2。'."\n"
.'- **SQL_LOG_V3**:企业版 V3。'."\n"
.'- **SQL_LOG_NOT_ENABLE**:未开启企业版。'."\n"
.'- **SQL_LOG_NOT_SUPPORT**: 不支持企业版。',
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'ColdRetention' => [
'title' => '冷数据存储周期(不落库),通过 retention - hotRetention 计算',
'description' => '数据冷存储时长,单位为天,由` Retention - HotRetention` 计算获得。',
'type' => 'integer',
'format' => 'int32',
'example' => '23',
],
'SqlLogEnable' => [
'description' => '是否开启了DAS企业版。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'Retention' => [
'description' => '数据总存储时长,单位为天。',
'type' => 'integer',
'format' => 'int32',
'example' => '30',
],
'HotRetention' => [
'description' => '数据热存储时长,单位为天。',
'type' => 'integer',
'format' => 'int32',
'example' => '7',
],
'RequestEnable' => [
'description' => '是否开启SQL洞察。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'false',
],
'Version' => [
'title' => '当前审计日志的版本',
'description' => '当前开启的DAS企业版版本。'."\n"
."\n"
.'- **SQL_LOG_V0**:企业版 V0。'."\n"
.'- **SQL_LOG_V1**:企业版 V1。'."\n"
.'- **SQL_LOG_V2**:企业版 V2。'."\n"
.'- **SQL_LOG_V3**:企业版 V3。'."\n"
.'- **SQL_LOG_NOT_ENABLE**:未开启企业版。'."\n"
.'- **SQL_LOG_NOT_SUPPORT**: 不支持企业版。',
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'RequestStartTime' => [
'description' => 'SQL洞察开启时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'HotEnable' => [
'description' => '是否开启数据热存储。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'HotStartTime' => [
'description' => '数据热存储开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'ColdEnable' => [
'description' => '是否开启数据冷存储。'."\n"
.'- **true**:是。'."\n"
.'- **false**:否。',
'type' => 'boolean',
'example' => 'true',
],
'ColdStartTime' => [
'description' => '数据冷存储开始时间,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'SqlLogState' => [
'description' => '数据迁移状态。'."\n"
."\n"
.'- **FINISH**: 历史数据迁移完成。'."\n"
.'- **RUNNING**: 历史数据迁移中。'."\n"
.'- **FAILURE**: 历史数据迁移失败。',
'type' => 'string',
'example' => 'FINISH',
],
'LogFilter' => [
'description' => '预留参数。',
'type' => 'string',
'example' => 'None',
],
'SqlLogSource' => [
'title' => '开启审计日志来源',
'description' => '开启审计日志来源',
'type' => 'string',
],
],
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"03C88D8E-1541-518E-8BFF-BEC6589B6334\\",\\n \\"Success\\": \\"false\\",\\n \\"Data\\": {\\n \\"SqlLogVisibleTime\\": 1683712800000,\\n \\"RequestStopTime\\": 1715335200000,\\n \\"CollectorVersion\\": \\"MYSQL_V3\\",\\n \\"SupportVersion\\": \\"SQL_LOG_V3\\",\\n \\"ColdRetention\\": 23,\\n \\"SqlLogEnable\\": true,\\n \\"Retention\\": 30,\\n \\"HotRetention\\": 7,\\n \\"RequestEnable\\": false,\\n \\"Version\\": \\"SQL_LOG_V3\\",\\n \\"RequestStartTime\\": 1683712800000,\\n \\"HotEnable\\": true,\\n \\"HotStartTime\\": 1683712800000,\\n \\"ColdEnable\\": true,\\n \\"ColdStartTime\\": 1683712800000,\\n \\"SqlLogState\\": \\"FINISH\\",\\n \\"LogFilter\\": \\"None\\",\\n \\"SqlLogSource\\": \\"\\"\\n }\\n}","type":"json"}]',
'title' => '开启或配置DAS企业版',
'description' => '使用该接口需满足以下前提条件:'."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。'."\n"
.'- 使用该接口默认开启当前支持的最新版本。DAS企业版各个版本支持的数据库和地域请参见[DAS产品系列及支持的功能](~~156204~~)。',
'requestParamsDescription' => 'DAS企业版当前存在V0、V1、V2、V3四个版本,默认开通当前支持的最新版本。'."\n"
."\n"
.'- 对于仅支持开启企业版 V0的数据库实例,仅需传入参数**Enable**和**Retention**。'."\n"
.'- 对于支持开启企业版 V1的数据库实例,仅需传入参数**Enable**和**Retention**,系统自动开启SQL洞察功能(即**RequestEnable**默认配置为**true**)。'."\n"
.'- 对于支持开启企业版 V2的数据库实例,仅需传入参数**Enable**和**Retention**,系统自动开启SQL洞察功能(即**RequestEnable**默认配置为**true**),且数据热存储时长(**HotRetention**)固定为7天,数据冷存储时长为`Retention - 7`天。',
],
'DescribeSqlLogStatistic' => [
'summary' => '调用DescribeSqlLogStatistic接口,查询DAS企业版的数据统计信息。',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '198879',
'abilityTreeNodes' => [
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '数据库实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID。',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
.'* true:执行成功'."\n"
.'* false:执行失败'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'SqlLogStatistic',
'description' => '返回数据。',
'type' => 'object',
'properties' => [
'Timestamp' => [
'title' => '时间戳',
'description' => '时间戳,格式为Unix时间戳,单位为毫秒。',
'type' => 'integer',
'format' => 'int64',
'example' => '1712568564928',
],
'HotSqlSize' => [
'title' => '热数据量',
'description' => '总的热存储数据,单位字节(Byte)。',
'type' => 'integer',
'format' => 'int64',
'enumValueTitles' => [],
'example' => '1118042',
],
'ColdSqlSize' => [
'title' => '冷数据量',
'description' => '总的冷存储数据,单位字节(Byte)。',
'type' => 'integer',
'format' => 'int64',
'example' => '8585901',
],
'ImportSqlSize' => [
'title' => '引入量',
'description' => '最近一天该的数据引入量,单位字节(Byte)。',
'type' => 'integer',
'format' => 'int64',
'example' => '297245',
],
'FreeHotSqlSize' => [
'description' => '免费的热存储数据,单位字节(Byte)。',
'type' => 'integer',
'format' => 'int64',
'example' => '297245',
],
'FreeColdSqlSize' => [
'description' => '免费的冷存储数据,单位字节(Byte)。',
'type' => 'integer',
'format' => 'int64',
'example' => '5041450',
],
'TotalSqlSize' => [
'type' => 'integer',
'format' => 'int64',
],
],
],
],
],
],
],
'errorCodes' => [
400 => [
[
'errorCode' => 'InvalidParams',
'errorMessage' => 'The request parameters are invalid.',
],
],
403 => [
[
'errorCode' => 'NoPermission',
'errorMessage' => 'You are not authorized to do this action.',
],
],
],
'staticInfo' => [
'returnType' => 'synchronous',
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"200\\",\\n \\"Message\\": \\"Successful\\",\\n \\"RequestId\\": \\"B6D17591-B48B-4D31-9CD6-9B9796B2****\\",\\n \\"Success\\": \\"true\\",\\n \\"Data\\": {\\n \\"Timestamp\\": 1712568564928,\\n \\"HotSqlSize\\": 1118042,\\n \\"ColdSqlSize\\": 8585901,\\n \\"ImportSqlSize\\": 297245,\\n \\"FreeHotSqlSize\\": 297245,\\n \\"FreeColdSqlSize\\": 5041450,\\n \\"TotalSqlSize\\": 0\\n }\\n}","type":"json"}]',
'title' => '查询DAS企业版数据统计信息',
'description' => '使用该接口需满足以下前提条件:'."\n"
."\n"
.'- 使用阿里云或DAS的SDK时,建议使用最新版本。'."\n"
.'- 在使用SDK调用DAS服务时,需要将地域指定为cn-shanghai。',
],
'GetDasSQLLogHotData' => [
'summary' => '获取审计日志热数据。',
'methods' => [
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
'abilityTreeCode' => '178715',
'abilityTreeNodes' => [
'FEATUREhdmFT57I0',
],
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => '数据库实例ID。',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'Start',
'in' => 'formData',
'schema' => [
'description' => '查询开始时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 只能查询开启DAS企业版后的数据,查询开始时间最大不能早于当前时间7天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1684734297000',
],
],
[
'name' => 'End',
'in' => 'formData',
'schema' => [
'description' => '查询结束时间,格式为Unix时间戳,单位为毫秒。'."\n"
."\n"
.'> 查询结束时间需晚于查询开始时间,且查询开始时间和查询结束时间的间隔不能超过1天。',
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1684820697000',
],
],
[
'name' => 'QueryKeyword',
'in' => 'formData',
'schema' => [
'description' => '关键字。'."\n"
."\n"
.'> 支持模糊查询;最多支持10个关键字组合查询,关键字之间以空格分隔。例如:a1 b2 c3。',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'a1 b2',
],
],
[
'name' => 'AccountName',
'in' => 'formData',
'schema' => [
'description' => '数据库账号。'."\n"
."\n"
.'> 支持多个数据库账号组合查询,数据库账号间以空格分隔,例如:`user1 user2 user3`。',
'type' => 'string',
'required' => false,
'example' => 'testuser',
],
],
[
'name' => 'DBName',
'in' => 'formData',
'schema' => [
'description' => '数据库名。'."\n"
."\n"
.'> 支持多个数据库名组合查询,数据库名间以空格分隔,例如:`DB1 DB2 DB3`。',
'type' => 'string',
'required' => false,
'example' => 'testDB',
],
],
[
'name' => 'HostAddress',
'in' => 'formData',
'schema' => [
'description' => '客户端IP地址。'."\n"
."\n"
.'> 支持多个客户端IP地址组合查询,客户端IP地址间以空格分隔,例如:`IP1 IP2 IP3`。',
'type' => 'string',
'required' => false,
'example' => '47.100.XX.XX',
],
],
[
'name' => 'LogicalOperator',
'in' => 'formData',
'schema' => [
'description' => '多个关键字的逻辑关系。'."\n"
."\n"
.'- **or**:或。'."\n"
.'- **and**:与。',
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'MaxLatancy',
'in' => 'formData',
'schema' => [
'description' => '最大执行耗时 ,单位为微秒。查询执行耗时小于该参数值的SQL语句。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '100',
],
],
[
'name' => 'MaxScanRows',
'in' => 'formData',
'schema' => [
'description' => '最大扫描行数 ,查询扫描行数小于该参数值的SQL语句。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10000',
],
],
[
'name' => 'MinLatancy',
'in' => 'formData',
'schema' => [
'description' => '最小执行耗时 ,单位为微秒。查询执行耗时大于等于该参数值的SQL语句。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'MinScanRows',
'in' => 'formData',
'schema' => [
'description' => '最小扫描行数 ,查询扫描行数大于等于该参数值的SQL语句。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'SqlType',
'in' => 'formData',
'schema' => [
'description' => 'SQL语句的类型。取值:'."\n"
.'- **select**'."\n"
.'- **update**'."\n"
.'- **delete**',
'type' => 'string',
'required' => false,
'enumValueTitles' => [
'select' => '查询',
'update' => '修改',
'delete' => '删除',
],
'example' => 'select',
],
],
[
'name' => 'State',
'in' => 'formData',
'schema' => [
'description' => '执行结果,输入**0**时表示查询执行成功的SQL,您也可以输入具体的错误码,查询对应的SQL。',
'type' => 'string',
'required' => false,
'example' => '0',
],
],
[
'name' => 'ThreadID',
'in' => 'formData',
'schema' => [
'description' => '线程ID。'."\n"
."\n"
.'> 支持多个线程ID组合查询,线程ID间以空格分隔,例如:`线程ID1 线程ID2 线程ID3`。',
'type' => 'string',
'required' => false,
'example' => '657',
],
],
[
'name' => 'PageNumbers',
'in' => 'formData',
'schema' => [
'description' => '分页查询的页码,从1开始,默认为1。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '2',
],
],
[
'name' => 'MaxRecordsPerPage',
'in' => 'formData',
'schema' => [
'description' => '分页查询每页最大记录数。取值范围:5~100。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'SortKey',
'in' => 'formData',
'schema' => [
'description' => '排序依据。'."\n"
."\n"
.'- **ScanRows**:扫描行数。'."\n"
.'- **UpdateRows**:更新行数。'."\n"
.'- **Consume**:耗时。'."\n"
.'- **OriginTime**:执行时间。'."\n"
.'- **ReturnRows**:返回行数。',
'type' => 'string',
'required' => false,
'example' => 'ScanRows',
],
],
[
'name' => 'SortMethod',
'in' => 'formData',
'schema' => [
'description' => '排序方式。'."\n"
.'- **ASC**:正序。'."\n"
.'- **DESC**:倒序。',
'type' => 'string',
'required' => false,
'example' => 'ASC',
],
],
[
'name' => 'ChildDBInstanceIDs',
'in' => 'formData',
'schema' => [
'description' => '节点ID。'."\n"
."\n"
.'> 对于PolarDB MySQL版实例,需要提供节点ID。',
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'Role',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'TraceId',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MinRows',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MaxRows',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MinSpillCnt',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MaxSpillCnt',
'in' => 'formData',
'schema' => [
'description' => '预留参数,暂不支持。',
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'TransactionId',
'in' => 'formData',
'schema' => [
'description' => '事务ID。',
'type' => 'string',
'required' => false,
'example' => '0',
],
],
[
'name' => 'Fail',
'in' => 'formData',
'schema' => [
'description' => 'SQL执行错误码,您可以调用[GetAsyncErrorRequestStatByCode](~~409804~~)获取错误码。',
'type' => 'string',
'required' => false,
'example' => '1064',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => '返回的状态码。',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '请求返回消息。'."\n"
.'> 请求成功时该参数返回**Successful**,请求失败时会返回请求异常信息(如错误码等)。',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '请求ID,阿里云为该请求生成的标识符。',
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Success' => [
'description' => '请求是否执行成功:'."\n"
."\n"
.'- **true**:执行成功。'."\n"
.'- **false**:执行失败。',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'ListResult