Groovy API reference

Microservice

2 minute readReference

createMicroservice

Creates a new microservice for an application

Arguments

Argument NameTypeDescription

projectName

String

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

microserviceName

String

The name of the microservice (Required)

applicationName

String

The name of the application

addDeployProcess

Boolean

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

definitionSource

String

Enum representing the source of the microservice definition

definitionSourceParameters

array

Parameters to resolve the source of the artifact representing microservice definition

definitionType

String

Microservice definition type.

deployParameters

Parameters to supply to deploy procedure of microservice definition type provider

description

String

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

rollbackParameters

Parameters to store microservice definition rollback parameters

Usage

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


ElectricFlow ef = new ElectricFlow()

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

deleteMicroservice

Deletes a microservice

Arguments

Argument NameTypeDescription

projectName

String

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

microserviceName

String

The name of the microservice (Required)

applicationName

String

The name of the application

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteMicroservice(
                projectName: 'test-projectName',
                microserviceName: 'test-microserviceName')

getMicroservice

Find a microservice by name.

Arguments

Argument NameTypeDescription

projectName

String

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

microserviceName

String

The name of the microservice (Required)

applicationName

String

The name of the application

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getMicroservice(
                projectName: 'test-projectName',
                microserviceName: 'test-microserviceName')

getMicroservices

Retrieve all microservices in an application

Arguments

Argument NameTypeDescription

projectName

String

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

applicationName

String

The name of the application

Usage

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


ElectricFlow ef = new ElectricFlow()

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

modifyMicroservice

Modifies an existing microservice.

Arguments

Argument NameTypeDescription

projectName

String

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

microserviceName

String

The name of the microservice (Required)

applicationName

String

The name of the application

definitionSource

String

Enum representing the source of the microservice definition

definitionSourceParameters

array

Parameters to resolve the source of the artifact representing microservice definition

definitionType

String

Microservice definition type.

deployParameters

Parameters to supply to deploy procedure of microservice definition type provider

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.

rollbackParameters

Parameters to store microservice definition rollback parameters

Usage

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


ElectricFlow ef = new ElectricFlow()

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