Environment Tier

4 minute readReference

addResourcesToEnvironmentTier

Adds resources to the specified environment tier.

Required arguments

projectName

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

String

environmentName

Name of the environment which must be unique among all environments for the project.

String

environmentTierName

Name for the environment tier that must be unique among all tiers in the environment.

String

Optional arguments

resourceNames

List of resources to add to the environment tier.

Collection

resourcePhaseMappings

A map of resources and rolling deploy phases.

Map

Response

None or a status OK message.

ec-perl

Syntax:

$<object>->addResourcesToEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>, {<optionals>});

Example:

$ec->addResourcesToEnvironmentTier("Default", "QA", "Tomcat", {resourceNames => "local"});

ectool

Syntax:

ectool addResourcesToEnvironmentTier <projectName> <environmentName> <environmentTierName> [optionals]

Example:

ectool addResourcesToEnvironmentTier "Default" "QA" "Tomcat" --resourceNames "local"

createEnvironmentTier

Creates a new environment tier.

Required arguments

projectName

Name for the project; must be unique among all projects.

String

environmentName

Name of the environment which must be unique among all environments for the project; must be unique among all projects.

String

environmentTierName

Name of the environment tier; must be unique among all tiers for the environment.

String

Optional arguments

batchSize

The size of the batch supported by the environment tier.

String

batchSizeType

The type of batch size supported by the environment tier.

BatchSizeType

description

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

String

resourceNames

List of resources to add to the environment tier.

Collection

resourcePhaseMappings

A map of the resources to the rolling deploy phases to which they are assigned.

Map

resourcePoolNames

A list of resource pools to add to the environment tier.

Collection

resourcePoolPhaseMappings

A map of the resource pools to the rolling deploy phases to which they are assigned.

Map

Response

Returns an environment tier element.

ec-perl

Syntax:

$<object>->createEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>, {<optionals>});

Example:

$ec->createEnvironmentTier("Default", "PROD", "Web Services", {description => "Required for AWS"});

ectool

Syntax:

ectool createEnvironmentTier <projectName> <environmentName> <environmentTierName> [optionals]

Example:

ectool createEnvironmentTier "Default" "PROD" "Web Services" --description "Required for AWS"

deleteEnvironmentTier

Deletes an environment tier.

Required arguments

projectName

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

String

environmentName

Name of the environment that must be unique among all environments for the project. The name must be unique among all projects.

String

environmentTierName

Name of the environment tier that must be unique among all tiers for the environment.

String

Optional arguments

None

Response

None or a status OK message.

ec-perl

Syntax:

$<object>->deleteEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>);

Example:

$ec->deleteEnvironmentTier("Default", "PROD", "App Server");

ectool

Syntax:

ectool deleteEnvironmentTier <projectName> <environmentName> <environmentTierName>

Example:

ectool deleteEnvironmentTier "Default" "PROD" "App Server"

getEnvironmentTier

Retrieves an environment tier by name.

Required arguments

projectName

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

String

environmentName

Name of the environment that must be unique among all environments for the project. It must be unique among all projects.

String

environmentTierName

Name of the environment tier that must be unique among all tiers for the environment.

String

Optional arguments

None

Response

Returns an environment tier element.

ec-perl

Syntax:

$<object>->getEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>);

Example:

$ec->getEnvironmentTier("Default", "QA Lab", "Test Machine 1");

ectool

Syntax:

ectool getEnvironmentTier <projectName> <environmentName> <environmentTierName>

Example:

ectool getEnvironmentTier "Default" "QA Lab" "Test Machine 1"

getEnvironmentTiers

Retrieves all environment tiers in an environment.

Required arguments

projectName

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

String

environmentName

Name of the environment that must be unique among all environments for the project. It must be unique among all projects.

String

Optional arguments

None

Response

Returns zero or more environment tier elements.

ec-perl

Syntax:

$<object>->getEnvironmentTiers(<projectName>, <environmentName>);

Example:

$ec->getEnvironmentTiers("Default", "QA Lab");

ectool

Syntax:

ectool getEnvironmentTiers <projectName> <environmentName>

Example:

ectool getEnvironmentTiers "Default" "QA Lab"

modifyEnvironmentTier

Modifies an environment tier.

Required arguments

projectName

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

String

environmentName

Name of the environment that must be unique among all environments for the project.

String

environmentTierName

Name of the environment tier that must be unique among all tiers for the environment.

String

Optional arguments

batchSize

The size of the batch supported by the environment tier.

String

batchSizeType

The type of batch size supported by the environment tier.

BatchSizeType

description

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

String

newName

New name for an existing environment tier.

String

resourceNames

List of resources to add to the environment tier.

Collection

resourcePhaseMappings

A map of the resources to the rolling deploy phases to which they are assigned.

Map

resourcePoolNames

A list of resource pools to add to the environment tier.

Collection

resourcePoolPhaseMappings

A map of the resource pools to the rolling deploy phases to which they are assigned.

Map

Response

Retrieves an updated environment tier element.

ec-perl

Syntax:

$<object>->modifyEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>, {<optionals>});

Example:

$ec->modifyEnvironmentTier("Default", "QA lab", "Tomcat 1", {newName => "Tomcat 2", description => "New server});

ectool

Syntax:

ectool modifyEnvironmentTier <projectName> <environmentName> <environmentTierName> [optionals]

Example:

ectool modifyEnvironmentTier "Default" "QA lab" "Tomcat 1" --newName "Tomcat 2" --description "New server"

removeResourcesFromEnvironmentTier

Removes the given resources from the given environment tier.

Required arguments

projectName

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

Argument Type: String

String

environmentName

The name of the environment.

String

environmentTierName

Name for the environment tier that must be unique among all tiers for the environment.

String

Optional arguments

resourceNames

List of resources to remove from the environment tier.

Collection

Response

Removes zero or more environment tier elements.

ec-perl

Syntax:

$<object>->removeResourcesFromEnvironmentTier(<projectName>, <environmentName>, <environmentTierName>, {<optionals>});

Example:

$ec->removeResourcesFromEnvironmentTier("Default", "Production", "Apache");

ectool

Syntax:

ectool removeResourcesFromEnvironmentTier <projectName> <environmentName> <environmentTierName> [optionals]

Example:

ectool removeResourcesFromEnvironmentTier "Default" "Production" "Apache"