getFunctionDefinitionVersion method

Future<GetFunctionDefinitionVersionResponse> getFunctionDefinitionVersion({
  1. required String functionDefinitionId,
  2. required String functionDefinitionVersionId,
  3. String? nextToken,
})

Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.

May throw BadRequestException.

Parameter functionDefinitionId : The ID of the Lambda function definition.

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