getDeviceDefinitionVersion method
Retrieves information about a device definition version.
May throw BadRequestException.
Parameter deviceDefinitionId
:
The ID of the device definition.
Parameter deviceDefinitionVersionId
:
The ID of the device definition version. This value maps to the
''Version'' property of the corresponding ''VersionInformation'' object,
which is returned by ''ListDeviceDefinitionVersions'' requests. If the
version is the last one that was associated with a device definition, the
value also maps to the ''LatestVersion'' property of the corresponding
''DefinitionInformation'' object.
Parameter nextToken
:
The token for the next set of results, or ''null'' if there are no
additional results.
Implementation
Future<GetDeviceDefinitionVersionResponse> getDeviceDefinitionVersion({
required String deviceDefinitionId,
required String deviceDefinitionVersionId,
String? nextToken,
}) async {
ArgumentError.checkNotNull(deviceDefinitionId, 'deviceDefinitionId');
ArgumentError.checkNotNull(
deviceDefinitionVersionId, 'deviceDefinitionVersionId');
final $query = <String, List<String>>{
if (nextToken != null) 'NextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/greengrass/definition/devices/${Uri.encodeComponent(deviceDefinitionId)}/versions/${Uri.encodeComponent(deviceDefinitionVersionId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetDeviceDefinitionVersionResponse.fromJson(response);
}