Snapshot Commands

createSnapshot

Creates a new snapshot of the specified application or microservice.

You must specify projectName, applicationName or serviceName, and snapshotName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

(Optional) The name of the application that must be unique among all projects.

Argument type: String

snapshotName

The name of the snapshot that must be unique withing the application.

Argument type: String

componentVersions

(Optional) The name and version of the component for the snapshot.

Argument type: Map

description

(Optional) Comment text describing this object, which is not interpreted by CloudBees CD .

A plain text or HTML description for this object. If using HTML, you must surround your text with <html> …​ </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul>

Argument type: String

environmentName

(Optional) Name of the environment from which the snapshot is created.

Argument type: String

environmentProjectName

(Optional) Name of the project to which the snapshot belongs.

Argument type: String

environmentTemplateProjectName

(Optional) Name of the project to which the environment template belongs when the snapshot is created from the environment template.

Argument type: String

serviceName

(Optional) The name of service from which the snapshot should be created.

Argument type: String

Positional arguments

projectName, snapshotName

Response

Returns a snapshot element.

ec-perl

syntax: $<object>->createSnapshot (<projectName>, <snapshotName>, {<optionals>});

Example

$ec->createSnapshot ("Default", "Snapshot1", {applicationName => "Test Run 1", description => "Test use cases"});

ectool

syntax: ] ectool createSnapshot <projectName> <snapshotName> [optionals]

Example

ectool createSnapshot "Default" "Snapshot1" --applicationName "Test Run 1" --description "Test use cases"

deleteSnapshot

Deletes a snapshot from an application.

You must specify projectName, applicationName or serviceName, and snapshotName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

The name of the application that must be unique among all projects.

Argument type: String

serviceName

The name of service from which the snapshot should be deleted. Argument type: String

snapshotName

The name of the snapshot that must be unique withing the application.

Argument type: String

Positional arguments

projectName, snapshotName

Response

None or a status OK message.

ec-perl

syntax: $<object>->deleteSnapshot (<projectName>, <snapshotName>, {<optionals>});

Example

$ec->deleteSnapshot ("Default", "Snapshot1", {applicationName => "Test Run 1"});

ectool

syntax: ectool deleteSnapshot <projectName> <snapshotName> [optionals]

Example

ectool deleteSnapshot "Default" "Snapshot1" --applicationName "Test Run 1"

getPartialApplicationRevision

Retrieves a partial application when a snapshot is created.

You must specify projectName, applicationName, and revisionNumber.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

The name of the application that must be unique among all projects.

Argument type: String

revisionNumber

The revision number of the application.

Argument type: Integer

Positional arguments

projectName, applicationName, revisionNumber

Response

Returns a list of environments deployed in the snapshot.

ec-perl

syntax: $<object>->getPartialApplicationRevision (<projectName>, <applicationName>, <revisionNumber>);

Example

$ec->getPartialApplicationRevision ("Pet Store", "Deploy", 2);

ectool

syntax: ectool getPartialApplicationRevision <projectName> <applicationName> <revisionNumber>

Example

ectool getPartialApplicationRevision "Pet Store" "Deploy" 2

getSnapshot

Find a snapshot by name.

You must specify projectName, applicationName, and snapshotName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

The application that owns the deployment history item.

Argument type: String

snapshotName

The name of the snapshot that must be unique within the application.

Argument type: String

Positional arguments

projectName, applicationName, snapshotName

Response

One snapshot element.

ec-perl

syntax: $<object>->getSnapshot (<projectName>, <applicationName>, <snapshotName>);

Example

$ec->getSnapshot ("Default", "Deploy", "Production");

ectool

syntax: ectool getSnapshot <projectName> <applicationName> <snapshotName>

Example

ectool getSnapshot "Default" "Deploy" "Production"

getSnapshotEnvironments

Retrieves a list of environments deployed in the specified snapshot.

You must specify projectName snapshotName, and ` `applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

snapshotName

The name of the snapshot that must be unique within the application.

Argument type: String

applicationName

The name of the application that must be unique among all projects.

Argument type: String

serviceName

(Optional) Get the list of environments for the specified service.

Argument Type: String

Positional arguments

projectName, snapshotName, applicationName

Response

A list of environments deployed in the snapshot.

ec-perl

syntax: $<object>->getSnapshotEnvironments (<projectName>, <applicationName>, <snapshotName>);

Example

$ec->getSnapshotEnvironments ("Default", "Deploy", "Production");

ectool

syntax: ectool getSnapshotEnvironments <projectName> <applicationName> <snapshotName>

Example

ectool getSnapshotEnvironments "Default" "Deploy" "Production"

getSnapshots

Retrieves all the snapshots in an application.

You must specify projectName and applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

The name of the application that must be unique among all projects.

Argument type: String

Positional arguments

projectName, applicationName

Response

Zero or more snapshot elements.

ec-perl

syntax: $<object>->getSnapshots (<projectName>, <applicationName>);

Example

$cmdr->getSnapshots ("Default", "Deploy");

ectool

syntax: ectool getSnapshots <projectName> <applicationName>

Example

ectool getSnapshots "Default" "Deploy"

modifySnapshot

Modifies an existing snapshot of an application.

You must specify projectNam, applicationName, and snapshotName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument type: String

applicationName

The name of the application that must be unique within the project.

Argument type: String

snapshotName

The name of the snapshot that must be unique within the application.

Argument type: String

componentVersions

(Optional) Name and version of the component for the snapshot. Use keyword LATEST for the latest version.

Argument type: Map

description

(Optional) Comment text describing this object, which is not interpreted by CloudBees CD .

A plain text or HTML description for this object. If using HTML, you must surround your text with <html> …​ </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul>

Argument type: String

environmentName

(Optional) Name of environment from which snapshot is created.

Argument type: String

environmentProjectName

(Optional) Name for the project to which the environment or environment template belongs.

Argument type: String

newName

(Optional) New name of the snapshot.

Argument type: String

Positional arguments

projectName, applicationName, snapshot

Response

Returns a modified snapshot object.

ec-perl

syntax: $<object>->createSnapshot (<projectName>, <applicationName>, <snapshotName>, {<optionals>});

Example

$ec->createSnapshot ("Default", "Deploy", "Beta Version 4", {description => "Internal use only"} );

ectool

syntax: ectool createSnapshot <projectName> <applicationName> [optionals]

Example

ectool createSnapshot "Default" "Deploy" "Beta Version 4" --description "Beta only"