ProtectTool Objects
Response
object from the Protect API.
Arguments:
prioritized_rulesets
: An optional sequence ofRuleset
objects to apply.project_id
: The UUID of the Galileo project this tool is associated with.project_name
: The name of the Galileo project.stage_name
: The name of the Protect stage to use for this tool.stage_id
: The UUID of the Protect stage.stage_version
: The version of the Protect stage to use.- “0: The timeout in seconds for the API request.
ProtectParser Objects
ProtectTool
.
If the Protect API response is ‘triggered’, it returns the response text.
Otherwise, it invokes a fallback chain.
Arguments:
chain
: TheRunnable
to invoke if the Protect invocation is not triggered.ignore_trigger
: If True, always invoke the fallback chain.echo_output
: If True, print the raw Protect API response to the console.
parser
ProtectTool
and decides the execution path.
If the response status is ‘triggered’, the response text is returned. Otherwise,
the fallback chain is invoked with the text.
If JSON parsing fails, it assumes the input is not from ProtectTool
and
invokes the fallback chain directly with the raw input.
Arguments:
response_raw_json
: Expects the output from theProtectTool
.