Service.Environment

Environment methods.

Summary
Service.EnvironmentEnvironment methods.
Functions
createcreate an environment for a site
cloneEnvironmentCreate a new environment, cloning the settings and files of an existing environment
destroyDelete an environment
enableenable an environment
disabledisable an environment
findSearch for an environment
getAddressfetch the address for this environment
setLiveset an environment ‘live’
liveHistorylist the history of live environments (all history, or just an interval)
setContainerMasterMake a container the master for this environment.
getSettingsget all the settings associated with the environment
setSettingsset a list of settings on the environment
addDatabaseadd a database to an environment
removeDatabaseremove a database from an environment
addContainersadd containers to an environment
listContainersList containers in this Environment
removeContainersremove containers to an environment
getAliasesGet all aliases associated with the environment
addAliasadd an alias to a site environment
destroyAliasRemove an alias from a site environment
restartServicesRestart services on containers participating in this environment
checkServiceConfigCheck service configuration for this Environment.

Functions

create

create an environment for a site

Parameters

idthe id of the site (idx: 1, type: Types.SiteId)
namethe name of the environment (idx: 2, type: Types.EnvironmentName)
containersa list of containerids to configure the site environment on (idx: 3, type: Thrift.list (Types.ContainerId))
typeno docs (idx: 4, type: Types.ContainerTypeId)

Returns

Types.EnvironmentId the id of the newly created environment

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

cloneEnvironment

Create a new environment, cloning the settings and files of an existing environment

Parameters

sourceno docs (idx: 1, type: Types.EnvironmentId)
nameno docs (idx: 2, type: Types.EnvironmentName)
containersno docs (idx: 3, type: Thrift.list (Types.ContainerId))
typeno docs (idx: 4, type: Types.ContainerTypeId)

Returns

Types.EnvironmentId

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

destroy

Delete an environment

Parameters

idthe id of a the environment you wish to destroy (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

enable

enable an environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

disable

disable an environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

find

Search for an environment

Parameters

customerIdno docs (idx: 1, type: Types.CustomerId, optional)
siteIdno docs (idx: 2, type: Types.SiteId, optional)
containerIdno docs (idx: 3, type: Types.ContainerId, optional)
idno docs (idx: 4, type: Types.EnvironmentId, optional)
nameno docs (idx: 5, type: Types.EnvironmentName, optional)
isEnabledno docs (idx: 6, type: Thrift.bool, optional)

Returns

Thrift.list (Types.EnvironmentDetails)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getAddress

fetch the address for this environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Types.IPAddress

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

setLive

set an environment ‘live’

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

liveHistory

list the history of live environments (all history, or just an interval)

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)
intervalno docs (idx: 2, type: Types.TimeInterval, optional)

Returns

Types.LiveEnvironmentHistory

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

setContainerMaster

Make a container the master for this environment.  If another container is already the master, this will replace that.

Parameters

environmentIdno docs (idx: 1, type: Types.EnvironmentId)
containerIdno docs (idx: 2, type: Types.ContainerId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getSettings

get all the settings associated with the environment

Parameters

idthe id of the environment (idx: 1, type: Types.EnvironmentId)

Returns

Types.SettingList

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

setSettings

set a list of settings on the environment

Parameters

idthe id of the environment (idx: 1, type: Types.EnvironmentId)
settingsa list of the settings (idx: 2, type: Types.SettingList)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

addDatabase

add a database to an environment

Parameters

idid of the environment (idx: 1, type: Types.EnvironmentId)
databaseIdno docs (idx: 2, type: Types.DatabaseId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

removeDatabase

remove a database from an environment

Parameters

idid of the environment (idx: 1, type: Types.EnvironmentId)
databaseIdno docs (idx: 2, type: Types.DatabaseId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

addContainers

add containers to an environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)
containersno docs (idx: 2, type: Thrift.list (Types.ContainerId))

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

listContainers

List containers in this Environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.list (Types.ContainerId)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

removeContainers

remove containers to an environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)
containersno docs (idx: 2, type: Thrift.list (Types.ContainerId))

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getAliases

Get all aliases associated with the environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Types.EnvironmentAliasList a list of sitealiases

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

addAlias

add an alias to a site environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)
aliaseslist of aliases (idx: 4, type: Thrift.list (Types.EnvironmentAlias))
createDNSno docs (idx: 3, type: Thrift.bool, optional)

Returns

Thrift.list (Types.EnvironmentAliasId)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

destroyAlias

Remove an alias from a site environment

Parameters

idthe id of the alias to destroy (idx: 1, type: Types.EnvironmentAliasId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

restartServices

Restart services on containers participating in this environment

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)
gracefulexecute a graceful restart of services (if supported) (idx: 2, type: Thrift.bool, optional)
configtestexecute a conditional restart based on clean configuration (idx: 3, type: Thrift.bool, optional)

Returns

Thrift.list (Types.ContainerCommandResponse)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

checkServiceConfig

Check service configuration for this Environment.

Parameters

idno docs (idx: 1, type: Types.EnvironmentId)

Returns

Thrift.list (Types.ContainerCommandResponse)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer
Base type Thrift.i16
Base type Thrift.string
A Thrift built-in type.
Base type Thrift.i32
Base type Thrift.i16
Base type Thrift.i16
A Thrift built-in type.
Base type Thrift.i16
A Thrift built-in type.
Details for an Environment
Base type Thrift.string
Structure which defines an interval
Base type Thrift.map (Types.EnvironmentId => Types.TimeInterval)
Base type Thrift.map (Types.SettingKey => Types.SettingValue)
Base type Thrift.i16
Base type Thrift.map (Types.EnvironmentAliasId => Types.EnvironmentAlias)
Base type Thrift.string
Base type Thrift.i16
The result of a command called against a container
Close