Snapshot

2 minute readReference

createSnapshot

Creates a new snapshot of the 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 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 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

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)

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

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)

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

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)

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.

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

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