Updated on 2023-10-19 GMT+08:00

Command Parsing

You can run deploy -h or deploy --help to view the documentation.

This command includes two subcommands:

Parameter Parsing

Table 1 Parameter description

Parameter Name

Abbreviation

Required in YAML

Description

type

-

No

Deployment type, which can be code or config.

Examples

If the resource description file (YAML) is available, you can directly run the s deploy command to deploy resources. The following is an example of the resource description file (YAML):
fgs-deploy-test: 
    region:   cn-north-4
    function: 
        functionName: fgs-deploy-test
        handler: index.handler
        memorySize: 128
        timeout: 30
        runtime: Node.js14.18
        package: default
        codeType: zip
        code:
        codeUri: ./code
    trigger:
        triggerTypeCode: APIG
        status: ACTIVE
        eventData:
            name: APIG_test
            groupName: APIGroup_xxx
            auth: IAM
            protocol: HTTPS
            timeout: 5000

Precautions

You may have some special requirements during resource deployment. See the following description:

  • To only deploy or update the code, add the --type code parameter.
  • To only deploy or update the configuration, add the --type config parameter.