Groovy API reference

Cluster

Reference

createCluster

Create a new cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

definitionParameters

Cluster definition parameter

description

String

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

environmentName

String

Name of the environment which owns this cluster.

pluginConfigurationName

String

name of the plugin configuration.

pluginKey

String

Name of the plugin key.

pluginProjectName

String

plugin project name.

providerClusterName

String

Name of the cluster on the provider platform.

providerProjectName

String

Name of the project on the provider platform.

provisionParameters

provision parameter

provisionProcedure

String

provision procedure name.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

deleteCluster

Deletes a cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

environmentName

String

Name of the environment which owns this cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

doActionOnRealtimeCluster

Perform action on the given object in the container platform for the given CloudBees CD/RO cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

action

String

The action to be performed on the object within the cluster. The supported values for action may vary by container platform and the type of object. Kubernetes cluster will support 'viewLogs' action on 'ecp-container' object type. (Required)

objectId

String

The identifier for the object within the cluster for which real-time details will be retrieved. The identifier for the object within the cluster can be obtained using 'getRealtimeClusterTopology' API. (Required)

objectType

String

The type of object within the cluster for which real-time details will be retrieved. The supported values for object type may vary by container platform. Kubernetes cluster will support 'ecp-namespace', 'ecp-service', 'ecp-pod', and 'ecp-container' object types. (Required)

environmentName

String

Name of the environment which owns this cluster.

actionParameters

Parameters passed as arguments for the action that should be performed on the object within the cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.doActionOnRealtimeCluster(
                projectName: 'test-projectName',
                clusterName: 'test-clusterName',
                action: 'test-action',
                objectId: 'test-objectId',
                objectType: 'test-objectType'
                /* optional arguments */)

getCluster

Retrieve a cluster by name.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

environmentName

String

Name of the environment which owns this cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

getClusters

Retrieve all clusters in a project or environment.

Arguments

Argument NameTypeDescription

projectName

String

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

environmentName

String

Name of the environment which owns this cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

getRealtimeClusterDetails

Retrieve details for the given object from the container platform for the given CloudBees CD/RO cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

objectId

String

The identifier for the object within the cluster for which real-time details will be retrieved. The identifier for the object within the cluster can be obtained using 'getRealtimeClusterTopology' API. (Required)

objectType

String

The type of object within the cluster for which real-time details will be retrieved. The supported values for object type may vary by container platform. Kubernetes cluster will support 'ecp-namespace', 'ecp-service', 'ecp-pod', and 'ecp-container' object types. (Required)

environmentName

String

Name of the environment which owns this cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getRealtimeClusterDetails(
                projectName: 'test-projectName',
                clusterName: 'test-clusterName',
                objectId: 'test-objectId',
                objectType: 'test-objectType')

getRealtimeClusterTopology

Retrieve cluster topology from the container platform for the given CloudBees CD/RO cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

environmentName

String

Name of the environment which owns this cluster.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

modifyCluster

Modify a cluster.

Arguments

Argument NameTypeDescription

projectName

String

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

clusterName

String

The name of the cluster. (Required)

definitionParameters

Cluster definition parameter

description

String

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

environmentName

String

Name of the environment which owns this cluster.

newName

String

New name for an existing object that is being renamed.

pluginConfigurationName

String

name of the plugin configuration.

pluginKey

String

Name of the plugin key.

pluginProjectName

String

plugin project name.

providerClusterName

String

Name of the cluster on the provider platform.

providerProjectName

String

Name of the project on the provider platform.

provisionParameters

provision parameter

provisionProcedure

String

provision procedure name.

Usage

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


ElectricFlow ef = new ElectricFlow()

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