Snapshot

3 minute readReference

createSnapshot

Creates a new snapshot of the specified application or microservice.

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)

applicationName

String

The name of application from which the snapshot should be created.

componentVersions

Component names and version used for snapshot. Use keyword LATEST to indicate the latest version.

description

String

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

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 a 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)

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')

getSnapshot

Retrieves 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)

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')

getSnapshotEnvironments

Retrieves a list of environments deployed in the specified 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)

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')

getSnapshots

Retrieves 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)

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', )

modifySnapshot

Modifies an existing snapshot of 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)

applicationName

String

The name of application from which the snapshot should be created.

componentVersions

Component names and version used for snapshot. Use keyword LATEST to indicate the latest version.

description

String

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

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

The 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 */)