Blueprints API¶
- class cloudify_rest_client.blueprints.BlueprintsClient(api)[source]¶
Bases: object
- list(_include=None)[source]¶
Returns a list of currently stored blueprints.
Parameters: _include – List of fields to include in response. Returns: Blueprints list.
- upload(blueprint_path, blueprint_id)[source]¶
Uploads a blueprint to Cloudify’s manager.
Parameters: - blueprint_path – Main blueprint yaml file path.
- blueprint_id – Id of the uploaded blueprint.
Returns: Created blueprint.
Blueprint path should point to the main yaml file of the blueprint to be uploaded. Its containing folder will be packed to an archive and get uploaded to the manager. Blueprint ID parameter is available for specifying the blueprint’s unique Id.
- get(blueprint_id, _include=None)[source]¶
Gets a blueprint by its id.
Parameters: - blueprint_id – Blueprint’s id to get.
- _include – List of fields to include in response.
Returns: The blueprint.
- delete(blueprint_id)[source]¶
Deletes the blueprint whose id matches the provided blueprint id.
Parameters: blueprint_id – The id of the blueprint to be deleted. Returns: Deleted blueprint.
- download(blueprint_id, output_file=None)[source]¶
Downloads a previously uploaded blueprint from Cloudify’s manager.
Parameters: - blueprint_id – The Id of the blueprint to be downloaded.
- output_file – The file path of the downloaded blueprint file (optional)
Returns: The file path of the downloaded blueprint.