Skip to main content
Version: Latest

Add a Blueprint Script to a Blueprint

Description: Add a blueprint script to a specific blueprint.

Signature: add_script_to_topology(topology_name, script_name, script_file_path, version, script_alias, parameters, category)

Parameters:

NameDirectionRequiredDescription
topology_nameInYesThe name of the blueprint
script_nameInYesThe name of the blueprint script you want to add
script_file_pathInYesTo replace the current script file with another one, specify the full path to the script file (including file name). py files and zip packages are supported.
versionInNoSet a version number for the script
script_aliasInNoSpecify an alias for the service
parametersInNoSpecify a list of inputs required by the script. For example: [“key1, value1”, “key2, value2”]
categoryInNoScript's category. The script will be arranged under this category in the blueprint/sandbox's Blueprint Commands pane

Sample:

packageEditor.add_script_to_topology('my blueprint', 'custom_setup_script', 'C:\\Work\\Projects\\Scripts\\custom_setup_script.zip', 1.0.0, 'Custom Setup Script', [], 'Custom scripts')