Datacenter API Reference

Methods

hosting.datacenter.list(apikey[, opts=nil])

List available datacenters.

Parameters:
Returns:

struct – list datacenters descriptions

Parameters

DatacenterCloseStatus

used by DatacenterReturn

Name Description
ALL Available for no one
NEW Available for users with resource already created inside
NONE Available for everybody
DatacenterListOptions

parameter of datacenter.list() and hosting.datacenter.list()

Changed in version 3.3.32: key dc_code has been added.
dc_code parameter.

Name Default Type Mandatory
dc_code   string no
iaas_closed   boolean no
get all closed datacenter: iaas_closed_for IN [‘NEW’, ‘ALL’]
iaas_opened   boolean no
get available datacenter for creation iaas_closed_for IN [‘NONE’, ‘NEW’]
id   int or array of int no
id of the datacenter
items_per_page 100 int no
number of items returned for the pagination
name   string no
paas_closed   boolean no
get all closed datacenterc: paas_closed_for IN [‘NEW’, ‘ALL’]
paas_opened   boolean no
get available datacenter for creation paas_closed_for IN [‘NONE’, ‘NEW’]
page 0 int no
page number for pagination offset
sort_by   string no
used to sort returned items: dc_code, iaas_closed, iaas_opened, id, name, paas_closed, paas_opened

Returns

DatacenterReturn

returned by datacenter.list() and hosting.datacenter.list()

used by PaasReturn, PrivateVlanReturn and RproxyReturn

Changed in version 3.3.36: key can_migrate_to has been added.
can_migrate_to parameter.

Changed in version 3.3.35: keys deactive_at, iaas_closed_for, paas_closed_for have been added.
deactive_at parameter.
iaas_closed_for parameter.
paas_closed_for parameter.

Changed in version 3.3.32: key dc_code has been added.
dc_code parameter.

Name Type
can_migrate_to array
country string
country name
dc_code string
unique code for a datacenter define like: ‘{CountryCode}-{TownCode}{Idx}’
deactivate_at string
iaas_closed_for string
availability of datacenter for IaaS creation
id int
datacenter unique identifier
iso string
ISO 3166 country code where the datacenter physically exists
name string
unique name of the datacenter physically exists (will be deprecated use dc_code instead)
paas_closed_for string
availability of datacenter for PaaS creation