Components

6 minute readReference

addComponentToApplicationTier

Adds the specified component to the specified application tier.

You must specify the projectName, applicationName, applicationTierName, and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique among all projects.

Argument Type: String

applicationTierName

Name of the tier that must be unique within the application.

Argument Type: String

componentName

Name of the component.

Argument Type: String

componentProjectName

(Optional) Name of the project that contains the component.

Argument Type: String

Positional arguments

projectName, applicationName, applicationTierName, componentName

Response

Returns the component and application tier elements.

ec-perl

syntax: $cmdr->addComponentToApplicationTier(<projectName>, <applicationName>, ` ` <applicationTierName>, <componentName>, {<optionals>});

Example

$ec->addComponentToApplicationTier("default", "Take snapshot", "Web server", "VCScomponent");

ectool

syntax: ectool addComponentToApplicationTier <projectName> <applicationName> <applicationTierName> <componentName> [optionals]

Example

ectool addComponentToApplicationTier "default" "Take snapshot" "Web server" "VCScomponent"

copyComponent

Creates a new component based on an existing one.

You must specify the projectName, componentName, and newComponentName.

Arguments Descriptions

projectName

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

Argument Type: String

componentName

The name of the component.

Argument Type: String

newComponentName

The name of the new component.

Argument Type: String

applicationTierName

(Optional) The name of the tier that must be unique within the application.

Argument Type: String

description

(Optional) Comment text describing this object. It is not interpreted by CloudBees CD/RO .

Argument Type: String

fromApplicationName

(Optional) The name of source application.

Argument Type: String

toApplicationName

(Optional) The name of source application.

Argument Type: String

Positional arguments

projectName, componentName, and newComponentName

Response

Returns the new component.

ec-perl

syntax: $cmdr->copyComponent(<projectName>, <componentName>, <newComponentName>, {<optionals>});

Example

$ec->copyComponent("Default", "WAR file", "New WAR file", {applicationTierName => "Web Server Config"});

ectool

syntax: ectool copyComponent <projectName> <componentName> <newComponentName> [optionals]

Example:

ectool copyComponent "Default" "WAR file" "New WAR file" --applicationTierName "Web Server Config"

createComponent

Creates a new component for a project.

You must specify the projectName and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

componentName

The name of the component.

Argument Type: String

actualParameters

(Optional) The parameters passed as arguments to the application component.

Argument Type: Map

applicationName

(Optional) The name of the application where the component is defined.

Argument Type: String

credentialName

(Optional) The name of the credential to attach to the component.

Argument Type: String

description

(Optional) Comment text describing this object. It is not interpreted by CloudBees CD/RO .

Argument Type: String

pluginKey

(Optional) The key of the plugin.

Argument Type: String

pluginName

(Optional) The name of the plugin.

Argument Type: String

pluginParameters

(Optional) The list of the plugin parameters.

Argument Type: Map

reference

(Optional) < Boolean flag— 0|1|true|false >

If 1 or true, a reference of the component is created.

If 0 or false, a copy of the component is created.

Argument type: Boolean

sourceApplicationName

(Optional) The name of source application.

Argument Type: String

sourceComponentName

(Optional) The name of new component.

Argument Type: String

sourceProjectName

(Optional) The name of source project.

Argument Type: String

Positional arguments

projectName, componentName

Usage Guidelines:

  • To create a new component, use pluginKey or pluginName.

    ectool example: --pluginKey or --pluginName

  • To create an application component by copying a master component, use applicationName, sourceComponentName, sourceProjectName, and reference = 0.

    ectool example: --applicationName, --sourceComponentName, --sourceProjectName, --reference 0

  • To create a master component by copying another master component, use sourceComponentName, sourceProjectName,and reference = 0.

    ectool example: --sourceComponentName, --sourceProjectName, --reference 0

  • To create an application component by copying another application component, use applicationName, sourceComponentName, sourceApplicationName, sourceProjectName, and reference = 0.

    ectool example: --applicationName, --sourceComponentName, --sourceApplicationName, --sourceProjectName, --reference 0

  • To create a master component from an application component, use sourceComponentName, sourceApplicationName, sourceProjectName, and reference = 0.

    ectool example: --sourceComponentName, --sourceApplicationName, --sourceProjectName, --reference 0

  • To create a reference of the master component, use applicationName, sourceComponentName, sourceProjectName, and reference = 1.

    ectool example: --applicationName, --sourceComponentName, --sourceProjectName, --reference 1

Response

Returns a version-controlled component element.

ec-perl

syntax: $cmdr->createComponent(<projectName>, <componentName>, {<optionals>});

Example

To create a new component:

$ec->createComponent("Default", "Cleanup DB", {pluginName => "EC-Maven"});

To create an application component by copying a master component

$ec->createComponent("Default", "Cleanup DB", {applicationName => "Deploy", sourceComponentName => "Backup DB", sourceProjectName => "Archive", reference => 0});

ectool

syntax: ectool createComponent <projectName> <componentName> [optionals]

Example

To create a new component:

ectool createComponent "Default" "Cleanup DB" --pluginName "EC-Maven"

To create an application component by copying a master component:

ectool createComponent "Default" "Cleanup DB" --applicationName "Deploy" --sourceComponentName "Backup DB" --sourceProjectName "Archive" --reference 0

deleteComponent

Deletes a component.

You must specify the projectName and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

componentName

Name of the component.

Argument Type: String

applicationName

(Optional) Name of an application to which this component is scoped.

Argument Type: String

Positional arguments

projectName, componentName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->deleteComponent(<projectName>, <componentName>, {<optionals>});

Example

$ec->deleteComponent("Default", "VCScomponent", {applicationName => "Deploy"});

ectool

syntax: ectool deleteComponent <projectName> <componentName> [optionals]

Example

ectool deleteComponent "Default" "VCScomponent" --applicationName "Deploy"

getComponent

Retrieves a component by name.

You must specify the projectName and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

componentName

Name of the component.

Argument Type: String

applicationEntityRevisionId

(Optional) The revision ID of the versioned object.

Argument type: UUID

applicationName

(Optional) Name of an application to which this component is scoped.

Argument Type: String

reference

(Optional) < Boolean flag— 0|1|true|false >

If 1 or true, a reference of the component is created.

If 0 or false, a copy of the component is created.

Argument type: Boolean

Positional arguments

projectName, componentName

Response

Retrieves the component element.

ec-perl

syntax: $cmdr->getComponent(<projectName>, <componentName>, {<optionals>});

Example

$ec->getComponent("Default", "WAR file", {applicationEntityRevisionId => "4fa765dd-73f1-11e3-b67e-b0a420524153"});

ectool

syntax: ectool getComponent <projectName> <componentName> [optionals]

Example

ectool getComponent "Default" "WAR file" --applicationEntityRevisionId "4fa765dd-73f1-11e3-b67e-b0a420524153"

getComponents

Retrieves all components in a project.

You must specify the projectName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

applicationEntityRevisionId

(Optional) The revision ID of the versioned object.

Argument type: UUID

applicationName

(Optional) Name of the application. You can search for components scoped to an application.

Argument Type: String

Positional arguments

projectName

Response

Returns zero or more component elements.

ec-perl

syntax: $cmdr->getComponents(<projectName>, {<optionals>});

Example

$ec->getComponents("Default", {applicationEntityRevisionId => "4fa765dd-73f1-11e3-b67e-b0a420524153"});

ectool

syntax: ectool getComponents <projectName> [optionals]

Example

ectool getComponents "Default" --applicationEntityRevisionId "4fa765dd-73f1-11e3-b67e-b0a420524153"

getComponentsinApplicationTier

Retrieves the list of components in an application tier.

You must specify the projectName, applicationName, and applicationTierName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique among all projects.

Argument Type: String

applicationTierName

Name of the tier that must be unique within the application.

Argument Type: String

applicationEntityRevisionId

(Optional) The revision ID of the versioned object.

Argument type: UUID

includeArtifactDetail

(Optional) < Boolean flag— 0|1|true|false >

If set to 1 or true, the artifact name and version are returned as part of component response.

Argument type: Boolean

Positional arguments

projectName, applicationName, applicationTierName

Response

Returns zero or more component elements in the application tier.

ec-perl

syntax: $cmdr->getComponentsInApplicationTier(<projectName>, <applicationName>, ` ` <applicationTierName>, {<optionals>});

Example:

$ec->getComponentsInApplicationTier("Default", "Deploy snapshot", "AWS", {applicationEntityRevisionId => "4fa765dd-73f1-11e3-b67e-b0a420524153"});

ectool

syntax: ectool getComponentsInApplicationTier <projectName> <applicationName> <applicationTierName> [optionals]

Example:

ectool getComponentsInApplicationTier "Default" "Deploy snapshot" "AWS" --applicationEntityRevisionId 4fa765dd-73f1-11e3-b67e-b0a420524153

==[modifyComponent] modifyComponent

Modifies an existing component.

You must specify the projectName and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

componentName

Name of the component.

Argument Type: String

actualParameters

(Optional) Parameters passed as arguments to the application component.

Argument Type: Map

applicationName

(Optional) Name of an application to which this component is scoped.

Argument Type: String

clearActualParameters

(Optional) < Boolean flag— 0|1|true|false >

If this is set to 1 or true, all actual parameters will be removed.

Argument type: Boolean

credentialName

(Optional) Name of the credential to attach to this component.

Argument Type: String

description

(Optional) Comment text describing this component. It is not interpreted by CloudBees CD/RO .

Argument Type: String

newName

(Optional) New name of the component.

Argument Type: String

pluginKey

(Optional) Key for the plugin.

Argument Type: String

pluginName

(Optional) Name of the plugin.

Argument Type: String

pluginParameters

(Optional) List of the plugin parameters

Argument Type: Map

Positional arguments

projectName, componentName

Response

Returns an updated component element.

ec-perl

syntax: $cmdr->modifyComponent(<projectName>, <componentName>, {<optionals>});

Example

$ec->modifyComponent("Default", "Web Server", {credentialName => "cred1", newName => "Master Web Server"});

ectool

syntax: ectool modifyComponent <projectName> <componentName> [optionals]

Example

ectool modifyComponent "Default" "Web Server" --credentialName cred1 --newName "Master Web Server"

removeComponentFromApplicationTier

Removes the specified component from an application tier.

You must specify the projectName, applicationName, applicationTierName, and componentName.

Arguments Descriptions

projectName

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

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique among all projects.

Argument Type: String

applicationTierName

Name of the tier that must be unique within the application.

Argument Type: String

componentName

Name of component.

Argument Type: String

componentProjectName

(Optional) Name of the project that contains the component.

Argument Type: String

Positional arguments

projectName, applicationName, applicationTierName, componentName

Response

None or a status OK message.

ec-perl

syntax: $cmdr->removeComponentFromApplicationTier(<projectName>, <applicationName>, <applicationTierName>, <componentName>, {<optionals>});

Example

$ec->removeComponentFromApplicationTier("Default", "Deploy", "Config", "WAR file", {componentProjectName => "Server Setup"});

ectool

syntax: ectool removeComponentFromApplicationTier <projectName> <applicationName> <applicationTierName> [optionals] <componentName> [optionals]

Example

ectool removeComponentFromApplicationTier "Default" "Deploy" "Config" "WAR file" --componentProjectName "Server Setup"