updateNode method
Future<void>
updateNode({
- required String networkId,
- required String nodeId,
- NodeLogPublishingConfiguration? logPublishingConfiguration,
- String? memberId,
Updates a node configuration with new parameters.
Applies only to Hyperledger Fabric.
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 logPublishingConfiguration
:
Configuration properties for publishing to Amazon CloudWatch Logs.
Parameter memberId
:
The unique identifier of the member that owns the node.
Applies only to Hyperledger Fabric.
Implementation
Future<void> updateNode({
required String networkId,
required String nodeId,
NodeLogPublishingConfiguration? logPublishingConfiguration,
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 $payload = <String, dynamic>{
if (logPublishingConfiguration != null)
'LogPublishingConfiguration': logPublishingConfiguration,
if (memberId != null) 'MemberId': memberId,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/networks/${Uri.encodeComponent(networkId)}/nodes/${Uri.encodeComponent(nodeId)}',
exceptionFnMap: _exceptionFns,
);
}