createResourcePool

On this page
Back to index

Summary

Creates a new pool for resources.
resourcePoolName
Stringrequired
Name for the resource pool; must be unique among all resource pools.
autoDelete
Booleanoptional
If true, the pool is deleted when the last resource is deleted.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
orderingFilter
Stringoptional
JavaScript fragment that returns custom ordering of resources in a pool.
resourceNames
Array<Unknown>optional
List of resources to add/remove from the pool.
resourcePoolDisabled
Booleanoptional
True means the resourcePool will not be allocated to job steps.
resourcePoolIdleSize
Integeroptional
Maximum number of resources to keep idle in the resource pool. If the system detects that the number of idle resources exceeds the maximum number specified, the additional idle resources are removed. Applicable only if the resource pool type is ELASTIC_K8S.
resourcePoolInactiveTimeout
Integeroptional
Timeout duration (in seconds) after which inactive resources are released from the pool; applicable only if the resource pool type is ELASTIC_K8S
resourcePoolMaxSize
Integeroptional
Maximum number of resources allowed in the resource pool; applicable only if the resource pool type is ELASTIC_K8S.
resourcePoolType
Stringoptional
Type of resource pool.
Possible values: "ELASTIC_K8S", "STANDARD"

Usage

Groovy

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 */ )