Read this on the main serverless docs site¶
Tencent-SCF - Invoke¶
Invokes a deployed function. You can send event data, read logs and display other important information of the function invocation.
Options¶
--functionor-fThe name of the function in your service that you want to invoke. Required.--stageor-sThe stage in your service you want to invoke your function in.--regionor-rThe region in your stage that you want to invoke your function in.--dataor-dString data to be passed as an event to your function.--pathor-pThe path to a json file with input data to be passed to the invoked function. This path is relative to the root directory of the service.
Examples¶
This example will invoke your deployed function named functionName in region ap-guangzhou in stage dev. This will output the result of the invocation in your terminal.
Function invocation with data¶
Function invocation with data passing¶
This example will pass the json data in the lib/event.json file (relative to the root of the service) while invoking the specified/deployed function.
Example of event.json