类 CreateFunctionRequest


  • public class CreateFunctionRequest
    extends GenericFunctionRequest
    Request object for creating a Baidu CFC function
    • 构造器详细资料

      • CreateFunctionRequest

        public CreateFunctionRequest​(String functionName,
                                     String description)
    • 方法详细资料

      • getCode

        public Code getCode()
        Get the function code
        返回:
        The function code
      • setCode

        public void setCode​(Code code)
        Set the function code
        参数:
        code - The function code
      • getEnvironment

        public Environment getEnvironment()
        Get the function environment
        返回:
        The function environment
      • setEnvironment

        public void setEnvironment​(Environment environment)
        Set the function environment
        参数:
        environment - The function environment
      • getHandler

        public String getHandler()
        Get the entry function of CFC call.
        返回:
        The entry function of CFC call
      • setHandler

        public void setHandler​(String handler)
        Set the entry function of CFC call. For node is module-name.export eg. index.handler maximum length limit is 128
        参数:
        handler - The entry function of CFC call. For node is module-name.export eg. index.handler maximum length limit is 128.
      • getMemorySize

        public Integer getMemorySize()
        Get the memory siz.
        返回:
        The memory size
      • setMemorySize

        public void setMemorySize​(Integer memorySize)
        Set the memory size. in megabytes, used by CFC to infer the amount of CPU and memory allocated to user functions. Default 128MB,Must be a multiple of 128MB (now CFC provides 128 to 1024M of memory).
        参数:
        memorySize - The memory size
      • getRuntime

        public String getRuntime()
        Get the runtime for function.
        返回:
        The runtime for function
      • setRuntime

        public void setRuntime​(String runtime)
        Set the runtime for function.
        参数:
        runtime - The runtime for function
      • getTimeout

        public Integer getTimeout()
        Get the timeout for executing a function
        返回:
        The timeout for executing a function
      • setTimeout

        public void setTimeout​(Integer timeout)
        Set the timeout for executing a function. The timeout should be 1-300
        参数:
        timeout - The timeout for executing a function