Parameters

Parameter context management

For Managing NiFi Parameter Contexts

nipyapi.parameters.assign_context_to_process_group(pg, context_id, cascade=False)[source]

Assigns a given Parameter Context to a specific Process Group Optionally cascades down to direct children Process Groups

Parameters:
  • pg (ProcessGroupEntity) – The Process Group to target

  • context_id (str) – The ID of the Parameter Context

  • cascade (bool) – Cascade Parameter Context down to child Process Groups?

Returns:

The updated Process Group

Return type:

ProcessGroupEntity

nipyapi.parameters.create_parameter_context(name, description=None, parameters=None, inherited_contexts=None)[source]
Create a new Parameter Context with optional description and

initial Parameters

Parameters:
Returns:

The New Parameter Context

Return type:

ParameterContextEntity

nipyapi.parameters.delete_parameter_context(context, refresh=True)[source]

Removes a Parameter Context

Parameters:
  • context (ParameterContextEntity) – Parameter Context to be deleted

  • refresh (bool) – Whether to refresh the Context before Deletion

Returns:

The removed Parameter Context

Return type:

ParameterContextEntity

nipyapi.parameters.delete_parameter_from_context(context, parameter_name)[source]

Delete a specific Parameter from a Parameter Context :param context: The Parameter Context to Update :type context: ParameterContextEntity :param parameter_name: The Parameter to delete :type parameter_name: str

Returns:

The updated Parameter Context

Return type:

ParameterContextEntity

nipyapi.parameters.get_parameter_context(identifier, identifier_type='name', greedy=True)[source]

Gets one or more Parameter Contexts matching a given identifier

Parameters:
  • identifier (str) – The Name or ID matching Parameter Context(s)

  • identifier_type (str) – ‘name’ or ‘id’

  • greedy (bool) – False for exact match, True for string match

Returns:

None for no matches, Single Object for unique match, list(Objects) for multiple matches

nipyapi.parameters.list_all_parameter_contexts()[source]

Lists all Parameter Contexts available on the Canvas

Returns:

list(ParameterContextEntity)

nipyapi.parameters.prepare_parameter(name, value, description=None, sensitive=False)[source]

Parses basic inputs into a Parameter object ready for submission

Parameters:
  • name (str) – The Name for the Parameter

  • value (str, int, float) – The Value for the Parameter

  • description (str) – Optional Description for the Parameter

  • sensitive (bool) – Whether to mark the Parameter Value as sensitive

Returns:

The ParameterEntity ready for use

Return type:

ParameterEntity

nipyapi.parameters.remove_context_from_process_group(pg)[source]

Clears any Parameter Context from the given Process Group

Parameters:

pg (ProcessGroupEntity) – The Process Group to target

Returns:

The updated Process Group

Return type:

ProcessGroupEntity

nipyapi.parameters.update_parameter_context(context)[source]

Update an already existing Parameter Context

Parameters:
  • context (ParameterContextEntity) – Parameter Context updated to be applied

  • refresh (bool) – Whether to refresh the object before Updating

Returns:

The updated Parameter Context

Return type:

ParameterContextEntity

nipyapi.parameters.upsert_parameter_to_context(context, parameter)[source]

Insert or Update Parameter within a Parameter Context

Parameters:
Returns:

The updated Parameter Context

Return type:

ParameterContextEntity