fcli is a powerful command line tool that helps you manage your Function Compute resources conveniently.
You can click here to download fcli. After the installation, you can run
fcli shell to go to the shell mode and complete the initial configurations.
Please input the endpoint (example: https://your_account_id.cn-shanghai.fc.aliyuncs.com):
Please input the access key id:
Please input the access key secret:
Store the configuration in: /Users/testuser/.fcli
Welcome to the function compute world. Have fun!
The account ID can be obtained in the console.
If you do not have a valid AccessKey, you can create one in RAM. You can use the AccessKey of the primary account, but this action is not recommended.
You can run the
help command to view available commands.
attach attach the policy to a role
cd change the current resource
clear clear the screen
config config the fcli
detach detach the policy from a role
exit exit the program
grant grant the permission
help display help
info display the resource detail info
invk invoke the function
logs display the service/function logs
ls list the child resources of the current resource
mkf create the function
mkir create the invocation role
mkl create the log project and store
mkrp create the ram policy
mks create the service
mksr create the service role
mkt create the trigger
pwd display the current resource
rm delete the resource
sbox a sandbox environment for installing the 3rd party libararies and trouble shooting
upf update the function
ups update the service
upt update the trigger
For every command, you can run
cmd --help to view detailed help information. For example, you can run
mks --help which will print out the detailed help info.
>>> mks --help
-d, --description string service description
--etag string service etag for update
-p, --log-project string loghub project for logging
-l, --log-store string loghub logstore for logging
-g, --nas-groupid int32 group id to access NAS volume (default -1)
--nas-mount-dir stringArray at least one nas dir is required to enable the NAS access
--nas-server-addr stringArray at least one nas server is required to enable the NAS access
-u, --nas-userid int32 user id to access NAS volume (default -1)
-r, --role string role arn for oss code copy, function execution and logging
--security-group-id string security group id is required to enable the vpc access
--v-switch-ids stringArray at least one vswitch id is required to enable the vpc access
--vpc-id string vpc id is required to enable the vpc access
In the Service Management, Function Management, and Trigger Management documents under the Developer guide, you can learn about more detailed descriptions and examples. If you have any questions, go to the project for a discussion.