getNode method
Returns detailed information about a node.
Applies to Hyperledger Fabric and Ethereum.
May throw InvalidRequestException. May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw InternalServiceErrorException.
Parameter networkId
:
The unique identifier of the network that the node is on.
Parameter nodeId
:
The unique identifier of the node.
Parameter memberId
:
The unique identifier of the member that owns the node.
Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.
Implementation
Future<GetNodeOutput> getNode({
required String networkId,
required String nodeId,
String? memberId,
}) async {
ArgumentError.checkNotNull(networkId, 'networkId');
_s.validateStringLength(
'networkId',
networkId,
1,
32,
isRequired: true,
);
ArgumentError.checkNotNull(nodeId, 'nodeId');
_s.validateStringLength(
'nodeId',
nodeId,
1,
32,
isRequired: true,
);
_s.validateStringLength(
'memberId',
memberId,
1,
32,
);
final $query = <String, List<String>>{
if (memberId != null) 'memberId': [memberId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/networks/${Uri.encodeComponent(networkId)}/nodes/${Uri.encodeComponent(nodeId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetNodeOutput.fromJson(response);
}