模块 extraction
extraction 模块包含用于从各种平台对象检索形参值的标准化函数。这些实用程序可确保数据类型正确且经过验证,支持强制性字段检查和空格管理,从而实现无缝集成开发。
TIPCommon.extraction.extract_action_param
TIPCommon.extraction.extract_action_param(siemplify, param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False, remove_whitespaces=True)
从 siemplify 对象中提取操作参数。
参数
| 参数 | |
|---|---|
siemplify |
SiemplifyAction.SiemplifyAction
用于执行操作的 |
param_name |
str
要提取的参数的名称。 |
default_value |
Any
如果未找到相应参数,则返回的默认值。 |
input_type |
type
参数的预期数据类型。 |
is_mandatory |
bool
指示参数是否为必需参数。 |
remove_whitespaces |
bool
指示是否从值中移除前导和尾随空格。 |
返回值
提取的参数值。
返回类型
Any
TIPCommon.extraction.extract_configuration_param
TIPCommon.extraction.extract_configuration_param(siemplify, provider_name, param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False, remove_whitespaces=True)
从集成功能的全局配置中提取配置参数值。
参数
| 参数 | |
|---|---|
provider_name |
str
集成功能的唯一标识符。 |
param_name |
str要检索的特定配置键。 |
返回值
提取的配置值。
TIPCommon.extraction.extract_connector_param
TIPCommon.extraction.extract_connector_param(siemplify, param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False, remove_whitespaces=True)
在连接器执行期间从 siemplify 对象提取连接器参数。
参数
| 参数 | |
|---|---|
siemplify |
SiemplifyConnectors.SiemplifyConnectorExecution
用于连接器执行的 |
返回值
连接器参数的值。
返回类型
Any
TIPCommon.extraction.extract_job_param
TIPCommon.extraction.extract_job_param(siemplify, param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False, remove_whitespaces=True)
从 siemplify 作业对象中提取作业参数。
参数
| 参数 | |
|---|---|
siemplify |
SiemplifyJob.SiemplifyJob
当前作业实例的 |
返回值
提取的作业参数值。
TIPCommon.extraction.extract_script_param
TIPCommon.extraction.extract_script_param(siemplify, input_dictionary, param_name, default_value=None, input_type=<class 'str'>, is_mandatory=False, print_value=False, remove_whitespaces=True)
从提供的输入字典中提取脚本参数。
参数
| 参数 | |
|---|---|
input_dictionary |
dict
包含脚本参数的字典来源。 |
返回值
从字典中提取的参数值。
TIPCommon.extraction.get_connector_detailed_params
TIPCommon.extraction.get_connector_detailed_params(siemplify)
检索专门为连接器定义的参数的详细列表。
参数
| 参数 | |
|---|---|
siemplify |
SiemplifyConnectors.SiemplifyConnectorExecution
连接器的 |
返回值
ConnectorParameter 对象的列表。
返回类型
list