'1.0',
'info' => [
'style' => 'RPC',
'product' => 'DAS',
'version' => '2020-01-16',
],
'directories' => [
[
'id' => 400976,
'title' => null,
'type' => 'directory',
'children' => [
'AddHDMInstance',
],
],
[
'id' => 400978,
'title' => null,
'type' => 'directory',
'children' => [
'GetInstanceInspections',
],
],
[
'id' => 400980,
'title' => null,
'type' => 'directory',
'children' => [
'SetEventSubscription',
'GetEventSubscription',
'GetAutonomousNotifyEventContent',
'GetAutonomousNotifyEventsInRange',
],
],
[
'id' => 400985,
'title' => null,
'type' => 'directory',
'children' => [
'CreateDiagnosticReport',
'DescribeDiagnosticReportList',
'GetDBInstanceConnectivityDiagnosis',
],
],
[
'id' => 400989,
'title' => null,
'type' => 'directory',
'children' => [
'CreateCacheAnalysisJob',
'DescribeCacheAnalysisJob',
'DescribeCacheAnalysisJobs',
],
],
[
'id' => 400993,
'title' => null,
'type' => 'directory',
'children' => [
'EnableSqlConcurrencyControl',
'DisableSqlConcurrencyControl',
'DisableAllSqlConcurrencyControlRules',
'GetRunningSqlConcurrencyControlRules',
'GetSqlConcurrencyControlRulesHistory',
'GetSqlConcurrencyControlKeywordsFromSqlText',
],
],
[
'id' => 401000,
'title' => null,
'type' => 'directory',
'children' => [
'CreateRequestDiagnosis',
'GetRequestDiagnosisResult',
'GetRequestDiagnosisPage',
'DescribeQueryExplain',
],
],
[
'id' => 401005,
'title' => null,
'type' => 'directory',
'children' => [
'DescribeHotBigKeys',
'DescribeTopHotKeys',
'DescribeTopBigKeys',
'DescribeHotKeys',
],
],
[
'id' => 401010,
'title' => null,
'type' => 'directory',
'children' => [
'CreateQueryOptimizeTag',
'GetQueryOptimizeExecErrorStats',
'GetQueryOptimizeExecErrorSample',
'GetQueryOptimizeSolution',
'GetQueryOptimizeRuleList',
'GetQueryOptimizeDataTrend',
'GetQueryOptimizeDataTop',
'GetQueryOptimizeDataStats',
'GetQueryOptimizeTag',
'GetQueryOptimizeShareUrl',
],
],
[
'id' => 401021,
'title' => null,
'type' => 'directory',
'children' => [
'GetErrorRequestSample',
'GetAsyncErrorRequestStatResult',
'GetAsyncErrorRequestListByCode',
'GetAsyncErrorRequestStatByCode',
'GetFullRequestOriginStatByInstanceId',
'GetFullRequestStatResultByInstanceId',
'GetFullRequestSampleByInstanceId',
],
],
[
'id' => 401029,
'title' => null,
'type' => 'directory',
'children' => [
'DescribeSqlLogConfig',
'ModifySqlLogConfig',
'DescribeSqlLogStatistic',
'GetDasSQLLogHotData',
'CreateSqlLogTask',
'DescribeSqlLogTask',
'DescribeSqlLogTasks',
],
],
[
'id' => 401037,
'title' => null,
'type' => 'directory',
'children' => [
'GetRedisAllSession',
'GetMongoDBCurrentOp',
'KillInstanceAllSession',
'CreateKillInstanceSessionTask',
'GetKillInstanceSessionTaskResult',
'GetMySQLAllSessionAsync',
],
],
[
'id' => 401044,
'title' => null,
'type' => 'directory',
'children' => [
'CreateStorageAnalysisTask',
'GetStorageAnalysisResult',
'GetAutoIncrementUsageStatistic',
],
],
[
'id' => 401048,
'title' => null,
'type' => 'directory',
'children' => [
'GetDeadLockDetailList',
'GetBlockingDetailList',
'CreateLatestDeadLockAnalysis',
'GetDeadLockHistory',
'GetDeadLockDetail',
'GetDeadlockHistogram',
],
],
[
'id' => 401055,
'title' => null,
'type' => 'directory',
'children' => [
'GetInstanceMissingIndexList',
],
],
[
'id' => 401057,
'title' => null,
'type' => 'directory',
'children' => [
'DescribeSlowLogHistogramAsync',
'DescribeSlowLogStatistic',
'DescribeSlowLogRecords',
],
],
[
'id' => 401061,
'title' => null,
'type' => 'directory',
'children' => [
'UpdateAutoThrottleRulesAsync',
'DisableAutoThrottleRules',
'GetAutoThrottleRules',
],
],
[
'id' => 401065,
'title' => null,
'type' => 'directory',
'children' => [
'UpdateAutoSqlOptimizeStatus',
'GetSqlOptimizeAdvice',
'GetInstanceSqlOptimizeStatistic',
],
],
[
'id' => 401069,
'title' => null,
'type' => 'directory',
'children' => [
'UpdateAutoResourceOptimizeRulesAsync',
'DisableAutoResourceOptimizeRules',
'GetAutoResourceOptimizeRules',
],
],
[
'id' => 401073,
'title' => null,
'type' => 'directory',
'children' => [
'ModifyAutoScalingConfig',
'DescribeAutoScalingConfig',
'DescribeAutoScalingHistory',
'DisableInstanceDasConfig',
],
],
[
'id' => 401078,
'title' => null,
'type' => 'directory',
'children' => [
'GetPartitionsHeatmap',
],
],
[
'id' => 401080,
'title' => null,
'type' => 'directory',
'children' => [
'GetPfsSqlSample',
'GetPfsMetricTrends',
'GetPfsSqlSummaries',
],
],
[
'id' => 401084,
'title' => null,
'type' => 'directory',
'children' => [
'DescribeErrorLogRecords',
],
],
[
'id' => 401086,
'title' => null,
'type' => 'directory',
'children' => [
'GetDasAgentSSE',
'GetInstanceGroupInspectReportList',
'GetInstanceGroupInspectReportDetail',
],
],
[
'id' => 401090,
'title' => null,
'type' => 'directory',
'children' => [
'CreateSecurityIPGroup',
'DescribeSecurityIPGroup',
'DescribeSecurityIPGroupRelation',
'ModifySecurityIPGroup',
'ModifySecurityIPGroupRelation',
'DeleteSecurityIPGroup',
],
],
[
'id' => 401097,
'title' => null,
'type' => 'directory',
'children' => [
'GetHDMAliyunResourceSyncResult',
'GetEndpointSwitchTask',
'GetHDMLastAliyunResourceSyncResult',
'DescribeSqlLogRecords',
'EnableDasPro',
'DisableDasPro',
'DescribeInstanceDasPro',
'GetDasProServiceUsage',
'RunCloudBenchTask',
'DescribeCloudbenchTask',
'DescribeCloudBenchTasks',
'CreateCloudBenchTasks',
'DescribeCloudbenchTaskConfig',
'DeleteCloudBenchTask',
'DeleteStopGateway',
],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'AddHDMInstance' => [
'summary' => 'Adds a database instance to Database Autonomy Service (DAS).',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => '__context',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceArea',
'in' => 'query',
'schema' => [
'description' => 'The type of the instance on which the database is deployed. Valid values:'."\n"
."\n"
.'* **RDS**: an Alibaba Cloud database instance.'."\n"
.'* **ECS**: an Elastic Compute Service (ECS) instance on which a self-managed database is deployed.'."\n"
.'* **IDC**: a self-managed database instance that is not deployed on Alibaba Cloud.'."\n"
."\n"
.'> IDC refers to your data center.'."\n",
'type' => 'string',
'required' => true,
'example' => 'ECS',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'Ip',
'in' => 'query',
'schema' => [
'description' => 'The endpoint that is used to access the instance over internal networks.'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****.mysql.rds.aliyuncs.com',
],
],
[
'name' => 'Port',
'in' => 'query',
'schema' => [
'description' => 'The port that is used to access the instance over internal networks.'."\n",
'type' => 'string',
'required' => false,
'example' => '3306',
],
],
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PostgreSQL**'."\n"
.'* **SQLServer**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PolarDBPostgreSQL**'."\n"
.'* **Redis**'."\n"
.'* **MongoDB**'."\n"
.'* **PolarDBOracle**'."\n"
.'* **PolarDBX**'."\n",
'type' => 'string',
'required' => false,
'example' => 'MySQL',
],
],
[
'name' => 'Username',
'in' => 'query',
'schema' => [
'description' => 'The username that is used to log on to the database.'."\n",
'type' => 'string',
'required' => false,
'example' => 'test****',
],
],
[
'name' => 'Password',
'in' => 'query',
'schema' => [
'description' => 'The password for the username.'."\n",
'type' => 'string',
'required' => false,
'example' => '122****',
],
],
[
'name' => 'InstanceAlias',
'in' => 'query',
'schema' => [
'description' => 'The name of the instance.'."\n",
'type' => 'string',
'required' => false,
'example' => 'yuecq--test****',
],
],
[
'name' => 'NetworkType',
'in' => 'query',
'schema' => [
'description' => 'The network type of the instance.'."\n",
'type' => 'string',
'required' => false,
'example' => 'VPC',
],
],
[
'name' => 'VpcId',
'in' => 'query',
'schema' => [
'description' => 'The virtual private cloud (VPC) ID.'."\n",
'type' => 'string',
'required' => false,
'example' => 'vpc-m5e666n89m2bx8jar****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The ID of the region in which the instance resides.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-hangzhou',
],
],
[
'name' => 'FlushAccount',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Synchro' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'object',
'properties' => [
'VpcId' => [
'description' => 'The VPC ID.'."\n",
'type' => 'string',
'example' => 'vpc-m5e666n89m2bx8jar****',
],
'Token' => [
'description' => 'The client token that is used to ensure the idempotence of the request.'."\n",
'type' => 'string',
'example' => 'tokenID',
],
'Ip' => [
'description' => 'The endpoint of the instance.'."\n",
'type' => 'string',
'example' => 'rm-de21209****.mysql.rds.aliyuncs.com',
],
'CallerUid' => [
'description' => 'The user ID of the caller.'."\n",
'type' => 'string',
'example' => '31063db679****',
],
'InstanceId' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'Port' => [
'description' => 'The port number of the instance that you want to access.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '3306',
],
'OwnerId' => [
'description' => 'The ID of the instance owner.'."\n",
'type' => 'string',
'example' => '325352345',
],
'Uuid' => [
'description' => 'The unique identifier of the instance.'."\n",
'type' => 'string',
'example' => 'hdm_3063db6792965c080a4bcb6e6304****',
],
'Error' => [
'description' => 'The error message returned if the request failed.'."\n",
'type' => 'string',
'example' => 'InvalidRequestURL',
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '200',
],
'Role' => [
'description' => 'The role of the current API caller.'."\n",
'type' => 'string',
'example' => 'master',
],
'TenantId' => [
'description' => 'The tenant ID.'."\n",
'type' => 'string',
'example' => 'L0EPfLS****=SCE00000*****',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'AddHDMInstance',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a DAS SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call DAS, you must set the region to cn-shanghai.'."\n",
],
'GetInstanceInspections' => [
'summary' => 'Queries the result of an inspection that is performed on a database instance by using the inspection and scoring feature.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **Redis**'."\n"
.'* **PolarDBMySQL**'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'MySQL',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1655416825000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1655427625000',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => '10',
],
],
[
'name' => 'InstanceArea',
'in' => 'query',
'schema' => [
'description' => 'The type of the instance on which the database is deployed. Valid values:'."\n"
."\n"
.'* **RDS**: an Alibaba Cloud database instance.'."\n"
.'* **ECS**: an ECS instance on which a self-managed database is deployed.'."\n"
.'* **IDC**: a self-managed database instance that is not deployed on Alibaba Cloud.'."\n"
."\n"
.'> The value IDC specifies that the instance is deployed in a data center.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'RDS',
],
],
[
'name' => 'SearchMap',
'in' => 'query',
'schema' => [
'description' => 'The filter condition, which can be specified in one of the following formats:'."\n"
."\n"
.'* Specify the ID of a single instance in the {"InstanceId":"Instance ID"} format.'."\n"
.'* Specify the IDs of multiple instances in the {"InstanceIds":\\["Instance ID1","Instance ID2"]} format. Separate the instance IDs with commas (,).'."\n"
.'* Specify the region in which the instance resides in the {"region":"Region of the instance"} format.'."\n",
'type' => 'string',
'required' => false,
'example' => '{"InstanceId":"rm-bp10usoc1erj7****"}',
],
],
[
'name' => 'ResourceGroupId',
'in' => 'query',
'schema' => [
'description' => 'The resource group ID.'."\n",
'type' => 'string',
'required' => false,
'example' => 'rg-aek2eil6npi****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => 'The details.'."\n",
'type' => 'object',
'properties' => [
'List' => [
'description' => 'The detailed information.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'EndTime' => [
'description' => 'The end time of the inspection and scoring task. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296001',
],
'StartTime' => [
'description' => 'The start time of the inspection and scoring task. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'Data' => [
'description' => 'The data returned.'."\n",
'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' => 'The information about the instance.'."\n",
'type' => 'object',
'properties' => [
'VpcId' => [
'description' => 'The ID of the virtual private cloud (VPC) in which the instance is deployed.'."\n",
'type' => 'string',
'example' => 'vpc-bp1knt7m55z9exoo7****',
],
'Uuid' => [
'description' => 'The unique identifier of the instance.'."\n",
'type' => 'string',
'example' => 'hdm_3063db6792965c080a4bcb6e6304****',
],
'InstanceArea' => [
'description' => 'The type of the instance on which the database is deployed. Valid values:'."\n"
."\n"
.'* **RDS**: an Alibaba Cloud database instance.'."\n"
.'* **ECS**: an Elastic Compute Service (ECS) instance on which a self-managed database is deployed.'."\n"
.'* **IDC**: a self-managed database instance that is not deployed on Alibaba Cloud.'."\n"
."\n"
.'> The value IDC indicates that the instance is deployed in a data center.'."\n",
'type' => 'string',
'example' => 'RDS',
],
'InstanceClass' => [
'description' => 'The instance type.'."\n",
'type' => 'string',
'example' => 'rds.mysql.s2.xlarge',
],
'Region' => [
'description' => 'The region ID of the instance.'."\n",
'type' => 'string',
'example' => 'cn-hangzhou',
],
'AccountId' => [
'description' => 'The account ID. You can view the ID of the logon account by moving the pointer over the profile in the Alibaba Cloud management console.'."\n",
'type' => 'string',
'example' => '108398049688****',
],
'NetworkType' => [
'description' => 'The network type of the instance.'."\n",
'type' => 'string',
'example' => 'VPC',
],
'Engine' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **Redis**'."\n"
.'* **PolarDBMySQL**'."\n",
'type' => 'string',
'example' => 'MySQL',
],
'InstanceId' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-bp10usoc1erj7****',
],
'NodeId' => [
'description' => 'The ID of the node on the instance.'."\n",
'type' => 'string',
'example' => 'rm-bp10usoc1erj7****',
],
'EngineVersion' => [
'description' => 'The version number of the database engine.'."\n",
'type' => 'string',
'example' => '8.0',
],
'InstanceAlias' => [
'description' => 'The instance name.'."\n",
'type' => 'string',
'example' => 'test-01',
],
'Cpu' => [
'description' => 'The CPU specification of the instance. For example, if a value of 8 is returned, the instance has eight CPU cores.'."\n",
'type' => 'string',
'example' => '8',
],
'Memory' => [
'description' => 'The memory capacity of the database that is deployed on the instance. Unit: MB.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '32768',
],
'Storage' => [
'description' => 'The storage space of the instance. Unit: GB.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '150',
],
'Category' => [
'description' => 'The connection mode of the instance. Valid values:'."\n"
."\n"
.'* **standard**: standard mode.'."\n"
.'* **safe**: database proxy mode.'."\n",
'type' => 'string',
'example' => 'standard',
],
],
],
'ScoreMap' => [
'description' => 'The scores that are deducted for the instance.'."\n",
'type' => 'object',
],
'GmtCreate' => [
'description' => 'The time when the task was created. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1603247192000',
],
'Score' => [
'description' => 'The inspection score of the instance.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '100',
],
'AutoFunction' => [
'description' => 'Indicates whether the autonomy service is enabled.'."\n",
'type' => 'object',
'properties' => [
'EventSubscription' => [
'description' => 'Indicates whether the event subscription feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'AutoIndex' => [
'description' => 'Indicates whether the feature of automatically creating and deleting indexes is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'AutoLimitedSql' => [
'description' => 'Indicates whether the automatic throttling feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'AutoResourceOptimize' => [
'description' => 'Indicates whether the automatic fragment recycling feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'AutoScale' => [
'description' => 'Indicates whether the auto scaling feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
],
],
'EnableDasPro' => [
'description' => 'Indicates whether DAS Enterprise Edition is enabled. Valid values:'."\n"
."\n"
.'* **0**: disabled.'."\n"
.'* **1**: enabled.'."\n"
.'* **2**: not supported.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'State' => [
'description' => 'The state of the inspection and scoring task. Valid values:'."\n"
."\n"
.'* **0**: The task is waiting for execution.'."\n"
.'* **1**: The task is in progress.'."\n"
.'* **2**: The task is complete.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'TaskType' => [
'description' => 'The mode in which the inspection and scoring task was initiated. Valid values:'."\n"
."\n"
.'* **0**: automatic mode.'."\n"
.'* **1**: manual mode.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
],
],
],
'PageNo' => [
'description' => 'The page number. The value returned is a positive integer. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetInstanceInspections',
'description' => 'Database Autonomy Service (DAS) provides the inspection and scoring feature. This feature allows you to inspect and score the health status of your instance on a regular basis. This helps you obtain information about the status of your databases. For more information, see [Inspection and scoring](~~205659~~).'."\n"
."\n"
.'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* This operation is applicable only to ApsaraDB RDS for MySQL databases, self-managed MySQL databases hosted on Elastic Compute Service (ECS) instances, self-managed MySQL databases in data centers, ApsaraDB for Redis databases, and PolarDB for MySQL databases.'."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.'."\n"
.'* The version of DAS SDK must be V1.0.3 or later.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'SetEventSubscription' => [
'summary' => 'Configures the event subscription settings for a database instance.',
'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' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'EventContext',
'in' => 'query',
'schema' => [
'title' => '事件场景',
'description' => 'The supported event scenarios. You can set the value to **AllContext**, which indicates that all scenarios are supported.'."\n",
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'AllContext',
],
],
[
'name' => 'Lang',
'in' => 'query',
'schema' => [
'title' => '语言',
'description' => 'The language of event notifications. You can set the value to **zh-CN**, which indicates that event notifications are sent in Chinese.'."\n",
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'zh-CN',
],
],
[
'name' => 'MinInterval',
'in' => 'query',
'schema' => [
'title' => '通知最小间隔',
'description' => 'The minimum interval between consecutive event notifications. Unit: seconds.'."\n",
'type' => 'string',
'required' => false,
'example' => '60',
],
],
[
'name' => 'ContactName',
'in' => 'query',
'schema' => [
'title' => '告警订阅人',
'description' => 'The name of the contact who receives alert notifications. Separate multiple names with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'Default contact',
],
],
[
'name' => 'ChannelType',
'in' => 'query',
'schema' => [
'title' => '通知方式',
'description' => 'The notification method. Valid values:'."\n"
."\n"
.'* **hdm_alarm_sms**: text message.'."\n"
.'* **dingtalk**: DingTalk chatbot.'."\n"
.'* **hdm_alarm_sms_and_email**: text message and email.'."\n"
.'* **hdm_alarm_sms,dingtalk**: text message and DingTalk chatbot.'."\n",
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'hdm_alarm_sms,dingtalk',
],
],
[
'name' => 'ContactGroupName',
'in' => 'query',
'schema' => [
'title' => '告警订阅组',
'description' => 'The name of the contact group that receives alert notifications. Separate multiple names with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'Default contact group',
],
],
[
'name' => 'Level',
'in' => 'query',
'schema' => [
'title' => '事件风险级别',
'description' => 'The risk level of the events. Valid values:'."\n"
."\n"
.'* **Notice**: events that trigger notifications, including events at the **Notice**, **Optimization**, **Warn**, and **Critical** levels.'."\n"
.'* **Optimization**: events that trigger optimizations, including events at the **Optimization**, **Warn**, and **Critical** levels.'."\n"
.'* **Warn**: events that trigger warnings, including events at the **Warn** and **Critical** levels.'."\n"
.'* **Critical**: events that trigger critical warnings.'."\n"
."\n"
.'The following content describes the events at each level in detail:'."\n"
."\n"
.'* Notice: events that are related to database exceptions for which no suggestions are generated.'."\n"
.'* Optimization: events for which optimization suggestions are generated based on the status of the database.'."\n"
.'* Warn: events that may affect the running of the database.'."\n"
.'* Critical: events that affect the running of the database.',
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'Optimization',
],
],
[
'name' => 'Active',
'in' => 'query',
'schema' => [
'title' => '是否启用',
'description' => 'Specifies whether to enable the event subscription feature. Valid values:'."\n"
."\n"
.'* **0**: disables the event subscription feature.'."\n"
.'* **1**: enables the event subscription feature.'."\n",
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => '1',
],
],
[
'name' => 'Severity',
'in' => 'query',
'schema' => [
'description' => 'The alert severity based on the event type.'."\n"
."\n"
.'Specify this parameter in the following format: `{"Event type 1":"Alert severity", "Event type 2":"Alert severity"}`.'."\n"
."\n"
.'Valid values of event types:'."\n"
."\n"
.'* **AutoScale**: auto scaling event.'."\n"
.'* **SQLThrottle**: throttling event.'."\n"
.'* **TimeSeriesAbnormal**: event for detecting time series anomalies.'."\n"
.'* **SQLOptimize**: SQL optimization event.'."\n"
.'* **ResourceOptimize**: storage optimization event.'."\n"
."\n"
.'Valid values of alert severities:'."\n"
."\n"
.'* **info**'."\n"
.'* **noticed**'."\n"
.'* **warning**'."\n"
.'* **critical**'."\n",
'type' => 'string',
'required' => false,
'example' => '{"AutoScale":"critical","SQLThrottle":"info","TimeSeriesAbnormal":"warning"}',
],
],
[
'name' => 'DispatchRule',
'in' => 'query',
'schema' => [
'description' => 'The notification rules based on the event type. If you leave this parameter empty, the values of **MinInterval** and **ChannelType** prevail.'."\n"
."\n"
.'Specify this parameter in the following format: `{"silenced": {"Event type 1":Specifies whether to enable adaptive silence, "Event type 2":Specify whether to enable adaptive silence},"min_interval": {"Event type 1":Minimum interval between event notifications, "Event type 2":Minimum interval between event notifications},"alert_type": {"Event type 1":"Notification method", "Event type 2":"Notification method"}}`.'."\n"
."\n"
.'* **silenced**: specifies whether to enable adaptive silence. After you enable adaptive silence, the interval between consecutive alert notifications for an event is the greater one of the minimum interval specified by **min_interval** and one third of the event duration. Valid values:'."\n"
."\n"
.' * 1: enables adaptive silence.'."\n"
.' * 2: disables adaptive silence.'."\n"
."\n"
.'* **min_interval**: the minimum interval between event notifications. Unit: seconds.'."\n"
."\n"
.'* **alert_type**: the notification method. Valid values:'."\n"
."\n"
.' * **hdm_alarm_sms**: text message.'."\n"
.' * **dingtalk**: DingTalk chatbot.'."\n"
.' * **hdm_alarm_sms_and_email**: text message and email.'."\n"
.' * **hdm_alarm_sms,dingtalk**: text message and DingTalk chatbot.'."\n",
'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' => 'The response parameters.'."\n",
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '097F0C56-B252-515A-B602-FC56EF93EF8A',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'userId' => [
'title' => '用户ID ',
'description' => 'The user ID.'."\n",
'type' => 'string',
'example' => '1088760496****',
],
'instanceId' => [
'title' => '实例ID',
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'eventContext' => [
'title' => '事件场景',
'description' => 'The supported event scenarios. Only **AllContext** is returned for this parameter, which indicates that all scenarios are supported.'."\n",
'type' => 'string',
'example' => 'AllContext',
],
'lang' => [
'title' => '语言',
'description' => 'The language of event notifications. Only **zh-CN** is returned for this parameter, which indicates that event notifications are sent in Chinese.'."\n",
'type' => 'string',
'example' => 'zh_CN',
],
'active' => [
'title' => '是否启用',
'description' => 'Indicates whether the event subscription feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: The event subscription feature is disabled.'."\n"
.'* **1**: The event subscription feature is enabled.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'minInterval' => [
'title' => '通知最小间隔',
'description' => 'The minimum interval between consecutive event notifications. Unit: seconds.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '60',
],
'contactName' => [
'title' => '告警订阅人',
'description' => 'The name of the contact who receives alert notifications. Multiple names are separated by commas (,).'."\n",
'type' => 'string',
'example' => 'Default contact',
],
'contactGroupName' => [
'title' => '告警订阅组',
'description' => 'The name of the contact group that receives alert notifications. Multiple names are separated by commas (,).'."\n",
'type' => 'string',
'example' => 'Default contact group',
],
'channelType' => [
'title' => '通知方式',
'description' => 'The notification method. Valid values:'."\n"
."\n"
.'* **hdm_alarm_sms**: text message.'."\n"
.'* **dingtalk**: DingTalk chatbot.'."\n"
.'* **hdm_alarm_sms_and_email**: text message and email.'."\n"
.'* **hdm_alarm_sms,dingtalk**: text message and DingTalk chatbot.'."\n",
'type' => 'string',
'example' => 'hdm_alarm_sms,dingtalk',
],
'level' => [
'title' => '事件风险级别',
'description' => 'The risk level of the events. Valid values:'."\n"
."\n"
.'* **Notice**'."\n"
.'* **Optimization**'."\n"
.'* **Warn**'."\n"
.'* **Critical**'."\n",
'type' => 'string',
'example' => 'Optimization',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'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' => 'SetEventSubscription',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call the API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* Make sure that the database instance that you want to manage is connected to DAS.'."\n",
],
'GetEventSubscription' => [
'summary' => 'Queries the event subscription settings of a database instance.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'title' => '实例ID。',
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****'."\n",
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'userId' => [
'title' => '用户ID。',
'description' => 'The user ID.'."\n",
'type' => 'string',
'example' => '1088760496****',
],
'instanceId' => [
'title' => '实例ID。',
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'eventContext' => [
'title' => '事件场景。',
'description' => 'The supported event scenarios. Only **AllContext** may be returned, which indicates that all scenarios are supported.'."\n",
'type' => 'string',
'example' => 'AllContext',
],
'lang' => [
'title' => '语言',
'description' => 'The language of event notifications. Only **zh-CN** may be returned, which indicates that event notifications are sent in Chinese.'."\n",
'type' => 'string',
'example' => 'zh_CN',
],
'active' => [
'title' => '是否开启。',
'description' => 'Indicates whether the event subscription feature is enabled. Valid values:'."\n"
."\n"
.'* **0**: The event subscription feature is disabled.'."\n"
.'* **1**: The event subscription feature is enabled.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'minInterval' => [
'title' => '通知最小间隔。',
'description' => 'The minimum interval between event notifications. Unit: seconds.'."\n",
'type' => 'string',
'example' => '60',
],
'contactName' => [
'title' => '告警订阅人。',
'description' => 'The name of the subscriber who receives alert notifications. Multiple names are separated by commas (,).'."\n",
'type' => 'string',
'example' => 'Default contact',
],
'contactGroupName' => [
'title' => '告警订阅组',
'description' => 'The name of the contact group that receives alert notifications. Multiple names are separated by commas (,).'."\n",
'type' => 'string',
'example' => 'Default contact group',
],
'channelType' => [
'title' => '通知方式。',
'description' => 'The notification method. Valid values:'."\n"
."\n"
.'* **hdm_alarm_sms**: text message.'."\n"
.'* **dingtalk**: DingTalk chatbot.'."\n"
.'* **hdm_alarm_sms_and_email**: text message and email.'."\n"
.'* **hdm_alarm_sms,dingtalk**: text message and DingTalk chatbot.'."\n",
'type' => 'string',
'example' => 'hdm_alarm_sms,dingtalk',
],
'level' => [
'title' => '事件风险级别。',
'description' => 'The risk level of the events that trigger notifications. Valid values:'."\n"
."\n"
.'* **Notice**'."\n"
.'* **Optimization**'."\n"
.'* **Warn**'."\n"
.'* **Critical**'."\n",
'type' => 'string',
'example' => 'Optimization',
],
'contacts' => [
'title' => '告警联系人信息。',
'description' => 'The user ID.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'name' => [
'title' => '告警联系人名称。',
'description' => 'The name of the alert contact.',
'type' => 'string',
'example' => 'Mr. Zhang',
],
'phone' => [
'title' => '告警联系人电话',
'description' => 'The mobile number of the alert contact.',
'type' => 'string',
'example' => '1390000****',
],
'email' => [
'title' => '告警联系人邮箱。',
'description' => 'The email address of the alert contact.',
'type' => 'string',
'example' => 'a***@example.net',
],
'dingtalkHook' => [
'title' => '告警联系人钉钉机器人webhook。',
'description' => 'The webhook URL of the DingTalk chatbot.',
'type' => 'string',
'example' => 'https://oapi.dingtalk.com/robot/send?access_token=68fa29a9eaf3ba9994f54fxxxc1aa9879700308f90e9c23ebfb3663642c9****',
],
'groups' => [
'title' => '告警联系人所属联系组列表。',
'description' => 'The contact groups to which the alert contact belongs.',
'type' => 'array',
'items' => [
'description' => 'The name of the alert contact.',
'type' => 'string',
'example' => 'Mr. Zhang',
],
],
'isCmsReduplicated' => [
'title' => '是否和云监控上的联系人重名。',
'description' => 'Indicates whether the alert contact name is the same as the contact name on CloudMonitor.'."\n"
."\n"
.'* **true**'."\n"
.'* **false**',
'type' => 'boolean',
'example' => 'true',
],
'userId' => [
'title' => '用户ID。',
'description' => 'The user ID.',
'type' => 'string',
'example' => '1088760496****',
],
],
'description' => '',
],
],
'contactGroups' => [
'description' => 'The alert contact groups.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'name' => [
'title' => '告警联系人组姓名。',
'description' => 'The name of the alert contact group.',
'type' => 'string',
'example' => 'Mr. Zhang',
],
'description' => [
'title' => '告警联系人组描述。',
'description' => 'The description of the alert contact group.',
'type' => 'string',
'example' => 'Default contact',
],
'contacts' => [
'title' => '告警联系人组内成员。',
'description' => 'The members of the alert contact group.',
'type' => 'string',
'example' => '"[\\"Mr. Zhang\\",\\"Ms. Wang\\",\\"Mr. Li\\"]"',
],
'userId' => [
'title' => '用户ID。',
'description' => 'The user ID.',
'type' => 'string',
'example' => '1088760496****',
],
],
],
],
'eventSendGroup' => [
'title' => '对应事件订阅的场景。',
'description' => 'The supported event scenarios in which event subscription can be sent.'."\n",
'type' => 'array',
'items' => [
'description' => 'The supported event scenario in which event notifications can be sent. Only **AllContext** may be returned, which indicates that all scenarios are supported.'."\n",
'type' => 'string',
'example' => 'AllContext',
],
],
'id' => [
'title' => '订阅关系序号。',
'description' => 'The primary key ID of the database.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'gmtCreate' => [
'title' => '创建时间。',
'description' => 'The time when event subscription was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1633071840000',
],
'gmtModified' => [
'title' => '最后修改时间。',
'description' => 'The time when the event subscription settings were most recently modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1633071850000',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetEventSubscription',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* The database instance that you want to manage is connected to DAS.'."\n",
],
'GetAutonomousNotifyEventContent' => [
'summary' => 'Queries the details of notification events of a database instance.',
'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' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-18ff4a195d****',
],
],
[
'name' => 'SpanId',
'in' => 'query',
'schema' => [
'description' => 'The unique identifier of the event. You can call the [GetAutonomousNotifyEventsInRange](~~288371~~) operation to query the unique identifier returned by the SpanId response parameter.'."\n",
'type' => 'string',
'required' => true,
'example' => '7e7b2774-95b8-4fa3-bd9c-0ab47cb7****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Data' => [
'description' => 'The details of the notification events.'."\n",
'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' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetAutonomousNotifyEventContent',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* After your instance is connected to DAS, notification events such as snapshot capture are triggered if DAS detects changes to database monitoring metrics during anomaly detection.'."\n"
."\n"
.'> You can query the details of notification events only if the autonomy center is enabled. For more information, see [Autonomy center](~~152139~~).'."\n",
],
'GetAutonomousNotifyEventsInRange' => [
'summary' => 'Queries the notification events of one or more urgency levels within a period.',
'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' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-18ff4a195d****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1568269711000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time.'."\n",
'type' => 'string',
'required' => true,
'example' => '1568265711221',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the node in a PolarDB for MySQL cluster. You can call the [DescribeDBClusters](~~98094~~) operation to query the node ID returned by the DBNodeId response parameter.'."\n"
."\n"
.'> You must specify the node ID if your database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'EventContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Level',
'in' => 'query',
'schema' => [
'description' => 'The urgency level of the events. If you specify this parameter, the MinLevel parameter does not take effect. Valid values:'."\n"
."\n"
.'* **Notice**: events for which the system sends notifications.'."\n"
.'* **Optimization**: events that need to be optimized.'."\n"
.'* **Warn**: events for which the system sends warnings.'."\n"
.'* **Critical**: critical events.'."\n",
'type' => 'string',
'required' => false,
'example' => 'Warn',
],
],
[
'name' => 'MinLevel',
'in' => 'query',
'schema' => [
'description' => 'The minimum urgency level of the events. Valid values:'."\n"
."\n"
.'* **Notice**: events for which the system sends notifications.'."\n"
.'* **Optimization**: events that need to be optimized.'."\n"
.'* **Warn**: events for which the system sends warnings.'."\n"
.'* **Critical**: critical events.'."\n",
'type' => 'string',
'required' => false,
'example' => 'Notice',
],
],
[
'name' => 'PageOffset',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page.'."\n",
'type' => 'string',
'required' => false,
'example' => '30',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'object',
'properties' => [
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'T' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'array',
'items' => [
'description' => 'The detailed information.'."\n",
'type' => 'string',
'example' => '"T": []',
],
],
],
],
'PageNo' => [
'description' => 'The page number.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => 'The number of entries per page.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetAutonomousNotifyEventsInRange',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* After your instance is connected to DAS, notification events such as snapshot capture are triggered if DAS detects changes to database monitoring metrics during anomaly detection.'."\n"
."\n"
.'> You can query the details of notification events only if the autonomy center is enabled. For more information, see [Autonomy center](~~152139~~).'."\n",
],
'CreateDiagnosticReport' => [
'summary' => 'Creates a diagnostic report.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'DBInstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to create the diagnostic report. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to create the diagnostic report. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be later than the end time.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'ac544623-f6ad-45fd-9a74-9be3db65****',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'string',
'example' => '70af71852fcdf2c5dc7b90596e2cf05b',
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'CreateDiagnosticReport',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than 4.3.3. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of Database Autonomy Service (DAS) SDK must be 1.0.3 or later.'."\n"
."\n"
.'* If you use an SDK to call DAS, you must set the region to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * RDS MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * Redis'."\n",
],
'DescribeDiagnosticReportList' => [
'summary' => 'Queries diagnostics reports.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'DBInstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'string',
'required' => false,
'example' => '10',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1668398892000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time.'."\n",
'type' => 'string',
'required' => true,
'example' => '1668420492000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'D00DB161-FEF6-5428-B37A-8D29A4C2****',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Synchro' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'Data' => [
'description' => 'The information of the diagnostics reports. Valid values:'."\n"
."\n"
.'* **total**: the number of diagnostics reports.'."\n"
.'* **score**: the health score.'."\n"
.'* **diagnosticTime**: the time when the diagnostics report was generated. The time is displayed in UTC.'."\n"
.'* **startTime**: the start time of the query. The time is displayed in UTC.'."\n"
.'* **endTime**: the end time of the query. The time is displayed in UTC.'."\n",
'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' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeDiagnosticReportList',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation is applicable to the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB for Redis'."\n",
],
'GetDBInstanceConnectivityDiagnosis' => [
'summary' => 'Queries the diagnosis of network connectivity when a user accesses a specific database instance by specifying an IP address.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'title' => '实例ID',
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SrcIp',
'in' => 'query',
'schema' => [
'title' => '源IP',
'description' => 'The source IP address.'."\n",
'type' => 'string',
'required' => true,
'example' => '47.110.180.62',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'The response parameters.'."\n",
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. Otherwise, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'instanceId' => [
'title' => '实例ID',
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'success' => [
'title' => '是否检测通过',
'description' => 'Indicates whether the connectivity test was passed:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'enumValueTitles' => [],
'example' => 'false',
],
'failType' => [
'title' => '异常类型',
'description' => 'The type of the exception:'."\n"
."\n"
.'* **0**: an exception that can be handled by the user.'."\n"
.'* **1**: an exception that can be handled by a technical engineer.'."\n",
'type' => 'string',
'example' => '0',
],
'connCheckErrorCode' => [
'title' => '异常检测项',
'description' => 'The exception detection items:'."\n"
."\n"
.'* **SRC_IP_NOT_IN_USER_WHITELIST**: The source IP address is not added to the whitelist of the user.'."\n"
.'* **VIP_NOT_EXISTS**: The Application Load Balancer (ALB) instance corresponding to the virtual IP address (VIP) does not exist.'."\n"
.'* **RS_NOT_EXISTS**: The resource sharing (RS) is not properly mounted.'."\n"
.'* **VIP_TUNNEL_ID_NOT_CONSISTENT**: The tunnel ID used by the VIP of the virtual private cloud (VPC) type is different from the tunnel ID of the VPC.'."\n"
.'* **VIP_VPC_CLOUD_INSTANCE_NOT_EXISTS**: The VIP of the VPC type does not exist.'."\n"
.'* **VIP_IS_NOT_NGLB**: The NGLB mode is disabled for the VIP.'."\n"
.'* **CUSTINS_NOT_ASSOCIATE_ECS_SECURITY_GROUP**: No security group is associated with the instance.'."\n"
.'* **SRC_IP_NOT_IN_USER_WHITELIST**: The source IP address is not added to the whitelist of the user.'."\n"
.'* **SRC_IP_NOT_IN_ADMIN_WHITELIST**: The source IP address is not added to the whitelist of the instance.'."\n"
.'* **SRC_IP_NOT_IN_ECS_SECURITY_GROUP**: The source IP address is not added to the security group that is associated with the instance.'."\n"
.'* **VPC_INSTANCE_IP_NOT_WORKING_STATUS**: The IP address in the VPC is in an abnormal state.'."\n",
'type' => 'string',
'example' => 'SRC_IP_NOT_IN_USER_WHITELIST',
],
'connCheckErrorMessage' => [
'title' => '异常检测详情信息',
'description' => 'The details of the exception detection.'."\n",
'type' => 'string',
'example' => 'Src ip:47.110.180.62 not in user whitelist',
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'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' => 'GetDBInstanceConnectivityDiagnosis',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* The database instance that you want to manage is connected to DAS.'."\n",
],
'CreateCacheAnalysisJob' => [
'summary' => 'Creates a cache analysis task.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the ApsaraDB for Redis instance.'."\n",
'type' => 'string',
'required' => true,
'docRequired' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the data node on the instance. You can specify this parameter to query the monitoring information about the specified node.'."\n"
."\n"
.'> If you specify the BackupSetId parameter, the system ignores the NodeId parameter. You can call the [DescribeLogicInstanceTopology](~~473786~~) operation to query the node ID.',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'BackupSetId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the backup file. You can call the [DescribeBackups](~~473823~~) operation to query the ID.'."\n"
."\n"
.'* If you need to specify multiple backup file IDs, separate them with commas (,). For example, you can set this parameter to `12345,67890`.'."\n"
.'* If you do not specify this parameter, the system automatically backs up the task and performs cache analysis on the backup file.',
'type' => 'string',
'required' => false,
'example' => '12345',
],
],
[
'name' => 'Separators',
'in' => 'query',
'schema' => [
'description' => 'The delimiters used to identify the prefixes of keys. You do not need to specify this parameter if one or more of the following default delimiters are used: `: ; , _ - + @ = | #`'."\n",
'type' => 'string',
'required' => false,
'example' => '&',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => 'The state of the cache analysis task. Valid values:'."\n"
."\n"
.'* **BACKUP**: The data is being backed up.'."\n"
.'* **ANALYZING**: The data is being analyzed.'."\n"
.'* **FINISHED**: The data is analyzed.'."\n"
.'* **FAILED**: An error occurred.'."\n",
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => 'The ID of the cache analysis task.'."\n"
."\n"
.'> This parameter can be used to query a specific cache analysis task. When you call the CreateCacheAnalysisJob operation, it takes some time to create a cache analysis task. As a result, the analysis results cannot be immediately returned. You can call the [DescribeCacheAnalysisJob](~~180983~~) operation to query the analysis results of the specified cache analysis task.'."\n",
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the ApsaraDB for Redis instance.',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The name of the database.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The expiration period of the key. Unit: milliseconds. A value of 0 indicates that the key does not expire.',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The name of the key.',
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'The data type of the key.',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'CreateCacheAnalysisJob',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call the API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* You can call this operation to analyze the data structures of ApsaraDB for Redis and the following self-developed data structures of Tair: TairString, TairHash, TairGIS, TairBloom, TairDoc, TairCpc, and TairZset. Other self-developed Tair data structures are not supported.'."\n"
.'* If the specifications of the database instance that you want to analyze are changed, the backup file generated before the specification change cannot be analyzed.'."\n"
.'* Tair ESSD/SSD-based instances are not supported.'."\n",
],
'DescribeCacheAnalysisJob' => [
'summary' => 'Queries the details of a cache analysis task.',
'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' => 'The ID of the instance.'."\n",
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'JobId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the cache analysis task. You can obtain the task ID from the response parameters of the [CreateCacheAnalysisJob](~~180982~~) operation.'."\n",
'type' => 'string',
'required' => true,
'example' => 'sf79-sd99-sa37-****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The message that is returned for the request.'."\n"
."\n"
.'> If the request is successful, **Successful** is returned. If the request fails, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The ID of the request.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => 'The details of the cache analysis task.'."\n",
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => 'The state of the cache analysis task. Valid values:'."\n"
."\n"
.'* **BACKUP**: The data is being backed up.'."\n"
.'* **ANALYZING**: The data is being analyzed.'."\n"
.'* **FINISHED**: The data is analyzed.'."\n"
.'* **FAILED**: An error occurred.'."\n",
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => 'The ID of the cache analysis task.'."\n",
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => 'The message that is returned for the request.'."\n"
."\n"
.'> If the request is successful, **Successful** is returned. If the request fails, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The details of the large keys. The returned large keys are sorted in descending order based on the number of bytes occupied by the keys.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the instance.'."\n",
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The database name.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The time when the key expires. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. A value of 0 indicates that the key never expires.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The key name.'."\n",
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'The data type of the key.'."\n",
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'KeyPrefixes' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'Prefix' => [
'description' => 'The prefixes of the keys.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'KeyNum' => [
'description' => 'The number of keys that contain the prefix.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '123',
],
'Type' => [
'description' => 'The data type of the instance.'."\n",
'type' => 'string',
'example' => 'hash',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'Prefix' => [
'description' => 'The prefix of the key.'."\n",
'type' => 'string',
'example' => 'task_',
],
'Count' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'BigKeysOfNum' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The details of the large keys. The returned large keys are sorted in descending order based on the number of keys.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the instance.'."\n",
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The database name.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The time when the key expires. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. A value of 0 indicates that the key never expires.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The key name.'."\n",
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'The data type of the key.'."\n",
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'UnexBigKeysOfBytes' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The details of permanent keys. The returned keys are sorted in descending order based on the number of bytes occupied by the keys.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the instance.'."\n",
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The database name.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The time when the key expires. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. A value of 0 indicates that the key never expires.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The key name.'."\n",
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'The data type of the key.'."\n",
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'UnexBigKeysOfNum' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The details of permanent keys. The returned keys are sorted in descending order based on the number of keys.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the instance.'."\n",
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The database name.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The time when the key expires. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. A value of 0 indicates that the key never expires.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The key name.'."\n",
'type' => 'string',
'example' => 'task_x****',
],
'Encoding' => [
'description' => 'The data type of the key.'."\n",
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'ExpiryKeysLevelCount' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'ExpiryLevel' => [
'description' => 'The statistics of the keys that have expired.'."\n",
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'AnalysisTs' => [
'description' => 'The time when the cache analysis task was complete. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1717469347000',
],
'Level' => [
'description' => 'The expiration level. Valid values:'."\n"
."\n"
.'* **0**: The key never expires.'."\n"
.'* **1**: The key has expired.'."\n"
.'* **2**: The key has expired for 0 to 1 hour.'."\n"
.'* **3**: The key has expired for 1 to 3 hours.'."\n"
.'* **4**: The key has expired for 3 to 12 hours.'."\n"
.'* **5**: The key has expired for 12 to 24 hours.'."\n"
.'* **6**: The key has expired for one to two days.'."\n"
.'* **7**: The key has expired for three to seven days.'."\n"
.'* **8**: The key has expired for more than seven days.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'TotalBytes' => [
'description' => 'The number of bytes occupied by the keys that have expired.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '8064',
],
'TotalKeys' => [
'description' => 'The total number of the keys that have expired.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '62',
],
],
],
],
],
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.',
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeCacheAnalysisJob',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call the API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* This operation is applicable only to ApsaraDB for Redis.'."\n"
."\n"
.'> You can call this operation to query the top 500 keys in a cache analysis task.'."\n",
],
'DescribeCacheAnalysisJobs' => [
'summary' => 'Queries a list of cache analysis tasks.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be an integer that is greater than 0. Default value: 1.'."\n",
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'string',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => 'The list of cache analysis tasks.'."\n",
'type' => 'object',
'properties' => [
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'CacheAnalysisJob' => [
'description' => 'The ID of the data node on the instance.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'TaskState' => [
'description' => 'The state of the cache analysis task. Valid values:'."\n"
."\n"
.'* **BACKUP**: The data is being backed up.'."\n"
.'* **ANALYZING**: The data is being analyzed.'."\n"
.'* **FINISHED**: The data is analyzed.'."\n"
.'* **FAILED**: An error occurred.',
'type' => 'string',
'example' => 'BACKUP',
],
'JobId' => [
'description' => 'The ID of the cache analysis task.',
'type' => 'string',
'example' => 'sf79-sd99-sa37-****',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'KeyInfo' => [
'description' => 'The details about the large keys.'."\n"
."\n"
.'> The sub-parameters of this parameter and the content of the sub-parameters are not returned. To query the detailed information about the cache analysis tasks, call the [DescribeCacheAnalysisJob](~~443012~~) operation.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The data type of the instance.',
'type' => 'string',
'example' => 'hash',
],
'Db' => [
'description' => 'The name of the database.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'ExpirationTimeMillis' => [
'description' => 'The expiration period of the key. Unit: milliseconds. A value of 0 indicates that the key does not expire.',
'type' => 'integer',
'format' => 'int64',
'example' => '1596256542547',
],
'Key' => [
'description' => 'The name of the key.',
'type' => 'string',
'example' => 'task_*****',
],
'Encoding' => [
'description' => 'The data type of the key.',
'type' => 'string',
'example' => 'hashtable',
],
'Bytes' => [
'description' => 'The number of bytes that are occupied by the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '12345',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.',
'type' => 'string',
'example' => 'r-****-db-0',
],
'Count' => [
'description' => 'The number of elements in the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '127',
],
],
],
],
],
],
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'r-bp18ff4a195d****',
],
'NodeId' => [
'description' => 'The ID of the data node on the instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'PageNo' => [
'description' => 'The page number. The value must be an integer that is greater than 0. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageSize' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeCacheAnalysisJobs',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* This operation is applicable only to ApsaraDB for Redis.'."\n",
],
'EnableSqlConcurrencyControl' => [
'summary' => 'Enables SQL throttling to control the numbers of database access requests and concurrent SQL statements.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n"
."\n"
.'> You must specify the instance ID only if your database instance is an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => 'The type of the SQL statements. Valid values:'."\n"
."\n"
.'* **SELECT**'."\n"
.'* **UPDATE**'."\n"
.'* **DELETE**'."\n",
'type' => 'string',
'required' => true,
'example' => 'SELECT',
],
],
[
'name' => 'MaxConcurrency',
'in' => 'query',
'schema' => [
'description' => 'The maximum number of concurrent SQL statements. Set this parameter to a positive integer.'."\n"
."\n"
.'> When the number of concurrent SQL statements that contain the specified keywords reaches this upper limit, the throttling rule is triggered.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '3',
],
],
[
'name' => 'SqlKeywords',
'in' => 'query',
'schema' => [
'description' => 'The keywords that are used to identify the SQL statements that need to be throttled.'."\n"
."\n"
.'> If you specify multiple SQL keywords, separate them with tildes (~). If the number of concurrent SQL statements that contain all the specified SQL keywords reaches the specified upper limit, the throttling rule is triggered.'."\n",
'type' => 'string',
'required' => true,
'example' => 'call~open~api~test~4~from~POP',
],
],
[
'name' => 'ConcurrencyControlTime',
'in' => 'query',
'schema' => [
'description' => 'The duration within which the SQL throttling rule takes effect. Unit: seconds.'."\n"
."\n"
.'> The throttling rule takes effect only within this duration.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '300',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'string',
'example' => 'Null',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'EnableSqlConcurrencyControl',
'description' => 'This operation supports the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
],
'DisableSqlConcurrencyControl' => [
'summary' => 'Disables a throttling rule.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'update',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n"
."\n"
.'> The database instance must be an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'ItemId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the throttling rule that is applied to the instance. You can call the [GetRunningSqlConcurrencyControlRules](~~223538~~) operation to query the ID.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'string',
'example' => 'Null',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DisableSqlConcurrencyControl',
'description' => 'This operation is applicable to the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
],
'DisableAllSqlConcurrencyControlRules' => [
'summary' => 'Disables all throttling rules that are in effect.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'update',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n"
."\n"
.'> You must specify this parameter only if your database instance is an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DisableAllSqlConcurrencyControlRules',
'description' => 'This operation supports the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
],
'GetRunningSqlConcurrencyControlRules' => [
'summary' => 'Queries the throttling rules that are in effect.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n"
."\n"
.'> You must specify this parameter only if your database instance is an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. The value must be a positive integer. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'runningRules' => [
'description' => 'The returned data.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ItemId' => [
'description' => 'The ID of the throttling rule that is applied to the instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '16',
],
'SqlType' => [
'description' => 'The type of the SQL statements. Valid values:'."\n"
."\n"
.'* **SELECT**'."\n"
.'* **UPDATE**'."\n"
.'* **DELETE**',
'type' => 'string',
'example' => 'SELECT',
],
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'SqlKeywords' => [
'description' => 'The keywords contained in the SQL statements to which the throttling rule was applied.'."\n"
."\n"
.'> SQL keywords are separated by tildes (~). If the number of concurrent SQL statements that contain all the specified SQL keywords reaches the specified upper limit, the throttling rule is triggered.',
'type' => 'string',
'example' => 'call~open~api~test~4~from~POP',
],
'StartTime' => [
'description' => 'The time when the throttling rule started to take effect. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'KeywordsHash' => [
'description' => 'The hash value of the SQL keywords. The hash value is calculated based on the SQL keywords that are contained in the SQL statements to which the throttling rule is applied.',
'type' => 'string',
'example' => 'b0b8aceeb43baea87b219c81767b****',
],
'ConcurrencyControlTime' => [
'description' => 'The duration within which the SQL throttling rule takes effect. Unit: seconds.'."\n"
."\n"
.'> The throttling rule takes effect only within this duration.',
'type' => 'integer',
'format' => 'int64',
'example' => '600',
],
'UserId' => [
'description' => 'The Alibaba Cloud account ID.',
'type' => 'string',
'example' => 'testxxx',
],
'MaxConcurrency' => [
'description' => 'The maximum number of concurrent SQL statements. The value is a positive integer.'."\n"
."\n"
.'> If the number of concurrent SQL statements that contain the specified keywords reaches this upper limit, the throttling rule is triggered.',
'type' => 'string',
'example' => '2',
],
'Status' => [
'description' => 'The status of the throttling rule. The value of **Open** indicates that the throttling rule is in effect.',
'type' => 'string',
'example' => 'Open',
],
],
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetRunningSqlConcurrencyControlRules',
'description' => 'This operation supports the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
],
'GetSqlConcurrencyControlRulesHistory' => [
'summary' => 'Queries the throttling rules that are being executed or have been triggered.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n"
."\n"
.'> Only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters are supported.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be an integer that is greater than 0. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. The value must be an integer that is greater than 0. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '4',
],
'List' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'rules' => [
'description' => 'The list of the queried throttling rules.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'ItemId' => [
'description' => 'The ID of the throttling rule that is applied to the instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '16',
],
'SqlType' => [
'description' => 'The type of the SQL statements. Valid values:'."\n"
."\n"
.'* **SELECT**'."\n"
.'* **UPDATE**'."\n"
.'* **DELETE**',
'type' => 'string',
'example' => 'SELECT',
],
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze1jdv45i7l6****',
],
'SqlKeywords' => [
'description' => 'The keywords that are used to identify the SQL statements that need to be throttled.'."\n"
."\n"
.'> SQL keywords are separated with tildes (~). When the number of concurrent SQL statements that contain all the specified SQL keywords reaches the specified upper limit, the throttling rule is triggered.',
'type' => 'string',
'example' => 'call~open~api~test~4~from~POP',
],
'StartTime' => [
'description' => 'The beginning of the time range to query. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'integer',
'format' => 'int64',
'example' => '1608888296000',
],
'KeywordsHash' => [
'description' => 'The hash value of the SQL keywords. The SQL keywords are contained in the SQL statements to which the throttling rule is applied.',
'type' => 'string',
'example' => 'b0b8aceeb43baea87b219c81767b****',
],
'ConcurrencyControlTime' => [
'description' => 'The duration within which the SQL throttling rule takes effect. Unit: seconds.'."\n"
."\n"
.'> The throttling rule takes effect only within this duration.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '600',
],
'UserId' => [
'description' => 'The user ID.',
'type' => 'string',
'example' => 'testxxx',
],
'MaxConcurrency' => [
'description' => 'The maximum number of concurrent SQL statements. Set this parameter to a positive integer.'."\n"
."\n"
.'> When the number of concurrent SQL statements that contain the specified keywords reaches this upper limit, the throttling rule is triggered.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'Status' => [
'description' => 'The state of the throttling rule. Valid values:'."\n"
."\n"
.'* **Open**: The throttling rule is in effect.'."\n"
.'* **Closed**: The throttling rule was in effect.',
'type' => 'string',
'example' => 'Open',
],
],
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetSqlConcurrencyControlRulesHistory',
'description' => 'This operation supports the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
],
'GetSqlConcurrencyControlKeywordsFromSqlText' => [
'summary' => 'Generates a throttling keyword string based on an SQL statement.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze5hpn2b99d2****',
],
],
[
'name' => 'SqlText',
'in' => 'query',
'schema' => [
'description' => 'The SQL statement based on which a throttling keyword string is to be generated.'."\n",
'type' => 'string',
'required' => true,
'example' => 'SELECT * FROM test where name = \'das\'',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The throttling keyword string that was generated based on the SQL statement.'."\n",
'type' => 'string',
'example' => 'SELECT~FROM~test~where~name',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '30A643F5-D7A6-55F5-AB75-DF501427****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetSqlConcurrencyControlKeywordsFromSqlText',
'description' => 'This operation supports the following database engines:'."\n"
."\n"
.'* ApsaraDB RDS for MySQL'."\n"
.'* PolarDB for MySQL'."\n",
'responseParamsDescription' => 'The returned throttling keyword string is generated based on SQL syntax. To throttle a specific value, you must add the value to the string. For example, if the original SQL statement is `SELECT \\* FROM test where name = \'das\'`, the following throttling keyword string is returned: `SELECT~FROM~test~where~name`. If you want to throttle the `das` value, you must add `~das` to the string, so that the string becomes `SELECT~FROM~test~where~name~das`.'."\n",
],
'CreateRequestDiagnosis' => [
'summary' => 'Initiates an SQL statement diagnostics request.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'systemTags' => [
'operationType' => 'create',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified for PolarDB for MySQL, PolarDB for PostgreSQL (Compatible with Oracle), and ApsaraDB for MongoDB instances.'."\n",
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'Database',
'in' => 'query',
'schema' => [
'description' => 'The name of the database.'."\n",
'type' => 'string',
'required' => true,
'example' => 'das',
],
],
[
'name' => 'Sql',
'in' => 'query',
'schema' => [
'description' => 'The SQL statement that you want to diagnose.'."\n",
'type' => 'string',
'required' => true,
'example' => 'select * from test where name = \'mockUser\'',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The diagnostics ID, which is the unique identifier of the diagnosis. This parameter can be used to query the result of the diagnosis.'."\n",
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'CreateRequestDiagnosis',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an SDK to call Database Autonomy Service (DAS), you must set the region to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n"
.' * ApsaraDB RDS for SQL Server'."\n"
.' * PolarDB for MySQL'."\n"
.' * PolarDB for PostgreSQL (compatible with Oracle)'."\n"
.' * ApsaraDB for MongoDB'."\n"
."\n"
.'> The minor engine version of ApsaraDB RDS for PostgreSQL instances must be 20221230 or later. For more information about how to check and update the minor engine version of an ApsaraDB RDS for PostgreSQL instance, see [Update the minor engine version of an ApsaraDB RDS for PostgreSQL instance](~~146895~~).'."\n",
],
'GetRequestDiagnosisResult' => [
'summary' => 'Queries the results of an SQL diagnostics task.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> You must specify the node ID if your database instance is a PolarDB for MySQL cluster, a PolarDB for PostgreSQL (compatible with Oracle) instance, or an ApsaraDB for MongoDB database.'."\n",
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'MessageId',
'in' => 'query',
'schema' => [
'description' => 'The unique ID of the diagnostic task.[](~~341609~~)'."\n"
."\n"
.'> If you set MessageId to the task ID of the automatic SQL optimization feature, no result is returned.'."\n",
'type' => 'string',
'required' => true,
'example' => '61820b594664275c4429****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'title' => 'SQL模板ID',
'description' => 'The SQL template ID.'."\n"
."\n"
.'> This parameter is required if you call this operation in the DAS console. You do not need to specify this parameter when you call this operation.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Source',
'in' => 'query',
'schema' => [
'title' => '诊断来源',
'description' => 'The source of the task.'."\n"
."\n"
.'> This parameter is required if you call this operation in the DAS console. You do not need to specify this parameter when you call this operation.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Data' => [
'description' => 'The returned data.'."\n",
'type' => 'object',
'properties' => [
'messageId' => [
'description' => 'The unique ID of the diagnostics task.'."\n",
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'uuid' => [
'description' => 'The unique ID of the diagnostics instance.'."\n",
'type' => 'string',
'example' => 'hdm_51fe9bc19ec413f4d530431af87a****',
],
'accountId' => [
'description' => 'The user ID.'."\n",
'type' => 'string',
'example' => '2093****',
],
'sqlId' => [
'description' => 'The SQL template ID.'."\n",
'type' => 'string',
'example' => '0c95dae3afef77be06572612df9b****',
],
'engine' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PostgreSQL**'."\n"
.'* **SQLServer**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PolarDBOracle**'."\n"
.'* **MongoDB**'."\n",
'type' => 'string',
'example' => 'MySQL',
],
'dbSchema' => [
'description' => 'The name of the database.'."\n",
'type' => 'string',
'example' => 'das',
],
'param' => [
'description' => 'The additional information.'."\n",
'type' => 'string',
'example' => '{"":""}',
],
'state' => [
'description' => 'The state of the diagnostics task. Valid values:'."\n"
."\n"
.'* **0**: The diagnostics task is in progress.'."\n"
.'* **1**: A diagnostics error occurred.'."\n"
.'* **2**: The diagnostics task is complete.'."\n"
.'* **3**: An SQL error occurred.'."\n"
.'* **4**: An engine error occurred.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'result' => [
'description' => 'The result of the SQL diagnostics task. The result includes the following information:'."\n"
."\n"
.'* **endTime**: the end time of the SQL diagnostics task.'."\n"
."\n"
.'* **errorCode**: the error code.'."\n"
."\n"
.' * **0001**: The SQL diagnostics task is complete.'."\n"
.' * **0003**: The SQL diagnostics task failed.'."\n"
."\n"
.'* **errorMessage**: the error message.'."\n"
."\n"
.'* **estimateCost**: the estimated cost.'."\n"
."\n"
.' * **cpu**: the estimated CPU utilization of the index.'."\n"
.' * **io**: the estimated I/O usage of the index.'."\n"
.' * **rows**: the estimated values of the rows returned for the index.'."\n"
."\n"
.'* **improvement**: the performance improvement ratio.'."\n"
."\n"
.'* **indexAdvices**: the index recommendations, which include the following information:'."\n"
."\n"
.' * **columns**: the index columns.'."\n"
.' * **ddlAddIndex**: the DDL statement for the index.'."\n"
.' * **indexName**: the name of the index.'."\n"
.' * **schemaName**: the name of the database.'."\n"
.' * **tableName**: the name of the table.'."\n"
.' * **unique**: indicates whether the index is unique.'."\n"
."\n"
.'* **ip**: the IP address of the instance.'."\n"
."\n"
.'* **messageId**: the ID of the diagnostics task.'."\n"
."\n"
.'* **port**: the port used to connect to the instance.'."\n"
."\n"
.'* **sqlTag**: the SQL tag.'."\n"
."\n"
.'* **startTime**: the start time of the SQL diagnostics task.'."\n"
."\n"
.'* **success**: indicates whether the request was successful.'."\n"
."\n"
.'* **support**: indicates whether the SQL statement can be diagnosed. Valid values:'."\n"
."\n"
.' * **true**'."\n"
.' * **false**'."\n"
."\n"
.'* **tuningAdvices** : the SQL rewrite suggestions.'."\n",
'type' => 'string',
'example' => '{ "endTime":1636354256000, "errorCode":"0001", "errorMessage":"TFX succeeded", "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' => 'The time when the SQL diagnostics task was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'example' => '1633071840000',
],
'gmtModified' => [
'description' => 'The time when the SQL diagnostics task was modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'example' => '1633071850000',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetRequestDiagnosisResult',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an SDK to call the API operations of Database Autonomy Service (DAS), you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* You cannot call this operation to query the diagnostic result of the automatic SQL optimization feature.'."\n"
."\n"
.'* This operation is applicable to the following database engines:'."\n"
."\n"
.' * RDS MySQL'."\n"
.' * RDS PostgreSQL'."\n"
.' * RDS SQL Server'."\n"
.' * PolarDB for MySQL'."\n"
.' * PolarDB for PostgreSQL (Compatible with Oracle)'."\n"
.' * ApsaraDB for MongoDB'."\n"
."\n"
.'> If your instance is an ApsaraDB RDS for PostgreSQL instance, make sure that the minor engine version of your instance is 20220130 or later. For more information about how to check and update the minor engine version of an ApsaraDB RDS for PostgreSQL instance, see [Update the minor engine version of an ApsaraDB RDS for PostgreSQL instance](~~146895~~).'."\n",
],
'GetRequestDiagnosisPage' => [
'summary' => 'Queries SQL diagnostics records by pages.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-0iwhhl8gx0ld6****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> You must specify the node ID if your database instance is a PolarDB for MySQL, PolarDB for PostgreSQL (Compatible with Oracle), or ApsaraDB for MongoDB instance.'."\n",
'type' => 'string',
'required' => false,
'example' => '202****',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. The value must be a positive integer. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '10',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1633071840000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1634972640000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '800FBAF5-A539-5B97-A09E-C63AB2F7****',
],
'Data' => [
'description' => 'The returned data.'."\n",
'type' => 'object',
'properties' => [
'list' => [
'description' => 'The SQL diagnostics records returned.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'messageId' => [
'description' => 'The unique ID of the diagnostics task.',
'type' => 'string',
'example' => '61820b594664275c4429****',
],
'uuid' => [
'description' => 'The unique ID of the diagnostics instance.',
'type' => 'string',
'example' => 'hdm_51fe9bc19ec413f4d530431af87a****',
],
'accountId' => [
'description' => 'The user ID.',
'type' => 'string',
'example' => '2093****',
],
'sqlId' => [
'description' => 'The SQL template ID.',
'type' => 'string',
'example' => '0c95dae3afef77be06572612df9b****',
],
'engine' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PostgreSQL**'."\n"
.'* **SQLServer**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PolarDBOracle**'."\n"
.'* **MongoDB**',
'type' => 'string',
'example' => 'MySQL',
],
'dbSchema' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'das',
],
'param' => [
'description' => 'Additional information.',
'type' => 'string',
'example' => '{"":""}',
],
'state' => [
'description' => 'The status of the diagnostics task. Valid values:'."\n"
."\n"
.'* **0**: The diagnostics task is in progress.'."\n"
."\n"
.'* **1**: A diagnostics error occurred.'."\n"
."\n"
.'* **2**: The diagnostics task is complete.'."\n"
."\n"
.'* **3**: An SQL error occurred.'."\n"
."\n"
.'* **4**: An engine error occurred.',
'type' => 'integer',
'format' => 'int32',
'example' => '2',
],
'result' => [
'description' => 'The result of the SQL diagnostics task. The result includes the following information:'."\n"
."\n"
.'* **endTime**: the end time of the SQL diagnostics task.'."\n"
.'* **errorCode**: indicates whether the SQL diagnostics task is complete. Valid values:'."\n"
.' * **0001**: The SQL diagnostics task is complete.'."\n"
.' * **0003**: The SQL diagnostics task failed.'."\n"
."\n"
.'* **errorMessage**: the error message.'."\n"
.'* **estimateCost**: the estimated cost.'."\n"
.' * **cpu**: the estimated CPU utilization of the index.'."\n"
.' * **io**: the estimated I/O usage of the index.'."\n"
.' * **rows**: the estimated values of the rows returned for the index.'."\n"
.'* **improvement**: the performance improvement ratio.'."\n"
.'* **indexAdvices**: the index recommendations, which include the following information:'."\n"
.' * **columns**: the index columns.'."\n"
.' * **ddlAddIndex**: the DDL statement for the index.'."\n"
.' * **indexName**: the name of the index.'."\n"
.' * **schemaName**: the name of the database.'."\n"
.' * **tableName**: the name of the table.'."\n"
.' * **unique**: indicates whether the index is unique.'."\n"
."\n"
.'* **ip**: the IP address of the instance.'."\n"
.'* **messageId**: the ID of the diagnostics task.'."\n"
.'* **port**: the port used to connect to the instance.'."\n"
.'* **sqlTag**: the SQL tag.'."\n"
.'* **startTime**: the start time of the SQL diagnostics task.'."\n"
.'* **success**: indicates whether the request was successful.'."\n"
.'* **support**: indicates whether the SQL statement can be diagnosed. Valid values:'."\n"
.' * **true**: The SQL statement can be diagnosed.'."\n"
.' * **false**: The SQL statement cannot be diagnosed.'."\n"
."\n"
.'* **tuningAdvices**: the SQL rewrite suggestions.',
'type' => 'string',
'example' => '{ "endTime":1636354256000, "errorCode":"0001", "errorMessage":"TFX Successful", "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' => 'The time when the SQL diagnostics task was created. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'string',
'example' => '1633071840000',
],
'gmtModified' => [
'description' => 'The time when the SQL diagnostics task was modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'string',
'example' => '1633071850000',
],
],
],
],
'pageNo' => [
'description' => 'The page number. The value must be a positive integer. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'pageSize' => [
'description' => 'The number of entries per page. The value must be a positive integer. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'total' => [
'description' => 'The total number of returned entries.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '100',
],
'extra' => [
'description' => 'Additional information.'."\n",
'type' => 'string',
'example' => '{"":""}',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetRequestDiagnosisPage',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an SDK to call API operations of Database Autonomy Service (DAS), you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n"
.' * ApsaraDB RDS for SQL Server'."\n"
.' * PolarDB for MySQL'."\n"
.' * PolarDB for PostgreSQL (Compatible with Oracle)'."\n"
.' * ApsaraDB for MongoDB'."\n"
."\n"
.'> The minor engine version of the Apsara RDS for PostgreSQL instance must be 20220130 or later. For more information about how to check and update the minor engine version of an ApsaraDB RDS for PostgreSQL instance, see [Update the minor engine version of an ApsaraDB RDS for PostgreSQL instance](~~146895~~).'."\n",
],
'DescribeQueryExplain' => [
'summary' => 'Queries the execution plan of an SQL statement.',
'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' => '',
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'formData',
'schema' => [
'description' => '',
'type' => 'string',
'required' => false,
'example' => 'pi-bp1v203xzzh0a****',
],
],
[
'name' => 'Sql',
'in' => 'formData',
'schema' => [
'description' => '',
'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' => '',
'type' => 'string',
'required' => false,
'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
'title' => 'Schema of Response',
'description' => 'Schema of Response',
'type' => 'object',
'properties' => [
'Code' => [
'description' => '',
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => '',
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => '',
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => '',
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'List',
'description' => 'List',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Id' => [
'description' => '',
'type' => 'string',
'example' => '1',
],
'SelectType' => [
'description' => '',
'type' => 'string',
'example' => 'SIMPLE',
],
'Table' => [
'description' => '',
'type' => 'string',
'example' => 'test',
],
'Type' => [
'description' => '',
'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' => '',
'type' => 'string',
'example' => '',
],
'TableList' => [
'title' => 'queryPlan中用到的表名',
'description' => '',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'string',
'example' => '',
],
],
'IndexList' => [
'title' => 'queryPlan中用到的索引名',
'description' => '',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'string',
'example' => '',
],
],
'LogicalPlanList' => [
'description' => '',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'string',
'example' => '',
],
],
'StmtText' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'StmtId' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'NodeId' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'Parent' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'PhysicalOp' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'LogicalOp' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'Argument' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'DefinedValues' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'EstimateRows' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'EstimateIO' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'EstimateCPU' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'AvgRowSize' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'TotalSubtreeCost' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'OutputList' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'Warnings' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'Parallel' => [
'description' => '',
'type' => 'string',
'example' => '',
],
'EstimateExecutions' => [
'description' => '',
'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' => 'DescribeQueryExplain',
],
'DescribeHotBigKeys' => [
'summary' => 'Queries the hot keys and the large keys in the memory in real time.',
'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' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => false,
'example' => 'r-****-db-0',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'description' => 'The list of hot keys and large keys.'."\n",
'type' => 'object',
'properties' => [
'HotKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => 'The list of hot keys.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Key' => [
'description' => 'The key.',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'The database in which the key is stored.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Hot' => [
'description' => 'The frequency at which the key is accessed, which indicates the queries per second (QPS) of the key.',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'The type of the key.',
'type' => 'string',
'example' => 'zset',
],
'Lfu' => [
'description' => 'The statistical value that is calculated based on the least frequently used (LFU) caching algorithm.',
'type' => 'integer',
'format' => 'int32',
'example' => '253',
],
'NodeId' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'Size' => [
'type' => 'integer',
'format' => 'int64',
],
],
],
],
],
],
'BigKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'BigKey' => [
'description' => 'The list of large keys.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Db' => [
'description' => 'The database in which the key is stored.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Key' => [
'description' => 'The key.',
'type' => 'string',
'example' => 'abc:def:eng',
],
'KeyType' => [
'description' => 'The type of the key.',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => 'The number of elements in the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'NodeId' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'HotKeyMsg' => [
'description' => 'The reason why the hot key failed to be queried.'."\n",
'type' => 'string',
'example' => 'current version doesn\'t support',
],
'BigKeyMsg' => [
'description' => 'The reason why the large key failed to be queried.'."\n",
'type' => 'string',
'example' => 'current version doesn\'t support',
],
'HighTrafficKeyMsg' => [
'type' => 'string',
],
'HighTrafficKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HighTrafficKey' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Key' => [
'type' => 'string',
],
'Db' => [
'type' => 'integer',
'format' => 'int32',
],
'Hot' => [
'type' => 'string',
],
'KeyType' => [
'type' => 'string',
],
'NodeId' => [
'type' => 'string',
],
'inBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'outBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'Size' => [
'type' => 'integer',
'format' => 'int64',
],
],
],
],
],
],
'LargeKeys' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'LargeKey' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Db' => [
'type' => 'string',
],
'Key' => [
'type' => 'string',
],
'KeyType' => [
'type' => 'string',
],
'DataSize' => [
'type' => 'string',
],
'NodeId' => [
'type' => 'string',
],
],
],
],
],
],
'LargeKeyMsg' => [
'type' => 'string',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeHotBigKeys',
'description' => 'This operation sorts list, hash, set, and zset keys based on the number of elements contained in these keys. The top three keys that contain the most elements are considered large keys. If the number of queries per second (QPS) of a key is greater than 3,000, the key is considered a hot key.'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than 4.3.3. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of Database Autonomy Service (DAS) SDK must be 1.0.2 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation is available only for ApsaraDB for Redis instances that meet the following requirements:'."\n"
."\n"
.' * The instance is a Community Edition instance that uses a major version of 5.0 or later or a performance-enhanced instance of the Enhanced Edition (Tair).'."\n"
.' * The ApsaraDB for Redis instance is updated to the latest minor version.',
],
'DescribeTopHotKeys' => [
'summary' => 'Queries the top 100 hotkeys over a period of time.',
'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' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => false,
'example' => 'r-****-db-0',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> '."\n"
."\n"
.'* The end time must be later than the start time.'."\n"
."\n"
.'* Only data within the last four days can be queried.'."\n"
."\n"
.'* The maximum interval between the **start time** and the** end time** is 3 hours.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => 'The detailed information about the hot keys.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Db' => [
'description' => 'The database in which the key is stored.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Key' => [
'description' => 'The key.',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Hot' => [
'description' => 'The frequency at which the key is accessed, which indicates the QPS of the key.',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'The type of the key.',
'type' => 'string',
'example' => 'zset',
],
'Lfu' => [
'description' => 'The statistical value that is calculated based on the least frequently used (LFU) caching algorithm.',
'type' => 'integer',
'format' => 'int32',
'example' => '253',
],
'NodeId' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
'InBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'OutBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'Category' => [
'type' => 'string',
],
],
],
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeTopHotKeys',
'description' => 'If the number of queries per second (QPS) of a key is greater than 3,000, the key is considered a hot key.'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than 4.3.3. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of Database Autonomy Service (DAS) SDK must be 1.0.2 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation is available only for an ApsaraDB for Redis instance of one of the following versions:'."\n"
."\n"
.' * The instance is a Community Edition instance that uses a major version of 4.0 or later or a performance-enhanced instance of the Enhanced Edition (Tair).'."\n"
.' * The ApsaraDB for Redis instance is updated to the latest minor version.',
],
'DescribeTopBigKeys' => [
'summary' => 'Queries the top 100 large keys over a period of time.',
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'ConsoleContext',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
[
'name' => 'StartTime',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993000',
],
],
[
'name' => 'EndTime',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> '."\n"
."\n"
.'* The end time must be later than the start time.'."\n"
."\n"
.'* Only data within the last four days can be queried.'."\n"
."\n"
.'* The maximum interval between the **start time** and the** end time** is 3 hours.'."\n",
'type' => 'string',
'required' => true,
'example' => '1596177993001',
],
],
],
'responses' => [
200 => [
'headers' => [],
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'BigKey' => [
'description' => 'The detailed information about the large keys.'."\n"
."\n"
.'> This parameter is left empty If no large keys exist within the specified time range.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Key' => [
'description' => 'The key.',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'The database in which the key is stored.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'KeyType' => [
'description' => 'The type of the key.',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => 'The number of elements in the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'NodeId' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'example' => 'r-x****-db-0',
],
],
],
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeTopBigKeys',
'description' => 'The list, hash, set, and zset keys are sorted based on the number of elements in these keys. The top three keys that have the most elements are considered large keys.'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than 4.3.3. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of Database Autonomy Service (DAS) SDK must be 1.0.2 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation is available only for an ApsaraDB for Redis instance of one of the following versions:'."\n"
."\n"
.' * The instance is ApsaraDB for Redis Community Edition instances that use a major version of 5.0 or later or a performance-enhanced instance of the ApsaraDB for Redis Enhanced Edition (Tair).'."\n"
.' * The ApsaraDB for Redis instance is updated to the latest minor version.',
],
'DescribeHotKeys' => [
'summary' => 'Queries the hot keys of an ApsaraDB for Redis instance.',
'methods' => [
'post',
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
'riskType' => 'none',
'chargeType' => 'free',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => true,
'example' => 'r-bp18ff4a195d****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the data shard on the ApsaraDB for Redis instance.',
'type' => 'string',
'required' => false,
'example' => 'r-x****-db-0',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Data' => [
'type' => 'object',
'itemNode' => true,
'properties' => [
'HotKey' => [
'description' => 'The details of the hot keys.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Key' => [
'description' => 'The name of the key.',
'type' => 'string',
'example' => 'abc:def:eng',
],
'Db' => [
'description' => 'The database in which the key is stored.',
'type' => 'integer',
'format' => 'int32',
'example' => '0',
],
'Hot' => [
'description' => 'The frequency at which the key is accessed, which indicates the queries per second (QPS) of the key.',
'type' => 'string',
'example' => '5500~6000',
],
'KeyType' => [
'description' => 'The type of the key.',
'type' => 'string',
'example' => 'zset',
],
'Size' => [
'description' => 'The number of elements in the key.',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'InBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'OutBytes' => [
'type' => 'integer',
'format' => 'int64',
],
'NodeId' => [
'type' => 'string',
],
'Category' => [
'type' => 'string',
],
],
],
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeHotKeys',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V1.0.2 or later.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation is applicable only to ApsaraDB for Redis instances that meet the following requirements:'."\n"
."\n"
.' * The ApsaraDB for Redis instance is a Community Edition instance that uses a major version of 4.0 or later or a performance-enhanced instance of the Enhanced Edition (Tair).'."\n"
.' * The ApsaraDB for Redis instance is updated to the latest minor version.',
],
'CreateQueryOptimizeTag' => [
'summary' => 'Adds a tag to a SQL template.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**: ApsaraDB RDS for MySQL'."\n"
.'* **PolarDBMySQL**: PolarDB for MySQL'."\n"
.'* **PostgreSQL**: ApsaraDB RDS for PostgreSQL'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'The SQL template IDs. You can call the [GetQueryOptimizeExecErrorStats](~~405261~~) operation to obtain the SQL template ID. Separate multiple SQL template IDs with commas (,).'."\n",
'type' => 'string',
'required' => true,
'example' => '6068ce044e3dc9b903979672fb0b69df,d12515c015fc9f41a0778a9e1de0e941',
],
],
[
'name' => 'Tags',
'in' => 'query',
'schema' => [
'description' => 'The SQL tags. Separate multiple SQL tags with commas (,). Valid values:'."\n"
."\n"
.'* **DAS_IMPORTANT**: The SQL template is important.'."\n"
.'* **DAS_NOT_IMPORTANT**: The SQL template is unimportant.'."\n"
.'* **USER_IGNORE**: The scheduling of the SQL template does not need to be optimized.'."\n"
.'* **DAS_IN_PLAN**: The scheduling of the SQL template needs to be optimized.'."\n",
'type' => 'string',
'required' => true,
'enumValueTitles' => [],
'example' => 'DAS_IN_PLAN,DAS_NOT_IMPORTANT',
],
],
[
'name' => 'Status',
'in' => 'query',
'schema' => [
'description' => 'The status of **Tags**. Valid values:'."\n"
."\n"
.'* **0**: removes all tags added to the SQL templates that are specified by **SqlIds** and leaves **Tags** empty.'."\n"
.'* **1**: adds the tags specified by **Tags** to the SQL templates that are specified by **SqlIds**.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'Comments',
'in' => 'query',
'schema' => [
'description' => 'The remarks.'."\n"
."\n"
.'The remarks can be 1 to 300 characters in length.'."\n",
'type' => 'string',
'required' => false,
'example' => 'Slow SQL queries of offline synchronization. No optimization is required.',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'Boolean',
'description' => 'Indicates whether the tags were added to the SQL templates.'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'CreateQueryOptimizeTag',
'description' => '* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeExecErrorStats' => [
'summary' => 'Queries SQL templates that failed to be executed.',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'The keywords of the SQL template. Separate multiple keywords with spaces.'."\n",
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => 'The logical relationship between multiple keywords. Valid values:'."\n"
."\n"
.'* **or**'."\n"
.'* **and**'."\n",
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => 'The name of the database to be queried.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => 'The time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.'."\n",
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'string',
'required' => true,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'string',
'required' => true,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => 'The field by which to sort the returned entries. Only error_count is supported, which specifies that the entries are sorted based on the number of failed executions.'."\n",
'type' => 'string',
'required' => false,
'example' => 'error_count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to sort the returned entries in ascending order. Default value: **true**. Valid values:'."\n"
."\n"
.'* **true**: sorts the returned entries in ascending order.'."\n"
.'* **false**: does not sort the returned entries in ascending order.'."\n",
'type' => 'string',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland'."\n"
.'* **cn-hongkong**: China (Hong Kong)'."\n"
.'* **ap-southeast-1**: Singapore'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region set by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> Set this parameter to **cn-china** for the instances that are created in the regions in the Chinese mainland.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information, including the error codes and the number of entries that are returned.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '19',
],
'PageNo' => [
'description' => 'The page number.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '1',
],
'PageSize' => [
'description' => 'The number of entries per page.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '10',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The information about the SQL templates that failed to execute.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'InstanceName' => [
'description' => 'The alias of the database instance.',
'type' => 'string',
'example' => 'test01',
],
'Dbname' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'The SQL template ID.',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlText' => [
'description' => 'The content of the SQL template.',
'type' => 'string',
'example' => 'select * from test1',
],
'ErrorCode' => [
'description' => 'The error code returned if the request failed.',
'type' => 'string',
'example' => '1146',
],
'ErrorCount' => [
'description' => 'The number of errors.',
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeExecErrorStats',
'description' => '* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeExecErrorSample' => [
'summary' => 'Queries the failed SQL statements under a SQL template.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'The SQL template ID. You can call the [GetQueryOptimizeExecErrorStats](~~405235~~) operation to obtain the SQL template ID.'."\n",
'type' => 'string',
'required' => true,
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => 'The date to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'PageNo' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The queried data.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'OrigHost' => [
'description' => 'The IP address of the client that executes the SQL statement.',
'type' => 'string',
'example' => '100.104.XX.XX',
],
'User' => [
'description' => 'The username of the client that executes the SQL statement.',
'type' => 'string',
'example' => 'test01',
],
'Dbname' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'The SQL template ID.',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlText' => [
'description' => 'The content of the SQL statement that failed to be executed.',
'type' => 'string',
'example' => 'select * from test1',
],
'ErrorCode' => [
'description' => 'The error code returned.',
'type' => 'string',
'example' => '1146',
],
'Timestamp' => [
'description' => 'The point in time when the failed SQL statement was executed. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'integer',
'format' => 'int64',
'example' => '1643020306739',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeExecErrorSample',
'description' => '* If you use Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V2.1.8. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V2.1.8 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeSolution' => [
'summary' => 'Queries suggestions provided by query governance for optimizing an SQL template.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'The SQL template ID. You can call the [GetQueryOptimizeDataStats](~~405261~~) operation to query the SQL template ID.'."\n",
'type' => 'string',
'required' => true,
'example' => '05fecf7e7b3efd123c4d5197035f****',
],
],
[
'name' => 'RuleIds',
'in' => 'query',
'schema' => [
'description' => 'The tag ID. For more information, see [Query governance](~~290038~~).'."\n",
'type' => 'string',
'required' => true,
'example' => 'LARGE_ROWS_EXAMINED',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID. You can call the [GetQueryOptimizeDataStats](~~405261~~) operation to query the instance ID.'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-bp1o3z6beqpej****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageNo' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The optimization suggestions.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Level' => [
'description' => 'The severity level. Valid values:'."\n"
."\n"
.'* **INFO**'."\n"
.'* **WARN**',
'type' => 'string',
'example' => 'INFO',
],
'RuleId' => [
'description' => 'The tag ID.',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED',
],
'Solution' => [
'description' => 'The suggestion.',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED_SOLUTION',
],
'SolutionExt' => [
'description' => 'The reserved parameter.',
'type' => 'string',
'example' => 'None',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '30FF4E40-17F3-5A51-AB23-43F30D9B****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeSolution',
'description' => '* If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeRuleList' => [
'summary' => 'Queries the tags added by the query governance feature to specified database instances.',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'title' => '',
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland'."\n"
.'* **cn-hongkong**: China (Hong Kong)'."\n"
.'* **ap-southeast-1**: Singapore'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region set by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> If your instances reside in the regions in the Chinese mainland, set this parameter to **cn-china**.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'PageNo' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The information about tags.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Type' => [
'description' => 'The type of the tag. **Predefined** is returned, which indicates that the tag is added by the system.',
'type' => 'string',
'example' => 'Predefined',
],
'Name' => [
'description' => 'The name of the tag.',
'type' => 'string',
'example' => 'LARGE_ROWS_EXAMINED',
],
'RuleId' => [
'description' => 'A reserved parameter.',
'type' => 'string',
'example' => 'None',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeRuleList',
'description' => '* If you use Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V2.1.8. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V2.1.8 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeDataTrend' => [
'summary' => 'Queries query governance trend data.',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> You can specify a start time up to two months earlier than the current time.'."\n",
'type' => 'string',
'required' => true,
'example' => '1642435200000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time, but not later than 00:00:00 (UTC+8) on the current day.'."\n",
'type' => 'string',
'required' => true,
'example' => '1643040000000',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland.'."\n"
.'* **cn-hongkong**: China (Hong Kong).'."\n"
.'* **ap-southeast-1**: Singapore.'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region specified by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> If your instances reside in the regions inside the Chinese mainland, set this parameter to **cn-china**.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The details of the trend data.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Kpi' => [
'description' => 'The name of the metric. Valid values:'."\n"
."\n"
.'* **sqlExecuteCount**: the number of executions of slow SQL queries.'."\n"
.'* **sqlExecuteCountDiff**: the difference in the number of executions of slow SQL queries compared to the previous day.'."\n"
.'* **sqlCount**: the number of slow SQL templates.'."\n"
.'* **sqlCountDiff**: the difference in the number of slow SQL templates compared to the previous day.'."\n"
.'* **optimizedSqlExecuteCount**: the number of optimizable executions of slow SQL queries.'."\n"
.'* **optimizedSqlExecuteCountDiff**: the difference in the number of optimizable executions of slow SQL queries compared to the previous day.'."\n"
.'* **optimizedSqlCount**: the number of optimizable slow SQL templates.'."\n"
.'* **optimizedSqlCountDiff**: the difference in the number of optimizable slow SQL templates compared to the previous day.',
'type' => 'string',
'example' => 'sqlExecuteCount',
],
'Timestamp' => [
'description' => 'The data timestamp. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'integer',
'format' => 'int64',
'example' => '1643040000000',
],
'Value' => [
'description' => 'The value of the metric.',
'type' => 'number',
'format' => 'double',
'example' => '1000',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeDataTrend',
'description' => '* If you use Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V2.1.8. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V2.1.8 or later.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeDataTop' => [
'summary' => 'Queries information about the best-performing and worst-performing instances based on query governance data.',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => 'The time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'Type',
'in' => 'query',
'schema' => [
'description' => 'The type of instances that you want to query. Valid values:'."\n"
."\n"
.'* **RED**: the best-performing instances'."\n"
.'* **BLACK**: the worst-performing instances'."\n",
'type' => 'string',
'required' => true,
'example' => 'RED',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland'."\n"
.'* **cn-hongkong**: China (Hong Kong)'."\n"
.'* **ap-southeast-1**: Singapore'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region set by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> Set this parameter to **cn-china** for all your instances that reside in the regions in the Chinese mainland.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The detailed information.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The information about the instances.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'Type' => [
'description' => 'The metric name. Valid values:'."\n"
."\n"
.'* **sqlExecuteCount**: the number of slow SQL executions.'."\n"
.'* **optimizedSqlExecuteCount**: the number of slow SQL executions that need to be optimized.',
'type' => 'string',
'example' => 'sqlExecuteCount',
],
'Value' => [
'description' => 'The metric value.',
'type' => 'number',
'format' => 'double',
'example' => '100',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeDataTop',
'description' => '* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V2.1.8. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V2.1.8 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeDataStats' => [
'summary' => 'Queries information about SQL templates based on query governance data.',
'methods' => [
'get',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'read',
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'Engine',
'in' => 'query',
'schema' => [
'description' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**'."\n"
.'* **PolarDBMySQL**'."\n"
.'* **PostgreSQL**'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'The keywords of the SQL template. Separate multiple keywords with spaces.'."\n",
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => 'The logical relationship between multiple keywords. Valid values:'."\n"
."\n"
.'* **or**'."\n"
.'* **and**'."\n",
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'Rules',
'in' => 'query',
'schema' => [
'description' => 'The tags that are used to filter SQL templates. Separate multiple tags with commas (,). For more information, see [Query governance](~~290038~~).'."\n",
'type' => 'string',
'required' => false,
'example' => 'DAS_NOT_IMPORTANT',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => 'The name of the database to be queried.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => 'The time range to query. Specify the time in the UNIX timestamp format. Unit: milliseconds.'."\n",
'type' => 'string',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'string',
'required' => false,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'string',
'required' => false,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => 'The field by which to sort the returned entries. Default value: **count**. Valid values:'."\n"
."\n"
.'* **count**: the number of executions.'."\n"
.'* **maxQueryTime**: the longest execution time.'."\n"
.'* **avgQueryTime**: the average execution time.'."\n"
.'* **maxLockTime**: the longest lock wait time.'."\n"
.'* **avgLockTime**: the longest lock wait time.'."\n"
.'* **maxRowsExamined**: the largest number of scanned rows.'."\n"
.'* **avgRowsExamined**: the average number of scanned rows.'."\n"
.'* **maxRowsSent**: the largest number of returned rows.'."\n"
.'* **avgRowsSent**: the average number of returned rows.'."\n",
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to sort the returned entries in ascending order. Default value: **true**. Valid values:'."\n"
."\n"
.'* **true**: sorts the returned entries in ascending order.'."\n"
.'* **false**: does not sort the returned entries in ascending order.'."\n",
'type' => 'string',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'OnlyOptimizedSql',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to query only SQL templates that need to be optimized. Default value: **false**. Valid values:'."\n"
."\n"
.'* **true**: queries only SQL templates that need to be optimized.'."\n"
.'* **false**: does not query only SQL statements that need to be optimized.'."\n",
'type' => 'string',
'required' => false,
'example' => 'false',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'The SQL template ID. You can query the ID of a template by calling the [GetQueryOptimizeExecErrorStats](~~405235~~) operation.'."\n",
'type' => 'string',
'required' => false,
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland'."\n"
.'* **cn-hongkong**: China (Hong Kong)'."\n"
.'* **ap-southeast-1**: Singapore'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region set by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> Set this parameter to **cn-china** for the instances that are created in the regions in the Chinese mainland.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
[
'name' => 'User',
'in' => 'query',
'schema' => [
'description' => 'The account of the database to be queried.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testUser',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '10',
],
'PageNo' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'PageSize' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => 'None',
],
'Extra' => [
'description' => 'The reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'List' => [
'description' => 'The information about the SQL templates.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'InstanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'Dbname' => [
'description' => 'The name of the database to which the SQL template belongs.',
'type' => 'string',
'example' => 'testdb01',
],
'SqlId' => [
'description' => 'The SQL template ID.',
'type' => 'string',
'example' => '2e8147b5ca2dfc640dfd5e43d96a****',
],
'SqlType' => [
'description' => 'The type of the SQL statement.',
'type' => 'string',
'example' => 'INSERT',
],
'Psql' => [
'description' => 'The SQL template.',
'type' => 'string',
'example' => 'select 1',
],
'SqlSample' => [
'description' => 'The sample query that took the longest time to execute.',
'type' => 'string',
'example' => 'select 2',
],
'Count' => [
'description' => 'The number of times that the SQL template is executed.',
'type' => 'integer',
'format' => 'int32',
'example' => '100',
],
'MaxQueryTime' => [
'description' => 'The longest query execution time. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '1.1',
],
'AvgQueryTime' => [
'description' => 'The average query execution time. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '1.1',
],
'MaxLockTime' => [
'description' => 'The longest lock wait time. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.1',
],
'AvgLockTime' => [
'description' => 'The average lock wait time. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.1',
],
'MaxRowsExamined' => [
'description' => 'The largest number of scanned rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'AvgRowsExamined' => [
'description' => 'The average number of scanned rows.',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'MaxRowsSent' => [
'description' => 'The largest number of returned rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRowsSent' => [
'description' => 'The average number of returned rows.',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'MaxRowsAffected' => [
'description' => 'The largest number of rows affected by the SQL template.'."\n"
."\n"
.'> A value of -1 indicates that this parameter is not collected.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRowsAffected' => [
'description' => 'The average number of rows affected by the SQL statement.'."\n"
."\n"
.'> A value of -1 indicates that this parameter is not collected.',
'type' => 'number',
'format' => 'double',
'example' => '100.1',
],
'RuleList' => [
'description' => 'The information about the rules.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Name' => [
'description' => 'The rule name.',
'type' => 'string',
'example' => 'DAS_NOT_IMPORTANT',
],
'Type' => [
'description' => 'The type of the rule. Valid values:'."\n"
."\n"
.'* **Predefined**'."\n"
.'* **UserDefined**',
'type' => 'string',
'example' => 'Predefined',
],
],
],
],
'User' => [
'description' => 'The account of the database.',
'type' => 'string',
'example' => 'testUser',
],
],
],
],
],
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**: The request was successful.'."\n"
.'* **false**: The request failed.'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeDataStats',
'description' => '* If you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V2.1.8. We recommend that you use the latest version.'."\n"
."\n"
.'* The version of your Database Autonomy Service (DAS) SDK must be V2.1.8 or later.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeTag' => [
'summary' => 'Queries the tags of a SQL statement.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**: ApsaraDB RDS for MySQL'."\n"
.'* **PolarDBMySQL**: PolarDB for MySQL'."\n"
.'* **PostgreSQL**: ApsaraDB RDS for PostgreSQL'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'The SQL template ID. You can call the [GetQueryOptimizeDataStats](~~405261~~) operation to query the SQL template ID.'."\n",
'type' => 'string',
'required' => true,
'example' => '29d9fef63e347d39c3436658a5fe5f2b',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'SqlTag',
'description' => 'The returned SQL tag data.'."\n",
'type' => 'object',
'properties' => [
'SqlId' => [
'description' => 'The SQL template ID.'."\n",
'type' => 'string',
'example' => '651b56fe9418d48edb8fdf0980ec****',
],
'Tags' => [
'title' => '逗号分隔的多个tag',
'description' => 'The SQL tags. Multiple tags are separated by commas (,).'."\n",
'type' => 'string',
'example' => 'DAS_IN_PLAN,DAS_NOT_IMPORTANT',
],
'Comments' => [
'description' => 'The remarks.'."\n",
'type' => 'string',
'example' => 'Slow SQL queries of offline synchronization. No optimization is required.',
],
],
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeTag',
'description' => '* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetQueryOptimizeShareUrl' => [
'summary' => 'Queries a share URL provided by the query governance feature.',
'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' => 'The database engine. Valid values:'."\n"
."\n"
.'* **MySQL**: ApsaraDB RDS for MySQL'."\n"
.'* **PolarDBMySQL**: PolarDB for MySQL'."\n"
.'* **PostgreSQL**: ApsaraDB RDS for PostgreSQL'."\n",
'type' => 'string',
'required' => true,
'example' => 'MySQL',
],
],
[
'name' => 'InstanceIds',
'in' => 'query',
'schema' => [
'description' => 'The instance IDs. Separate multiple IDs with commas (,).'."\n",
'type' => 'string',
'required' => false,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'TagNames',
'in' => 'query',
'schema' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'Keywords',
'in' => 'query',
'schema' => [
'description' => 'The keywords of the SQL template. Separate multiple keywords with spaces.'."\n",
'type' => 'string',
'required' => false,
'example' => 'select update',
],
],
[
'name' => 'LogicalOperator',
'in' => 'query',
'schema' => [
'description' => 'The logical relationship between multiple keywords. Valid values:'."\n"
."\n"
.'* **or**'."\n"
.'* **and**'."\n",
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'Rules',
'in' => 'query',
'schema' => [
'description' => 'The tags that are used to filter SQL templates. Separate multiple tags with commas (,). For more information, see [Query governance](~~290038~~).'."\n",
'type' => 'string',
'required' => false,
'example' => 'DAS_NOT_IMPORTANT',
],
],
[
'name' => 'DbNames',
'in' => 'query',
'schema' => [
'description' => 'The name of the database to be queried.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
[
'name' => 'Time',
'in' => 'query',
'schema' => [
'description' => 'The date to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1642953600000',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 10.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '10',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '1',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => 'The field by which to sort the returned entries. Default value: **count**. Valid values:'."\n"
."\n"
.'* **count**: the number of executions.'."\n"
.'* **maxQueryTime**: the longest execution duration.'."\n"
.'* **avgQueryTime**: the average execution duration.'."\n"
.'* **maxLockTime**: the longest lock wait duration.'."\n"
.'* **avgLockTime**: the average lock wait duration.'."\n"
.'* **maxRowsExamined**: the largest number of scanned rows.'."\n"
.'* **avgRowsExamined**: the average number of scanned rows.'."\n"
.'* **maxRowsSent**: the largest number of returned rows.'."\n"
.'* **avgRowsSent**: the average number of returned rows.'."\n",
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to sort the returned entries in ascending order. Default value: **true**. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'OnlyOptimizedSql',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to query only SQL templates that need to be optimized. Default value: **false**. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'SqlIds',
'in' => 'query',
'schema' => [
'description' => 'The SQL template IDs. You can call the [GetQueryOptimizeExecErrorStats](~~405261~~) operation to obtain the SQL template IDs.'."\n",
'type' => 'string',
'required' => false,
'example' => '6068ce044e3dc9b903979672fb0b69df,d12515c015fc9f41a0778a9e1de0****',
],
],
[
'name' => 'Region',
'in' => 'query',
'schema' => [
'description' => 'The region in which the instance resides. Valid values:'."\n"
."\n"
.'* **cn-china**: Chinese mainland'."\n"
.'* **cn-hongkong**: China (Hong Kong)'."\n"
.'* **ap-southeast-1**: Singapore'."\n"
."\n"
.'This parameter takes effect only if **InstanceIds** is left empty. If you leave **InstanceIds** empty, the system obtains data from the region set by **Region**. By default, Region is set to **cn-china**. If you specify **InstanceIds**, **Region** does not take effect and the system obtains data from the region in which the first specified instance resides.****'."\n"
."\n"
.'> If your instances reside in the regions in the Chinese mainland, set this parameter to **cn-china**.'."\n",
'type' => 'string',
'required' => false,
'example' => 'cn-china',
],
],
[
'name' => 'User',
'in' => 'query',
'schema' => [
'description' => 'The account of the database to be queried.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testUser',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, Successful is returned. If the request failed, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'String',
'description' => 'The share URL.'."\n",
'type' => 'string',
'example' => 'https://hdm.console.aliyun.com/#/queryOptimize?Keywords=&OnlyOptimizedSql=true&Time=1684771200000&Engine=MySQL&InstanceIds=&Rules=&PageNo=1&PageSize=10&OrderBy=count&Asc=false&SqlIds=&dbNames=®ion=cn-china&user=',
],
],
'description' => '',
],
],
],
'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' => 'GetQueryOptimizeShareUrl',
'description' => '* If you use Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
."\n"
.'* This operation supports the following database engines:'."\n"
."\n"
.' * ApsaraDB RDS for MySQL'."\n"
.' * PolarDB for MySQL'."\n"
.' * ApsaraDB RDS for PostgreSQL'."\n",
],
'GetErrorRequestSample' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> You must specify the node ID if your database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'The SQL query ID. You can call the [GetAsyncErrorRequestListByCode](~~410746~~) operation to query the ID of the SQL query for which MySQL error code is returned.'."\n",
'type' => 'string',
'required' => false,
'example' => '2cd4432556c3dab9d825ba363637****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be within the storage duration of the SQL Explorer feature of the database instance, and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => 'The name of the database.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The returned data.'."\n",
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'sqlId' => [
'description' => 'The SQL query ID.'."\n",
'type' => 'string',
'example' => '2cd4432556c3dab9d825ba363637****',
],
'database' => [
'description' => 'The database name.'."\n",
'type' => 'string',
'example' => 'dbgateway',
],
'originHost' => [
'description' => 'The IP address of the client that executes the SQL statement.'."\n",
'type' => 'string',
'example' => '172.16.1****',
],
'tables' => [
'description' => 'The table information.'."\n",
'type' => 'array',
'items' => [
'description' => 'The table name.'."\n",
'type' => 'string',
'example' => 'meter_****',
],
],
'instanceId' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'errorCode' => [
'description' => 'The error code that is returned.'."\n",
'type' => 'string',
'example' => '1062',
],
'user' => [
'description' => 'The username of the account that is used to log on to the database.'."\n",
'type' => 'string',
'example' => 'dbgat****',
],
'sql' => [
'description' => 'The SQL statement.'."\n",
'type' => 'string',
'example' => 'insert into meter_****',
],
'timestamp' => [
'description' => 'The time when the SQL query was executed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'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' => 'The request ID.'."\n",
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetErrorRequestSample',
'summary' => 'Asynchronously queries information about failed SQL queries in SQL Explorer data. You can query up to 20 failed SQL queries within the specific time range.',
'description' => '> GetErrorRequestSample is an asynchronous operation. After a request is sent, the complete results are not returned immediately. If the value of **isFinish** is **false** in the response, wait for 1 second and then send a request again. If the value of **isFinish** is **true**, the complete results are returned.'."\n"
."\n"
.'* This API operation supports only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters for which Database Autonomy Service (DAS) Enterprise Edition is enabled. For more information, see [Purchase DAS Enterprise Edition](~~163298~~).'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'GetAsyncErrorRequestStatResult' => [
'summary' => 'Asynchronously obtains the number of failed executions of SQL templates based on SQL Explorer data.',
'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' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified for PolarDB for MySQL instances.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'SqlIdList',
'in' => 'query',
'schema' => [
'description' => 'The ID of the SQL template. Separate multiple SQL IDs with commas (,). You can call the [GetAsyncErrorRequestListByCode](~~410746~~) operation to query the ID of the SQL query for which MySQL error code is returned.'."\n",
'type' => 'string',
'required' => false,
'example' => 'ad78a4e7d3ce81590c9dc2d5f4bc****,0f92feacd92c048b06a16617a633****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The beginning of the time range to query must be within the storage duration of the database instance and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => 'The name of the database.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'fail' => [
'description' => 'Indicates whether the request failed. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'false',
],
'isFinish' => [
'description' => 'Indicates whether the asynchronous request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'resultId' => [
'description' => 'The ID of the asynchronous request.'."\n",
'type' => 'string',
'example' => 'async__61f45ee381b2fa4e8a6545e3bee9****',
],
'state' => [
'description' => 'The state of the asynchronous request. Valid values:'."\n"
."\n"
.'* **RUNNING**: The asynchronous request is running.'."\n"
.'* **SUCCESS**: The asynchronous request is successful.'."\n"
.'* **FAIL**: The asynchronous request fails.'."\n",
'type' => 'string',
'example' => 'SUCCESS',
],
'timestamp' => [
'description' => 'The time when the asynchronous request was made. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1644558576717',
],
'complete' => [
'description' => 'Indicates whether the asynchronous request was complete.'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'result' => [
'description' => 'The returned data of the asynchronous request.'."\n",
'type' => 'object',
'items' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'additionalProperties' => [
'type' => 'object',
'properties' => [
'sqlId' => [
'name' => 'sqlId',
'type' => 'string',
'backendName' => 'sqlId',
'example' => 'ad78a4e7d3ce81590c9dc2d5f4bc****',
'description' => 'The SQL ID.'."\n",
],
'instanceId' => [
'name' => 'instanceId',
'type' => 'string',
'backendName' => 'instanceId',
'example' => 'rm-2ze8g2am97624****',
'description' => 'The instance ID.'."\n",
],
'count' => [
'name' => 'count',
'type' => 'integer',
'format' => 'int32',
'backendName' => 'count',
'description' => 'The number of failed executions.'."\n",
'example' => '1',
],
],
'description' => 'The returned data of the asynchronous request.'."\n",
],
'extendType' => 'true',
],
'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' => 'The request ID.'."\n",
'type' => 'string',
'example' => '3FC3F8EB-3564-5D1A-B187-3B03E5B0****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'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' => 'GetAsyncErrorRequestStatResult',
'description' => '> GetAsyncErrorRequestStatResult is an asynchronous operation. After a request is sent, the complete results are not returned immediately. If the value of **isFinish** is **false** in the response, wait for 1 second and then send a request again. If the value of **isFinish** is **true**, the complete results are returned.'."\n"
."\n"
.'* This API operation supports only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters for which Database Autonomy Service (DAS) Enterprise Edition is enabled. For more information, see [Purchase DAS Enterprise Edition](~~163298~~).'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'GetAsyncErrorRequestListByCode' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified if the database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-wz9s658475e58****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be within the storage duration of the SQL Explorer feature of the database instance, and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'ErrorCode',
'in' => 'query',
'schema' => [
'description' => 'The error code. You can call the [GetAsyncErrorRequestStatByCode](~~409804~~) operation to query the MySQL error codes that may be generated in the SQL Explorer results of an instance.'."\n",
'type' => 'string',
'required' => false,
'example' => '1064',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'fail' => [
'description' => 'Indicates whether the asynchronous request failed. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'false',
],
'result' => [
'description' => 'The instance ID.'."\n",
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'sqlId' => [
'description' => 'SQL ID.',
'type' => 'string',
'example' => 'ad78a4e7d3ce81590c9dc2d5f4bc****',
],
'instanceId' => [
'description' => 'The instance ID',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
],
],
],
'resultId' => [
'description' => 'The ID of the asynchronous request.'."\n",
'type' => 'string',
'example' => 'async__c39d43ece52d35267cc4b92a0c26****',
],
'isFinish' => [
'description' => 'Indicates whether the asynchronous request was complete. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'state' => [
'description' => 'The state of the asynchronous request. Valid values:'."\n"
."\n"
.'* **RUNNING**'."\n"
.'* **SUCCESS**'."\n"
.'* **FAIL**'."\n",
'type' => 'string',
'example' => 'SUCCESS',
],
'complete' => [
'description' => 'Indicates whether the asynchronous request was complete.'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'timestamp' => [
'description' => 'The time when the asynchronous request was made. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'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' => 'The request ID.'."\n",
'type' => 'string',
'example' => '9CB97BC4-6479-55D0-B9D0-EA925AFE****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetAsyncErrorRequestListByCode',
'summary' => 'Asynchronously queries the IDs of SQL statements that generate a MySQL error code in the SQL Explorer results of a database instance.',
'description' => '> GetAsyncErrorRequestListByCode is an asynchronous operation. After a request is sent, the complete results are not returned immediately. If the value of the **isFinish** parameter is **false** in the response, wait for 1 second and then send a request again. If the value of the **isFinish** parameter is **true**, the complete results are returned.'."\n"
."\n"
.'* This API operation supports only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters for which Database Autonomy Service (DAS) Enterprise Edition is enabled. For more information, see [Enable and manage DAS Economy Edition and DAS Enterprise Edition](~~163298~~).'."\n"
.'* If you use an SDK to call the API operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* When you call this operation, the value of the SqlId parameter changes due to the optimization of the SQL template algorithm starting from September 1, 2024. For more information, see [\\[Notice\\] Optimization of the SQL template algorithm](~~2845725~~).',
],
'GetAsyncErrorRequestStatByCode' => [
'methods' => [
'get',
'post',
],
'schemes' => [
'http',
'https',
],
'security' => [
[
'AK' => [],
],
],
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified for PolarDB for MySQL clusters.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-wz9s658475e58****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be within the storage duration of the SQL Explorer feature of the database instance and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642556990714',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '1642566830000',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => 'The name of a database.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testdb01',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'fail' => [
'description' => 'Indicates whether the asynchronous request failed. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'false',
],
'isFinish' => [
'description' => 'Indicates whether the asynchronous request was complete. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'resultId' => [
'description' => 'The ID of the asynchronous request.'."\n",
'type' => 'string',
'example' => 'async__fcd7c35788e62324622c3b4a03de****',
],
'state' => [
'description' => 'The state of the asynchronous request. Valid values:'."\n"
."\n"
.'* **RUNNING**'."\n"
.'* **SUCCESS**'."\n"
.'* **FAIL**'."\n",
'type' => 'string',
'example' => 'SUCCESS',
],
'timestamp' => [
'description' => 'The time when the asynchronous request was made. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1644560866961',
],
'complete' => [
'description' => 'Indicates whether the asynchronous request was complete.'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'result' => [
'description' => 'The number of SQL queries corresponding to the error code.'."\n",
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'instanceId' => [
'description' => 'The instance ID.',
'type' => 'string',
'example' => 'rm-2ze8g2am97624****',
],
'errorCode' => [
'description' => 'The error code returned if the request failed.',
'type' => 'string',
'example' => '1062',
],
'count' => [
'description' => 'The number of SQL queries corresponding to the error code.',
'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' => 'The request ID.'."\n",
'type' => 'string',
'example' => '840F51F7-9C01-538D-94F6-AE712905****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetAsyncErrorRequestStatByCode',
'summary' => 'Asynchronously queries the MySQL error codes in SQL Explorer data and the number of SQL queries corresponding to each error code.',
'description' => '> GetAsyncErrorRequestStatByCode is an asynchronous operation After a request is sent, the complete results are not returned immediately. If the value of **isFinish** is **false** in the response, wait for 1 second and then send a request again. If the value of **isFinish** is **true**, the complete results are returned.'."\n"
."\n"
.'* This API operation supports only ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters for which Database Autonomy Service (DAS) Enterprise Edition is enabled. For more information, see [Purchase DAS Enterprise Edition](~~163298~~).'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'GetFullRequestOriginStatByInstanceId' => [
'methods' => [
'post',
],
'schemes' => [
'https',
'http',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'UserId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the Alibaba Cloud account that is used to create the database instance.'."\n"
."\n"
.'> This parameter is optional. The system can automatically obtain the account ID based on the value of InstanceId when you call this operation.'."\n",
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified if the database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-bp12v7243x012****',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be within the storage duration of the SQL Explorer of the database instance, and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1644716649000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1644803409000',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => 'The field by which the results to be returned are sorted. Default value: **count**. Valid values:'."\n"
."\n"
.'* **count**: the number of executions.'."\n"
.'* **avgRt**: the average execution duration.'."\n"
.'* **rtRate**: the execution duration percentage.'."\n"
.'* **rowsExamined**: the total number of scanned rows.'."\n"
.'* **avgRowsExamined**: the average number of scanned rows.'."\n"
.'* **avgRowsReturned**: the average number of returned rows.'."\n",
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to sort the results in ascending order. By default, the results are not sorted in ascending order.'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'Disabled',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 20.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '20',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => 'The type of the SQL statement. Valid values: **SELECT**, **INSERT**, **UPDATE**, **DELETE**, **MERGE**, **ALTER**, **CREATEINDEX**, **DROPINDEX**, **CREATE**, **DROP**, **SET**, **DESC**, **REPLACE**, **CALL**, **BEGIN**, **DESCRIBE**, **ROLLBACK**, **FLUSH**, **USE**, **SHOW**, **START**, **COMMIT**, and **RENAME**.'."\n"
."\n"
.'> If the database instance is an ApsaraDB RDS for MySQL instance, a PolarDB for MySQL instance, or a PolarDB-X 2.0 instance, statistics can be collected based on the SQL statement type.'."\n",
'type' => 'string',
'required' => false,
'example' => 'SELECT',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'The role of the PolarDB-X 2.0 node. Valid values:'."\n"
."\n"
.'* **polarx_cn**: compute node.'."\n"
.'* **polarx_en**: data node.'."\n",
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'The response parameters.'."\n",
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Data' => [
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'List' => [
'description' => 'The details of the full request data.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'Key' => [
'description' => 'The IP address of the client that executes the SQL statement.',
'type' => 'string',
'example' => '172.26.6****',
],
'AvgFetchRows' => [
'description' => 'The average number of rows that are fetched from data nodes by compute nodes on the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgLockWaitTime' => [
'description' => 'The average lock wait duration. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.00009589874265269765',
],
'AvgLogicalRead' => [
'description' => 'The average number of logical reads.',
'type' => 'number',
'format' => 'double',
'example' => '654.4470327860251',
],
'AvgPhysicalAsyncRead' => [
'description' => 'The average number of physical asynchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgPhysicalSyncRead' => [
'description' => 'The average number of physical synchronous reads.',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'AvgRows' => [
'description' => 'The average number of rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgExaminedRows' => [
'description' => 'The average number of scanned rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL databases.',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgReturnedRows' => [
'description' => 'The average number of returned rows.',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgUpdatedRows' => [
'description' => 'The average number of updated rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL and PolarDB-X 2.0 databases.',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgRt' => [
'description' => 'The average execution duration.',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'AvgSqlCount' => [
'description' => 'The average number of SQL statements.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'Count' => [
'description' => 'The total number of executions.',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'CountRate' => [
'description' => 'The percentage of the total number of executions.',
'type' => 'number',
'format' => 'double',
'example' => '0.0586',
],
'Database' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'dbtest01',
],
'ErrorCount' => [
'description' => 'The number of failed executions.',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'FetchRows' => [
'description' => 'The number of rows that are fetched from data nodes by compute nodes on the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Ip' => [
'description' => 'The network address of the database instance.',
'type' => 'string',
'example' => 'rm-uf6dyi58dm6****.mysql.rds.aliy****.com',
],
'LockWaitTime' => [
'description' => 'The lock wait duration. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '1089.4177720290281',
],
'LogicalRead' => [
'description' => 'The number of logical reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '7.434573266E9',
],
'OriginHost' => [
'description' => 'The IP address of the client that executes the SQL statement.',
'type' => 'string',
'example' => '172.26.6****',
],
'PhysicalAsyncRead' => [
'description' => 'The number of physical asynchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'PhysicalSyncRead' => [
'description' => 'The number of physical synchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Port' => [
'description' => 'The port number that is used to connect to the database instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '3306',
],
'Rows' => [
'description' => 'The total number of rows updated or returned by the compute nodes of the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'ExaminedRows' => [
'description' => 'The total number of scanned rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL databases.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'RtGreaterThanOneSecondCount' => [
'description' => 'The number of SQL statements that take longer than 1 second to execute.',
'type' => 'integer',
'format' => 'int64',
'example' => '2',
],
'RtRate' => [
'description' => 'The execution duration percentage.',
'type' => 'number',
'format' => 'double',
'example' => '0.1384',
],
'SqlCount' => [
'description' => 'The number of SQL statements.',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'SumUpdatedRows' => [
'description' => 'The total number of updated rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Version' => [
'description' => 'The version number.',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'VpcId' => [
'description' => 'The virtual private cloud (VPC) ID.',
'type' => 'string',
'example' => 'vpc-2zentqj1sk4qmolci****',
],
],
],
],
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'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' => 'GetFullRequestOriginStatByInstanceId',
'summary' => 'Collects the full request statistics in the SQL Explorer results of a database instance by access source.',
'description' => 'The SQL Explorer feature allows you to check the health status of SQL statements and troubleshoot performance issues. For more information, see [SQL Explorer](~~204096~~).'."\n"
."\n"
.'* For more information about database instances that support this feature, see [Overview](~~190912~~).'."\n"
.'* If you use an SDK to call API operations of Database Autonomy Service (DAS), you must set the region ID to cn-shanghai.'."\n",
],
'GetFullRequestStatResultByInstanceId' => [
'methods' => [
'post',
],
'schemes' => [
'https',
'http',
],
'security' => [
[
'AK' => [],
],
],
'deprecated' => false,
'systemTags' => [
'operationType' => 'get',
],
'parameters' => [
[
'name' => 'UserId',
'in' => 'query',
'schema' => [
'description' => 'The ID of the Alibaba Cloud account that was used to create the database instance.'."\n"
."\n"
.'> This parameter is optional. The system can automatically obtain the Alibaba Cloud account ID based on the value of InstanceId when you call the GetFullRequestOriginStatByInstanceId operation.'."\n",
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'query',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'NodeId',
'in' => 'query',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> You must specify the node ID if your database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-bp12v7243x012****',
],
],
[
'name' => 'SqlId',
'in' => 'query',
'schema' => [
'description' => 'The SQL ID.'."\n"
."\n"
.'> If this parameter is specified, the full request statistics of the specified SQL query are collected. If this parameter is left empty, the full request statistics of the entire database instance are collected.'."\n",
'type' => 'string',
'required' => false,
'example' => 'd71f82be1eef72bd105128204d2e****',
],
],
[
'name' => 'OriginHost',
'in' => 'query',
'schema' => [
'description' => 'The IP address of the client that executes the SQL statement.'."\n"
."\n"
.'> This parameter is optional. If this parameter is specified, the full request statistics of the specified IP address are collected. If this parameter is left empty, the full request statistics of the entire database instance are collected.'."\n",
'type' => 'string',
'required' => false,
'example' => '172.26.XX.XXX',
],
],
[
'name' => 'Keyword',
'in' => 'query',
'schema' => [
'description' => 'The keywords that are used for query.'."\n",
'type' => 'string',
'required' => false,
'example' => 'dbtest01',
],
],
[
'name' => 'Start',
'in' => 'query',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1645581813000',
],
],
[
'name' => 'End',
'in' => 'query',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval cannot exceed one day.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1645668213000',
],
],
[
'name' => 'OrderBy',
'in' => 'query',
'schema' => [
'description' => 'The field by which to sort the returned entries. Default value: **count**. Valid values:'."\n"
."\n"
.'* **count**: the number of executions.'."\n"
.'* **avgRt**: the average execution duration.'."\n"
.'* **rtRate**: the execution duration percentage.'."\n"
.'* **rowsExamined**: the total number of scanned rows.'."\n"
.'* **avgRowsExamined**: the average number of scanned rows.'."\n"
.'* **avgRowsReturned**: the average number of returned rows.'."\n",
'type' => 'string',
'required' => false,
'example' => 'count',
],
],
[
'name' => 'Asc',
'in' => 'query',
'schema' => [
'description' => 'Specifies whether to sort the results in ascending order. By default, the results are not sorted in ascending order.'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'Disabled',
],
],
[
'name' => 'PageNo',
'in' => 'query',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '1',
],
],
[
'name' => 'PageSize',
'in' => 'query',
'schema' => [
'description' => 'The number of entries per page. Default value: 20.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => true,
'example' => '20',
],
],
[
'name' => 'SqlType',
'in' => 'query',
'schema' => [
'description' => 'The type of the SQL statement. Valid values: **SELECT**, **INSERT**, **UPDATE**, **DELETE**, **LOGIN**, **LOGOUT**, **MERGE**, **ALTER**, **CREATEINDEX**, **DROPINDEX**, **CREATE**, **DROP**, **SET**, **DESC**, **REPLACE**, **CALL**, **BEGIN**, **DESCRIBE**, **ROLLBACK**, **FLUSH**, **USE**, **SHOW**, **START**, **COMMIT**, and **RENAME**.'."\n"
."\n"
.'> If your database instance is an ApsaraDB RDS for MySQL instance, a PolarDB for MySQL cluster, or a PolarDB-X 2.0 instance, the statistics can be collected based on the SQL statement type.'."\n",
'type' => 'string',
'required' => false,
'example' => 'SELECT',
],
],
[
'name' => 'DbName',
'in' => 'query',
'schema' => [
'description' => 'The name of the database.'."\n",
'type' => 'string',
'required' => false,
'example' => 'dbtest01',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'The role of the node in the PolarDB-X 2.0 instance. Valid values:'."\n"
."\n"
.'* **polarx_cn**: compute node.'."\n"
.'* **polarx_dn**: data node.'."\n",
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'description' => 'The response parameters.'."\n",
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '7172BECE-588A-5961-8126-C216E16B****',
],
'Data' => [
'description' => 'The returned data.'."\n",
'type' => 'object',
'properties' => [
'Result' => [
'description' => 'The returned full request data.'."\n",
'type' => 'object',
'properties' => [
'List' => [
'description' => 'The full request data.',
'type' => 'array',
'items' => [
'description' => '',
'type' => 'object',
'properties' => [
'SqlId' => [
'description' => 'The SQL ID.',
'type' => 'string',
'example' => 'd71f82be1eef72bd105128204d2e****',
],
'AvgFetchRows' => [
'description' => 'The average number of rows that are fetched by compute nodes from data nodes on the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgLockWaitTime' => [
'description' => 'The average lock wait latency. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.00009589874265269765',
],
'AvgLogicalRead' => [
'description' => 'The average number of logical reads.',
'type' => 'number',
'format' => 'double',
'example' => '654.4470327860251',
],
'AvgPhysicalAsyncRead' => [
'description' => 'The average number of physical asynchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgPhysicalSyncRead' => [
'description' => 'The average number of physical synchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'AvgExaminedRows' => [
'description' => 'The average number of scanned rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL databases.',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgReturnedRows' => [
'description' => 'The average number of returned rows.',
'type' => 'number',
'format' => 'double',
'example' => '10000',
],
'AvgUpdatedRows' => [
'description' => 'The average number of updated rows.'."\n"
."\n"
.' > This parameter is returned only for ApsaraDB RDS for MySQL and PolarDB-X 2.0 databases.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'AvgRt' => [
'description' => 'The average execution duration.',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'AvgSqlCount' => [
'description' => 'The average number of SQL statements.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'Count' => [
'description' => 'The total number of executions.',
'type' => 'integer',
'format' => 'int64',
'example' => '100000',
],
'CountRate' => [
'description' => 'The percentage of the total number of executions.',
'type' => 'number',
'format' => 'double',
'example' => '0.0586',
],
'Database' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'dbtest01',
],
'ErrorCount' => [
'description' => 'The number of failed executions.',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'FetchRows' => [
'description' => 'The number of rows that are fetched by compute nodes from data nodes on the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Ip' => [
'description' => 'The IP address of the database instance.',
'type' => 'string',
'example' => 'rm-uf6dyi58dm6****.mysql.rds.aliy****.com',
],
'LockWaitTime' => [
'description' => 'The lock wait latency. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '1089.4177720290281',
],
'LogicalRead' => [
'description' => 'The number of logical reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '7.434573266E9',
],
'PhysicalAsyncRead' => [
'description' => 'The number of physical asynchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'PhysicalSyncRead' => [
'description' => 'The number of physical synchronous reads.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Port' => [
'description' => 'The port number that is used to connect to the database instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '3306',
],
'Psql' => [
'description' => 'The SQL template.',
'type' => 'string',
'example' => 'select * from dbtest01 where ****',
],
'Rows' => [
'description' => 'The total number of rows updated or returned by the compute nodes of the PolarDB-X 2.0 instance.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'ExaminedRows' => [
'description' => 'The total number of scanned rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL databases.',
'type' => 'integer',
'format' => 'int64',
'example' => '10000',
],
'RtGreaterThanOneSecondCount' => [
'description' => 'The number of SQL statements that take longer than 1 second to execute.',
'type' => 'integer',
'format' => 'int64',
'example' => '20',
],
'RtRate' => [
'description' => 'The execution duration percentage.',
'type' => 'number',
'format' => 'double',
'example' => '2.499',
],
'SqlCount' => [
'description' => 'The number of SQL statements.',
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'SumUpdatedRows' => [
'description' => 'The total number of updated rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '100',
],
'Tables' => [
'description' => 'The names of tables in the database.',
'type' => 'array',
'items' => [
'description' => 'The names of tables in the database.',
'type' => 'string',
'example' => 'tabletest01,tabletest02',
],
],
'Version' => [
'description' => 'The version number.',
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
'VpcId' => [
'description' => 'The virtual private cloud (VPC) ID.',
'type' => 'string',
'example' => 'vpc-2zentqj1sk4qmolci****',
],
],
],
],
'Total' => [
'description' => 'The total number of entries returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1',
],
],
],
'Fail' => [
'description' => 'Indicates whether the asynchronous request failed. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'false',
],
'IsFinish' => [
'description' => 'Indicates whether the asynchronous request was complete. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'ResultId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '9CB97BC4-6479-55D0-B9D0-EA925AFE****',
],
'State' => [
'description' => 'The state of the asynchronous request. Valid values:'."\n"
."\n"
.'* **RUNNING**'."\n"
.'* **SUCCESS**'."\n"
.'* **FAIL**'."\n",
'type' => 'string',
'example' => 'SUCCESS',
],
'Timestamp' => [
'description' => 'The time when the asynchronous request was sent. The value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1645668213000',
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'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' => 'GetFullRequestStatResultByInstanceId',
'summary' => 'Asynchronously collects the full request statistics in the SQL Explorer results of a database instance by SQL ID.',
'description' => '> GetFullRequestStatResultByInstanceId is an asynchronous operation. After a request is sent, the complete results are not returned immediately. If the value of the isFinish parameter is **false** in the response, wait for 1 second and then send a request again. If the value of the isFinish parameter is **true**, the complete results are returned.'."\n"
."\n"
.'The SQL Explorer feature allows you to check the health status of SQL statements and troubleshoot performance issues. For more information, see [SQL Explorer](~~204096~~).'."\n"
."\n"
.'* For more information about database instances that support this feature, see [Overview of DAS Enterprise Edition](~~190912~~).'."\n"
.'* If you use an SDK to call the API operations of Database Autonomy Service (DAS), you must set the region ID to cn-shanghai.'."\n"
.'* When you call this operation, the value of the SqlId parameter changes due to the optimization of the SQL template algorithm starting from September 1, 2024. For more information, see [\\[Notice\\] Optimization of the SQL template algorithm](~~2845725~~).'."\n",
],
'GetFullRequestSampleByInstanceId' => [
'summary' => 'Queries sample SQL statements in the SQL Explorer data of a database instance by SQL ID. You can query up to 20 sample SQL statements.',
'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' => 'The ID of the Alibaba Cloud account that is used to create the database instance.'."\n"
."\n"
.'> This parameter is optional. The system can automatically obtain the account ID based on the value of InstanceId when you call this operation.'."\n",
'type' => 'string',
'required' => false,
'example' => '196278346919****',
],
],
[
'name' => 'InstanceId',
'in' => 'formData',
'schema' => [
'description' => 'The instance ID.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
[
'name' => 'SqlId',
'in' => 'formData',
'schema' => [
'description' => 'The SQL statement ID.'."\n",
'type' => 'string',
'required' => true,
'example' => '651b56fe9418d48edb8fdf0980ec****',
],
],
[
'name' => 'Start',
'in' => 'formData',
'schema' => [
'description' => 'The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The start time must be within the storage duration of the SQL Explorer feature of the database instance, and can be up to 90 days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1660097421000',
],
],
[
'name' => 'End',
'in' => 'formData',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time must be equal to or greater than 1 hour.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1660104621000',
],
],
[
'name' => 'Role',
'in' => 'query',
'schema' => [
'description' => 'The role of the PolarDB-X 2.0 node. Valid values:'."\n"
."\n"
.'* **polarx_cn**: compute node.'."\n"
.'* **polarx_en**: data node.'."\n",
'type' => 'string',
'required' => false,
'example' => 'polarx_cn',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message that contains information such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Data' => [
'description' => 'The returned data.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Timestamp' => [
'description' => 'The time when the SQL statement was executed. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.',
'type' => 'integer',
'format' => 'int64',
'example' => '1660100753556',
],
'SqlId' => [
'description' => 'The SQL statement ID.',
'type' => 'string',
'example' => '651b56fe9418d48edb8fdf0980ec****',
],
'Sql' => [
'description' => 'The sample SQL statement.',
'type' => 'string',
'example' => 'select * from testdb01 where ****',
],
'Database' => [
'description' => 'The name of the database.',
'type' => 'string',
'example' => 'dbtest',
],
'Rt' => [
'description' => 'The amount of time consumed to execute the SQL statement. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.409789',
],
'User' => [
'description' => 'The name of the user who executes the SQL statement.',
'type' => 'string',
'example' => 'testuser',
],
'LockWaitTime' => [
'description' => 'The lock wait duration. Unit: seconds.',
'type' => 'number',
'format' => 'double',
'example' => '0.0137',
],
'LogicalRead' => [
'description' => 'The number of logical reads.',
'type' => 'number',
'format' => 'double',
'example' => '165848',
],
'PhysicalSyncRead' => [
'description' => 'The number of physical synchronous reads.',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'PhysicalAsyncRead' => [
'description' => 'The number of physical asynchronous reads.',
'type' => 'number',
'format' => 'double',
'example' => '0',
],
'RowsExamined' => [
'title' => '扫描行数',
'description' => 'The total number of scanned rows.'."\n"
."\n"
.'> This parameter is returned only for ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL databases.',
'type' => 'integer',
'format' => 'int64',
'example' => '2048576',
],
'RowsReturned' => [
'description' => 'The number of rows returned by the SQL statement.',
'type' => 'integer',
'format' => 'int64',
'example' => '14',
],
'OriginHost' => [
'description' => 'The source IP address.',
'type' => 'string',
'example' => '172.17.XX.XX',
],
'ScanRows' => [
'title' => '扫描行数, RDS MySQL DescribeTemplateSqlDetail',
'description' => 'The number of scanned rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'UpdateRows' => [
'title' => '更新行数, RDS MySQL DescribeTemplateSqlDetail',
'description' => 'The number of updated rows.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'SqlType' => [
'description' => 'The type of the SQL statement. Valid values: **SELECT**, **INSERT**, **UPDATE**, **DELETE**, **LOGIN**, **LOGOUT**, **MERGE**, **ALTER**, **CREATEINDEX**, **DROPINDEX**, **CREATE**, **DROP**, **SET**, **DESC**, **REPLACE**, **CALL**, **BEGIN**, **DESCRIBE**, **ROLLBACK**, **FLUSH**, **USE**, **SHOW**, **START**, **COMMIT**, and **RENAME**.',
'type' => 'string',
'example' => 'SELECT',
],
'Scnt' => [
'title' => 'polarx cn节点,dn请求总数',
'description' => 'The number of requests sent from PolarDB-X 2.0 compute nodes to data nodes.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Rows' => [
'title' => 'polarx cn节点,总更新/返回行数',
'description' => 'The number of rows updated or returned on PolarDB-X 2.0 compute nodes.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
'Frows' => [
'title' => 'polarx cn节点,拉取行数',
'description' => 'The number of rows fetched by PolarDB-X 2.0 compute nodes.',
'type' => 'integer',
'format' => 'int64',
'example' => '0',
],
],
],
],
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '200',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'GetFullRequestSampleByInstanceId',
'description' => 'The SQL Explorer feature allows you to check the health status of SQL statements and troubleshoot performance issues. For more information, see [SQL Explorer](~~204096~~).'."\n"
."\n"
.'* For more information about the database engines that support SQL Explorer, see [SQL Explorer](~~204096~~).'."\n"
.'* If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'DescribeSqlLogConfig' => [
'summary' => 'Queries the configurations of Database Autonomy Service (DAS) Enterprise Edition that is enabled for a database instance.',
'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' => 'The ID of the database instance.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze8g2am97624****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The response code.'."\n",
'type' => 'string',
'example' => '200',
],
'Data' => [
'title' => 'SqlLogConfig',
'description' => 'The data that is returned.'."\n",
'type' => 'object',
'properties' => [
'ColdEnable' => [
'description' => 'Indicates whether the cold data storage is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'ColdRetention' => [
'title' => '冷数据存储周期(不落库),通过 retention - hotRetention 计算',
'description' => 'The number of days for which the SQL Explorer and Audit data is stored in cold storage.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '23',
],
'ColdStartTime' => [
'description' => 'The time when the cold data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'CollectorVersion' => [
'description' => 'The collector version. Valid values:'."\n"
."\n"
.'* **MYSQL_V0**'."\n"
.'* **MYSQL_V1**'."\n"
.'* **MYSQL_V2**'."\n"
.'* **MYSQL_V3**'."\n"
.'* **PG_V1**'."\n"
.'* **rdspg_v1**'."\n"
.'* **polarpg_v1**'."\n",
'type' => 'string',
'example' => 'MYSQL_V3',
],
'HotEnable' => [
'description' => 'Indicates whether the hot data storage is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'HotRetention' => [
'description' => 'The number of days for which the SQL Explorer and Audit data is stored in hot storage.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '7',
],
'HotStartTime' => [
'description' => 'The time when the hot data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'LogFilter' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'RequestEnable' => [
'description' => 'Indicates whether the SQL Explorer feature is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'RequestStartTime' => [
'description' => 'The time when the SQL Explorer feature was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'RequestStopTime' => [
'description' => 'The time when DAS Enterprise Edition V1 expired. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1715335200000',
],
'Retention' => [
'description' => 'The total storage duration of the SQL Explorer and Audit data. The value of this parameter is the sum of the values of **HotRetention** and **ColdRetention**. Unit: day.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '30',
],
'SqlLogEnable' => [
'description' => 'Indicates whether DAS Enterprise Edition is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'SqlLogSource' => [
'description' => 'A reserved parameter.',
'type' => 'string',
'example' => 'None',
],
'SqlLogState' => [
'description' => 'The state of data migration. Valid values:'."\n"
."\n"
.'* **FINISH**: The historical data is migrated.'."\n"
.'* **RUNNING**: The historical data is being migrated.'."\n"
.'* **FAILURE**: The historical data fails to be migrated.'."\n",
'type' => 'string',
'example' => 'FINISH',
],
'SqlLogVisibleTime' => [
'description' => 'The time when DAS Enterprise Edition was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'SupportMigration' => [
'description' => 'A reserved parameter.',
'type' => 'boolean',
'example' => 'None',
],
'SupportVersion' => [
'title' => '当前实例支持的数据库版本(不落库)',
'description' => 'The latest version of DAS Enterprise Edition that supports the database instance. Valid values:'."\n"
."\n"
.'* **SQL_LOG_V0**: DAS Enterprise Edition V0.'."\n"
.'* **SQL_LOG_V1**: DAS Enterprise version V1.'."\n"
.'* **SQL_LOG_V2**: DAS Enterprise Edition V2.'."\n"
.'* **SQL_LOG_V3**: DAS Enterprise Edition V3.'."\n"
.'* **SQL_LOG_NOT_ENABLE**: DAS Enterprise Edition is not enabled.'."\n"
.'* **SQL_LOG_NOT_SUPPORT**: DAS Enterprise Edition is not supported.'."\n",
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'Version' => [
'title' => '当前审计日志的版本',
'description' => 'The version of DAS Enterprise Edition that is enabled for the database instance. Valid values:'."\n"
."\n"
.'* **SQL_LOG_V0**: DAS Enterprise Edition V0.'."\n"
.'* **SQL_LOG_V1**: DAS Enterprise version V1.'."\n"
.'* **SQL_LOG_V2**: DAS Enterprise Edition V2.'."\n"
.'* **SQL_LOG_V3**: DAS Enterprise Edition V3.'."\n"
.'* **SQL_LOG_NOT_ENABLE**: DAS Enterprise Edition is not enabled.'."\n"
.'* **SQL_LOG_NOT_SUPPORT**: DAS Enterprise Edition is not supported.'."\n",
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
],
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
],
'description' => '',
],
],
],
'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' => 'DescribeSqlLogConfig',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a DAS SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n",
'responseParamsDescription' => 'For database instances for which DAS Enterprise Edition V0 or DAS Enterprise Edition V1 is enabled, the SQL Explorer and Audit data is stored in CStore, which is considered as hot data storage.******** In this case, the following results are returned is the response: `SqlLogEnable = HotEnable = true, Retention = HotRetention, ColdEnable = false, ColdRetention = 0`.'."\n",
],
'ModifySqlLogConfig' => [
'summary' => 'Enables or configures Database Autonomy Service (DAS) Enterprise Edition for a database instance.',
'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' => 'The ID of the database instance.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rr-2ze770smbq3tpr2o9',
],
],
[
'name' => 'Enable',
'in' => 'formData',
'schema' => [
'description' => 'Specifies whether to enable DAS Enterprise Edition. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n"
."\n"
.'> This parameter is required if you want to enable DAS Enterprise Edition. By default, the latest version of DAS Enterprise Edition that supports the database instance is enabled.'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'RequestEnable',
'in' => 'formData',
'schema' => [
'description' => 'Specifies whether to enable the SQL Explorer feature. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n"
."\n"
.'> This parameter is required if only DAS Enterprise Edition V3 can be enabled for the database instance.'."\n",
'type' => 'boolean',
'required' => false,
'example' => 'true',
],
],
[
'name' => 'Retention',
'in' => 'formData',
'schema' => [
'description' => 'The total storage duration of the SQL Explorer and Audit data. Unit: day. Valid values:'."\n"
."\n"
.'* 7'."\n"
.'* 30'."\n"
.'* 180'."\n"
.'* 365'."\n"
."\n"
.'> If you want to enable DAS Enterprise Edition V3, the value of this parameter must be greater than or equal to 30.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '30',
],
],
[
'name' => 'HotRetention',
'in' => 'formData',
'schema' => [
'description' => 'The number of days for which the SQL Explorer and Audit data is stored in hot storage. Valid values: 1 to 7.'."\n"
."\n"
.'> This parameter is required if only DAS Enterprise Edition V3 can be enabled for the database instance.'."\n",
'type' => 'integer',
'format' => 'int32',
'required' => false,
'example' => '1',
],
],
[
'name' => 'Filters',
'in' => 'query',
'style' => 'repeatList',
'schema' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'array',
'items' => [
'description' => 'A reserved parameter.',
'type' => 'object',
'properties' => [
'Key' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
'Value' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
'required' => false,
],
'required' => false,
'maxItems' => 100,
],
],
[
'name' => 'EnableAudit',
'in' => 'query',
'schema' => [
'type' => 'boolean',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The response code.'."\n",
'type' => 'string',
'example' => '403',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '03C88D8E-1541-518E-8BFF-BEC6589B6334',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'False',
],
'Data' => [
'title' => 'SqlLogConfig',
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'SqlLogVisibleTime' => [
'description' => 'The time when DAS Enterprise Edition was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'RequestStopTime' => [
'description' => 'The time when DAS Enterprise Edition V1 expired. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1715335200000',
],
'CollectorVersion' => [
'description' => 'The collector version. Valid values:'."\n"
."\n"
.'* **MYSQL_V0**'."\n"
.'* **MYSQL_V1**'."\n"
.'* **MYSQL_V2**'."\n"
.'* **MYSQL_V3**'."\n"
.'* **PG_V1**'."\n"
.'* **rdspg_v1**'."\n"
.'* **polarpg_v1**'."\n",
'type' => 'string',
'example' => 'MYSQL_V3',
],
'SupportVersion' => [
'title' => '当前实例支持的数据库版本(不落库)',
'description' => 'The latest version of DAS Enterprise Edition that supports the database instance. Valid values:'."\n"
."\n"
.'* **SQL_LOG_V0**: DAS Enterprise Edition V0.'."\n"
.'* **SQL_LOG_V1**: DAS Enterprise Edition V1.'."\n"
.'* **SQL_LOG_V2**: DAS Enterprise Edition V2.'."\n"
.'* **SQL_LOG_V3**: DAS Enterprise Edition V3.'."\n"
.'* **SQL_LOG_NOT_ENABLE**: DAS Enterprise Edition is not enabled.'."\n"
.'* **SQL_LOG_NOT_SUPPORT**: DAS Enterprise Edition is not supported.'."\n",
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'ColdRetention' => [
'title' => '冷数据存储周期(不落库),通过 retention - hotRetention 计算',
'description' => 'The number of days for which the SQL Explorer and Audit data is stored in cold storage. The value is calculated by using the following formula: Value of ColdRetention = Value of Retention - Value of HotRetention.``'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '23',
],
'SqlLogEnable' => [
'description' => 'Indicates whether DAS Enterprise Edition is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'Retention' => [
'description' => 'The total storage duration of the SQL Explorer and Audit data. Unit: day.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '30',
],
'HotRetention' => [
'description' => 'The number of days for which the SQL Explorer and Audit data is stored in hot storage.'."\n",
'type' => 'integer',
'format' => 'int32',
'example' => '7',
],
'RequestEnable' => [
'description' => 'Indicates whether the SQL Explorer feature is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'false',
],
'Version' => [
'title' => '当前审计日志的版本',
'description' => 'The version of DAS Enterprise Edition that is enabled for the database instance. Valid values:'."\n"
."\n"
.'* **SQL_LOG_V0**: DAS Enterprise Edition V0.'."\n"
.'* **SQL_LOG_V1**: DAS Enterprise Edition V1.'."\n"
.'* **SQL_LOG_V2**: DAS Enterprise Edition V2.'."\n"
.'* **SQL_LOG_V3**: DAS Enterprise Edition V3.'."\n"
.'* **SQL_LOG_NOT_ENABLE**: DAS Enterprise Edition is not enabled.'."\n"
.'* **SQL_LOG_NOT_SUPPORT**: DAS Enterprise Edition is not supported.'."\n",
'type' => 'string',
'example' => 'SQL_LOG_V3',
],
'RequestStartTime' => [
'description' => 'The time when the SQL Explorer feature was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'HotEnable' => [
'description' => 'Indicates whether the hot data storage is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'HotStartTime' => [
'description' => 'The time when the hot data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'ColdEnable' => [
'description' => 'Indicates whether the cold data storage is enabled. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'boolean',
'example' => 'true',
],
'ColdStartTime' => [
'description' => 'The time when the cold data storage was enabled. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1683712800000',
],
'SqlLogState' => [
'description' => 'The state of data migration. Valid values:'."\n"
."\n"
.'* **FINISH**: The historical data is migrated.'."\n"
.'* **RUNNING**: The historical data is being migrated.'."\n"
.'* **FAILURE**: The historical data fails to be migrated.'."\n",
'type' => 'string',
'example' => 'FINISH',
],
'LogFilter' => [
'description' => 'A reserved parameter.'."\n",
'type' => 'string',
'example' => 'None',
],
'SqlLogSource' => [
'title' => '开启审计日志来源',
'type' => 'string',
],
],
],
],
'description' => '',
],
],
],
'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' => 'ModifySqlLogConfig',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a DAS SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n"
.'* By default, the latest version of DAS Enterprise Edition that supports the database instance is enabled. For information about the databases and regions that are supported by different versions of DAS Enterprise Edition, see [Editions and supported features](~~156204~~).'."\n",
'requestParamsDescription' => 'DAS Enterprise Edition has the following versions: DAS Enterprise Edition V0, DAS Enterprise Edition V1, DAS Enterprise Edition V2, and DAS Enterprise Edition V3. By default, the latest version of DAS Enterprise Edition that supports the database instance is activated.'."\n"
."\n"
.'* For a database instance for which DAS Enterprise Edition V0 is activated, you need to specify only **Enable** and **Retention**.'."\n"
.'* For a database instance for which DAS Enterprise Edition V1 is activated, you need to specify only **Enable** and **Retention**. DAS automatically enables the SQL Explorer feature for the database instance. The default value of **RequestEnable** is **true**.'."\n"
.'* For a database instance for which DAS Enterprise Edition V2 is activated, you need to specify only **Enable** and **Retention**. DAS automatically enables the SQL Explorer feature for the database instance. The default value of **RequestEnable** is **true**. The value of **HotRetention** is fixed to 7, which specifies that the retention period for data in the hot storage is seven days. The default value of `Retention` is 7, which specifies that the retention period for data in the cold storage is seven days.'."\n",
],
'DescribeSqlLogStatistic' => [
'summary' => 'Queries the statistics of Database Autonomy Service (DAS) Enterprise Edition.',
'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' => 'The ID of the database instance.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The response code.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => 'B6D17591-B48B-4D31-9CD6-9B9796B2****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* true'."\n"
.'* false'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'SqlLogStatistic',
'description' => 'The data returned.'."\n",
'type' => 'object',
'properties' => [
'Timestamp' => [
'title' => '时间戳',
'description' => 'The timestamp. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '1712568564928',
],
'HotSqlSize' => [
'title' => '热数据量',
'description' => 'The size of the SQL Explorer and Audit data that is stored in hot storage. Unit: bytes.'."\n",
'type' => 'integer',
'format' => 'int64',
'enumValueTitles' => [],
'example' => '1118042',
],
'ColdSqlSize' => [
'title' => '冷数据量',
'description' => 'The size of the SQL Explorer and Audit data that is stored in cold storage. Unit: bytes.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '8585901',
],
'ImportSqlSize' => [
'title' => '引入量',
'description' => 'The size of the SQL Explorer and Audit data that was generated in the most recent day. Unit: bytes.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '23',
],
'FreeHotSqlSize' => [
'description' => 'The free quota for hot data storage. Unit: bytes.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '297245',
],
'FreeColdSqlSize' => [
'description' => 'The free quota for cold data storage. Unit: bytes.'."\n",
'type' => 'integer',
'format' => 'int64',
'example' => '5041450',
],
'TotalSqlSize' => [
'type' => 'integer',
'format' => 'int64',
],
],
],
],
'description' => '',
],
],
],
'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' => 'DescribeSqlLogStatistic',
'description' => 'Before you call this operation, take note of the following items:'."\n"
."\n"
.'* If you use an Alibaba Cloud SDK or a DAS SDK to call this operation, we recommend that you use the latest version of the SDK.'."\n"
.'* If you use an SDK to call operations of DAS, you must set the region ID to cn-shanghai.'."\n",
],
'GetDasSQLLogHotData' => [
'summary' => 'Queries the hot data of audit logs.',
'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' => 'The ID of the database instance.'."\n",
'type' => 'string',
'required' => true,
'example' => 'rm-2ze1jdv45i7l6****',
],
],
[
'name' => 'Start',
'in' => 'formData',
'schema' => [
'description' => 'The beginning of the time range to query. Specify a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The beginning of the time range to query must be later than the time when DAS Enterprise Edition is enabled, and can be up to seven days earlier than the current time.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1684734297000',
],
],
[
'name' => 'End',
'in' => 'formData',
'schema' => [
'description' => 'The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.'."\n"
."\n"
.'> The end time must be later than the start time. The interval between the start time and the end time cannot exceed 24 hours.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => true,
'example' => '1684820697000',
],
],
[
'name' => 'QueryKeyword',
'in' => 'formData',
'schema' => [
'description' => 'The keyword that is used for the query.'."\n"
."\n"
.'> Fuzzy search is not supported. You can query data by using multiple keywords. Separate keywords with spaces.'."\n",
'type' => 'string',
'required' => false,
'enumValueTitles' => [],
'example' => 'test',
],
],
[
'name' => 'AccountName',
'in' => 'formData',
'schema' => [
'description' => 'The account of the database.'."\n"
."\n"
.'> You can specify multiple database accounts that are separated by spaces. Example: `user1 user2 user3`.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testuser',
],
],
[
'name' => 'DBName',
'in' => 'formData',
'schema' => [
'description' => 'The name of the database.'."\n"
."\n"
.'> You can specify multiple database names that are separated by spaces. Example: `DB1 DB2 DB3`.'."\n",
'type' => 'string',
'required' => false,
'example' => 'testDB',
],
],
[
'name' => 'HostAddress',
'in' => 'formData',
'schema' => [
'description' => 'The IP address of the client.'."\n"
."\n"
.'> You can specify multiple IP addresses that are separated by spaces. Example: `IP1 IP2 IP3`.'."\n",
'type' => 'string',
'required' => false,
'example' => '47.100.XX.XX',
],
],
[
'name' => 'LogicalOperator',
'in' => 'formData',
'schema' => [
'description' => 'The logical relationship among multiple keywords.'."\n"
."\n"
.'* **or**'."\n"
.'* **and**'."\n",
'type' => 'string',
'required' => false,
'example' => 'or',
],
],
[
'name' => 'MaxLatancy',
'in' => 'formData',
'schema' => [
'description' => 'The maximum execution duration. Unit: microseconds. You can specify this parameter to query the SQL statements whose execution duration is smaller than the value of this parameter.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '100',
],
],
[
'name' => 'MaxScanRows',
'in' => 'formData',
'schema' => [
'description' => 'The maximum number of scanned rows. You can specify this parameter to query the SQL statements that scan a smaller number of rows than the value of this parameter.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10000',
],
],
[
'name' => 'MinLatancy',
'in' => 'formData',
'schema' => [
'description' => 'The minimum execution duration. Unit: microseconds. You can specify this parameter to query the SQL statements whose execution duration is greater than or equal to the value of this parameter.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'MinScanRows',
'in' => 'formData',
'schema' => [
'description' => 'The minimum number of scanned rows. You can specify this parameter to query the SQL statements that scan a larger or an equal number of rows than the value of this parameter.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'SqlType',
'in' => 'formData',
'schema' => [
'description' => 'The type of the SQL statement. Valid values:'."\n"
."\n"
.'* **SELECT**'."\n"
.'* **UPDATE**'."\n"
.'* **DELETE**',
'type' => 'string',
'required' => false,
'enumValueTitles' => [
'DELETE' => '',
'UPDATE' => '',
'SELECT' => '',
],
'example' => 'SELECT',
],
],
[
'name' => 'State',
'in' => 'formData',
'schema' => [
'description' => 'The execution results. You can specify **0** to query the SQL statements that are successfully executed. You can also specify an error code to query the corresponding SQL statements that fail to be executed.'."\n",
'type' => 'string',
'required' => false,
'example' => '0',
],
],
[
'name' => 'ThreadID',
'in' => 'formData',
'schema' => [
'description' => 'The thread ID.'."\n"
."\n"
.'> You can specify multiple thread IDs that are separated by spaces. Example: `Thread ID1 Thread ID2 Thread ID3`.'."\n",
'type' => 'string',
'required' => false,
'example' => '657',
],
],
[
'name' => 'PageNumbers',
'in' => 'formData',
'schema' => [
'description' => 'The page number. Pages start from page 1. Default value: 1.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '2',
],
],
[
'name' => 'MaxRecordsPerPage',
'in' => 'formData',
'schema' => [
'description' => 'The maximum number of entries per page. Valid values: 5 to 100.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => '10',
],
],
[
'name' => 'SortKey',
'in' => 'formData',
'schema' => [
'description' => 'The basis on which you want to sort the query results.'."\n"
."\n"
.'* **SCAN_ROWS**: the number of scanned rows.'."\n"
.'* **UPDATE_ROWS**: the number of updated rows.'."\n"
.'* **CONSUME**: the time consumed.'."\n"
.'* **ORIGIN_TIME**: the execution duration.'."\n",
'type' => 'string',
'required' => false,
'example' => 'SCAN_ROWS',
],
],
[
'name' => 'SortMethod',
'in' => 'formData',
'schema' => [
'description' => 'The order in which you want to sort the query results.'."\n"
."\n"
.'* **ase**: ascending order.'."\n"
.'* **desc**: descending order.'."\n",
'type' => 'string',
'required' => false,
'example' => 'ase',
],
],
[
'name' => 'ChildDBInstanceIDs',
'in' => 'formData',
'schema' => [
'description' => 'The node ID.'."\n"
."\n"
.'> This parameter must be specified if the database instance is a PolarDB for MySQL cluster.'."\n",
'type' => 'string',
'required' => false,
'example' => 'pi-bp179lg03445l****',
],
],
[
'name' => 'Role',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'TraceId',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'string',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MinRows',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MaxRows',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MinSpillCnt',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'MaxSpillCnt',
'in' => 'formData',
'schema' => [
'description' => 'The reserved parameter. This parameter is not supported.'."\n",
'type' => 'integer',
'format' => 'int64',
'required' => false,
'example' => 'None',
],
],
[
'name' => 'TransactionId',
'in' => 'formData',
'schema' => [
'description' => 'The transaction ID.'."\n",
'type' => 'string',
'required' => false,
'example' => '0',
],
],
[
'name' => 'Fail',
'in' => 'formData',
'schema' => [
'description' => 'The error code of SQL execution. You can call the [GetAsyncErrorRequestStatByCode](~~409804~~) operation to query MySQL error codes in SQL Explorer data.'."\n",
'type' => 'string',
'required' => false,
'example' => '1064',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => [
'description' => 'The HTTP status code returned.'."\n",
'type' => 'string',
'example' => '200',
],
'Message' => [
'description' => 'The returned message.'."\n"
."\n"
.'> If the request was successful, **Successful** is returned. If the request failed, an error message such as an error code is returned.'."\n",
'type' => 'string',
'example' => 'Successful',
],
'RequestId' => [
'description' => 'The request ID.'."\n",
'type' => 'string',
'example' => '0A74B755-98B7-59DB-8724-1321B394****',
],
'Success' => [
'description' => 'Indicates whether the request was successful. Valid values:'."\n"
."\n"
.'* **true**'."\n"
.'* **false**'."\n",
'type' => 'string',
'example' => 'true',
],
'Data' => [
'title' => 'ListResult