getDataSourceIntrospection method
Retrieves the record of an existing introspection. If the retrieval is successful, the result of the instrospection will also be returned. If the retrieval fails the operation, an error message will be returned instead.
May throw BadRequestException.
May throw InternalFailureException.
May throw NotFoundException.
Parameter introspectionId :
The introspection ID. Each introspection contains a unique ID that can be
used to reference the instrospection record.
Parameter includeModelsSDL :
A boolean flag that determines whether SDL should be generated for
introspected types. If set to true, each model will contain
an sdl property that contains the SDL for that type. The SDL
only contains the type data and no additional metadata or directives.
Parameter maxResults :
The maximum number of introspected types that will be returned in a single
response.
Parameter nextToken :
Determines the number of types to be returned in a single response before
paginating. This value is typically taken from nextToken
value from the previous response.
Implementation
Future<GetDataSourceIntrospectionResponse> getDataSourceIntrospection({
required String introspectionId,
bool? includeModelsSDL,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
25,
);
final $query = <String, List<String>>{
if (includeModelsSDL != null)
'includeModelsSDL': [includeModelsSDL.toString()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/datasources/introspections/${Uri.encodeComponent(introspectionId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetDataSourceIntrospectionResponse.fromJson(response);
}