Class CreateFunctionRequestBody
- java.lang.Object
-
- com.huaweicloud.sdk.functiongraph.v2.model.CreateFunctionRequestBody
-
public class CreateFunctionRequestBody extends Object
函数属性结构体。
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateFunctionRequestBody.CodeTypeEnum函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。static classCreateFunctionRequestBody.RuntimeEnumFunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。static classCreateFunctionRequestBody.TypeEnum函数版本;部分局点只支持v1函数,缺省值则为v1
-
Constructor Summary
Constructors Constructor Description CreateFunctionRequestBody()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateFunctionRequestBodyaddDependVersionListItem(String dependVersionListItem)booleanequals(Object o)StringgetAppXrole()函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。StringgetCodeFilename()函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。CreateFunctionRequestBody.CodeTypeEnumgetCodeType()函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。StringgetCodeUrl()当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。List<String>getDependVersionList()依赖版本id列表StringgetDescription()函数描述。StringgetEnterpriseProjectId()企业项目ID,在企业用户创建函数时必填。FuncCodegetFuncCode()Get funcCodeStringgetFuncName()函数名称。FuncVpcgetFuncVpc()Get funcVpcStringgetHandler()函数执行入口 规则:xx.xx,必须包含“.StringgetInitializerHandler()函数初始化入口,规则:xx.xx,必须包含“.IntegergetInitializerTimeout()初始化超时时间,超时函数将被强行停止,范围1~300秒。IntegergetMemorySize()函数消耗的内存。 单位M。 取值范围为:128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128,最大值为4096。StringgetPackage()函数所属的分组Package,用于用户针对函数的自定义分组。CreateFunctionRequestBody.RuntimeEnumgetRuntime()FunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。IntegergetTimeout()函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置CreateFunctionRequestBody.TypeEnumgetType()函数版本;部分局点只支持v1函数,缺省值则为v1StringgetUserData()用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。StringgetXrole()函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。inthashCode()voidsetAppXrole(String appXrole)voidsetCodeFilename(String codeFilename)voidsetCodeType(CreateFunctionRequestBody.CodeTypeEnum codeType)voidsetCodeUrl(String codeUrl)voidsetDependVersionList(List<String> dependVersionList)voidsetDescription(String description)voidsetEnterpriseProjectId(String enterpriseProjectId)voidsetFuncCode(FuncCode funcCode)voidsetFuncName(String funcName)voidsetFuncVpc(FuncVpc funcVpc)voidsetHandler(String handler)voidsetInitializerHandler(String initializerHandler)voidsetInitializerTimeout(Integer initializerTimeout)voidsetMemorySize(Integer memorySize)voidsetPackage(String _package)voidsetRuntime(CreateFunctionRequestBody.RuntimeEnum runtime)voidsetTimeout(Integer timeout)voidsetType(CreateFunctionRequestBody.TypeEnum type)voidsetUserData(String userData)voidsetXrole(String xrole)StringtoString()CreateFunctionRequestBodywithAppXrole(String appXrole)CreateFunctionRequestBodywithCodeFilename(String codeFilename)CreateFunctionRequestBodywithCodeType(CreateFunctionRequestBody.CodeTypeEnum codeType)CreateFunctionRequestBodywithCodeUrl(String codeUrl)CreateFunctionRequestBodywithDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)CreateFunctionRequestBodywithDependVersionList(List<String> dependVersionList)CreateFunctionRequestBodywithDescription(String description)CreateFunctionRequestBodywithEnterpriseProjectId(String enterpriseProjectId)CreateFunctionRequestBodywithFuncCode(FuncCode funcCode)CreateFunctionRequestBodywithFuncCode(java.util.function.Consumer<FuncCode> funcCodeSetter)CreateFunctionRequestBodywithFuncName(String funcName)CreateFunctionRequestBodywithFuncVpc(FuncVpc funcVpc)CreateFunctionRequestBodywithFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)CreateFunctionRequestBodywithHandler(String handler)CreateFunctionRequestBodywithInitializerHandler(String initializerHandler)CreateFunctionRequestBodywithInitializerTimeout(Integer initializerTimeout)CreateFunctionRequestBodywithMemorySize(Integer memorySize)CreateFunctionRequestBodywithPackage(String _package)CreateFunctionRequestBodywithRuntime(CreateFunctionRequestBody.RuntimeEnum runtime)CreateFunctionRequestBodywithTimeout(Integer timeout)CreateFunctionRequestBodywithType(CreateFunctionRequestBody.TypeEnum type)CreateFunctionRequestBodywithUserData(String userData)CreateFunctionRequestBodywithXrole(String xrole)
-
-
-
Method Detail
-
withFuncName
public CreateFunctionRequestBody withFuncName(String funcName)
-
getFuncName
public String getFuncName()
函数名称。- Returns:
- funcName
-
setFuncName
public void setFuncName(String funcName)
-
withPackage
public CreateFunctionRequestBody withPackage(String _package)
-
getPackage
public String getPackage()
函数所属的分组Package,用于用户针对函数的自定义分组。- Returns:
- _package
-
setPackage
public void setPackage(String _package)
-
withRuntime
public CreateFunctionRequestBody withRuntime(CreateFunctionRequestBody.RuntimeEnum runtime)
-
getRuntime
public CreateFunctionRequestBody.RuntimeEnum getRuntime()
FunctionGraph函数的执行环境 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Python3.9: Python语言3.9版本。 Go1.8: Go语言1.8版本。 Go1.x: Go语言1.x版本。 Java8: Java语言8版本。 Java11: Java语言11版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 Node.js10.16: Nodejs语言10.16版本。 Node.js12.13: Nodejs语言12.13版本。 Node.js14.18: Nodejs语言14.18版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 http: HTTP函数。- Returns:
- runtime
-
setRuntime
public void setRuntime(CreateFunctionRequestBody.RuntimeEnum runtime)
-
withTimeout
public CreateFunctionRequestBody withTimeout(Integer timeout)
-
getTimeout
public Integer getTimeout()
函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置- Returns:
- timeout
-
setTimeout
public void setTimeout(Integer timeout)
-
withHandler
public CreateFunctionRequestBody withHandler(String handler)
-
getHandler
public String getHandler()
函数执行入口 规则:xx.xx,必须包含“. ” 举例:对于node.js函数:myfunction.handler,则表示函数的文件名为myfunction.js,执行的入口函数名为handler。- Returns:
- handler
-
setHandler
public void setHandler(String handler)
-
withDependVersionList
public CreateFunctionRequestBody withDependVersionList(List<String> dependVersionList)
-
addDependVersionListItem
public CreateFunctionRequestBody addDependVersionListItem(String dependVersionListItem)
-
withDependVersionList
public CreateFunctionRequestBody withDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)
-
withFuncVpc
public CreateFunctionRequestBody withFuncVpc(FuncVpc funcVpc)
-
withFuncVpc
public CreateFunctionRequestBody withFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)
-
getFuncVpc
public FuncVpc getFuncVpc()
Get funcVpc- Returns:
- funcVpc
-
setFuncVpc
public void setFuncVpc(FuncVpc funcVpc)
-
withMemorySize
public CreateFunctionRequestBody withMemorySize(Integer memorySize)
-
getMemorySize
public Integer getMemorySize()
函数消耗的内存。 单位M。 取值范围为:128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128,最大值为4096。- Returns:
- memorySize
-
setMemorySize
public void setMemorySize(Integer memorySize)
-
withCodeType
public CreateFunctionRequestBody withCodeType(CreateFunctionRequestBody.CodeTypeEnum codeType)
-
getCodeType
public CreateFunctionRequestBody.CodeTypeEnum getCodeType()
函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。- Returns:
- codeType
-
setCodeType
public void setCodeType(CreateFunctionRequestBody.CodeTypeEnum codeType)
-
withCodeUrl
public CreateFunctionRequestBody withCodeUrl(String codeUrl)
-
getCodeUrl
public String getCodeUrl()
当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。- Returns:
- codeUrl
-
setCodeUrl
public void setCodeUrl(String codeUrl)
-
withCodeFilename
public CreateFunctionRequestBody withCodeFilename(String codeFilename)
-
getCodeFilename
public String getCodeFilename()
函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。- Returns:
- codeFilename
-
setCodeFilename
public void setCodeFilename(String codeFilename)
-
withUserData
public CreateFunctionRequestBody withUserData(String userData)
-
getUserData
public String getUserData()
用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。- Returns:
- userData
-
setUserData
public void setUserData(String userData)
-
withXrole
public CreateFunctionRequestBody withXrole(String xrole)
-
getXrole
public String getXrole()
函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- xrole
-
setXrole
public void setXrole(String xrole)
-
withAppXrole
public CreateFunctionRequestBody withAppXrole(String appXrole)
-
getAppXrole
public String getAppXrole()
函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- appXrole
-
setAppXrole
public void setAppXrole(String appXrole)
-
withDescription
public CreateFunctionRequestBody withDescription(String description)
-
getDescription
public String getDescription()
函数描述。- Returns:
- description
-
setDescription
public void setDescription(String description)
-
withFuncCode
public CreateFunctionRequestBody withFuncCode(FuncCode funcCode)
-
withFuncCode
public CreateFunctionRequestBody withFuncCode(java.util.function.Consumer<FuncCode> funcCodeSetter)
-
getFuncCode
public FuncCode getFuncCode()
Get funcCode- Returns:
- funcCode
-
setFuncCode
public void setFuncCode(FuncCode funcCode)
-
withInitializerHandler
public CreateFunctionRequestBody withInitializerHandler(String initializerHandler)
-
getInitializerHandler
public String getInitializerHandler()
函数初始化入口,规则:xx.xx,必须包含“. ”。 举例:对于node.js函数:myfunction.initializer,则表示函数的文件名为myfunction.js,初始化的入口函数名为initializer。- Returns:
- initializerHandler
-
setInitializerHandler
public void setInitializerHandler(String initializerHandler)
-
withInitializerTimeout
public CreateFunctionRequestBody withInitializerTimeout(Integer initializerTimeout)
-
getInitializerTimeout
public Integer getInitializerTimeout()
初始化超时时间,超时函数将被强行停止,范围1~300秒。- Returns:
- initializerTimeout
-
setInitializerTimeout
public void setInitializerTimeout(Integer initializerTimeout)
-
withEnterpriseProjectId
public CreateFunctionRequestBody withEnterpriseProjectId(String enterpriseProjectId)
-
getEnterpriseProjectId
public String getEnterpriseProjectId()
企业项目ID,在企业用户创建函数时必填。- Returns:
- enterpriseProjectId
-
setEnterpriseProjectId
public void setEnterpriseProjectId(String enterpriseProjectId)
-
withType
public CreateFunctionRequestBody withType(CreateFunctionRequestBody.TypeEnum type)
-
getType
public CreateFunctionRequestBody.TypeEnum getType()
函数版本;部分局点只支持v1函数,缺省值则为v1- Returns:
- type
-
setType
public void setType(CreateFunctionRequestBody.TypeEnum type)
-
-