ResourcePool

3 minute readReference

addResourcesToPool

Adds resources to the specified resource pool (a named group of resources).

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

resourceNames

String array

List of resources to add/remove from the pool.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.addResourcesToPool( resourcePoolName: 'test-resourcePoolName' /* optional arguments */)

createResourcePool

Creates a new pool for resources.

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

autoDelete

Boolean

If true, the pool is deleted when the last resource is deleted.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

orderingFilter

String

JavaScript fragment that returns custom ordering of resources in a pool.

resourceNames

String array

List of resources to add/remove from the pool.

resourcePoolDisabled

Boolean

True means the resourcePool will not be allocated to job steps.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createResourcePool( resourcePoolName: 'test-resourcePoolName' /* optional arguments */)

deleteResourcePool

Deletes a resource pool.

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteResourcePool( resourcePoolName: 'test-resourcePoolName')

getResourcePool

Retrieves a specified resource pool by name.

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getResourcePool( resourcePoolName: 'test-resourcePoolName')

getResourcePools

Retrieves a list of resource pools.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getResourcePools()

getResourcePoolsInEnvironmentTier

Retrieves the list of resource pools in the specified environment tier.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

environmentName

String

The name of the environment. (Required)

environmentTierName

String

Name for the environment tier; must be unique among all tiers for the environment. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getResourcePoolsInEnvironmentTier( projectName: 'test-projectName', environmentName: 'test-environmentName', environmentTierName: 'test-environmentTierName')

modifyResourcePool

Modifies an existing resource pool.

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

autoDelete

Boolean

If true, the pool is deleted when the last resource is deleted.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

newName

String

The new name for an existing object that is being renamed.

orderingFilter

String

JavaScript fragment that returns custom ordering of resources in a pool.

resourceNames

String array

List of resources to add/remove from the pool.

resourcePoolDisabled

Boolean

True means the resourcePool will not be allocated to job steps.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyResourcePool( resourcePoolName: 'test-resourcePoolName' /* optional arguments */)

removeResourcePoolFromEnvironmentTier

Removes a resource pool from the specified environment tier.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

environmentName

String

The name of the environment. (Required)

environmentTierName

String

Name for the environment tier; must be unique among all tiers for the environment. (Required)

resourcePoolName

String

Name for the resource pool; must be unique among all resource pools. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.removeResourcePoolFromEnvironmentTier( projectName: 'test-projectName', environmentName: 'test-environmentName', environmentTierName: 'test-environmentTierName', resourcePoolName: 'test-resourcePoolName')

tearDownResourcePool

Used to get rid of resource pools that are no longer needed, and tear down associated dynamic resources.

Arguments

Argument Name Type Description

resourcePoolName

String

Name for the resource pool.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.tearDownResourcePool()