createHook

Back to index

Summary

Creates a hook in a resource template, which can have one or more hooks. A hook stores a reference to a procedure in a CloudBees CD/RO project or plugin project. When a resource template is used to create a resource pool, these procedures are invoked.
hookName
Stringrequired
Name for the hook; must be unique among all hooks.
broadcast
Booleanoptional
Broadcast flag.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
hookParameter
Arrayoptional
Hook parameters.
hookType
Stringoptional
Hook type.
Possible values: "POST_CONFIGURATION", "POST_PROVISIONING", "POST_TEARDOWN", "PRE_CONFIGURATION", "PRE_PROVISIONING", "PRE_TEARDOWN"
procedureName
Stringoptional
Hook procedure name.
procedurePluginKey
Stringoptional
Procedure plugin key.
procedureProjectName
Stringoptional
Procedure project name.
projectName
Stringoptional
ProjectName of the entity that owns the hook.
resourceTemplateName
Stringoptional
Name of the resource template.

Usage

Perl

$cmdr->createHook( "test-hookName" # hookName # optionals );

ectool

ectool createHook \ "test-hookName" `# hookName` \ # optionals

Examples

Perl

$cmdr->createHook("Config Web Server", {hooktype => PRE_CONFIGURATION, procedureName => "Server Start", procedureProjectName => "Servers");

ectool

ectool createHook "Config Web Server" --hookType PRE_CONFIGURATION --procedureName "Server Start" --procedureProjectName "Servers"