createLambda method
Future<ClientResponse<LambdaResponse, Errors> >
createLambda(
- String lambdaId,
- LambdaRequest request
Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
@param {String} lambdaId (Optional) The Id for the lambda. If not provided a secure random UUID will be generated. @param {LambdaRequest} request The request object that contains all the information used to create the lambda. @returns {Promise<ClientResponse
Implementation
Future<ClientResponse<LambdaResponse, Errors>> createLambda(
String lambdaId, LambdaRequest request) {
return _start<LambdaResponse, Errors>()
.withUri('/api/lambda')
.withUriSegment(lambdaId)
.withJSONBody(request)
.withMethod('POST')
.withResponseHandler(
defaultResponseHandlerBuilder((d) => LambdaResponse.fromJson(d)))
.go();
}