huaweicloud-sdk-python-v3/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/show_function_config_respon...

1435 lines
54 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowFunctionConfigResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
sensitive_list = []
openapi_types = {
'func_id': 'str',
'resource_id': 'str',
'func_urn': 'str',
'func_name': 'str',
'domain_id': 'str',
'namespace': 'str',
'project_name': 'str',
'package': 'str',
'runtime': 'str',
'timeout': 'int',
'handler': 'str',
'memory_size': 'int',
'gpu_memory': 'int',
'cpu': 'int',
'code_type': 'str',
'code_url': 'str',
'code_filename': 'str',
'code_size': 'int',
'user_data': 'str',
'encrypted_user_data': 'str',
'digest': 'str',
'version': 'str',
'image_name': 'str',
'xrole': 'str',
'app_xrole': 'str',
'description': 'str',
'last_modified': 'datetime',
'ephemeral_storage': 'int',
'func_vpc': 'FuncVpc',
'mount_config': 'MountConfig',
'depend_list': 'list[str]',
'depend_version_list': 'list[str]',
'strategy_config': 'StrategyConfig',
'dependencies': 'list[Dependency]',
'initializer_handler': 'str',
'initializer_timeout': 'int',
'pre_stop_handler': 'str',
'pre_stop_timeout': 'int',
'enterprise_project_id': 'str',
'long_time': 'bool',
'log_group_id': 'str',
'log_stream_id': 'str',
'type': 'str',
'enable_dynamic_memory': 'bool',
'is_stateful_function': 'bool',
'enable_auth_in_header': 'bool',
'custom_image': 'CustomImage'
}
attribute_map = {
'func_id': 'func_id',
'resource_id': 'resource_id',
'func_urn': 'func_urn',
'func_name': 'func_name',
'domain_id': 'domain_id',
'namespace': 'namespace',
'project_name': 'project_name',
'package': 'package',
'runtime': 'runtime',
'timeout': 'timeout',
'handler': 'handler',
'memory_size': 'memory_size',
'gpu_memory': 'gpu_memory',
'cpu': 'cpu',
'code_type': 'code_type',
'code_url': 'code_url',
'code_filename': 'code_filename',
'code_size': 'code_size',
'user_data': 'user_data',
'encrypted_user_data': 'encrypted_user_data',
'digest': 'digest',
'version': 'version',
'image_name': 'image_name',
'xrole': 'xrole',
'app_xrole': 'app_xrole',
'description': 'description',
'last_modified': 'last_modified',
'ephemeral_storage': 'ephemeral_storage',
'func_vpc': 'func_vpc',
'mount_config': 'mount_config',
'depend_list': 'depend_list',
'depend_version_list': 'depend_version_list',
'strategy_config': 'strategy_config',
'dependencies': 'dependencies',
'initializer_handler': 'initializer_handler',
'initializer_timeout': 'initializer_timeout',
'pre_stop_handler': 'pre_stop_handler',
'pre_stop_timeout': 'pre_stop_timeout',
'enterprise_project_id': 'enterprise_project_id',
'long_time': 'long_time',
'log_group_id': 'log_group_id',
'log_stream_id': 'log_stream_id',
'type': 'type',
'enable_dynamic_memory': 'enable_dynamic_memory',
'is_stateful_function': 'is_stateful_function',
'enable_auth_in_header': 'enable_auth_in_header',
'custom_image': 'custom_image'
}
def __init__(self, func_id=None, resource_id=None, func_urn=None, func_name=None, domain_id=None, namespace=None, project_name=None, package=None, runtime=None, timeout=None, handler=None, memory_size=None, gpu_memory=None, cpu=None, code_type=None, code_url=None, code_filename=None, code_size=None, user_data=None, encrypted_user_data=None, digest=None, version=None, image_name=None, xrole=None, app_xrole=None, description=None, last_modified=None, ephemeral_storage=None, func_vpc=None, mount_config=None, depend_list=None, depend_version_list=None, strategy_config=None, dependencies=None, initializer_handler=None, initializer_timeout=None, pre_stop_handler=None, pre_stop_timeout=None, enterprise_project_id=None, long_time=None, log_group_id=None, log_stream_id=None, type=None, enable_dynamic_memory=None, is_stateful_function=None, enable_auth_in_header=None, custom_image=None):
"""ShowFunctionConfigResponse
The model defined in huaweicloud sdk
:param func_id: 函数id唯一标识函数。
:type func_id: str
:param resource_id: 资源id。
:type resource_id: str
:param func_urn: 函数的URNUniform Resource Name唯一标识函数。
:type func_urn: str
:param func_name: 函数名称。
:type func_name: str
:param domain_id: 域名id。
:type domain_id: str
:param namespace: 租户的project id。
:type namespace: str
:param project_name: 租户的project name。
:type project_name: str
:param package: 函数所属的分组Package用于用户针对函数的自定义分组。
:type package: str
:param runtime: 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函数。
:type runtime: str
:param timeout: 函数执行超时时间超时函数将被强行停止范围3900秒可以通过白名单配置延长到12小时具体可以咨询客服进行配置
:type timeout: int
:param handler: 函数执行入口 规则xx.xx必须包含“. ” 举例对于node.js函数myfunction.handler则表示函数的文件名为myfunction.js执行的入口函数名为handler。
:type handler: str
:param memory_size: 函数消耗的内存。 单位M。 取值范围为128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128最大值为4096。
:type memory_size: int
:param gpu_memory: 函数消耗的显存只支持自定义运行时与自定义镜像函数配置GPU。 单位MB。 取值范围为1024、2048、3072、4096、5120、6144、7168、8192、9216、10240、11264、12288、13312、14336、15360、16384。 最小值为1024最大值为16384。
:type gpu_memory: int
:param cpu: 函数占用的cpu资源。 单位为millicore1 core=1000 millicores。 取值与MemorySize成比例默认是128M内存占0.1个核100 millicores
:type cpu: int
:param code_type: 函数代码类型取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包主要针对Java函数。
:type code_type: str
:param code_url: 当CodeType为obs时该值为函数代码包在OBS上的地址CodeType为其他值时该字段为空。
:type code_url: str
:param code_filename: 函数的文件名当CodeType为jar/zip时必须提供该字段inline和obs不需要提供。
:type code_filename: str
:param code_size: 函数大小,单位:字节。
:type code_size: int
:param user_data: 用户自定义的name/value信息。 在函数中使用的参数。 举例如函数要访问某个主机可以设置自定义参数Host={host_ip}最多定义20个总长度不超过4KB。
:type user_data: str
:param encrypted_user_data: 用户自定义的name/value信息用于需要加密的配置。
:type encrypted_user_data: str
:param digest: 函数代码SHA512 hash值用于判断函数是否变化。
:type digest: str
:param version: 函数版本号由系统自动生成规则vYYYYMMDD-HHMMSSv+年月日-时分秒)。
:type version: str
:param image_name: 函数版本的内部标识。
:type image_name: str
:param xrole: 函数使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:type xrole: str
:param app_xrole: 函数app使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:type app_xrole: str
:param description: 函数描述。
:type description: str
:param last_modified: 函数最后一次更新时间。
:type last_modified: datetime
:param ephemeral_storage: 临时存储大小。
:type ephemeral_storage: int
:param func_vpc:
:type func_vpc: :class:`huaweicloudsdkfunctiongraph.v2.FuncVpc`
:param mount_config:
:type mount_config: :class:`huaweicloudsdkfunctiongraph.v2.MountConfig`
:param depend_list: 依赖id列表
:type depend_list: list[str]
:param depend_version_list: 依赖版本id列表
:type depend_version_list: list[str]
:param strategy_config:
:type strategy_config: :class:`huaweicloudsdkfunctiongraph.v2.StrategyConfig`
:param dependencies: 函数依赖代码包列表。
:type dependencies: list[:class:`huaweicloudsdkfunctiongraph.v2.Dependency`]
:param initializer_handler: 函数初始化入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.initializer则表示函数的文件名为myfunction.js初始化的入口函数名为initializer。
:type initializer_handler: str
:param initializer_timeout: 初始化超时时间超时函数将被强行停止范围1300秒。
:type initializer_timeout: int
:param pre_stop_handler: 函数预停止函数的入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.pre_stop_handler则表示函数的文件名为myfunction.js初始化的入口函数名为pre_stop_handler。
:type pre_stop_handler: str
:param pre_stop_timeout: 初始化超时时间超时函数将被强行停止范围190秒。
:type pre_stop_timeout: int
:param enterprise_project_id: 企业项目ID在企业用户创建函数时必填。
:type enterprise_project_id: str
:param long_time: 是否允许进行长时间超时设置。
:type long_time: bool
:param log_group_id: 自定义日志查询组id
:type log_group_id: str
:param log_stream_id: 自定义日志查询流id
:type log_stream_id: str
:param type: v2表示为公测版本,v1为原来版本。
:type type: str
:param enable_dynamic_memory: 是否允许动态内存配置
:type enable_dynamic_memory: bool
:param is_stateful_function: 是否支持有状态如果需要支持需要固定传参为truev2版本支持
:type is_stateful_function: bool
:param enable_auth_in_header: 是否允许在请求头中添加鉴权信息
:type enable_auth_in_header: bool
:param custom_image:
:type custom_image: :class:`huaweicloudsdkfunctiongraph.v2.CustomImage`
"""
super(ShowFunctionConfigResponse, self).__init__()
self._func_id = None
self._resource_id = None
self._func_urn = None
self._func_name = None
self._domain_id = None
self._namespace = None
self._project_name = None
self._package = None
self._runtime = None
self._timeout = None
self._handler = None
self._memory_size = None
self._gpu_memory = None
self._cpu = None
self._code_type = None
self._code_url = None
self._code_filename = None
self._code_size = None
self._user_data = None
self._encrypted_user_data = None
self._digest = None
self._version = None
self._image_name = None
self._xrole = None
self._app_xrole = None
self._description = None
self._last_modified = None
self._ephemeral_storage = None
self._func_vpc = None
self._mount_config = None
self._depend_list = None
self._depend_version_list = None
self._strategy_config = None
self._dependencies = None
self._initializer_handler = None
self._initializer_timeout = None
self._pre_stop_handler = None
self._pre_stop_timeout = None
self._enterprise_project_id = None
self._long_time = None
self._log_group_id = None
self._log_stream_id = None
self._type = None
self._enable_dynamic_memory = None
self._is_stateful_function = None
self._enable_auth_in_header = None
self._custom_image = None
self.discriminator = None
if func_id is not None:
self.func_id = func_id
if resource_id is not None:
self.resource_id = resource_id
if func_urn is not None:
self.func_urn = func_urn
if func_name is not None:
self.func_name = func_name
if domain_id is not None:
self.domain_id = domain_id
if namespace is not None:
self.namespace = namespace
if project_name is not None:
self.project_name = project_name
if package is not None:
self.package = package
if runtime is not None:
self.runtime = runtime
if timeout is not None:
self.timeout = timeout
if handler is not None:
self.handler = handler
if memory_size is not None:
self.memory_size = memory_size
if gpu_memory is not None:
self.gpu_memory = gpu_memory
if cpu is not None:
self.cpu = cpu
if code_type is not None:
self.code_type = code_type
if code_url is not None:
self.code_url = code_url
if code_filename is not None:
self.code_filename = code_filename
if code_size is not None:
self.code_size = code_size
if user_data is not None:
self.user_data = user_data
if encrypted_user_data is not None:
self.encrypted_user_data = encrypted_user_data
if digest is not None:
self.digest = digest
if version is not None:
self.version = version
if image_name is not None:
self.image_name = image_name
if xrole is not None:
self.xrole = xrole
if app_xrole is not None:
self.app_xrole = app_xrole
if description is not None:
self.description = description
if last_modified is not None:
self.last_modified = last_modified
if ephemeral_storage is not None:
self.ephemeral_storage = ephemeral_storage
if func_vpc is not None:
self.func_vpc = func_vpc
if mount_config is not None:
self.mount_config = mount_config
if depend_list is not None:
self.depend_list = depend_list
if depend_version_list is not None:
self.depend_version_list = depend_version_list
if strategy_config is not None:
self.strategy_config = strategy_config
if dependencies is not None:
self.dependencies = dependencies
if initializer_handler is not None:
self.initializer_handler = initializer_handler
if initializer_timeout is not None:
self.initializer_timeout = initializer_timeout
if pre_stop_handler is not None:
self.pre_stop_handler = pre_stop_handler
if pre_stop_timeout is not None:
self.pre_stop_timeout = pre_stop_timeout
if enterprise_project_id is not None:
self.enterprise_project_id = enterprise_project_id
if long_time is not None:
self.long_time = long_time
if log_group_id is not None:
self.log_group_id = log_group_id
if log_stream_id is not None:
self.log_stream_id = log_stream_id
if type is not None:
self.type = type
if enable_dynamic_memory is not None:
self.enable_dynamic_memory = enable_dynamic_memory
if is_stateful_function is not None:
self.is_stateful_function = is_stateful_function
if enable_auth_in_header is not None:
self.enable_auth_in_header = enable_auth_in_header
if custom_image is not None:
self.custom_image = custom_image
@property
def func_id(self):
"""Gets the func_id of this ShowFunctionConfigResponse.
函数id唯一标识函数。
:return: The func_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._func_id
@func_id.setter
def func_id(self, func_id):
"""Sets the func_id of this ShowFunctionConfigResponse.
函数id唯一标识函数。
:param func_id: The func_id of this ShowFunctionConfigResponse.
:type func_id: str
"""
self._func_id = func_id
@property
def resource_id(self):
"""Gets the resource_id of this ShowFunctionConfigResponse.
资源id。
:return: The resource_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._resource_id
@resource_id.setter
def resource_id(self, resource_id):
"""Sets the resource_id of this ShowFunctionConfigResponse.
资源id。
:param resource_id: The resource_id of this ShowFunctionConfigResponse.
:type resource_id: str
"""
self._resource_id = resource_id
@property
def func_urn(self):
"""Gets the func_urn of this ShowFunctionConfigResponse.
函数的URNUniform Resource Name唯一标识函数。
:return: The func_urn of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._func_urn
@func_urn.setter
def func_urn(self, func_urn):
"""Sets the func_urn of this ShowFunctionConfigResponse.
函数的URNUniform Resource Name唯一标识函数。
:param func_urn: The func_urn of this ShowFunctionConfigResponse.
:type func_urn: str
"""
self._func_urn = func_urn
@property
def func_name(self):
"""Gets the func_name of this ShowFunctionConfigResponse.
函数名称。
:return: The func_name of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._func_name
@func_name.setter
def func_name(self, func_name):
"""Sets the func_name of this ShowFunctionConfigResponse.
函数名称。
:param func_name: The func_name of this ShowFunctionConfigResponse.
:type func_name: str
"""
self._func_name = func_name
@property
def domain_id(self):
"""Gets the domain_id of this ShowFunctionConfigResponse.
域名id。
:return: The domain_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._domain_id
@domain_id.setter
def domain_id(self, domain_id):
"""Sets the domain_id of this ShowFunctionConfigResponse.
域名id。
:param domain_id: The domain_id of this ShowFunctionConfigResponse.
:type domain_id: str
"""
self._domain_id = domain_id
@property
def namespace(self):
"""Gets the namespace of this ShowFunctionConfigResponse.
租户的project id。
:return: The namespace of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._namespace
@namespace.setter
def namespace(self, namespace):
"""Sets the namespace of this ShowFunctionConfigResponse.
租户的project id。
:param namespace: The namespace of this ShowFunctionConfigResponse.
:type namespace: str
"""
self._namespace = namespace
@property
def project_name(self):
"""Gets the project_name of this ShowFunctionConfigResponse.
租户的project name。
:return: The project_name of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._project_name
@project_name.setter
def project_name(self, project_name):
"""Sets the project_name of this ShowFunctionConfigResponse.
租户的project name。
:param project_name: The project_name of this ShowFunctionConfigResponse.
:type project_name: str
"""
self._project_name = project_name
@property
def package(self):
"""Gets the package of this ShowFunctionConfigResponse.
函数所属的分组Package用于用户针对函数的自定义分组。
:return: The package of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._package
@package.setter
def package(self, package):
"""Sets the package of this ShowFunctionConfigResponse.
函数所属的分组Package用于用户针对函数的自定义分组。
:param package: The package of this ShowFunctionConfigResponse.
:type package: str
"""
self._package = package
@property
def runtime(self):
"""Gets the runtime of this ShowFunctionConfigResponse.
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函数。
:return: The runtime of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._runtime
@runtime.setter
def runtime(self, runtime):
"""Sets the runtime of this ShowFunctionConfigResponse.
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函数。
:param runtime: The runtime of this ShowFunctionConfigResponse.
:type runtime: str
"""
self._runtime = runtime
@property
def timeout(self):
"""Gets the timeout of this ShowFunctionConfigResponse.
函数执行超时时间超时函数将被强行停止范围3900秒可以通过白名单配置延长到12小时具体可以咨询客服进行配置
:return: The timeout of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._timeout
@timeout.setter
def timeout(self, timeout):
"""Sets the timeout of this ShowFunctionConfigResponse.
函数执行超时时间超时函数将被强行停止范围3900秒可以通过白名单配置延长到12小时具体可以咨询客服进行配置
:param timeout: The timeout of this ShowFunctionConfigResponse.
:type timeout: int
"""
self._timeout = timeout
@property
def handler(self):
"""Gets the handler of this ShowFunctionConfigResponse.
函数执行入口 规则xx.xx必须包含“. ” 举例对于node.js函数myfunction.handler则表示函数的文件名为myfunction.js执行的入口函数名为handler。
:return: The handler of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._handler
@handler.setter
def handler(self, handler):
"""Sets the handler of this ShowFunctionConfigResponse.
函数执行入口 规则xx.xx必须包含“. ” 举例对于node.js函数myfunction.handler则表示函数的文件名为myfunction.js执行的入口函数名为handler。
:param handler: The handler of this ShowFunctionConfigResponse.
:type handler: str
"""
self._handler = handler
@property
def memory_size(self):
"""Gets the memory_size of this ShowFunctionConfigResponse.
函数消耗的内存。 单位M。 取值范围为128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128最大值为4096。
:return: The memory_size of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._memory_size
@memory_size.setter
def memory_size(self, memory_size):
"""Sets the memory_size of this ShowFunctionConfigResponse.
函数消耗的内存。 单位M。 取值范围为128、256、512、768、1024、1280、1536、1792、2048、2560、3072、3584、4096。 最小值为128最大值为4096。
:param memory_size: The memory_size of this ShowFunctionConfigResponse.
:type memory_size: int
"""
self._memory_size = memory_size
@property
def gpu_memory(self):
"""Gets the gpu_memory of this ShowFunctionConfigResponse.
函数消耗的显存只支持自定义运行时与自定义镜像函数配置GPU。 单位MB。 取值范围为1024、2048、3072、4096、5120、6144、7168、8192、9216、10240、11264、12288、13312、14336、15360、16384。 最小值为1024最大值为16384。
:return: The gpu_memory of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._gpu_memory
@gpu_memory.setter
def gpu_memory(self, gpu_memory):
"""Sets the gpu_memory of this ShowFunctionConfigResponse.
函数消耗的显存只支持自定义运行时与自定义镜像函数配置GPU。 单位MB。 取值范围为1024、2048、3072、4096、5120、6144、7168、8192、9216、10240、11264、12288、13312、14336、15360、16384。 最小值为1024最大值为16384。
:param gpu_memory: The gpu_memory of this ShowFunctionConfigResponse.
:type gpu_memory: int
"""
self._gpu_memory = gpu_memory
@property
def cpu(self):
"""Gets the cpu of this ShowFunctionConfigResponse.
函数占用的cpu资源。 单位为millicore1 core=1000 millicores。 取值与MemorySize成比例默认是128M内存占0.1个核100 millicores
:return: The cpu of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._cpu
@cpu.setter
def cpu(self, cpu):
"""Sets the cpu of this ShowFunctionConfigResponse.
函数占用的cpu资源。 单位为millicore1 core=1000 millicores。 取值与MemorySize成比例默认是128M内存占0.1个核100 millicores
:param cpu: The cpu of this ShowFunctionConfigResponse.
:type cpu: int
"""
self._cpu = cpu
@property
def code_type(self):
"""Gets the code_type of this ShowFunctionConfigResponse.
函数代码类型取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包主要针对Java函数。
:return: The code_type of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._code_type
@code_type.setter
def code_type(self, code_type):
"""Sets the code_type of this ShowFunctionConfigResponse.
函数代码类型取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包主要针对Java函数。
:param code_type: The code_type of this ShowFunctionConfigResponse.
:type code_type: str
"""
self._code_type = code_type
@property
def code_url(self):
"""Gets the code_url of this ShowFunctionConfigResponse.
当CodeType为obs时该值为函数代码包在OBS上的地址CodeType为其他值时该字段为空。
:return: The code_url of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._code_url
@code_url.setter
def code_url(self, code_url):
"""Sets the code_url of this ShowFunctionConfigResponse.
当CodeType为obs时该值为函数代码包在OBS上的地址CodeType为其他值时该字段为空。
:param code_url: The code_url of this ShowFunctionConfigResponse.
:type code_url: str
"""
self._code_url = code_url
@property
def code_filename(self):
"""Gets the code_filename of this ShowFunctionConfigResponse.
函数的文件名当CodeType为jar/zip时必须提供该字段inline和obs不需要提供。
:return: The code_filename of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._code_filename
@code_filename.setter
def code_filename(self, code_filename):
"""Sets the code_filename of this ShowFunctionConfigResponse.
函数的文件名当CodeType为jar/zip时必须提供该字段inline和obs不需要提供。
:param code_filename: The code_filename of this ShowFunctionConfigResponse.
:type code_filename: str
"""
self._code_filename = code_filename
@property
def code_size(self):
"""Gets the code_size of this ShowFunctionConfigResponse.
函数大小,单位:字节。
:return: The code_size of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._code_size
@code_size.setter
def code_size(self, code_size):
"""Sets the code_size of this ShowFunctionConfigResponse.
函数大小,单位:字节。
:param code_size: The code_size of this ShowFunctionConfigResponse.
:type code_size: int
"""
self._code_size = code_size
@property
def user_data(self):
"""Gets the user_data of this ShowFunctionConfigResponse.
用户自定义的name/value信息。 在函数中使用的参数。 举例如函数要访问某个主机可以设置自定义参数Host={host_ip}最多定义20个总长度不超过4KB。
:return: The user_data of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._user_data
@user_data.setter
def user_data(self, user_data):
"""Sets the user_data of this ShowFunctionConfigResponse.
用户自定义的name/value信息。 在函数中使用的参数。 举例如函数要访问某个主机可以设置自定义参数Host={host_ip}最多定义20个总长度不超过4KB。
:param user_data: The user_data of this ShowFunctionConfigResponse.
:type user_data: str
"""
self._user_data = user_data
@property
def encrypted_user_data(self):
"""Gets the encrypted_user_data of this ShowFunctionConfigResponse.
用户自定义的name/value信息用于需要加密的配置。
:return: The encrypted_user_data of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._encrypted_user_data
@encrypted_user_data.setter
def encrypted_user_data(self, encrypted_user_data):
"""Sets the encrypted_user_data of this ShowFunctionConfigResponse.
用户自定义的name/value信息用于需要加密的配置。
:param encrypted_user_data: The encrypted_user_data of this ShowFunctionConfigResponse.
:type encrypted_user_data: str
"""
self._encrypted_user_data = encrypted_user_data
@property
def digest(self):
"""Gets the digest of this ShowFunctionConfigResponse.
函数代码SHA512 hash值用于判断函数是否变化。
:return: The digest of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._digest
@digest.setter
def digest(self, digest):
"""Sets the digest of this ShowFunctionConfigResponse.
函数代码SHA512 hash值用于判断函数是否变化。
:param digest: The digest of this ShowFunctionConfigResponse.
:type digest: str
"""
self._digest = digest
@property
def version(self):
"""Gets the version of this ShowFunctionConfigResponse.
函数版本号由系统自动生成规则vYYYYMMDD-HHMMSSv+年月日-时分秒)。
:return: The version of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._version
@version.setter
def version(self, version):
"""Sets the version of this ShowFunctionConfigResponse.
函数版本号由系统自动生成规则vYYYYMMDD-HHMMSSv+年月日-时分秒)。
:param version: The version of this ShowFunctionConfigResponse.
:type version: str
"""
self._version = version
@property
def image_name(self):
"""Gets the image_name of this ShowFunctionConfigResponse.
函数版本的内部标识。
:return: The image_name of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._image_name
@image_name.setter
def image_name(self, image_name):
"""Sets the image_name of this ShowFunctionConfigResponse.
函数版本的内部标识。
:param image_name: The image_name of this ShowFunctionConfigResponse.
:type image_name: str
"""
self._image_name = image_name
@property
def xrole(self):
"""Gets the xrole of this ShowFunctionConfigResponse.
函数使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:return: The xrole of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._xrole
@xrole.setter
def xrole(self, xrole):
"""Sets the xrole of this ShowFunctionConfigResponse.
函数使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:param xrole: The xrole of this ShowFunctionConfigResponse.
:type xrole: str
"""
self._xrole = xrole
@property
def app_xrole(self):
"""Gets the app_xrole of this ShowFunctionConfigResponse.
函数app使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:return: The app_xrole of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._app_xrole
@app_xrole.setter
def app_xrole(self, app_xrole):
"""Sets the app_xrole of this ShowFunctionConfigResponse.
函数app使用的权限委托名称需要IAM支持并在IAM界面创建委托当函数需要访问其他服务时必须提供该字段。
:param app_xrole: The app_xrole of this ShowFunctionConfigResponse.
:type app_xrole: str
"""
self._app_xrole = app_xrole
@property
def description(self):
"""Gets the description of this ShowFunctionConfigResponse.
函数描述。
:return: The description of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this ShowFunctionConfigResponse.
函数描述。
:param description: The description of this ShowFunctionConfigResponse.
:type description: str
"""
self._description = description
@property
def last_modified(self):
"""Gets the last_modified of this ShowFunctionConfigResponse.
函数最后一次更新时间。
:return: The last_modified of this ShowFunctionConfigResponse.
:rtype: datetime
"""
return self._last_modified
@last_modified.setter
def last_modified(self, last_modified):
"""Sets the last_modified of this ShowFunctionConfigResponse.
函数最后一次更新时间。
:param last_modified: The last_modified of this ShowFunctionConfigResponse.
:type last_modified: datetime
"""
self._last_modified = last_modified
@property
def ephemeral_storage(self):
"""Gets the ephemeral_storage of this ShowFunctionConfigResponse.
临时存储大小。
:return: The ephemeral_storage of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._ephemeral_storage
@ephemeral_storage.setter
def ephemeral_storage(self, ephemeral_storage):
"""Sets the ephemeral_storage of this ShowFunctionConfigResponse.
临时存储大小。
:param ephemeral_storage: The ephemeral_storage of this ShowFunctionConfigResponse.
:type ephemeral_storage: int
"""
self._ephemeral_storage = ephemeral_storage
@property
def func_vpc(self):
"""Gets the func_vpc of this ShowFunctionConfigResponse.
:return: The func_vpc of this ShowFunctionConfigResponse.
:rtype: :class:`huaweicloudsdkfunctiongraph.v2.FuncVpc`
"""
return self._func_vpc
@func_vpc.setter
def func_vpc(self, func_vpc):
"""Sets the func_vpc of this ShowFunctionConfigResponse.
:param func_vpc: The func_vpc of this ShowFunctionConfigResponse.
:type func_vpc: :class:`huaweicloudsdkfunctiongraph.v2.FuncVpc`
"""
self._func_vpc = func_vpc
@property
def mount_config(self):
"""Gets the mount_config of this ShowFunctionConfigResponse.
:return: The mount_config of this ShowFunctionConfigResponse.
:rtype: :class:`huaweicloudsdkfunctiongraph.v2.MountConfig`
"""
return self._mount_config
@mount_config.setter
def mount_config(self, mount_config):
"""Sets the mount_config of this ShowFunctionConfigResponse.
:param mount_config: The mount_config of this ShowFunctionConfigResponse.
:type mount_config: :class:`huaweicloudsdkfunctiongraph.v2.MountConfig`
"""
self._mount_config = mount_config
@property
def depend_list(self):
"""Gets the depend_list of this ShowFunctionConfigResponse.
依赖id列表
:return: The depend_list of this ShowFunctionConfigResponse.
:rtype: list[str]
"""
return self._depend_list
@depend_list.setter
def depend_list(self, depend_list):
"""Sets the depend_list of this ShowFunctionConfigResponse.
依赖id列表
:param depend_list: The depend_list of this ShowFunctionConfigResponse.
:type depend_list: list[str]
"""
self._depend_list = depend_list
@property
def depend_version_list(self):
"""Gets the depend_version_list of this ShowFunctionConfigResponse.
依赖版本id列表
:return: The depend_version_list of this ShowFunctionConfigResponse.
:rtype: list[str]
"""
return self._depend_version_list
@depend_version_list.setter
def depend_version_list(self, depend_version_list):
"""Sets the depend_version_list of this ShowFunctionConfigResponse.
依赖版本id列表
:param depend_version_list: The depend_version_list of this ShowFunctionConfigResponse.
:type depend_version_list: list[str]
"""
self._depend_version_list = depend_version_list
@property
def strategy_config(self):
"""Gets the strategy_config of this ShowFunctionConfigResponse.
:return: The strategy_config of this ShowFunctionConfigResponse.
:rtype: :class:`huaweicloudsdkfunctiongraph.v2.StrategyConfig`
"""
return self._strategy_config
@strategy_config.setter
def strategy_config(self, strategy_config):
"""Sets the strategy_config of this ShowFunctionConfigResponse.
:param strategy_config: The strategy_config of this ShowFunctionConfigResponse.
:type strategy_config: :class:`huaweicloudsdkfunctiongraph.v2.StrategyConfig`
"""
self._strategy_config = strategy_config
@property
def dependencies(self):
"""Gets the dependencies of this ShowFunctionConfigResponse.
函数依赖代码包列表。
:return: The dependencies of this ShowFunctionConfigResponse.
:rtype: list[:class:`huaweicloudsdkfunctiongraph.v2.Dependency`]
"""
return self._dependencies
@dependencies.setter
def dependencies(self, dependencies):
"""Sets the dependencies of this ShowFunctionConfigResponse.
函数依赖代码包列表。
:param dependencies: The dependencies of this ShowFunctionConfigResponse.
:type dependencies: list[:class:`huaweicloudsdkfunctiongraph.v2.Dependency`]
"""
self._dependencies = dependencies
@property
def initializer_handler(self):
"""Gets the initializer_handler of this ShowFunctionConfigResponse.
函数初始化入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.initializer则表示函数的文件名为myfunction.js初始化的入口函数名为initializer。
:return: The initializer_handler of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._initializer_handler
@initializer_handler.setter
def initializer_handler(self, initializer_handler):
"""Sets the initializer_handler of this ShowFunctionConfigResponse.
函数初始化入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.initializer则表示函数的文件名为myfunction.js初始化的入口函数名为initializer。
:param initializer_handler: The initializer_handler of this ShowFunctionConfigResponse.
:type initializer_handler: str
"""
self._initializer_handler = initializer_handler
@property
def initializer_timeout(self):
"""Gets the initializer_timeout of this ShowFunctionConfigResponse.
初始化超时时间超时函数将被强行停止范围1300秒。
:return: The initializer_timeout of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._initializer_timeout
@initializer_timeout.setter
def initializer_timeout(self, initializer_timeout):
"""Sets the initializer_timeout of this ShowFunctionConfigResponse.
初始化超时时间超时函数将被强行停止范围1300秒。
:param initializer_timeout: The initializer_timeout of this ShowFunctionConfigResponse.
:type initializer_timeout: int
"""
self._initializer_timeout = initializer_timeout
@property
def pre_stop_handler(self):
"""Gets the pre_stop_handler of this ShowFunctionConfigResponse.
函数预停止函数的入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.pre_stop_handler则表示函数的文件名为myfunction.js初始化的入口函数名为pre_stop_handler。
:return: The pre_stop_handler of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._pre_stop_handler
@pre_stop_handler.setter
def pre_stop_handler(self, pre_stop_handler):
"""Sets the pre_stop_handler of this ShowFunctionConfigResponse.
函数预停止函数的入口规则xx.xx必须包含“. ”。 举例对于node.js函数myfunction.pre_stop_handler则表示函数的文件名为myfunction.js初始化的入口函数名为pre_stop_handler。
:param pre_stop_handler: The pre_stop_handler of this ShowFunctionConfigResponse.
:type pre_stop_handler: str
"""
self._pre_stop_handler = pre_stop_handler
@property
def pre_stop_timeout(self):
"""Gets the pre_stop_timeout of this ShowFunctionConfigResponse.
初始化超时时间超时函数将被强行停止范围190秒。
:return: The pre_stop_timeout of this ShowFunctionConfigResponse.
:rtype: int
"""
return self._pre_stop_timeout
@pre_stop_timeout.setter
def pre_stop_timeout(self, pre_stop_timeout):
"""Sets the pre_stop_timeout of this ShowFunctionConfigResponse.
初始化超时时间超时函数将被强行停止范围190秒。
:param pre_stop_timeout: The pre_stop_timeout of this ShowFunctionConfigResponse.
:type pre_stop_timeout: int
"""
self._pre_stop_timeout = pre_stop_timeout
@property
def enterprise_project_id(self):
"""Gets the enterprise_project_id of this ShowFunctionConfigResponse.
企业项目ID在企业用户创建函数时必填。
:return: The enterprise_project_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._enterprise_project_id
@enterprise_project_id.setter
def enterprise_project_id(self, enterprise_project_id):
"""Sets the enterprise_project_id of this ShowFunctionConfigResponse.
企业项目ID在企业用户创建函数时必填。
:param enterprise_project_id: The enterprise_project_id of this ShowFunctionConfigResponse.
:type enterprise_project_id: str
"""
self._enterprise_project_id = enterprise_project_id
@property
def long_time(self):
"""Gets the long_time of this ShowFunctionConfigResponse.
是否允许进行长时间超时设置。
:return: The long_time of this ShowFunctionConfigResponse.
:rtype: bool
"""
return self._long_time
@long_time.setter
def long_time(self, long_time):
"""Sets the long_time of this ShowFunctionConfigResponse.
是否允许进行长时间超时设置。
:param long_time: The long_time of this ShowFunctionConfigResponse.
:type long_time: bool
"""
self._long_time = long_time
@property
def log_group_id(self):
"""Gets the log_group_id of this ShowFunctionConfigResponse.
自定义日志查询组id
:return: The log_group_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._log_group_id
@log_group_id.setter
def log_group_id(self, log_group_id):
"""Sets the log_group_id of this ShowFunctionConfigResponse.
自定义日志查询组id
:param log_group_id: The log_group_id of this ShowFunctionConfigResponse.
:type log_group_id: str
"""
self._log_group_id = log_group_id
@property
def log_stream_id(self):
"""Gets the log_stream_id of this ShowFunctionConfigResponse.
自定义日志查询流id
:return: The log_stream_id of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._log_stream_id
@log_stream_id.setter
def log_stream_id(self, log_stream_id):
"""Sets the log_stream_id of this ShowFunctionConfigResponse.
自定义日志查询流id
:param log_stream_id: The log_stream_id of this ShowFunctionConfigResponse.
:type log_stream_id: str
"""
self._log_stream_id = log_stream_id
@property
def type(self):
"""Gets the type of this ShowFunctionConfigResponse.
v2表示为公测版本,v1为原来版本。
:return: The type of this ShowFunctionConfigResponse.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this ShowFunctionConfigResponse.
v2表示为公测版本,v1为原来版本。
:param type: The type of this ShowFunctionConfigResponse.
:type type: str
"""
self._type = type
@property
def enable_dynamic_memory(self):
"""Gets the enable_dynamic_memory of this ShowFunctionConfigResponse.
是否允许动态内存配置
:return: The enable_dynamic_memory of this ShowFunctionConfigResponse.
:rtype: bool
"""
return self._enable_dynamic_memory
@enable_dynamic_memory.setter
def enable_dynamic_memory(self, enable_dynamic_memory):
"""Sets the enable_dynamic_memory of this ShowFunctionConfigResponse.
是否允许动态内存配置
:param enable_dynamic_memory: The enable_dynamic_memory of this ShowFunctionConfigResponse.
:type enable_dynamic_memory: bool
"""
self._enable_dynamic_memory = enable_dynamic_memory
@property
def is_stateful_function(self):
"""Gets the is_stateful_function of this ShowFunctionConfigResponse.
是否支持有状态如果需要支持需要固定传参为truev2版本支持
:return: The is_stateful_function of this ShowFunctionConfigResponse.
:rtype: bool
"""
return self._is_stateful_function
@is_stateful_function.setter
def is_stateful_function(self, is_stateful_function):
"""Sets the is_stateful_function of this ShowFunctionConfigResponse.
是否支持有状态如果需要支持需要固定传参为truev2版本支持
:param is_stateful_function: The is_stateful_function of this ShowFunctionConfigResponse.
:type is_stateful_function: bool
"""
self._is_stateful_function = is_stateful_function
@property
def enable_auth_in_header(self):
"""Gets the enable_auth_in_header of this ShowFunctionConfigResponse.
是否允许在请求头中添加鉴权信息
:return: The enable_auth_in_header of this ShowFunctionConfigResponse.
:rtype: bool
"""
return self._enable_auth_in_header
@enable_auth_in_header.setter
def enable_auth_in_header(self, enable_auth_in_header):
"""Sets the enable_auth_in_header of this ShowFunctionConfigResponse.
是否允许在请求头中添加鉴权信息
:param enable_auth_in_header: The enable_auth_in_header of this ShowFunctionConfigResponse.
:type enable_auth_in_header: bool
"""
self._enable_auth_in_header = enable_auth_in_header
@property
def custom_image(self):
"""Gets the custom_image of this ShowFunctionConfigResponse.
:return: The custom_image of this ShowFunctionConfigResponse.
:rtype: :class:`huaweicloudsdkfunctiongraph.v2.CustomImage`
"""
return self._custom_image
@custom_image.setter
def custom_image(self, custom_image):
"""Sets the custom_image of this ShowFunctionConfigResponse.
:param custom_image: The custom_image of this ShowFunctionConfigResponse.
:type custom_image: :class:`huaweicloudsdkfunctiongraph.v2.CustomImage`
"""
self._custom_image = custom_image
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
import simplejson as json
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
def __repr__(self):
"""For `print`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowFunctionConfigResponse):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other