Class CreateFunctionResponse
- java.lang.Object
-
- com.huaweicloud.sdk.core.SdkResponse
-
- com.huaweicloud.sdk.functiongraph.v2.model.CreateFunctionResponse
-
public class CreateFunctionResponse extends com.huaweicloud.sdk.core.SdkResponseResponse Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateFunctionResponse.CodeTypeEnum函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。static classCreateFunctionResponse.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函数。
-
Constructor Summary
Constructors Constructor Description CreateFunctionResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateFunctionResponseaddDependListItem(String dependListItem)CreateFunctionResponseaddDependVersionListItem(String dependVersionListItem)booleanequals(Object o)StringgetAppXrole()函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。StringgetCodeFilename()函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。LonggetCodeSize()函数大小,单位:字节。CreateFunctionResponse.CodeTypeEnumgetCodeType()函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。StringgetCodeUrl()当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。IntegergetCpu()函数占用的cpu资源。 单位为millicore(1 core=1000 millicores)。 取值与MemorySize成比例,默认是128M内存占0.1个核(100 millicores)。 函数占用的CPU为基础CPU:200 millicores,再加上内存按比例占用的CPU,计算方法:内存/128 *100 + 200。CustomImagegetCustomImage()Get customImageList<String>getDependList()依赖id列表List<String>getDependVersionList()依赖版本id列表StringgetDescription()函数描述。StringgetDigest()函数代码SHA512 hash值,用于判断函数是否变化。StringgetDomainId()域名id。BooleangetEnableAuthInHeader()是否允许在请求头中添加鉴权信息BooleangetEnableDynamicMemory()是否启动动态内存配置StringgetEncryptedUserData()用户自定义的name/value信息,用于需要加密的配置。StringgetEnterpriseProjectId()企业项目ID,在企业用户创建函数时必填。StringgetExtendConfig()函数扩展配置。StringgetFuncName()函数名称。StringgetFuncUrn()函数的URN(Uniform Resource Name),唯一标识函数。FuncVpcgetFuncVpc()Get funcVpcStringgetHandler()函数执行入口 规则:xx.xx,必须包含“.StringgetImageName()函数版本的内部标识。StringgetInitializerHandler()函数初始化入口,规则:xx.xx,必须包含“.IntegergetInitializerTimeout()初始化超时时间,超时函数将被强行停止,范围1~300秒。BooleangetIsStatefulFunction()是否支持有状态,如果需要支持,需要固定传参为true,v2版本支持java.time.OffsetDateTimegetLastModified()函数最后一次更新时间。IntegergetMemorySize()函数消耗的内存。 单位M。 取值范围为:128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128,最大值为4096。MountConfiggetMountConfig()Get mountConfigStringgetNamespace()租户的project id。StringgetPackage()函数所属的分组Package,用于用户针对函数的自定义分组。StringgetProjectName()租户的project name。CreateFunctionResponse.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函数。StrategyConfiggetStrategyConfig()Get strategyConfigIntegergetTimeout()函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置StringgetUserData()用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。StringgetVersion()函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。StringgetXrole()函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。inthashCode()voidsetAppXrole(String appXrole)voidsetCodeFilename(String codeFilename)voidsetCodeSize(Long codeSize)voidsetCodeType(CreateFunctionResponse.CodeTypeEnum codeType)voidsetCodeUrl(String codeUrl)voidsetCpu(Integer cpu)voidsetCustomImage(CustomImage customImage)voidsetDependList(List<String> dependList)voidsetDependVersionList(List<String> dependVersionList)voidsetDescription(String description)voidsetDigest(String digest)voidsetDomainId(String domainId)voidsetEnableAuthInHeader(Boolean enableAuthInHeader)voidsetEnableDynamicMemory(Boolean enableDynamicMemory)voidsetEncryptedUserData(String encryptedUserData)voidsetEnterpriseProjectId(String enterpriseProjectId)voidsetExtendConfig(String extendConfig)voidsetFuncName(String funcName)voidsetFuncUrn(String funcUrn)voidsetFuncVpc(FuncVpc funcVpc)voidsetHandler(String handler)voidsetImageName(String imageName)voidsetInitializerHandler(String initializerHandler)voidsetInitializerTimeout(Integer initializerTimeout)voidsetIsStatefulFunction(Boolean isStatefulFunction)voidsetLastModified(java.time.OffsetDateTime lastModified)voidsetMemorySize(Integer memorySize)voidsetMountConfig(MountConfig mountConfig)voidsetNamespace(String namespace)voidsetPackage(String _package)voidsetProjectName(String projectName)voidsetRuntime(CreateFunctionResponse.RuntimeEnum runtime)voidsetStrategyConfig(StrategyConfig strategyConfig)voidsetTimeout(Integer timeout)voidsetUserData(String userData)voidsetVersion(String version)voidsetXrole(String xrole)StringtoString()CreateFunctionResponsewithAppXrole(String appXrole)CreateFunctionResponsewithCodeFilename(String codeFilename)CreateFunctionResponsewithCodeSize(Long codeSize)CreateFunctionResponsewithCodeType(CreateFunctionResponse.CodeTypeEnum codeType)CreateFunctionResponsewithCodeUrl(String codeUrl)CreateFunctionResponsewithCpu(Integer cpu)CreateFunctionResponsewithCustomImage(CustomImage customImage)CreateFunctionResponsewithCustomImage(java.util.function.Consumer<CustomImage> customImageSetter)CreateFunctionResponsewithDependList(java.util.function.Consumer<List<String>> dependListSetter)CreateFunctionResponsewithDependList(List<String> dependList)CreateFunctionResponsewithDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)CreateFunctionResponsewithDependVersionList(List<String> dependVersionList)CreateFunctionResponsewithDescription(String description)CreateFunctionResponsewithDigest(String digest)CreateFunctionResponsewithDomainId(String domainId)CreateFunctionResponsewithEnableAuthInHeader(Boolean enableAuthInHeader)CreateFunctionResponsewithEnableDynamicMemory(Boolean enableDynamicMemory)CreateFunctionResponsewithEncryptedUserData(String encryptedUserData)CreateFunctionResponsewithEnterpriseProjectId(String enterpriseProjectId)CreateFunctionResponsewithExtendConfig(String extendConfig)CreateFunctionResponsewithFuncName(String funcName)CreateFunctionResponsewithFuncUrn(String funcUrn)CreateFunctionResponsewithFuncVpc(FuncVpc funcVpc)CreateFunctionResponsewithFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)CreateFunctionResponsewithHandler(String handler)CreateFunctionResponsewithImageName(String imageName)CreateFunctionResponsewithInitializerHandler(String initializerHandler)CreateFunctionResponsewithInitializerTimeout(Integer initializerTimeout)CreateFunctionResponsewithIsStatefulFunction(Boolean isStatefulFunction)CreateFunctionResponsewithLastModified(java.time.OffsetDateTime lastModified)CreateFunctionResponsewithMemorySize(Integer memorySize)CreateFunctionResponsewithMountConfig(MountConfig mountConfig)CreateFunctionResponsewithMountConfig(java.util.function.Consumer<MountConfig> mountConfigSetter)CreateFunctionResponsewithNamespace(String namespace)CreateFunctionResponsewithPackage(String _package)CreateFunctionResponsewithProjectName(String projectName)CreateFunctionResponsewithRuntime(CreateFunctionResponse.RuntimeEnum runtime)CreateFunctionResponsewithStrategyConfig(StrategyConfig strategyConfig)CreateFunctionResponsewithStrategyConfig(java.util.function.Consumer<StrategyConfig> strategyConfigSetter)CreateFunctionResponsewithTimeout(Integer timeout)CreateFunctionResponsewithUserData(String userData)CreateFunctionResponsewithVersion(String version)CreateFunctionResponsewithXrole(String xrole)
-
-
-
Method Detail
-
withFuncUrn
public CreateFunctionResponse withFuncUrn(String funcUrn)
-
getFuncUrn
public String getFuncUrn()
函数的URN(Uniform Resource Name),唯一标识函数。- Returns:
- funcUrn
-
setFuncUrn
public void setFuncUrn(String funcUrn)
-
withFuncName
public CreateFunctionResponse withFuncName(String funcName)
-
getFuncName
public String getFuncName()
函数名称。- Returns:
- funcName
-
setFuncName
public void setFuncName(String funcName)
-
withDomainId
public CreateFunctionResponse withDomainId(String domainId)
-
getDomainId
public String getDomainId()
域名id。- Returns:
- domainId
-
setDomainId
public void setDomainId(String domainId)
-
withNamespace
public CreateFunctionResponse withNamespace(String namespace)
-
getNamespace
public String getNamespace()
租户的project id。- Returns:
- namespace
-
setNamespace
public void setNamespace(String namespace)
-
withProjectName
public CreateFunctionResponse withProjectName(String projectName)
-
getProjectName
public String getProjectName()
租户的project name。- Returns:
- projectName
-
setProjectName
public void setProjectName(String projectName)
-
withPackage
public CreateFunctionResponse withPackage(String _package)
-
getPackage
public String getPackage()
函数所属的分组Package,用于用户针对函数的自定义分组。- Returns:
- _package
-
setPackage
public void setPackage(String _package)
-
withRuntime
public CreateFunctionResponse withRuntime(CreateFunctionResponse.RuntimeEnum runtime)
-
getRuntime
public CreateFunctionResponse.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(CreateFunctionResponse.RuntimeEnum runtime)
-
withTimeout
public CreateFunctionResponse withTimeout(Integer timeout)
-
getTimeout
public Integer getTimeout()
函数执行超时时间,超时函数将被强行停止,范围3~900秒,可以通过白名单配置延长到12小时,具体可以咨询华为云函数工作流服务进行配置- Returns:
- timeout
-
setTimeout
public void setTimeout(Integer timeout)
-
withHandler
public CreateFunctionResponse withHandler(String handler)
-
getHandler
public String getHandler()
函数执行入口 规则:xx.xx,必须包含“. ” 举例:对于node.js函数:myfunction.handler,则表示函数的文件名为myfunction.js,执行的入口函数名为handler。- Returns:
- handler
-
setHandler
public void setHandler(String handler)
-
withMemorySize
public CreateFunctionResponse 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)
-
withCpu
public CreateFunctionResponse withCpu(Integer cpu)
-
getCpu
public Integer getCpu()
函数占用的cpu资源。 单位为millicore(1 core=1000 millicores)。 取值与MemorySize成比例,默认是128M内存占0.1个核(100 millicores)。 函数占用的CPU为基础CPU:200 millicores,再加上内存按比例占用的CPU,计算方法:内存/128 *100 + 200。- Returns:
- cpu
-
setCpu
public void setCpu(Integer cpu)
-
withCodeType
public CreateFunctionResponse withCodeType(CreateFunctionResponse.CodeTypeEnum codeType)
-
getCodeType
public CreateFunctionResponse.CodeTypeEnum getCodeType()
函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。- Returns:
- codeType
-
setCodeType
public void setCodeType(CreateFunctionResponse.CodeTypeEnum codeType)
-
withCodeUrl
public CreateFunctionResponse withCodeUrl(String codeUrl)
-
getCodeUrl
public String getCodeUrl()
当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。- Returns:
- codeUrl
-
setCodeUrl
public void setCodeUrl(String codeUrl)
-
withCodeFilename
public CreateFunctionResponse withCodeFilename(String codeFilename)
-
getCodeFilename
public String getCodeFilename()
函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。- Returns:
- codeFilename
-
setCodeFilename
public void setCodeFilename(String codeFilename)
-
withCodeSize
public CreateFunctionResponse withCodeSize(Long codeSize)
-
getCodeSize
public Long getCodeSize()
函数大小,单位:字节。- Returns:
- codeSize
-
setCodeSize
public void setCodeSize(Long codeSize)
-
withUserData
public CreateFunctionResponse withUserData(String userData)
-
getUserData
public String getUserData()
用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。- Returns:
- userData
-
setUserData
public void setUserData(String userData)
-
withEncryptedUserData
public CreateFunctionResponse withEncryptedUserData(String encryptedUserData)
-
getEncryptedUserData
public String getEncryptedUserData()
用户自定义的name/value信息,用于需要加密的配置。- Returns:
- encryptedUserData
-
setEncryptedUserData
public void setEncryptedUserData(String encryptedUserData)
-
withDigest
public CreateFunctionResponse withDigest(String digest)
-
getDigest
public String getDigest()
函数代码SHA512 hash值,用于判断函数是否变化。- Returns:
- digest
-
setDigest
public void setDigest(String digest)
-
withVersion
public CreateFunctionResponse withVersion(String version)
-
getVersion
public String getVersion()
函数版本号,由系统自动生成,规则:vYYYYMMDD-HHMMSS(v+年月日-时分秒)。- Returns:
- version
-
setVersion
public void setVersion(String version)
-
withImageName
public CreateFunctionResponse withImageName(String imageName)
-
getImageName
public String getImageName()
函数版本的内部标识。- Returns:
- imageName
-
setImageName
public void setImageName(String imageName)
-
withXrole
public CreateFunctionResponse withXrole(String xrole)
-
getXrole
public String getXrole()
函数使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- xrole
-
setXrole
public void setXrole(String xrole)
-
withAppXrole
public CreateFunctionResponse withAppXrole(String appXrole)
-
getAppXrole
public String getAppXrole()
函数app使用的权限委托名称,需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。- Returns:
- appXrole
-
setAppXrole
public void setAppXrole(String appXrole)
-
withDescription
public CreateFunctionResponse withDescription(String description)
-
getDescription
public String getDescription()
函数描述。- Returns:
- description
-
setDescription
public void setDescription(String description)
-
withLastModified
public CreateFunctionResponse withLastModified(java.time.OffsetDateTime lastModified)
-
getLastModified
public java.time.OffsetDateTime getLastModified()
函数最后一次更新时间。- Returns:
- lastModified
-
setLastModified
public void setLastModified(java.time.OffsetDateTime lastModified)
-
withFuncVpc
public CreateFunctionResponse withFuncVpc(FuncVpc funcVpc)
-
withFuncVpc
public CreateFunctionResponse withFuncVpc(java.util.function.Consumer<FuncVpc> funcVpcSetter)
-
getFuncVpc
public FuncVpc getFuncVpc()
Get funcVpc- Returns:
- funcVpc
-
setFuncVpc
public void setFuncVpc(FuncVpc funcVpc)
-
withMountConfig
public CreateFunctionResponse withMountConfig(MountConfig mountConfig)
-
withMountConfig
public CreateFunctionResponse withMountConfig(java.util.function.Consumer<MountConfig> mountConfigSetter)
-
getMountConfig
public MountConfig getMountConfig()
Get mountConfig- Returns:
- mountConfig
-
setMountConfig
public void setMountConfig(MountConfig mountConfig)
-
withDependList
public CreateFunctionResponse withDependList(List<String> dependList)
-
addDependListItem
public CreateFunctionResponse addDependListItem(String dependListItem)
-
withDependList
public CreateFunctionResponse withDependList(java.util.function.Consumer<List<String>> dependListSetter)
-
withDependVersionList
public CreateFunctionResponse withDependVersionList(List<String> dependVersionList)
-
addDependVersionListItem
public CreateFunctionResponse addDependVersionListItem(String dependVersionListItem)
-
withDependVersionList
public CreateFunctionResponse withDependVersionList(java.util.function.Consumer<List<String>> dependVersionListSetter)
-
withStrategyConfig
public CreateFunctionResponse withStrategyConfig(StrategyConfig strategyConfig)
-
withStrategyConfig
public CreateFunctionResponse withStrategyConfig(java.util.function.Consumer<StrategyConfig> strategyConfigSetter)
-
getStrategyConfig
public StrategyConfig getStrategyConfig()
Get strategyConfig- Returns:
- strategyConfig
-
setStrategyConfig
public void setStrategyConfig(StrategyConfig strategyConfig)
-
withExtendConfig
public CreateFunctionResponse withExtendConfig(String extendConfig)
-
getExtendConfig
public String getExtendConfig()
函数扩展配置。- Returns:
- extendConfig
-
setExtendConfig
public void setExtendConfig(String extendConfig)
-
withInitializerHandler
public CreateFunctionResponse 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 CreateFunctionResponse withInitializerTimeout(Integer initializerTimeout)
-
getInitializerTimeout
public Integer getInitializerTimeout()
初始化超时时间,超时函数将被强行停止,范围1~300秒。- Returns:
- initializerTimeout
-
setInitializerTimeout
public void setInitializerTimeout(Integer initializerTimeout)
-
withEnterpriseProjectId
public CreateFunctionResponse withEnterpriseProjectId(String enterpriseProjectId)
-
getEnterpriseProjectId
public String getEnterpriseProjectId()
企业项目ID,在企业用户创建函数时必填。- Returns:
- enterpriseProjectId
-
setEnterpriseProjectId
public void setEnterpriseProjectId(String enterpriseProjectId)
-
withEnableDynamicMemory
public CreateFunctionResponse withEnableDynamicMemory(Boolean enableDynamicMemory)
-
getEnableDynamicMemory
public Boolean getEnableDynamicMemory()
是否启动动态内存配置- Returns:
- enableDynamicMemory
-
setEnableDynamicMemory
public void setEnableDynamicMemory(Boolean enableDynamicMemory)
-
withIsStatefulFunction
public CreateFunctionResponse withIsStatefulFunction(Boolean isStatefulFunction)
-
getIsStatefulFunction
public Boolean getIsStatefulFunction()
是否支持有状态,如果需要支持,需要固定传参为true,v2版本支持- Returns:
- isStatefulFunction
-
setIsStatefulFunction
public void setIsStatefulFunction(Boolean isStatefulFunction)
-
withEnableAuthInHeader
public CreateFunctionResponse withEnableAuthInHeader(Boolean enableAuthInHeader)
-
getEnableAuthInHeader
public Boolean getEnableAuthInHeader()
是否允许在请求头中添加鉴权信息- Returns:
- enableAuthInHeader
-
setEnableAuthInHeader
public void setEnableAuthInHeader(Boolean enableAuthInHeader)
-
withCustomImage
public CreateFunctionResponse withCustomImage(CustomImage customImage)
-
withCustomImage
public CreateFunctionResponse withCustomImage(java.util.function.Consumer<CustomImage> customImageSetter)
-
getCustomImage
public CustomImage getCustomImage()
Get customImage- Returns:
- customImage
-
setCustomImage
public void setCustomImage(CustomImage customImage)
-
-