ResourcePool

3 minute readReference

addResourcesToPool

Adds the given resources to the given pool.

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

Create a new 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.

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

Delete 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

Retrieve a 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

Retrieve all 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

Return the list of resource pools in an 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

Modify 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

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 the given resource pool from the given 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()