ResourceTemplate commands

createResourceTemplate

Creates a new resource template.

Arguments

Argument Name Type Description

projectName

String

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

resourceTemplateName

String

Name for the resource template; must be unique among all resource templates. (Required)

cfgMgrParameters

array

configuration manager plugin parameters

cfgMgrPluginKey

String

configuration manager plugin key

cfgMgrProcedure

String

configuration manager plugin method name

cfgMgrProjectName

String

configuration manager plugin project name

cloudProviderParameters

array

cloud provider plugin parameters

cloudProviderPluginKey

String

cloud provider plugin key

cloudProviderProcedure

String

cloud provider plugin method name

cloudProviderProjectName

String

cloud provider plugin project name

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.createResourceTemplate(
                projectName: 'test-projectName',
                resourceTemplateName: 'test-resourceTemplateName'
                /* optional arguments */)

deleteResourceTemplate

Delete a resource template.

Arguments

Argument Name Type Description

projectName

String

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

resourceTemplateName

String

Name for the resource template; must be unique among all resource templates. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteResourceTemplate(
                projectName: 'test-projectName',
                resourceTemplateName: 'test-resourceTemplateName')

getResourceTemplate

Retrieve a resource template by name.

Arguments

Argument Name Type Description

resourceTemplateName

String

Name for the resource template; must be unique among all resource templates. (Required)

projectName

String

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

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getResourceTemplate(
                resourceTemplateName: 'test-resourceTemplateName',
                projectName: 'test-projectName')

getResourceTemplates

Retrieve all resource templates.

Arguments

Argument Name Type Description

projectName

String

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

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getResourceTemplates(
                projectName: 'test-projectName')

getResourceTemplatesInEnvironmentTemplateTier

Retrieve all resource templates in environment template tier

Arguments

Argument Name Type Description

projectName

String

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

environmentTemplateName

String

The name of the environment template. (Required)

environmentTemplateTierName

String

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

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getResourceTemplatesInEnvironmentTemplateTier(
                projectName: 'test-projectName',
                environmentTemplateName: 'test-environmentTemplateName',
                environmentTemplateTierName: 'test-environmentTemplateTierName')

modifyResourceTemplate

Modifies an existing resourceTemplate.

Arguments

Argument Name Type Description

projectName

String

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

resourceTemplateName

String

Name for the resource template; must be unique among all resource templates. (Required)

cfgMgrParameters

array

configuration manager plugin parameters

cfgMgrPluginKey

String

configuration manager plugin key

cfgMgrProcedure

String

configuration manager plugin method name

cfgMgrProjectName

String

configuration manager plugin project name

cloudProviderParameters

array

cloud provider plugin parameters

cloudProviderPluginKey

String

cloud provider plugin key

cloudProviderProcedure

String

cloud provider plugin method name

cloudProviderProjectName

String

cloud provider plugin project name

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

newName

String

New name for an existing object that is being renamed.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.modifyResourceTemplate(
                projectName: 'test-projectName',
                resourceTemplateName: 'test-resourceTemplateName'
                /* optional arguments */)

removeResourceTemplateFromEnvironmentTemplateTier

Removes the given resource template from the given environment template tier.

Arguments

Argument Name Type Description

projectName

String

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

environmentTemplateName

String

The name of the environment template. (Required)

environmentTemplateTierName

String

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

resourceTemplateName

String

Name for the resource template; must be unique among all resource templates. (Required)

resourceTemplateProjectName

String

Name for the project to which the resource template belongs to.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.removeResourceTemplateFromEnvironmentTemplateTier(
                projectName: 'test-projectName',
                environmentTemplateName: 'test-environmentTemplateName',
                environmentTemplateTierName: 'test-environmentTemplateTierName',
                resourceTemplateName: 'test-resourceTemplateName'
                /* optional arguments */)