updateConnectionFunction method
Updates a connection function.
May throw AccessDenied.
May throw EntityNotFound.
May throw EntitySizeLimitExceeded.
May throw InvalidArgument.
May throw InvalidIfMatchVersion.
May throw PreconditionFailed.
May throw UnsupportedOperation.
Parameter connectionFunctionCode :
The connection function code.
Parameter id :
The connection function ID.
Parameter ifMatch :
The current version (ETag value) of the connection function
you are updating.
Implementation
Future<UpdateConnectionFunctionResult> updateConnectionFunction({
required Uint8List connectionFunctionCode,
required FunctionConfig connectionFunctionConfig,
required String id,
required String ifMatch,
}) async {
final headers = <String, String>{
'If-Match': ifMatch.toString(),
};
final $result = await _protocol.sendRaw(
method: 'PUT',
requestUri: '/2020-05-31/connection-function/${Uri.encodeComponent(id)}',
headers: headers,
payload: UpdateConnectionFunctionRequest(
connectionFunctionCode: connectionFunctionCode,
connectionFunctionConfig: connectionFunctionConfig,
id: id,
ifMatch: ifMatch)
.toXml('UpdateConnectionFunctionRequest'),
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return UpdateConnectionFunctionResult(
connectionFunctionSummary: ConnectionFunctionSummary.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
);
}