getNamedQuery method
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
May throw InternalServerException. May throw InvalidRequestException.
Parameter namedQueryId
:
The unique ID of the query. Use ListNamedQueries to get query IDs.
Implementation
Future<GetNamedQueryOutput> getNamedQuery({
required String namedQueryId,
}) async {
ArgumentError.checkNotNull(namedQueryId, 'namedQueryId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.GetNamedQuery'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'NamedQueryId': namedQueryId,
},
);
return GetNamedQueryOutput.fromJson(jsonResponse.body);
}