Microservice

2 minute readReference

createMicroservice

Creates a new microservice for a project or application.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application. (Required)

microserviceName

String

The name of the microservice. (Required)

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', applicationName: 'test-applicationName', microserviceName: 'test-microserviceName' /* optional arguments */)

deleteMicroservice

Deletes a microservice application.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application. (Required)

microserviceName

String

The name of the microservice. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteMicroservice( projectName: 'test-projectName', applicationName: 'test-applicationName', microserviceName: 'test-microserviceName')

getMicroservice

Retrieves a microservice by name.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application. (Required)

microserviceName

String

The name of the microservice. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getMicroservice( projectName: 'test-projectName', applicationName: 'test-applicationName', microserviceName: 'test-microserviceName')

getMicroservices

Retrieves all microservices in a project or application.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getMicroservices( projectName: 'test-projectName', applicationName: 'test-applicationName')

modifyMicroservice

Modifies an existing microservice.

Arguments

Argument Name Type Description

projectName

String

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

applicationName

String

The name of the application. (Required)

microserviceName

String

The name of the microservice. (Required)

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

The 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', applicationName: 'test-applicationName', microserviceName: 'test-microserviceName' /* optional arguments */)