getConnectorDefinitionVersion method

Future<GetConnectorDefinitionVersionResponse> getConnectorDefinitionVersion({
  1. required String connectorDefinitionId,
  2. required String connectorDefinitionVersionId,
  3. String? nextToken,
})

Retrieves information about a connector definition version, including the connectors that the version contains. Connectors are prebuilt modules that interact with local infrastructure, device protocols, AWS, and other cloud services.

May throw BadRequestException.

Parameter connectorDefinitionId : The ID of the connector definition.

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