Service commands

createService

Creates a new service for a project or an application

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

addDeployProcess

Boolean

If set to true,then a service process is also created.

applicationName

String

The name of an application to scope this service to.

defaultCapacity

String

The default service capacity

description

String

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

maxCapacity

String

The max service capacity

minCapacity

String

The min service capacity

volume

String

Volume json of the service

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

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

deleteService

Deletes a service

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

applicationName

String

The name of an application to scope this service to.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

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

getPartialServiceRevision

Returns partial service object for snapshot creation

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

revisionNumber

Integer

Revision number (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getPartialServiceRevision(
                projectName: 'test-projectName',
                serviceName: 'test-serviceName',
                revisionNumber: 'test-revisionNumber')

getService

Find a service by name.

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

applicationEntityRevisionId

String

Revisionid of the versioned object

applicationName

String

The name of an application to scope this service to.

includeDetails

Boolean

True to include details (default is false)

serviceEntityRevisionId

String

Revisionid of the versioned object

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

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

getServiceDeploymentDetails

Get service deployment details.

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

clusterName

String

The name of the cluster. (Required)

applicationEntityRevisionId

String

Revisionid of the versioned object

applicationName

String

The name of an application to scope this service to.

clusterProjectName

String

The name of the project which owns the cluster.

environmentName

String

The name of the environment which owns the cluster.

jobStepId

String

The id of the job step

serviceEntityRevisionId

String

Revisionid of the versioned object

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getServiceDeploymentDetails(
                projectName: 'test-projectName',
                serviceName: 'test-serviceName',
                clusterName: 'test-clusterName'
                /* optional arguments */)

getServices

Retrieve all services in a project or in an application

Arguments

Argument Name Type Description

projectName

String

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

applicationEntityRevisionId

String

Revisionid of the versioned object

applicationName

String

Name of the application. Specify to search for services scoped to an application.

includeDetails

Boolean

True to include details (default is false)

includeEntityRevisions

Boolean

Include the revisions of services in the results

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

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

modifyService

Modifies an existing service.

Arguments

Argument Name Type Description

projectName

String

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

serviceName

String

The name of the service (Required)

applicationName

String

The name of an application to scope this service to.

defaultCapacity

String

The default service capacity

description

String

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

maxCapacity

String

The max service capacity

minCapacity

String

The min service capacity

newName

String

New name for an existing object that is being renamed.

volume

String

Volume json of the service

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.apis.model.*


ElectricFlow ef = new ElectricFlow()

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