createMember method
Creates a member within a Managed Blockchain network.
Applies only to Hyperledger Fabric.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw InvalidRequestException.
May throw ResourceAlreadyExistsException.
May throw ResourceLimitExceededException.
May throw ResourceNotFoundException.
May throw ResourceNotReadyException.
May throw ThrottlingException.
May throw TooManyTagsException.
Parameter invitationId :
The unique identifier of the invitation that is sent to the member to join
the network.
Parameter memberConfiguration :
Member configuration parameters.
Parameter networkId :
The unique identifier of the network in which the member is created.
Parameter clientRequestToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the operation. An idempotent operation completes no more
than one time. This identifier is required only if you make a service
request directly using an HTTP client. It is generated automatically if
you use an Amazon Web Services SDK or the CLI.
Implementation
Future<CreateMemberOutput> createMember({
required String invitationId,
required MemberConfiguration memberConfiguration,
required String networkId,
String? clientRequestToken,
}) async {
final $payload = <String, dynamic>{
'InvitationId': invitationId,
'MemberConfiguration': memberConfiguration,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/networks/${Uri.encodeComponent(networkId)}/members',
exceptionFnMap: _exceptionFns,
);
return CreateMemberOutput.fromJson(response);
}