describe_query
async
¶
describe_query(
*,
config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
event_data_store: Optional[EventDataStoreArn] = None,
query_id: Optional[UUID] = None,
query_alias: Optional[QueryAlias] = None,
refresh_id: Optional[RefreshId] = None,
event_data_store_owner_account_id: Optional[AccountId] = None,
) -> DescribeQueryResponse
CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query status. If the query results were delivered to an S3 bucket, the response also provides the S3 URI and the delivery status.
You must specify either QueryId or QueryAlias. Specifying the QueryAlias parameter returns information about the last query run for the alias. You can provide RefreshId along with QueryAlias to view the query results of a dashboard query for the specified RefreshId.
Parameters:
-
event_data_store(Optional[EventDataStoreArn], default:None) –The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.
-
query_id(Optional[UUID], default:None) –The query ID.
-
query_alias(Optional[QueryAlias], default:None) –The alias that identifies a query template.
-
refresh_id(Optional[RefreshId], default:None) –The ID of the dashboard refresh.
-
event_data_store_owner_account_id(Optional[AccountId], default:None) –The account ID of the event data store owner.
Raises:
-
EventDataStoreARNInvalidException–The specified event data store ARN is not valid or does not map to an event data store in your account.
-
EventDataStoreNotFoundException–The specified event data store was not found.
-
InactiveEventDataStoreException–The event data store is inactive.
-
InvalidParameterException–The request includes a parameter that is not valid.
-
NoManagementAccountSLRExistsException–This exception is thrown when the management account does not have a service-linked role.
-
OperationNotPermittedException–This exception is thrown when the requested operation is not permitted.
-
QueryIdNotFoundException–The query ID does not exist or does not map to a query.
-
UnsupportedOperationException–This exception is thrown when the requested operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | |