Login
Back to bricks list
Introduction Version

CredentialsParam

Credentials params spec. When used, the end user will be able to select a credentials from the list of credentials available in the lab. The config stores only the credentials name but not the credentials data (key, password). The credentials data is retrieved from the credentials service just before the execution of the task or view.

The accessible value in task in a dictionary, it depends on the credentials type. See the documentation of the credentials type for more info.

Attributes

PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: Optionalallowed_values: Optionaldefault_value: Optionalhuman_name: Optionaloptional: boolshort_description: Optionalunit: Optionalvisibility: Literal

Functions

__INIT__
Parameters:
NameTypeDefault valueDescription
credentials_typeCredentialsType Type of credentials to use for this param (if empty, any credentials can be used)
optionalbool False See default value optional[str]
visibilityLiteral public Visibility of the param, see doc on type paramspecvisibilty for more info paramspecvisibilty
human_nameOptional Select credentials Human readable name of the param, showed in the interface [str]
short_descriptionOptional Description of the param, showed in the interface [str]
BUILD

Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.

Parameters:
NameTypeDefault valueDescription
valueAny
Return type:
dict
GET_DEFAULT_VALUE
Return type:
ParamSpecType
TO_DTO
Return type:
ParamSpecDTO
VALIDATE

Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.l

Parameters:
NameTypeDefault valueDescription
valueAny
Return type:
str
EMPTY - @classmethod
Return type:
ParamSpec
GET_STR_TYPE - @classmethod
Return type:
str
LOAD_FROM_DTO - @classmethod
Parameters:
NameTypeDefault valueDescription
spec_dtoParamSpecDTO
Return type:
ParamSpec