getSubscriptionDefinitionVersion method
Retrieves information about a subscription definition version.
May throw BadRequestException.
Parameter subscriptionDefinitionId
:
The ID of the subscription definition.
Parameter subscriptionDefinitionVersionId
:
The ID of the subscription definition version. This value maps to the
''Version'' property of the corresponding ''VersionInformation'' object,
which is returned by ''ListSubscriptionDefinitionVersions'' requests. If
the version is the last one that was associated with a subscription
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<GetSubscriptionDefinitionVersionResponse>
getSubscriptionDefinitionVersion({
required String subscriptionDefinitionId,
required String subscriptionDefinitionVersionId,
String? nextToken,
}) async {
ArgumentError.checkNotNull(
subscriptionDefinitionId, 'subscriptionDefinitionId');
ArgumentError.checkNotNull(
subscriptionDefinitionVersionId, 'subscriptionDefinitionVersionId');
final $query = <String, List<String>>{
if (nextToken != null) 'NextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/greengrass/definition/subscriptions/${Uri.encodeComponent(subscriptionDefinitionId)}/versions/${Uri.encodeComponent(subscriptionDefinitionVersionId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetSubscriptionDefinitionVersionResponse.fromJson(response);
}