createResource

On this page
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.
resourceName
Stringrequired
Name for the resource; must be unique among all resources.
artifactCacheDirectory
Stringoptional
Artifact cache directory for this resource.
block
Booleanoptional
True to block on the agent ping before returning.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
hostName
Stringoptional
The domain name or IP address of the server machine corresponding to this resource.
hostType
Stringoptional
The type of the host.
Possible values: "CONCURRENT", "REGISTERED"
pools
Stringoptionaldeprecated
A list of arbitrary names separated by spaces, indicating the pools with which this resource is associated.
port
Integeroptional
Port number to use when connecting to the agent for this resource; defaults to server default.
proxyCustomization
Stringoptional
Proxy specific customization data; defaults to none.
proxyHostName
Stringoptional
The domain name or IP address of the proxy agent machine corresponding to this resource.
proxyPort
Integeroptional
Port number to use when connecting to the proxy agent for this resource; defaults to server default.
proxyProtocol
Stringoptional
The protocol to use when proxying to this resource; defaults to none.
repositoryNames
Stringoptional
A newline delimited list of repositories to retrieve artifacts from.
resourceDisabled
Booleanoptional
True means this resource will not be allocated to job steps, regardless of its step limit.
resourcePools
Stringoptional
A list of arbitrary names separated by comma, indicating the pools with which this resource is associated.
shell
Stringoptional
Name of the shell program that will execute the command and postprocessor for the step.
stepLimit
Integeroptional
The maximum number of steps that may execute simultaneously using this resource.
trusted
Booleanoptional
True means the agent can speak to all other trusted agents in its zone. An untrusted agent can only speak to gateway agents.
useSSL
Booleanoptional
True means SSL is used for communication.
workspaceName
Stringoptional
The name of the workspace.
zoneName
Stringoptional
Name 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 */ )