MCPcopy
hub / github.com/aws-amplify/amplify-cli / add

Function add

packages/amplify-category-function/src/index.ts:46–59  ·  view source on GitHub ↗
(context, providerName, service, parameters)

Source from the content-addressed store, hash-verified

44 * Entry point for adding function resource
45 */
46export const add = async (context, providerName, service, parameters): Promise<string> => {
47 const options = {
48 service,
49 providerPlugin: providerName,
50 build: true,
51 };
52 // eslint-disable-next-line
53 const providerController = require(`./provider-utils/${providerName}/index`);
54 if (!providerController) {
55 context.print.error('Provider not configured for this category');
56 return undefined;
57 }
58 return providerController.addResource(context, categoryName, service, options, parameters);
59};
60
61/**
62 * Entry point for updating function resource

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
requireFunction · 0.50
addResourceMethod · 0.45

Tested by

no test coverage detected