Service.Site

Site methods.

Summary
Service.SiteSite methods.
Functions
createCreate a site.
destroyDelete a Site
updateUpdate the site details.
findSearch for a site.
getSettingsget all the settings associated with the site
setSettingsset a list of settings on the site
getAliasesget all aliases associated with the site
addAliasAdd an alias to a site.
destroyAliasRemove an alias from a site
getAddressfetch the address for this site
updateAddressAssociate an address with the site
assignCertificateAssign an SSL certificate with the site.
getLoadBalancerStatusFetch the current site status

Functions

create

Create a site.  Note that the hostname must not already be in use or an InvalidArguments will be thrown.

Parameters

customerIdno docs (idx: 1, type: Types.CustomerId)
namea friendly name for the site (for your use) (idx: 2, type: Types.SiteName)
hostnamea fully qualified domain name (fqdn) (idx: 3, type: Types.Hostname)
environmentNamethe name of the Environment to create (idx: 4, type: Types.EnvironmentName)
environmentTypeno docs (idx: 9, type: Types.ContainerTypeId)
addressthe ip address that the site should be bound to (idx: 5, type: Types.IPAddress, optional)
sslreserve SSL for the SiteAddress (idx: 6, type: Thrift.bool, optional)
containersa list of container ids that the site environment will be configured on (idx: 7, type: Thrift.list (Types.ContainerId))
aliasesno docs (idx: 8, type: Thrift.list (Types.SiteAlias), optional)
createDNSif true, DNS records will be created for the new site and aliases (idx: 10, type: Thrift.bool, optional)

Returns

Types.SiteId the newly created id of the site

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

destroy

Delete a Site

Parameters

idthe id of the site (idx: 1, type: Types.SiteId)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

update

Update the site details.  Provide ‘name’ and/or ‘hostname’.  Note that, if changing the hostname, the new hostname must not already be in use or an InvalidArguments will be thrown.

Parameters

idno docs (idx: 1, type: Types.SiteId)
nameno docs (idx: 2, type: Types.SiteName, optional)
hostnameno docs (idx: 3, type: Types.Hostname, optional)
updateDNSno docs (idx: 4, type: Thrift.bool, optional)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

find

Search for a site.

Parameters

customerIdno docs (idx: 1, type: Types.CustomerId, optional)
nameno docs (idx: 2, type: Types.SiteName, optional)
hostnameno docs (idx: 3, type: Types.Hostname, optional)
addressno docs (idx: 4, type: Types.IPAddress, optional)
idno docs (idx: 5, type: Types.SiteId, optional)
isSSLAssignableno docs (idx: 6, type: Thrift.bool, optional)

Returns

Thrift.list (Types.SiteDetails)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getSettings

get all the settings associated with the site

Parameters

idthe id of the site (idx: 1, type: Types.SiteId)

Returns

Types.SettingList

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

setSettings

set a list of settings on the site

Parameters

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

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getAliases

get all aliases associated with the site

Parameters

idthe id of the site (idx: 1, type: Types.SiteId)

Returns

Types.SiteAliasList a list of sitealiases

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

addAlias

Add an alias to a site.  Note that the alias must not already be in use or an InvalidArguments will be thrown.

Parameters

idthe id of the site to which you want to add an alias (idx: 1, type: Types.SiteId)
aliaseslist of aliases (idx: 4, type: Thrift.list (Types.SiteAlias))
createDNSno docs (idx: 3, type: Thrift.bool, optional)

Returns

Thrift.list (Types.SiteAliasId)

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

destroyAlias

Remove an alias from a site

Parameters

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

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getAddress

fetch the address for this site

Parameters

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

Returns

Types.IPAddress

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

updateAddress

Associate an address with the site

Parameters

idno docs (idx: 1, type: Types.SiteId)
addressIf left empty, and if not createNewAddress, it will default to the currently assigned address (idx: 2, type: Types.IPAddress, optional)
isSSLReservedno docs (idx: 3, type: Thrift.bool, optional)
createNewAddressno docs (idx: 4, type: Thrift.bool, optional)
updateDNSno docs (idx: 5, type: Thrift.bool, optional)

Returns

Types.IPAddress

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

assignCertificate

Assign an SSL certificate with the site.  If there was a previous certificate, it will be replace.

Parameters

siteIdno docs (idx: 1, type: Types.SiteId)
certificateIdIf left blank, unassigns the certificate (idx: 2, type: Types.CertificateId, optional)

Returns

Thrift.void

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer

getLoadBalancerStatus

Fetch the current site status

Parameters

siteIdno docs (idx: 1, type: Types.SiteId)
timeIf present, will search for closest record to this time (backwards); otherwise, defaults to latest status (idx: 2, type: Types.UnixTime, optional)

Returns

Types.SiteLoadBalancerStatus

Throws

Exceptions.InvalidArguments (idx: 1)

Roles

  • customer
Base type Thrift.i16
Base type Thrift.string
Base type Thrift.string
Base type Thrift.string
Base type Thrift.i16
Base type Thrift.string
A Thrift built-in type.
A Thrift built-in type.
Base type Thrift.i32
Base type Thrift.string
Base type Thrift.i16
A Thrift built-in type.
Site Details
Base type Thrift.map (Types.SettingKey => Types.SettingValue)
Base type Thrift.map (Types.SiteAliasId => Types.SiteAlias)
Base type Thrift.i16
Base type Thrift.i32
Base type Thrift.i32
All the LoadBalancerStatus records that are associated with the live site
Close