Skip to content

Commit b770bb2

Browse files
author
AWS
committed
AWS RDS DataService Update: Support to receive SQL query results in the form of a simplified JSON string. This enables developers using the new JSON string format to more easily convert it to an object using popular JSON string parsing libraries.
1 parent 50a7b57 commit b770bb2

File tree

2 files changed

+64
-13
lines changed

2 files changed

+64
-13
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS RDS DataService",
4+
"contributor": "",
5+
"description": "Support to receive SQL query results in the form of a simplified JSON string. This enables developers using the new JSON string format to more easily convert it to an object using popular JSON string parsing libraries."
6+
}

services/rdsdata/src/main/resources/codegen-resources/service-2.json

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"input":{"shape":"BatchExecuteStatementRequest"},
2323
"output":{"shape":"BatchExecuteStatementResponse"},
2424
"errors":[
25+
{"shape":"AccessDeniedException"},
2526
{"shape":"BadRequestException"},
2627
{"shape":"StatementTimeoutException"},
2728
{"shape":"InternalServerErrorException"},
@@ -40,6 +41,7 @@
4041
"input":{"shape":"BeginTransactionRequest"},
4142
"output":{"shape":"BeginTransactionResponse"},
4243
"errors":[
44+
{"shape":"AccessDeniedException"},
4345
{"shape":"BadRequestException"},
4446
{"shape":"StatementTimeoutException"},
4547
{"shape":"InternalServerErrorException"},
@@ -58,6 +60,7 @@
5860
"input":{"shape":"CommitTransactionRequest"},
5961
"output":{"shape":"CommitTransactionResponse"},
6062
"errors":[
63+
{"shape":"AccessDeniedException"},
6164
{"shape":"BadRequestException"},
6265
{"shape":"StatementTimeoutException"},
6366
{"shape":"InternalServerErrorException"},
@@ -77,6 +80,7 @@
7780
"input":{"shape":"ExecuteSqlRequest"},
7881
"output":{"shape":"ExecuteSqlResponse"},
7982
"errors":[
83+
{"shape":"AccessDeniedException"},
8084
{"shape":"BadRequestException"},
8185
{"shape":"InternalServerErrorException"},
8286
{"shape":"ForbiddenException"},
@@ -96,13 +100,14 @@
96100
"input":{"shape":"ExecuteStatementRequest"},
97101
"output":{"shape":"ExecuteStatementResponse"},
98102
"errors":[
103+
{"shape":"AccessDeniedException"},
99104
{"shape":"BadRequestException"},
100105
{"shape":"StatementTimeoutException"},
101106
{"shape":"InternalServerErrorException"},
102107
{"shape":"ForbiddenException"},
103108
{"shape":"ServiceUnavailableError"}
104109
],
105-
"documentation":"<p>Runs a SQL statement against a database.</p> <important> <p>If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> parameter, changes that result from the call are committed automatically.</p> </important> <p>The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.</p>"
110+
"documentation":"<p>Runs a SQL statement against a database.</p> <important> <p>If a call isn't part of a transaction because it doesn't include the <code>transactionID</code> parameter, changes that result from the call are committed automatically.</p> </important> <p>If the binary response data from the database is more than 1 MB, the call is terminated.</p>"
106111
},
107112
"RollbackTransaction":{
108113
"name":"RollbackTransaction",
@@ -114,6 +119,7 @@
114119
"input":{"shape":"RollbackTransactionRequest"},
115120
"output":{"shape":"RollbackTransactionResponse"},
116121
"errors":[
122+
{"shape":"AccessDeniedException"},
117123
{"shape":"BadRequestException"},
118124
{"shape":"StatementTimeoutException"},
119125
{"shape":"InternalServerErrorException"},
@@ -125,6 +131,18 @@
125131
}
126132
},
127133
"shapes":{
134+
"AccessDeniedException":{
135+
"type":"structure",
136+
"members":{
137+
"message":{"shape":"ErrorMessage"}
138+
},
139+
"documentation":"<p>You do not have sufficient access to perform this action.</p>",
140+
"error":{
141+
"httpStatusCode":403,
142+
"senderFault":true
143+
},
144+
"exception":true
145+
},
128146
"Arn":{
129147
"type":"string",
130148
"max":100,
@@ -148,11 +166,11 @@
148166
},
149167
"doubleValues":{
150168
"shape":"DoubleArray",
151-
"documentation":"<p>An array of integers.</p>"
169+
"documentation":"<p>An array of floating-point numbers.</p>"
152170
},
153171
"longValues":{
154172
"shape":"LongArray",
155-
"documentation":"<p>An array of floating point numbers.</p>"
173+
"documentation":"<p>An array of integers.</p>"
156174
},
157175
"stringValues":{
158176
"shape":"StringArray",
@@ -403,7 +421,7 @@
403421
"DoubleArray":{
404422
"type":"list",
405423
"member":{"shape":"BoxedDouble"},
406-
"documentation":"<p>An array of floating point numbers.</p> <note> <p>Some array entries can be null.</p> </note>"
424+
"documentation":"<p>An array of floating-point numbers.</p> <note> <p>Some array entries can be null.</p> </note>"
407425
},
408426
"ErrorMessage":{"type":"string"},
409427
"ExecuteSqlRequest":{
@@ -463,6 +481,10 @@
463481
"shape":"DbName",
464482
"documentation":"<p>The name of the database.</p>"
465483
},
484+
"formatRecordsAs":{
485+
"shape":"RecordsFormatType",
486+
"documentation":"<p>A value that indicates whether to format the result set as a single JSON string. This parameter only applies to <code>SELECT</code> statements and is ignored for other types of statements. Allowed values are <code>NONE</code> and <code>JSON</code>. The default value is <code>NONE</code>. The result is returned in the <code>formattedRecords</code> field.</p> <p>For usage information about the JSON format for result sets, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html\">Using the Data API</a> in the <i>Amazon Aurora User Guide</i>.</p>"
487+
},
466488
"includeResultMetadata":{
467489
"shape":"Boolean",
468490
"documentation":"<p>A value that indicates whether to include metadata in the results.</p>"
@@ -503,19 +525,23 @@
503525
"members":{
504526
"columnMetadata":{
505527
"shape":"Metadata",
506-
"documentation":"<p>Metadata for the columns included in the results.</p>"
528+
"documentation":"<p>Metadata for the columns included in the results. This field is blank if the <code>formatRecordsAs</code> parameter is set to <code>JSON</code>.</p>"
529+
},
530+
"formattedRecords":{
531+
"shape":"FormattedSqlRecords",
532+
"documentation":"<p>A string value that represents the result set of a <code>SELECT</code> statement in JSON format. This value is only present when the <code>formatRecordsAs</code> parameter is set to <code>JSON</code>.</p> <p>The size limit for this field is currently 10 MB. If the JSON-formatted string representing the result set requires more than 10 MB, the call returns an error.</p>"
507533
},
508534
"generatedFields":{
509535
"shape":"FieldList",
510-
"documentation":"<p>Values for fields generated during the request.</p> <pre><code> &lt;note&gt; &lt;p&gt;The &lt;code&gt;generatedFields&lt;/code&gt; data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the &lt;code&gt;RETURNING&lt;/code&gt; clause. For more information, see &lt;a href=&quot;https://www.postgresql.org/docs/10/dml-returning.html&quot;&gt;Returning Data From Modified Rows&lt;/a&gt; in the PostgreSQL documentation.&lt;/p&gt; &lt;/note&gt; </code></pre>"
536+
"documentation":"<p>Values for fields generated during a DML request.</p> <pre><code> &lt;note&gt; &lt;p&gt;The &lt;code&gt;generatedFields&lt;/code&gt; data isn't supported by Aurora PostgreSQL. To get the values of generated fields, use the &lt;code&gt;RETURNING&lt;/code&gt; clause. For more information, see &lt;a href=&quot;https://www.postgresql.org/docs/10/dml-returning.html&quot;&gt;Returning Data From Modified Rows&lt;/a&gt; in the PostgreSQL documentation.&lt;/p&gt; &lt;/note&gt; </code></pre>"
511537
},
512538
"numberOfRecordsUpdated":{
513539
"shape":"RecordsUpdated",
514540
"documentation":"<p>The number of records updated by the request.</p>"
515541
},
516542
"records":{
517543
"shape":"SqlRecords",
518-
"documentation":"<p>The records returned by the SQL statement.</p>"
544+
"documentation":"<p>The records returned by the SQL statement. This field is blank if the <code>formatRecordsAs</code> parameter is set to <code>JSON</code>.</p>"
519545
}
520546
},
521547
"documentation":"<p>The response elements represent the output of a request to run a SQL statement against a database.</p>"
@@ -574,6 +600,7 @@
574600
},
575601
"exception":true
576602
},
603+
"FormattedSqlRecords":{"type":"string"},
577604
"Id":{
578605
"type":"string",
579606
"max":192,
@@ -595,6 +622,13 @@
595622
"member":{"shape":"BoxedLong"},
596623
"documentation":"<p>An array of integers.</p> <note> <p>Some array entries can be null.</p> </note>"
597624
},
625+
"LongReturnType":{
626+
"type":"string",
627+
"enum":[
628+
"STRING",
629+
"LONG"
630+
]
631+
},
598632
"Metadata":{
599633
"type":"list",
600634
"member":{"shape":"ColumnMetadata"}
@@ -623,12 +657,19 @@
623657
"documentation":"<p>The values returned in the record.</p>"
624658
}
625659
},
626-
"documentation":"<p>A record returned by a call.</p>"
660+
"documentation":"<p>A record returned by a call.</p> <important> <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p> </important>"
627661
},
628662
"Records":{
629663
"type":"list",
630664
"member":{"shape":"Record"}
631665
},
666+
"RecordsFormatType":{
667+
"type":"string",
668+
"enum":[
669+
"NONE",
670+
"JSON"
671+
]
672+
},
632673
"RecordsUpdated":{"type":"long"},
633674
"ResultFrame":{
634675
"type":"structure",
@@ -642,7 +683,7 @@
642683
"documentation":"<p>The result-set metadata in the result set.</p>"
643684
}
644685
},
645-
"documentation":"<p>The result set returned by a SQL statement.</p>"
686+
"documentation":"<p>The result set returned by a SQL statement.</p> <important> <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p> </important>"
646687
},
647688
"ResultSetMetadata":{
648689
"type":"structure",
@@ -664,6 +705,10 @@
664705
"decimalReturnType":{
665706
"shape":"DecimalReturnType",
666707
"documentation":"<p>A value that indicates how a field of <code>DECIMAL</code> type is represented in the response. The value of <code>STRING</code>, the default, specifies that it is converted to a String value. The value of <code>DOUBLE_OR_LONG</code> specifies that it is converted to a Long value if its scale is 0, or to a Double value otherwise.</p> <important> <p>Conversion to Double or Long can result in roundoff errors due to precision loss. We recommend converting to String, especially when working with currency values.</p> </important>"
708+
},
709+
"longReturnType":{
710+
"shape":"LongReturnType",
711+
"documentation":"<p>A value that indicates how a field of <code>LONG</code> type is represented. Allowed values are <code>LONG</code> and <code>STRING</code>. The default is <code>LONG</code>. Specify <code>STRING</code> if the length or precision of numeric values might cause truncation or rounding errors. </p>"
667712
}
668713
},
669714
"documentation":"<p>Options that control how the result set is returned.</p>"
@@ -761,7 +806,7 @@
761806
"documentation":"<p>The result set of the SQL statement.</p>"
762807
}
763808
},
764-
"documentation":"<p>The result of a SQL statement.</p> <pre><code> &lt;important&gt; &lt;p&gt;This data type is deprecated.&lt;/p&gt; &lt;/important&gt; </code></pre>"
809+
"documentation":"<p>The result of a SQL statement.</p> <pre><code> &lt;important&gt; &lt;p&gt;This data structure is only used with the deprecated &lt;code&gt;ExecuteSql&lt;/code&gt; operation. Use the &lt;code&gt;BatchExecuteStatement&lt;/code&gt; or &lt;code&gt;ExecuteStatement&lt;/code&gt; operation instead.&lt;/p&gt; &lt;/important&gt; </code></pre>"
765810
},
766811
"SqlStatementResults":{
767812
"type":"list",
@@ -800,7 +845,7 @@
800845
"documentation":"<p>The attributes returned in the record.</p>"
801846
}
802847
},
803-
"documentation":"<p>A structure value returned by a call.</p>"
848+
"documentation":"<p>A structure value returned by a call.</p> <important> <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation. Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p> </important>"
804849
},
805850
"TransactionStatus":{
806851
"type":"string",
@@ -876,9 +921,9 @@
876921
"documentation":"<p>A value for a column of STRUCT data type.</p>"
877922
}
878923
},
879-
"documentation":"<p>Contains the value of a column.</p> <pre><code> &lt;important&gt; &lt;p&gt;This data type is deprecated.&lt;/p&gt; &lt;/important&gt; </code></pre>",
924+
"documentation":"<p>Contains the value of a column.</p> <pre><code> &lt;important&gt; &lt;p&gt;This data structure is only used with the deprecated &lt;code&gt;ExecuteSql&lt;/code&gt; operation. Use the &lt;code&gt;BatchExecuteStatement&lt;/code&gt; or &lt;code&gt;ExecuteStatement&lt;/code&gt; operation instead.&lt;/p&gt; &lt;/important&gt; </code></pre>",
880925
"union":true
881926
}
882927
},
883-
"documentation":"<p><fullname>Amazon RDS Data Service</fullname> <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless DB cluster. To run these statements, you work with the Data Service API.</p> <p>For more information about the Data Service API, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html\">Using the Data API for Aurora Serverless</a> in the <i>Amazon Aurora User Guide</i>.</p></p>"
928+
"documentation":"<p><fullname>Amazon RDS Data Service</fullname> <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless DB cluster. To run these statements, you work with the Data Service API.</p> <p>For more information about the Data Service API, see <a href=\"https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html\">Using the Data API</a> in the <i>Amazon Aurora User Guide</i>.</p></p>"
884929
}

0 commit comments

Comments
 (0)