Skip to content

Commit d39aca7

Browse files
This release adds a new API GenerateQuery that generates a query from a natural language prompt about the event data in your event data store. This operation uses generative artificial intelligence (generative AI) to produce a ready-to-use SQL query from the prompt.
1 parent 9de8147 commit d39aca7

22 files changed

+1674
-320
lines changed

generator/ServiceModels/cloudtrail/cloudtrail-2013-11-01.api.json

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,26 @@
354354
{"shape":"EventDataStoreFederationEnabledException"}
355355
]
356356
},
357+
"GenerateQuery":{
358+
"name":"GenerateQuery",
359+
"http":{
360+
"method":"POST",
361+
"requestUri":"/"
362+
},
363+
"input":{"shape":"GenerateQueryRequest"},
364+
"output":{"shape":"GenerateQueryResponse"},
365+
"errors":[
366+
{"shape":"EventDataStoreARNInvalidException"},
367+
{"shape":"EventDataStoreNotFoundException"},
368+
{"shape":"InactiveEventDataStoreException"},
369+
{"shape":"InvalidParameterException"},
370+
{"shape":"GenerateResponseException"},
371+
{"shape":"OperationNotPermittedException"},
372+
{"shape":"UnsupportedOperationException"},
373+
{"shape":"NoManagementAccountSLRExistsException"}
374+
],
375+
"idempotent":true
376+
},
357377
"GetChannel":{
358378
"name":"GetChannel",
359379
"http":{
@@ -810,7 +830,8 @@
810830
{"shape":"UnsupportedOperationException"},
811831
{"shape":"OperationNotPermittedException"},
812832
{"shape":"NotOrganizationMasterAccountException"},
813-
{"shape":"NoManagementAccountSLRExistsException"}
833+
{"shape":"NoManagementAccountSLRExistsException"},
834+
{"shape":"ConflictException"}
814835
],
815836
"idempotent":true
816837
},
@@ -1524,7 +1545,8 @@
15241545
"QueryStatistics":{"shape":"QueryStatisticsForDescribeQuery"},
15251546
"ErrorMessage":{"shape":"ErrorMessage"},
15261547
"DeliveryS3Uri":{"shape":"DeliveryS3Uri"},
1527-
"DeliveryStatus":{"shape":"DeliveryStatus"}
1548+
"DeliveryStatus":{"shape":"DeliveryStatus"},
1549+
"Prompt":{"shape":"Prompt"}
15281550
}
15291551
},
15301552
"DescribeTrailsRequest":{
@@ -1710,6 +1732,12 @@
17101732
"min":1,
17111733
"pattern":"^[a-zA-Z0-9._/\\-:]+$"
17121734
},
1735+
"EventDataStoreList":{
1736+
"type":"list",
1737+
"member":{"shape":"EventDataStoreArn"},
1738+
"max":1,
1739+
"min":1
1740+
},
17131741
"EventDataStoreMaxLimitExceededException":{
17141742
"type":"structure",
17151743
"members":{
@@ -1795,6 +1823,30 @@
17951823
"DISABLED"
17961824
]
17971825
},
1826+
"GenerateQueryRequest":{
1827+
"type":"structure",
1828+
"required":[
1829+
"EventDataStores",
1830+
"Prompt"
1831+
],
1832+
"members":{
1833+
"EventDataStores":{"shape":"EventDataStoreList"},
1834+
"Prompt":{"shape":"Prompt"}
1835+
}
1836+
},
1837+
"GenerateQueryResponse":{
1838+
"type":"structure",
1839+
"members":{
1840+
"QueryStatement":{"shape":"QueryStatement"},
1841+
"QueryAlias":{"shape":"QueryAlias"}
1842+
}
1843+
},
1844+
"GenerateResponseException":{
1845+
"type":"structure",
1846+
"members":{
1847+
},
1848+
"exception":true
1849+
},
17981850
"GetChannelRequest":{
17991851
"type":"structure",
18001852
"required":["Channel"],
@@ -2659,6 +2711,12 @@
26592711
"min":0,
26602712
"pattern":"[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*"
26612713
},
2714+
"Prompt":{
2715+
"type":"string",
2716+
"max":500,
2717+
"min":3,
2718+
"pattern":"^[ -~\\n]*$"
2719+
},
26622720
"PublicKey":{
26632721
"type":"structure",
26642722
"members":{

generator/ServiceModels/cloudtrail/cloudtrail-2013-11-01.docs.json

Lines changed: 35 additions & 3 deletions
Large diffs are not rendered by default.

generator/ServiceModels/cloudtrail/cloudtrail-2013-11-01.normal.json

Lines changed: 79 additions & 4 deletions
Large diffs are not rendered by default.

sdk/code-analysis/ServiceAnalysis/CloudTrail/Generated/PropertyValueRules.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@
141141
<max>1000</max>
142142
<pattern>.*</pattern>
143143
</property-value-rule>
144+
<property-value-rule>
145+
<property>Amazon.CloudTrail.Model.DescribeQueryResponse.Prompt</property>
146+
<min>3</min>
147+
<max>500</max>
148+
<pattern>^[ -~\n]*$</pattern>
149+
</property-value-rule>
144150
<property-value-rule>
145151
<property>Amazon.CloudTrail.Model.DescribeQueryResponse.QueryId</property>
146152
<min>36</min>
@@ -189,6 +195,24 @@
189195
<max>125</max>
190196
<pattern>^[a-zA-Z0-9._/\-:@=\+,\.]+$</pattern>
191197
</property-value-rule>
198+
<property-value-rule>
199+
<property>Amazon.CloudTrail.Model.GenerateQueryRequest.Prompt</property>
200+
<min>3</min>
201+
<max>500</max>
202+
<pattern>^[ -~\n]*$</pattern>
203+
</property-value-rule>
204+
<property-value-rule>
205+
<property>Amazon.CloudTrail.Model.GenerateQueryResponse.QueryAlias</property>
206+
<min>1</min>
207+
<max>256</max>
208+
<pattern>^[a-zA-Z][a-zA-Z0-9._\-]*$</pattern>
209+
</property-value-rule>
210+
<property-value-rule>
211+
<property>Amazon.CloudTrail.Model.GenerateQueryResponse.QueryStatement</property>
212+
<min>1</min>
213+
<max>10000</max>
214+
<pattern>(?s).*</pattern>
215+
</property-value-rule>
192216
<property-value-rule>
193217
<property>Amazon.CloudTrail.Model.GetChannelRequest.Channel</property>
194218
<min>3</min>

sdk/src/Services/CloudTrail/Generated/Model/AdvancedEventSelector.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,26 @@ namespace Amazon.CloudTrail.Model
6060
/// </para>
6161
/// </li> </ul>
6262
/// <para>
63+
/// The following additional fields are available for event data stores:
64+
/// </para>
65+
/// <ul> <li>
66+
/// <para>
67+
/// <c>eventName</c>
68+
/// </para>
69+
/// </li> <li>
70+
/// <para>
71+
/// <c>eventType</c>
72+
/// </para>
73+
/// </li> <li>
74+
/// <para>
75+
/// <c>sessionCredentialFromConsole</c>
76+
/// </para>
77+
/// </li> <li>
78+
/// <para>
79+
/// <c>userIdentity.arn</c>
80+
/// </para>
81+
/// </li> </ul>
82+
/// <para>
6383
/// <b>Supported CloudTrail event record fields for data events</b>
6484
/// </para>
6585
/// <ul> <li>
@@ -84,6 +104,26 @@ namespace Amazon.CloudTrail.Model
84104
/// </para>
85105
/// </li> </ul>
86106
/// <para>
107+
/// The following additional fields are available for event data stores:
108+
/// </para>
109+
/// <ul> <li>
110+
/// <para>
111+
/// <c>eventSource</c>
112+
/// </para>
113+
/// </li> <li>
114+
/// <para>
115+
/// <c>eventType</c>
116+
/// </para>
117+
/// </li> <li>
118+
/// <para>
119+
/// <c>sessionCredentialFromConsole</c>
120+
/// </para>
121+
/// </li> <li>
122+
/// <para>
123+
/// <c>userIdentity.arn</c>
124+
/// </para>
125+
/// </li> </ul>
126+
/// <para>
87127
/// <b>Supported CloudTrail event record fields for network activity events</b>
88128
/// </para>
89129
/// <note>

0 commit comments

Comments
 (0)