类 CreateFunctionRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.cfc.model.GenericFunctionRequest
-
- com.baidubce.services.cfc.model.CreateFunctionRequest
-
public class CreateFunctionRequest extends GenericFunctionRequest
Request object for creating a Baidu CFC function
-
-
构造器概要
构造器 构造器 说明 CreateFunctionRequest(String functionName, String description)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CodegetCode()Get the function codeEnvironmentgetEnvironment()Get the function environmentStringgetHandler()Get the entry function of CFC call.IntegergetMemorySize()Get the memory siz.StringgetRuntime()Get the runtime for function.IntegergetTimeout()Get the timeout for executing a functionvoidsetCode(Code code)Set the function codevoidsetEnvironment(Environment environment)Set the function environmentvoidsetHandler(String handler)Set the entry function of CFC call.voidsetMemorySize(Integer memorySize)Set the memory size.voidsetRuntime(String runtime)Set the runtime for function.voidsetTimeout(Integer timeout)Set the timeout for executing a function.StringtoString()(non-Javadoc)CreateFunctionRequestwithCode(Code code)CreateFunctionRequestwithDescription(String description)CreateFunctionRequestwithEnvironment(Environment environment)CreateFunctionRequestwithFunctionName(String functionName)CreateFunctionRequestwithHandler(String handler)CreateFunctionRequestwithMemorySize(Integer memorySize)CreateFunctionRequestwithRequestCredentials(BceCredentials credentials)CreateFunctionRequestwithRuntime(String runtime)CreateFunctionRequestwithTimeout(Integer timeout)-
从类继承的方法 com.baidubce.services.cfc.model.GenericFunctionRequest
getDescription, getFunctionName, setDescription, setFunctionName
-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
方法详细资料
-
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
-
withFunctionName
public CreateFunctionRequest withFunctionName(String functionName)
- 指定者:
withFunctionName在类中GenericFunctionRequest
-
withDescription
public CreateFunctionRequest withDescription(String description)
- 指定者:
withDescription在类中GenericFunctionRequest
-
withCode
public CreateFunctionRequest withCode(Code code)
-
withEnvironment
public CreateFunctionRequest withEnvironment(Environment environment)
-
withHandler
public CreateFunctionRequest withHandler(String handler)
-
withMemorySize
public CreateFunctionRequest withMemorySize(Integer memorySize)
-
withRuntime
public CreateFunctionRequest withRuntime(String runtime)
-
withTimeout
public CreateFunctionRequest withTimeout(Integer timeout)
-
withRequestCredentials
public CreateFunctionRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
toString
public String toString()
(non-Javadoc)- 覆盖:
toString在类中Object- 另请参阅:
Object.toString()
-
-