|
142 | 142 | {"shape":"ValidationException"},
|
143 | 143 | {"shape":"InvalidEndpointException"}
|
144 | 144 | ],
|
145 |
| - "documentation":"<p> You can use this API to run a scheduled query manually. </p>", |
| 145 | + "documentation":"<p> You can use this API to run a scheduled query manually. </p> <p>If you enabled <code>QueryInsights</code>, this API also returns insights and metrics related to the query that you executed as part of an Amazon SNS notification. <code>QueryInsights</code> helps with performance tuning of your query.</p>", |
146 | 146 | "endpointdiscovery":{"required":true},
|
147 | 147 | "idempotent":true
|
148 | 148 | },
|
|
217 | 217 | {"shape":"ValidationException"},
|
218 | 218 | {"shape":"InvalidEndpointException"}
|
219 | 219 | ],
|
220 |
| - "documentation":"<p> <code>Query</code> is a synchronous operation that enables you to run a query against your Amazon Timestream data. <code>Query</code> will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the <a href=\"https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html\">code sample</a> for details. </p> <p>Your query request will fail in the following cases:</p> <ul> <li> <p> If you submit a <code>Query</code> request with the same client token outside of the 5-minute idempotency window. </p> </li> <li> <p> If you submit a <code>Query</code> request with the same client token, but change other parameters, within the 5-minute idempotency window. </p> </li> <li> <p> If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message: </p> <p> <code>Query aborted as max page response size has been exceeded by the output result row</code> </p> </li> <li> <p> If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an <code>Invalid pagination token</code> error. </p> </li> </ul>", |
| 220 | + "documentation":"<p> <code>Query</code> is a synchronous operation that enables you to run a query against your Amazon Timestream data.</p> <p>If you enabled <code>QueryInsights</code>, this API also returns insights and metrics related to the query that you executed. <code>QueryInsights</code> helps with performance tuning of your query.</p> <note> <p>The maximum number of <code>Query</code> API requests you're allowed to make with <code>QueryInsights</code> enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling.</p> </note> <p> <code>Query</code> will time out after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. See the <a href=\"https://docs.aws.amazon.com/timestream/latest/developerguide/code-samples.run-query.html\">code sample</a> for details. </p> <p>Your query request will fail in the following cases:</p> <ul> <li> <p> If you submit a <code>Query</code> request with the same client token outside of the 5-minute idempotency window. </p> </li> <li> <p> If you submit a <code>Query</code> request with the same client token, but change other parameters, within the 5-minute idempotency window. </p> </li> <li> <p> If the size of the row (including the query metadata) exceeds 1 MB, then the query will fail with the following error message: </p> <p> <code>Query aborted as max page response size has been exceeded by the output result row</code> </p> </li> <li> <p> If the IAM principal of the query initiator and the result reader are not the same and/or the query initiator and the result reader do not have the same query string in the query requests, the query will fail with an <code>Invalid pagination token</code> error. </p> </li> </ul>", |
221 | 221 | "endpointdiscovery":{"required":true},
|
222 | 222 | "idempotent":true
|
223 | 223 | },
|
|
614 | 614 | "shape":"ClientToken",
|
615 | 615 | "documentation":"<p>Not used. </p>",
|
616 | 616 | "idempotencyToken":true
|
| 617 | + }, |
| 618 | + "QueryInsights":{ |
| 619 | + "shape":"ScheduledQueryInsights", |
| 620 | + "documentation":"<p>Encapsulates settings for enabling <code>QueryInsights</code>.</p> <p>Enabling <code>QueryInsights</code> returns insights and metrics as a part of the Amazon SNS notification for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance and cost.</p>" |
617 | 621 | }
|
618 | 622 | }
|
619 | 623 | },
|
|
867 | 871 | "type":"list",
|
868 | 872 | "member":{"shape":"ParameterMapping"}
|
869 | 873 | },
|
| 874 | + "PartitionKey":{"type":"string"}, |
| 875 | + "PartitionKeyList":{ |
| 876 | + "type":"list", |
| 877 | + "member":{"shape":"PartitionKey"} |
| 878 | + }, |
870 | 879 | "PrepareQueryRequest":{
|
871 | 880 | "type":"structure",
|
872 | 881 | "required":["QueryString"],
|
|
917 | 926 | "min":1,
|
918 | 927 | "pattern":"[a-zA-Z0-9]+"
|
919 | 928 | },
|
| 929 | + "QueryInsights":{ |
| 930 | + "type":"structure", |
| 931 | + "required":["Mode"], |
| 932 | + "members":{ |
| 933 | + "Mode":{ |
| 934 | + "shape":"QueryInsightsMode", |
| 935 | + "documentation":"<p>Provides the following modes to enable <code>QueryInsights</code>:</p> <ul> <li> <p> <code>ENABLED_WITH_RATE_CONTROL</code> – Enables <code>QueryInsights</code> for the queries being processed. This mode also includes a rate control mechanism, which limits the <code>QueryInsights</code> feature to 1 query per second (QPS).</p> </li> <li> <p> <code>DISABLED</code> – Disables <code>QueryInsights</code>.</p> </li> </ul>" |
| 936 | + } |
| 937 | + }, |
| 938 | + "documentation":"<p> <code>QueryInsights</code> is a performance tuning feature that helps you optimize your queries, reducing costs and improving performance. With <code>QueryInsights</code>, you can assess the pruning efficiency of your queries and identify areas for improvement to enhance query performance. With <code>QueryInsights</code>, you can also analyze the effectiveness of your queries in terms of temporal and spatial pruning, and identify opportunities to improve performance. Specifically, you can evaluate how well your queries use time-based and partition key-based indexing strategies to optimize data retrieval. To optimize query performance, it's essential that you fine-tune both the temporal and spatial parameters that govern query execution.</p> <p>The key metrics provided by <code>QueryInsights</code> are <code>QuerySpatialCoverage</code> and <code>QueryTemporalRange</code>. <code>QuerySpatialCoverage</code> indicates how much of the spatial axis the query scans, with lower values being more efficient. <code>QueryTemporalRange</code> shows the time range scanned, with narrower ranges being more performant.</p> <p> <b>Benefits of QueryInsights</b> </p> <p>The following are the key benefits of using <code>QueryInsights</code>:</p> <ul> <li> <p> <b>Identifying inefficient queries</b> – <code>QueryInsights</code> provides information on the time-based and attribute-based pruning of the tables accessed by the query. This information helps you identify the tables that are sub-optimally accessed.</p> </li> <li> <p> <b>Optimizing your data model and partitioning</b> – You can use the <code>QueryInsights</code> information to access and fine-tune your data model and partitioning strategy.</p> </li> <li> <p> <b>Tuning queries</b> – <code>QueryInsights</code> highlights opportunities to use indexes more effectively.</p> </li> </ul> <note> <p>The maximum number of <code>Query</code> API requests you're allowed to make with <code>QueryInsights</code> enabled is 1 query per second (QPS). If you exceed this query rate, it might result in throttling.</p> </note>" |
| 939 | + }, |
| 940 | + "QueryInsightsMode":{ |
| 941 | + "type":"string", |
| 942 | + "enum":[ |
| 943 | + "ENABLED_WITH_RATE_CONTROL", |
| 944 | + "DISABLED" |
| 945 | + ] |
| 946 | + }, |
| 947 | + "QueryInsightsResponse":{ |
| 948 | + "type":"structure", |
| 949 | + "members":{ |
| 950 | + "QuerySpatialCoverage":{ |
| 951 | + "shape":"QuerySpatialCoverage", |
| 952 | + "documentation":"<p>Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning. </p>" |
| 953 | + }, |
| 954 | + "QueryTemporalRange":{ |
| 955 | + "shape":"QueryTemporalRange", |
| 956 | + "documentation":"<p>Provides insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning:</p> <ul> <li> <p>Add missing time-predicates.</p> </li> <li> <p>Remove functions around the time predicates.</p> </li> <li> <p>Add time predicates to all the sub-queries.</p> </li> </ul>" |
| 957 | + }, |
| 958 | + "QueryTableCount":{ |
| 959 | + "shape":"Long", |
| 960 | + "documentation":"<p>Indicates the number of tables in the query.</p>", |
| 961 | + "box":true |
| 962 | + }, |
| 963 | + "OutputRows":{ |
| 964 | + "shape":"Long", |
| 965 | + "documentation":"<p>Indicates the total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.</p>", |
| 966 | + "box":true |
| 967 | + }, |
| 968 | + "OutputBytes":{ |
| 969 | + "shape":"Long", |
| 970 | + "documentation":"<p>Indicates the size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.</p>", |
| 971 | + "box":true |
| 972 | + }, |
| 973 | + "UnloadPartitionCount":{ |
| 974 | + "shape":"Long", |
| 975 | + "documentation":"<p>Indicates the partitions created by the <code>Unload</code> operation.</p>", |
| 976 | + "box":true |
| 977 | + }, |
| 978 | + "UnloadWrittenRows":{ |
| 979 | + "shape":"Long", |
| 980 | + "documentation":"<p>Indicates the rows written by the <code>Unload</code> query.</p>", |
| 981 | + "box":true |
| 982 | + }, |
| 983 | + "UnloadWrittenBytes":{ |
| 984 | + "shape":"Long", |
| 985 | + "documentation":"<p>Indicates the size, in bytes, written by the <code>Unload</code> operation.</p>", |
| 986 | + "box":true |
| 987 | + } |
| 988 | + }, |
| 989 | + "documentation":"<p>Provides various insights and metrics related to the query that you executed.</p>" |
| 990 | + }, |
920 | 991 | "QueryPricingModel":{
|
921 | 992 | "type":"string",
|
922 | 993 | "enum":[
|
|
944 | 1015 | "MaxRows":{
|
945 | 1016 | "shape":"MaxQueryResults",
|
946 | 1017 | "documentation":"<p> The total number of rows to be returned in the <code>Query</code> output. The initial run of <code>Query</code> with a <code>MaxRows</code> value specified will return the result set of the query in two cases: </p> <ul> <li> <p>The size of the result is less than <code>1MB</code>.</p> </li> <li> <p>The number of rows in the result set is less than the value of <code>maxRows</code>.</p> </li> </ul> <p>Otherwise, the initial invocation of <code>Query</code> only returns a <code>NextToken</code>, which can then be used in subsequent calls to fetch the result set. To resume pagination, provide the <code>NextToken</code> value in the subsequent command.</p> <p>If the row size is large (e.g. a row has many columns), Timestream may return fewer rows to keep the response size from exceeding the 1 MB limit. If <code>MaxRows</code> is not provided, Timestream will send the necessary number of rows to meet the 1 MB limit.</p>"
|
| 1018 | + }, |
| 1019 | + "QueryInsights":{ |
| 1020 | + "shape":"QueryInsights", |
| 1021 | + "documentation":"<p>Encapsulates settings for enabling <code>QueryInsights</code>.</p> <p>Enabling <code>QueryInsights</code> returns insights and metrics in addition to query results for the query that you executed. You can use <code>QueryInsights</code> to tune your query performance.</p>" |
947 | 1022 | }
|
948 | 1023 | }
|
949 | 1024 | },
|
|
974 | 1049 | "QueryStatus":{
|
975 | 1050 | "shape":"QueryStatus",
|
976 | 1051 | "documentation":"<p>Information about the status of the query, including progress and bytes scanned.</p>"
|
| 1052 | + }, |
| 1053 | + "QueryInsightsResponse":{ |
| 1054 | + "shape":"QueryInsightsResponse", |
| 1055 | + "documentation":"<p>Encapsulates <code>QueryInsights</code> containing insights and metrics related to the query that you executed.</p>" |
977 | 1056 | }
|
978 | 1057 | }
|
979 | 1058 | },
|
| 1059 | + "QuerySpatialCoverage":{ |
| 1060 | + "type":"structure", |
| 1061 | + "members":{ |
| 1062 | + "Max":{ |
| 1063 | + "shape":"QuerySpatialCoverageMax", |
| 1064 | + "documentation":"<p>Provides insights into the spatial coverage of the executed query and the table with the most inefficient spatial pruning.</p> <ul> <li> <p> <code>Value</code> – The maximum ratio of spatial coverage.</p> </li> <li> <p> <code>TableArn</code> – The Amazon Resource Name (ARN) of the table with sub-optimal spatial pruning.</p> </li> <li> <p> <code>PartitionKey</code> – The partition key used for partitioning, which can be a default <code>measure_name</code> or a CDPK.</p> </li> </ul>" |
| 1065 | + } |
| 1066 | + }, |
| 1067 | + "documentation":"<p>Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning</p> <p>For example, you can do the following with the <code>QuerySpatialCoverage</code> information:</p> <ul> <li> <p>Add measure_name or use <a href=\"https://docs.aws.amazon.com/timestream/latest/developerguide/customer-defined-partition-keys.html\">customer-defined partition key</a> (CDPK) predicates.</p> </li> <li> <p>If you've already done the preceding action, remove functions around them or clauses, such as <code>LIKE</code>.</p> </li> </ul>" |
| 1068 | + }, |
| 1069 | + "QuerySpatialCoverageMax":{ |
| 1070 | + "type":"structure", |
| 1071 | + "members":{ |
| 1072 | + "Value":{ |
| 1073 | + "shape":"Double", |
| 1074 | + "documentation":"<p>The maximum ratio of spatial coverage.</p>" |
| 1075 | + }, |
| 1076 | + "TableArn":{ |
| 1077 | + "shape":"AmazonResourceName", |
| 1078 | + "documentation":"<p>The Amazon Resource Name (ARN) of the table with the most sub-optimal spatial pruning.</p>" |
| 1079 | + }, |
| 1080 | + "PartitionKey":{ |
| 1081 | + "shape":"PartitionKeyList", |
| 1082 | + "documentation":"<p>The partition key used for partitioning, which can be a default <code>measure_name</code> or a <a href=\"https://docs.aws.amazon.com/timestream/latest/developerguide/customer-defined-partition-keys.html\">customer defined partition key</a>.</p>" |
| 1083 | + } |
| 1084 | + }, |
| 1085 | + "documentation":"<p>Provides insights into the table with the most sub-optimal spatial range scanned by your query.</p>" |
| 1086 | + }, |
980 | 1087 | "QueryStatus":{
|
981 | 1088 | "type":"structure",
|
982 | 1089 | "members":{
|
|
1001 | 1108 | "min":1,
|
1002 | 1109 | "sensitive":true
|
1003 | 1110 | },
|
| 1111 | + "QueryTemporalRange":{ |
| 1112 | + "type":"structure", |
| 1113 | + "members":{ |
| 1114 | + "Max":{ |
| 1115 | + "shape":"QueryTemporalRangeMax", |
| 1116 | + "documentation":"<p>Encapsulates the following properties that provide insights into the most sub-optimal performing table on the temporal axis:</p> <ul> <li> <p> <code>Value</code> – The maximum duration in nanoseconds between the start and end of the query.</p> </li> <li> <p> <code>TableArn</code> – The Amazon Resource Name (ARN) of the table which is queried with the largest time range.</p> </li> </ul>" |
| 1117 | + } |
| 1118 | + }, |
| 1119 | + "documentation":"<p>Provides insights into the temporal range of the query, including the table with the largest (max) time range.</p>" |
| 1120 | + }, |
| 1121 | + "QueryTemporalRangeMax":{ |
| 1122 | + "type":"structure", |
| 1123 | + "members":{ |
| 1124 | + "Value":{ |
| 1125 | + "shape":"Long", |
| 1126 | + "documentation":"<p>The maximum duration in nanoseconds between the start and end of the query.</p>" |
| 1127 | + }, |
| 1128 | + "TableArn":{ |
| 1129 | + "shape":"AmazonResourceName", |
| 1130 | + "documentation":"<p>The Amazon Resource Name (ARN) of the table which is queried with the largest time range.</p>" |
| 1131 | + } |
| 1132 | + }, |
| 1133 | + "documentation":"<p>Provides insights into the table with the most sub-optimal temporal pruning scanned by your query.</p>" |
| 1134 | + }, |
1004 | 1135 | "ResourceName":{"type":"string"},
|
1005 | 1136 | "ResourceNotFoundException":{
|
1006 | 1137 | "type":"structure",
|
|
1246 | 1377 | },
|
1247 | 1378 | "documentation":"<p>Structure that describes scheduled query.</p>"
|
1248 | 1379 | },
|
| 1380 | + "ScheduledQueryInsights":{ |
| 1381 | + "type":"structure", |
| 1382 | + "required":["Mode"], |
| 1383 | + "members":{ |
| 1384 | + "Mode":{ |
| 1385 | + "shape":"ScheduledQueryInsightsMode", |
| 1386 | + "documentation":"<p>Provides the following modes to enable <code>ScheduledQueryInsights</code>:</p> <ul> <li> <p> <code>ENABLED_WITH_RATE_CONTROL</code> – Enables <code>ScheduledQueryInsights</code> for the queries being processed. This mode also includes a rate control mechanism, which limits the <code>QueryInsights</code> feature to 1 query per second (QPS).</p> </li> <li> <p> <code>DISABLED</code> – Disables <code>ScheduledQueryInsights</code>.</p> </li> </ul>" |
| 1387 | + } |
| 1388 | + }, |
| 1389 | + "documentation":"<p>Encapsulates settings for enabling <code>QueryInsights</code> on an <code>ExecuteScheduledQueryRequest</code>.</p>" |
| 1390 | + }, |
| 1391 | + "ScheduledQueryInsightsMode":{ |
| 1392 | + "type":"string", |
| 1393 | + "enum":[ |
| 1394 | + "ENABLED_WITH_RATE_CONTROL", |
| 1395 | + "DISABLED" |
| 1396 | + ] |
| 1397 | + }, |
| 1398 | + "ScheduledQueryInsightsResponse":{ |
| 1399 | + "type":"structure", |
| 1400 | + "members":{ |
| 1401 | + "QuerySpatialCoverage":{ |
| 1402 | + "shape":"QuerySpatialCoverage", |
| 1403 | + "documentation":"<p>Provides insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.</p>" |
| 1404 | + }, |
| 1405 | + "QueryTemporalRange":{ |
| 1406 | + "shape":"QueryTemporalRange", |
| 1407 | + "documentation":"<p>Provides insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning:</p> <ul> <li> <p>Add missing time-predicates.</p> </li> <li> <p>Remove functions around the time predicates.</p> </li> <li> <p>Add time predicates to all the sub-queries.</p> </li> </ul>" |
| 1408 | + }, |
| 1409 | + "QueryTableCount":{ |
| 1410 | + "shape":"Long", |
| 1411 | + "documentation":"<p>Indicates the number of tables in the query.</p>", |
| 1412 | + "box":true |
| 1413 | + }, |
| 1414 | + "OutputRows":{ |
| 1415 | + "shape":"Long", |
| 1416 | + "documentation":"<p>Indicates the total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.</p>", |
| 1417 | + "box":true |
| 1418 | + }, |
| 1419 | + "OutputBytes":{ |
| 1420 | + "shape":"Long", |
| 1421 | + "documentation":"<p>Indicates the size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.</p>", |
| 1422 | + "box":true |
| 1423 | + } |
| 1424 | + }, |
| 1425 | + "documentation":"<p>Provides various insights and metrics related to the <code>ExecuteScheduledQueryRequest</code> that was executed.</p>" |
| 1426 | + }, |
1249 | 1427 | "ScheduledQueryList":{
|
1250 | 1428 | "type":"list",
|
1251 | 1429 | "member":{"shape":"ScheduledQuery"}
|
|
1284 | 1462 | "shape":"ExecutionStats",
|
1285 | 1463 | "documentation":"<p>Runtime statistics for a scheduled run.</p>"
|
1286 | 1464 | },
|
| 1465 | + "QueryInsightsResponse":{ |
| 1466 | + "shape":"ScheduledQueryInsightsResponse", |
| 1467 | + "documentation":"<p>Provides various insights and metrics related to the run summary of the scheduled query.</p>" |
| 1468 | + }, |
1287 | 1469 | "ErrorReportLocation":{
|
1288 | 1470 | "shape":"ErrorReportLocation",
|
1289 | 1471 | "documentation":"<p>S3 location for error report.</p>"
|
|
0 commit comments