Back to index
Summary
Creates a new resource. For a proxy resource, proxyHostName and proxyPort arguments refer to the proxying CloudBees CD/RO agent. hostName and port refer to the proxy target.resourceNameStringrequiredName for the resource; must be unique among all resources. artifactCacheDirectoryStringoptionalArtifact cache directory for this resource. blockBooleanoptionalTrue to block on the agent ping before returning. descriptionStringoptionalComment text describing this object that is not interpreted at all by CloudBees CD/RO. hostNameStringoptionalThe domain name or IP address of the server machine corresponding to this resource. hostTypeStringoptionalThe type of the host. Possible values: "CONCURRENT" , "REGISTERED" poolsStringoptionaldeprecatedA list of arbitrary names separated by spaces, indicating the pools with which this resource is associated. portIntegeroptionalPort number to use when connecting to the agent for this resource; defaults to server default. proxyCustomizationStringoptionalProxy specific customization data; defaults to none. proxyHostNameStringoptionalThe domain name or IP address of the proxy agent machine corresponding to this resource. proxyPortIntegeroptionalPort number to use when connecting to the proxy agent for this resource; defaults to server default. proxyProtocolStringoptionalThe protocol to use when proxying to this resource; defaults to none. repositoryNamesStringoptionalA newline delimited list of repositories to retrieve artifacts from. resourceDisabledBooleanoptionalTrue means this resource will not be allocated to job steps, regardless of its step limit. resourcePoolsStringoptionalA list of arbitrary names separated by comma, indicating the pools with which this resource is associated. shellStringoptionalName of the shell program that will execute the command and postprocessor for the step. stepLimitIntegeroptionalThe maximum number of steps that may execute simultaneously using this resource. trustedBooleanoptionalTrue means the agent can speak to all other trusted agents in its zone. An untrusted agent can only speak to gateway agents. useSSLBooleanoptionalTrue means SSL is used for communication. workspaceNameStringoptionalThe name of the workspace. zoneNameStringoptionalName for the zone; must be unique among all zones. |
Usage
Groovy
import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createResource( resourceName: "test-resourceName" /* optional arguments */ )