Snapshot commands

createSnapshot

Creates a new snapshot of the application or service.

Arguments

Argument Name Type Description

projectName

String

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

snapshotName

String

Name of the snapshot; must be unique within the snapshot container. (Required)

serviceName

String

The name of service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

componentVersions

array

component names and version used for snapshot. use keyword 'LATEST' to indicate latest version

containerVersions

String

Volume mount json of the container image

description

String

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

environmentName

String

The name of environment from which snapshot be created

environmentProjectName

String

Name for the project to which the environment or environment template belongs to.

Usage

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


ElectricFlow ef = new ElectricFlow()

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

deleteSnapshot

Deletes snapshot from an application.

Arguments

Argument Name Type Description

projectName

String

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

snapshotName

String

Name of the snapshot; must be unique within the snapshot container. (Required)

serviceName

String

The name of service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

Usage

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


ElectricFlow ef = new ElectricFlow()

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

getSnapshot

Find a snapshot by name.

Arguments

Argument Name Type Description

projectName

String

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

snapshotName

String

Name of the snapshot; must be unique within the snapshot container. (Required)

serviceName

String

The name of service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

Usage

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


ElectricFlow ef = new ElectricFlow()

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

getSnapshotEnvironments

Find a list of environments deployed on snapshot.

Arguments

Argument Name Type Description

projectName

String

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

snapshotName

String

Name of the snapshot; must be unique within the snapshot container. (Required)

serviceName

String

The name of service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

Usage

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


ElectricFlow ef = new ElectricFlow()

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

getSnapshots

Retrieve all snapshots in 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 service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

Usage

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


ElectricFlow ef = new ElectricFlow()

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

modifySnapshot

Modifies an existing snapshot.

Arguments

Argument Name Type Description

projectName

String

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

snapshotName

String

Name of the snapshot; must be unique within the snapshot container. (Required)

serviceName

String

The name of service from which the snapshot should be created

applicationName

String

The name of application from which the snapshot should be created

componentVersions

array

component names and version used for snapshot. use keyword 'LATEST' to indicate latest version

containerVersions

String

Volume mount json of the container image

description

String

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

environmentName

String

The name of environment from which snapshot be created

environmentProjectName

String

Name for the project to which the environment or environment template belongs to.

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.modifySnapshot(
                projectName: 'test-projectName',
                snapshotName: 'test-snapshotName'
                /* optional arguments */)