updateNetwork method
Updates the properties of an existing Wickr network, such as its name or encryption key configuration.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter networkId :
The ID of the Wickr network to update.
Parameter networkName :
The new name for the network. Must be between 1 and 20 characters.
Parameter clientToken :
A unique identifier for this request to ensure idempotency.
Parameter encryptionKeyArn :
The ARN of the Amazon Web Services KMS customer managed key to use for
encrypting sensitive data in the network.
Implementation
Future<UpdateNetworkResponse> updateNetwork({
required String networkId,
required String networkName,
String? clientToken,
String? encryptionKeyArn,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'networkName': networkName,
if (encryptionKeyArn != null) 'encryptionKeyArn': encryptionKeyArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/networks/${Uri.encodeComponent(networkId)}',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return UpdateNetworkResponse.fromJson(response);
}