This topic describes how to use the YAML mode of the FC component to manage resources.

Prerequisites

Supported commands

FC allows you to deploy resources to Function Compute. You can run the s deploy command in an on-premises directory to deploy resources defined in the s.yml file to Function Compute.

  • s deploy all: Deploy all resources.

    Command syntax:

    s deploy all --type <code> --use-local -y

    Parameters:

    • --type: specifies whether to deploy the configuration or function code. For example, if you change the timeout period of the initializer function and do not modify the function code, you can use this parameter to deploy only the configuration. If you modify both the configuration and function code, you do not need to specify this parameter. By default, the configuration and function code are deployed.
    • --use-local: uses the on-premises configuration to deploy the resources.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to deploy all resources:

    s deploy all -y 

  • s deploy service: Deploy a service.

    Command syntax:

    s deploy service --use-local -y

    Parameters:

    • --use-local: uses the on-premises configuration to deploy the service.
    • -y--assume-yes or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to deploy a service:

    s deploy service -y

  • s deploy function: Deploy a function.

    Command syntax:

    s deploy function --type <code> --use-local -y

    Parameters:

    • --type: specifies whether to deploy the configuration or function code. For example, if you change the timeout period of the initializer function and do not modify the function code, you can use this parameter to deploy only the configuration. If you modify both the configuration and function code, you do not need to specify this parameter. By default, the configuration and function code are deployed.
    • --use-local: uses the on-premises configuration to deploy the function.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to deploy a function:

    s deploy function --use-local
  • s deploy trigger: Deploy a trigger.

    Command syntax:

    s deploy trigger --trigger-name <triggerName> --use-local -y

    Parameters:

    • --trigger-name: the name of the trigger to be deployed.
    • --use-local: uses the on-premises configuration to deploy the trigger.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to deploy a trigger:

    s deploy trigger --trigger-name mytrigger
  • s deploy domain: Deploy a custom domain.

    Command syntax:

    s deploy domain --use-local -y

    Parameters:

    • --use-local: uses the on-premises configuration to deploy the custom domain.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to deploy a custom domain:

    s deploy domain --use-local
 
Note: If your s.yml file contains multiple functions, such as fc-a and fc-b, and you need to deploy only one function, such as fc-a, you can run the following command in the project directory to deploy the fc-a function:
s fc-a deploy
   

Deployment may fail when you deploy some projects by running the s deploy command of the FC component because Function Compute is not integrated with all dependencies. Therefore, you must install third-party dependencies by using the FC component before you deploy a project. FC supports the following manifest files of some package managers for different programming languages:

  • pom.xml files of Apache Maven for Java
  • package.json files of npm for Node.js
  • requirements.txt files of pip for Python
  • dockerfile files of a container package manager

Command syntax:

s build --dockerfile <dockerfile path> -d

Parameters:

  • -f or --dockerfile string: the path of the dockerfile file.
  • -d or --use-docker string: specifies to use Docker to create functions.

Example: Run the following command in the project directory to install dependencies:

s build -f ./ -d 

When you use Serverless Devs to manage Function Compute, specific new resources may be generated in Function Compute. For example, if you set the Virtual Private Cloud (VPC) setting to Auto when you deploy a resource to Function Compute, the resource can be properly deployed. However, you cannot check the status of the resource after it is brought online.

Command syntax:

s info --region <regionid> --service-name <serviceName> --function-name <functionName> --trigger-name <triggerName>

Parameters:

  • --function-name string: the name of the function that you want to query.
  • --trigger-name string: the name of the trigger that you want to query.
  • --region string: the ID of the region where the resource that you want to query resides.
  • --service-name string: the name of the service that you want to query.

Example: Run the following command in the project directory to query the details of a resource:

s info --region cn-hangzhou --service-name serviceName

Note: If the s.yml file contains multiple projects, and you need to query the details of only one of the projects, you can run the following command in the project directory to query the details of the project:
s <projectName> info // Replace <projectName> with the name of the project. 

FC allows you to invoke and debug a resource deployed in Function Compute on your on-premises machine. You can run the s local command to invoke and debug a function on your on-premises machine. s local contains two subcommands: s local start and s local invoke.

  • s local start: Debug an HTTP function.

    Command syntax:

    s local start -c <vscode> -d --debug-args <debugArgs> --debugger-path <debuggerPath> --tmp-dir <tmpDir>

    Parameters:

    • -c or --config string: the integrated development environment (IDE) to be used during debugging, such as Visual Studio Code (VS Code) or PyCharm. Relevant debugging configuration information is returned for the IDE.
    • -d or --debug-port string: the port of the container to be started in debugging mode. The port is open in an on-premises environment.
    • --debug-args: the additional parameters to be passed to the debugger.
    • --debugger-path: the path of the debugger.
    • --tmp-dir: specifies to mount the temporary directory to the /tmp path. The default path is ./.s/tmp/invoke/serviceName/functionName/.

    Example: Run the following command in the project directory to debug an HTTP function:

    s local start -c Vscode
    Note: If the s.yml file contains multiple projects, you can run the following command to debug one of the projects:
    s <projectName> local start // Replace <projectName> with the name of the project.

  • s local invoke: Debug an event function.

    Command syntax:

    s local invoke -e <event> -f <filepath> -s -m <mode> --c <vscode> -d <port> --debug-args <debugArgs> --debugger-path <debuggerPath> --tmp-dir <tmpDir>

    Parameters:

    • -e or --event: the event data, which is a string, or the path of the file that contains the event data to be passed to the function during the invocation.
    • -f or --event-file: the path of the file that contains the event data to be passed to the function during the invocation.
    • -s or --event-stdin: specifies whether to read data from the standard input (stdin) or a pipeline.
    • -m or --mode: the invocation mode. Examples: api, server, and normal.
    • -c or --config: the IDE to be used during debugging, such as VS Code or PyCharm. Relevant debugging configuration information is returned for the IDE.
    • --debug-args string: the additional parameters to be passed to the debugger.
    • -d or --debug-port string: the port of the container to be started in debugging mode. The port is open in an on-premises environment.
    • --tmp-dir string: specifies to mount the temporary directory to the /tmp path. The default path is ./.s/tmp/invoke/serviceName/functionName/.
    • --debugger-path string: the path of the debugger.

    Example: Run the following command in the project directory to debug an event function:

    s local invoke -c vscode -m api
    Note: If the s.yml file contains multiple projects, you can run the following command to debug one of the projects:
    s <projectName> local start // Replace <projectName> with the name of the project.

FC allows you to run the s invoke command to invoke a function.

Command syntax:

s invoke --event <payload>  --event-file <file-path> --region <regionid> --service-name <serviceName> --function-name <functionName>  --event-stdin --invocation-type <async>

Parameters:

  • --event string: the event data to be passed to the function during the invocation.
  • --event-file string: the path of the file to be used. If the function to be invoked is an event function, the file is the one that contains the event data. If the function to be invoked is an HTTP function, the file is the one that contains the HTTP request settings.
  • --event-stdin string: specifies whether to read data from the stdin or a pipeline.
  • --function-name string: the name of the function to be invoked.
  • --invocation-type string: the type of the invocation. Valid values: sync and async. Default value: sync.
  • --region string: the ID of the region where the function resides.
  • --service-name string: the name of the service that contains the function.

Example: Run the following command in the project directory to invoke an online function:

s invoke --region cn-hangzhou --function-name test --invocation-type async

FC allows you to delete resources from Function Compute. You can run the s remove command to delete resources.

  • s remove service: Delete a service.

    Command syntax:

    s remove service --region <regionid>  --service-name <serviceName> --use-local -y

    Parameters:

    • --region string: the ID of the region where the service that you want to delete resides.
    • --service-name string: the name of the service that you want to delete.
    • --use-local: specifies to delete only configuration resources related to services, functions, and triggers.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete all services:

    s remove service -y

  • s remove function: Delete a function.

    Command syntax:

    s remove function --region <regionid>  --service-name <serviceName> --function-name <functionName> --use-local -y

    Parameters:

    • --region string: the ID of the region where the function that you want to delete resides.
    • --service-name string: the name of the service that contains the function.
    • --function-name string: the name of the function that you want to delete.
    • --use-local: specifies to delete only configuration resources related to functions and triggers.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete a function:

    s remove function --function-name functionName
  • s remove trigger: Delete a trigger.

    Command syntax:

    s remove function --region <regionid>  --service-name <serviceName> --function-name <functionName> --trigger-name <triggerName>

    Parameters:

    • --region string: the ID of the region where the trigger that you want to delete resides.
    • --service-name string: the name of the service that contains the function for which the trigger that you want to delete is created.
    • --function-name string: the name of the function for which the trigger that you want to delete is created.
    • --trigger-name string: the name of the trigger that you want to delete.

    Example: Run the following command in the project directory to delete a trigger:

    s remove trigger --service-name functionName --function-name functionName --trigger-name triggerName

  • s remove domain: Delete a custom domain name.

    Example: Run the following command in the project directory to delete a custom domain name:

    s remove domain

  • s remove version: Delete a service version.

    Command syntax:

    s remove version --region <regionid>  --service-name <serviceName> --version <version> -y

    Parameters:

    • --region string: the ID of the region where the service version that you want to delete resides.
    • --service-name string: the name of the service whose version you want to delete.
    • --version string: the version number of the service version that you want to delete.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete a service version:

    s remove version --region cn-hangzhou --service-name serviceName --version 3
  • s remove alias: Delete a service alias.

    Command syntax:

    s remove alias --region <regionid>  --service-name <serviceName> --alias-name <aliasName> -y

    Parameters:

    • --region string: the ID of the region where the service alias that you want to delete resides.
    • --service-name string: the name of the service whose alias you want to delete.
    • --alias-name string: the alias that you want to delete.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete a service alias:

    s remove alias-name aliasName
  • s remove provision: Delete a provisioned instance.

    Command syntax:

    s remove provision --region <regionid>  --service-name <serviceName> --function-name <functionName> -y

    Parameters:

    • --region string: the ID of the region where the provisioned instance that you want to delete resides.
    • --service-name string: the name of the service for which you want to delete the provisioned instance.
    • --qualifier string: the version or alias of the service.
    • --function-name string: the name of the function for which you want to delete the provisioned instance.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete a provisioned instance:

    s remove provision --service-name serviceName --qualifier test
  • s remove onDemand: Delete an on-demand instance.

    Command syntax:

    s remove onDemand --region <regionid>  --service-name <serviceName> --function-name <functionName> -y

    Parameters:

    • --region string: the ID of the region where the on-demand instance that you want to delete resides.
    • --service-name string: the name of the service for which you want to delete the on-demand instance.
    • --qualifier string: the version or alias of the service.
    • --function-name string: the name of the function for which you want to delete the on-demand instance.
    • --qualifier string: the alias or version of the service.
    • -y or --assume-yes: sets the answers to all questions to yes for the command output.

    Example: Run the following command in the project directory to delete an on-demand instance:

    s remove onDemand --assume-yes
  • s remove layer: Delete a layer

    Command syntax:

    s remove layer --region <regionid>  --layer-name <layerName> --version <version> 

    Parameters:

    • --region string: the ID of the region where the layer that you want to delete resides.
    • --layer-name string: the name of the layer that you want to delete.
    • --version string: the version number of the layer that you want to delete.

    Example: Run the following command in the project directory to delete a layer:

    s remove layer --layer-name layerName

When you use FC to perform operations such as resource deployment, you may need to check the online logs. FC allows you to run the s logs command to query the logs of a resource.

Command syntax:

s logs -s <starttime> -e <endtime> --region <regionid>  --request-id <requestID> --service-name <serviceName> --function-name <functionName> --keyword <test> --tail boolean --type <failed>

Parameters:

  • -e or --end-time string: the end of the time range to query.
  • --function-name string: the name of the function whose logs you want to query.
  • --keyword string: the keyword used to filter logs.
  • --region string: the ID of the region where the function resides.
  • --request-id string: the ID of the request the logs for which you want to query.
  • --service-name string: the name of the service that contains the function.
  • -e or --end-time string: the beginning of the time range to query.
  • --tail boolean: specifies whether to continuously return logs.
  • --type string: the type of the logs that you want to query.

Example: Run the following command in the specified directory to query the logs of a resource:

s logs -r requestId
Note: You cannot use a request ID to query the logs of a function in the following cases:
  • A single instance that concurrently processes multiple requests is used for the function.
  • The runtime environment of the function is a custom runtime or a custom container.

You may want to query specific metrics of a deployed function, such as the number of invocations, number of successful executions, and number of failed executions. FC allows you to run the s metrics command to query the metrics of a function.

Command syntax:

s metrics --region <regionid>  --service-name <serviceName> --function-name <functionName>

Parameters:

  • --function-name string: the name of the function whose metrics you want to query.
  • --region string: the ID of the region where the function resides.
  • --service-name string: the name of the service that contains the function.

Example: Run the following command in the project directory to query the metrics of a function:

s metrics --service-name serviceName --function-name functionName

After you run the preceding command, a URL is returned. Open the URL in a browser to view the metrics of the specified function.

FC allows you to run the s nas command to mount Apsara File Storage NAS files. s nas contains three subcommands: s nas download, s nas upload, and s nas command.

  • s nas download: Download existing NAS resources to your on-premises machine.

    Command syntax:

    s nas download --r -n 

    Parameters:

    • -r or --recursive: specifies to overwrite the content of the folder.
    • -n or --no-clobber: specifies not to overwrite existing files.

    Example: Run the following command in the project directory to download the resources in the mnt/auto/folder/ directory in NAS to your on-premises machine:

    s exec -- nas download -r -n nas:///mnt/auto/folder/. ./folder

  • s nas upload: Upload on-premises resources to a specified NAS directory.

    Command syntax:

    s nas upload --r -n 

    Parameters:

    • -r or --recursive: specifies to overwrite the content of the folder.
    • -n or --no-clobber: specifies not to overwrite existing files.

    Example: Run the following command in the project directory to upload on-premises resources to the mnt/auto/folder/ directory in NAS:

    s exec -- nas upload -r -n ./event-code nas:///mnt/auto1/folder

  • s nas command: Run a specific command in the instance to manage NAS files.

    Example: Run the following command in the project directory to query the list of online NAS resources:

    s exec -- nas command ls -a nas:///mnt/auto1/folder

FC allows you to run the s version command to manage service versions. s version contains two subcommands: s version publish and s version list.

  • s version publish: Publish a service version.

    Command syntax:

    s version publish --region <regionid>  --service-name <serviceName> --description <description>

    Parameters:

    • --description string: the description of the version to be published.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service for which you want to publish the version.

    Example: Run the following command in the project directory to publish a service version:

    s version publish --region cn-hangzhou --service-name fc-deploy-service

  • s version list: Query service versions.

    Command syntax:

    s version list --region <regionid>  --service-name <serviceName> --table boolean

    Parameters:

    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service whose versions you want to query.
    • --table boolean: specifies whether to return the versions in the form of a table.

    Example: Run the following command in the project directory to query service versions:

    s version list --region cn-hangzhou --service-name serviceName --table boolean

FC allows you to run the s alias command to manage service aliases. s alias contains three subcommands: s alias publish, s alias get, and s alias list.

  • s alias publish: Set an alias for a service.

    Command syntax:

    s alias publish --alias-name <aliasName> --description <description> --gversion <grayscale version id> --region <regionid>  --service-name <serviceName> --function-name <functionName> --version-id <versionID> --weight <weight parameter >

    Parameters:

    • --alias-name string: the alias to be set.
    • --description string: the description of the alias.
    • --gversion string: the ID of the canary release version.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service for which you want to set the alias.
    • --version-id string: the ID of the version to which the alias points.
    • --weight string: the weight of the canary release version.

    Example: Run the following command in the project directory to set an alias:

    s alias publish --version-id 3  --alias-name aliasName
  • s alias get: Query the details of an alias.

    Command syntax:

    s alias get --alias-name <aliasName> --region <regionid>  --service-name <serviceName> 

    Parameters:

    • --alias-name string: the alias whose details you want to query.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service to which the alias belongs.

    Example: Run the following command in the project directory to query the details of an alias:

    s alias get --region cn-hangzhou --alias-name aliasName
  • s alias list: Query aliases.

    Command syntax:

    s alias list --table boolean --region <regionid>  --service-name <serviceName> 

    Parameters:

    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service whose aliases you want to query.
    • --table boolean: specifies whether to return the aliases in the form of a table.

    Example: Run the following command in the project directory to query aliases:

    s alias list --region cn-hangzhou --service-name serviceName

FC allows you to run the s provision command to manage provisioned instances. s provision contains three subcommands: s provision list, s provision put, and s provision get.

  • s provision put: Configure provisioned instances.

    Command syntax:

    s provision put --config <configuration path> --qualifier <qualifier> --region <regionid>  --target <target parameter> --service-name <serviceName> 

    Parameters:

    • --config string: the path where the configuration is stored.
    • --qualifier string: the version or alias of the service for which you want to configure provisioned instances.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service.
    • --target number: the number of provisioned instances to be configured for the service.

    Example: Run the following command in the project directory to configure provisioned instances:

    s provision put --target 1 --qualifier alias

  • s provision list: Query provisioned instances.

    Command syntax:

    s provision list --table boolean --qualifier <qualifier> --region <regionid>  --service-name <serviceName>

    Parameters:

    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service whose provisioned instances you want to query.
    • --qualifier string: the version or alias of the service.
    • --table boolean: specifies whether to return the provisioned instances in the form of a table.

    Example: Run the following command in the project directory to query provisioned instances:

    s provision list --region cn-hangzhou --service-name serviceName

  • s provision get: Query the configuration of provisioned instances.

    Command syntax:

    s provision get --qualifier <qualifier> --region <regionid>  --function-name <functionName> --service-name <serviceName>

    Parameters:

    • --function-name string: the name of the function that you want to use the provisioned instances to execute.
    • --qualifier string: the version or alias of the service that contains the function.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service.

    Example: Run the following command in the project directory to query the configuration of provisioned instances:

    s provision get --qualifier test

FC allows you to run the s onDemand command to manage on-demand instances. s onDemand contains three subcommands: s onDemand put, s onDemand list, and s onDemand get.

  • s onDemand put: Configure on-demand instances.

    Command syntax:

    s onDemand put --function-name <functionName> --max  <maximumInstanceCount > --qualifier <qualifier> --region <regionid>  --service-name <serviceName>

    Parameters:

    • --function-name string: the name of the function that you want to use the on-demand instances to execute.
    • --max or --maximum-instance-count string: the maximum number of on-demand instances that can be used to execute the function.
    • --qualifier string: the version or alias of the service that contains the function.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service.

    Example: Run the following command in the project directory to configure on-demand instances:

    s onDemand put --qualifier test --max 1
  • s onDemand list: Query on-demand instances.

    Command syntax:

    s onDemand list --table boolean --region <regionid>  --service-name <serviceName>

    Parameters:

    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service.
    • --table boolean: specifies whether to return the on-demand instances in the form of a table.

    Example: Run the following command in the project directory to query on-demand instances:

    s onDemand list --table boolean
  • s onDemand get: Query the configuration of on-demand resources.

    Command syntax:

    s onDemand get --function-name <functionName> --qualifier <qualifier> --region <regionid>  --service-name <serviceName>

    Parameters:

    • --function-name string: the name of the function that you want to use the on-demand instances to execute.
    • --qualifier string: the version or alias of the service that contains the function.
    • --region string: the ID of the region where the service resides.
    • --service-name string: the name of the service.

    Example: Run the following command in the project directory to query the configuration of on-demand instances:

    s onDemand get --qualifier test

Layers allow you to publish and deploy custom resources such as public libraries, runtimes, and function extensions. The public libraries on which a function depends can be abstracted to a layer. This reduces the size of code packages when you deploy or update the function. You can also deploy a custom runtime as a layer to share the runtime among multiple functions.

FC allows you to run the s layer command to manage layers. s layer contains four subcommands: s layer publish, s layer list, s layer versionConfig, and s layer versions.

  • s layer publish: Publish a layer version.

    Command syntax:

    s layer publish --code <codefile> --compatible-runtime <Runtime> --description <description> --region <regionid>  --layer-name <layerName>

    Parameters:

    • --code string: the ZIP file used to configure the layer.
    • --compatible-runtime string: the runtime environment of the layer.
    • --description string: the description of the layer.
    • --layer-name string: the name of the layer.
    • --region string: the ID of the region where the layer resides.

    Example: Run the following command in the project directory to publish a layer:

    s layer publish --layer-name testName --code ./
  • s layer list: Query layers.

    Command syntax:

    s layer list --prefix <prefix> --region <regionid>  --table boolean

    Parameters:

    • --prefix string: the name prefix of the layers that you want to query.
    • --region string: the ID of the region where the layers that you want to query reside.
    • --table boolean: specifies whether to return the layers in the form of a table.

    Example: Run the following command in the project directory to query layers:

    s layer list
  • s layer versionConfig: Query the details of a layer version.

    Command syntax:

    s layer versionConfig --layer-name <layerName> --region <regionid>  --version-id <version>

    Parameters:

    • --layer-name string: the name of the layer.
    • --region string: the ID of the region where the layer resides.
    • --version-id number: the layer version that you want to query.

    Example: Run the following command in the project directory to query the details of a layer version:

    s layer versionConfig --layer-name layerName --version-id 2
  • s layer versions: Query the versions of a layer.

    Command syntax:

    s layer versions --layer-name <layerName> --region <regionid>  --table boolean

    Parameters:

    • --layer-name string: the name of the layer.
    • --region string: the ID of the region where the layer resides.
    • --table boolean: specifies whether to return the layer versions in the form of a table.

    Example: Run the following command in the project directory to query the versions of a layer:

    s layer versions --layer-name layerName --table boolean

FC allows you to run the s proxied command to configure interconnection between on-premises and cloud applications. s proxied contains three subcommands: s proxied setup, s proxied invoke, and s proxied clean.

  • s proxied setup: Prepare auxiliary resources and related environments for interconnection between on-premises and cloud applications.

    Command syntax:

    s proxied setup -c <IDE> --debug-args <debugargs> -d --debugger-path <debuggerPath> --tmp-dir <tmpDir>

    Parameters:

    • -c or --config string: the IDE to be used during debugging, such as VS Code or PyCharm. Relevant debugging configuration information is returned for the IDE.
    • --debug-args string: the additional parameters to be passed to the debugger.
    • -d or --debug-port string: the port of the container to be started in debugging mode. The port is open in an on-premises environment.
    • --debugger-path string: the path of the debugger.
    • --tmp-dir string: specifies to mount the temporary directory to the /tmp path. The default path is ./.s/tmp/invoke/serviceName/functionName/.

    Example: Run the following command in the project directory to prepare auxiliary resources and on-premises environments required for interconnection between on-premises and cloud applications.

    s proxied setup -c vscode
    Note: If the s.yml file contains multiple projects, and you need to debug only one of the projects, run the following command:
    s <projectName> proxied setup // Replace <projectName> with the name of the project.
  • s proxied invoke: Invoke an on-premises function.

    Command syntax:

    s proxied setup -e <event> -f <file>  -s 

    Parameters:

    • -e or --event string: the event data to be passed to the function during the invocation.
    • -f or --event-file: the path of the file that contains the event data to be passed to the function during the invocation.
    • -s or --event-stdin: specifies whether to read data from the stdin or a pipeline.

    Example: For an event function for which no trigger is configured or a function for which an HTTP trigger is configured, after you have prepared the required auxiliary resources and on-premises environments for interconnection between on-premises and cloud applications, you must start a new terminal in the specified directory and run the following command on the terminal to invoke the on-premises function.

    s proxied invoke

  • s proxied clean: Clear the auxiliary resources and related environments for interconnection between on-premises and cloud applications.

    Example: Run the following command in the project directory to clear the auxiliary resources and on-premises environments required for interconnection between on-premises and cloud applications.

    s proxied clean