tencent cloud


Template file

Last updated: 2022-03-15 16:12:40
This document is currently invalid. Please refer to the documentation page of the product.

    The template file is used to define the configuration file used by the function, which is usually placed under the function project Directory. Template files can be managed through code management tools together with function codes and test event files. Currently, template files support YAML Format. Standard use of template files Tencent Cloud serverless application model (Tencent Cloud Serverless Application Model,TCSAM) .

    Example of file content

    The template file is used to describe the configuration information such as the function and Associate's trigger. This document takes a simple template file as an example, which is as follows:

        Type: TencentCloud::Serverless::Namespace
          Type: TencentCloud::Serverless::Function
            CodeUri: ./hello_world
            Description: This is a template function
                ENV_FIRST: env1
                ENV_SECOND: env2
            Handler: index.main_handler
            MemorySize: 128
            Runtime: Python3.6
            Timeout: 3
        Timeout: 10

    The example specifies the function name hello_world and related attributes such as Entry function main.main_handler, runtime Python 3.6, code file location, environment variable, memory size, timeout, and so on.

    File structure

    The YAML format uses a hierarchical structure to define nested content.
    For details, values, and other information at each level, see TCSAM The definition of.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support