Skip to main content

hostings

Creates, updates, deletes, gets or lists a hostings resource.

Overview​

Namehostings
TypeResource
Idovh.hosting_web.hostings

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
display_namestringSet the name displayed in ManagerV6 for your hosting (max 50 chars) (wire: displayName)
service_namestringService name (wire: serviceName)
available_boost_offerarrayAvailable offers for boost option (wire: availableBoostOffer)
boost_offerstringCurrent boost offer (1000gp, 20gp, 240gp, 240pack, 240plan, 300gp, 60gp, 720pack, 720plan, 90pack, 90plan, CLOUDWEB_1, CLOUDWEB_2, CLOUDWEB_3, KS, PERFORMANCE_1, PERFORMANCE_2, PERFORMANCE_3, PERFORMANCE_4, PERSO, POWER_BETA_1, PRO, START, business, cloudweb1, cloudweb2, cloudweb3, cloudwebbetax1, depro2012, deprol2012, deproxl2012, deproxxl2012, destart2012, destartl2012, destartxl2012, domainpack, hosting-agency, hosting-agency-max, hosting-agency-plus, hosting-free-100m, hosting-performance-1, hosting-performance-2, hosting-performance-3, hosting-performance-4, hosting-perso, hosting-pro, hosting-starter, hosting-starter-ovh, hosting-startup, hostingAtScaleX128, hostingAtScaleX16, hostingAtScaleX20, hostingAtScaleX24, hostingAtScaleX32, hostingAtScaleX64, hostingAtScaleX8, itbusiness2012, itperso2012, itpremium2012, kimsufi2015, mailpack, mailplan, mediapack, mediaplan, ovhpro1To, ovhpro2To, ovhpro5To, paas2014beta, perf2014x1, perf2014x2, perf2014x3, perf2014x4, perso2010, perso2014, powerBeta1, powerbeta1, premium, pro2010, pro2014, start10g, start10m, start1g, start1ges, start1m, start5g, starter, xxlpack, xxlplan) (wire: boostOffer)
clusterstringCluster name
cluster_ipstring (ipv4)This direct ip to your cluster ( usefull for application like api ) (example: 192.0.2.0) (wire: clusterIp)
cluster_ipv_6string (ipv6)This direct ipv6 to your cluster ( usefull for application like api ) (example: 2001:41d0:1:1994::1) (wire: clusterIpv6)
countries_iparrayAvailable clusterIp by countries (wire: countriesIp)
datacenterstringDatacenter where this account is located
default_attached_domainstringThe default attached domain created along with your hosting (wire: defaultAttachedDomain)
filerstringFiler name
has_cdnbooleanHas a CDN service linked on the hosting (wire: hasCdn)
has_hosted_sslbooleanHas a HostedSSL service linked on the hosting (wire: hasHostedSsl)
homestringPath of your home
hosting_ipstring (ipv4)The recommended ip for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) (example: 192.0.2.0) (wire: hostingIp)
hosting_ipv_6string (ipv6)The recommended ipv6 for your hosting ( depends on hosting's linked services, e.g CDN or hostedSSL ) (example: 2001:41d0:1:1994::1) (wire: hostingIpv6)
iamobjectIAM resource metadata
last_ovh_config_scanstring (date-time)/hosting/web/{serviceName}/ovhConfig is stored in cache. This date is the last refresh of this data (wire: lastOvhConfigScan)
multiple_sslbooleanIf set to true, service can manage more than only one certificate (wire: multipleSSL)
object_quotanumberobjects allowed (wire: objectQuota)
object_usednumberobjects used (wire: objectUsed)
offerstringHosting offer (1000gp, 20gp, 240gp, 240pack, 240plan, 300gp, 60gp, 720pack, 720plan, 90pack, 90plan, CLOUDWEB_1, CLOUDWEB_2, CLOUDWEB_3, KS, PERFORMANCE_1, PERFORMANCE_2, PERFORMANCE_3, PERFORMANCE_4, PERSO, POWER_BETA_1, PRO, START, business, cloudweb1, cloudweb2, cloudweb3, cloudwebbetax1, depro2012, deprol2012, deproxl2012, deproxxl2012, destart2012, destartl2012, destartxl2012, domainpack, hosting-agency, hosting-agency-max, hosting-agency-plus, hosting-free-100m, hosting-performance-1, hosting-performance-2, hosting-performance-3, hosting-performance-4, hosting-perso, hosting-pro, hosting-starter, hosting-starter-ovh, hosting-startup, hostingAtScaleX128, hostingAtScaleX16, hostingAtScaleX20, hostingAtScaleX24, hostingAtScaleX32, hostingAtScaleX64, hostingAtScaleX8, itbusiness2012, itperso2012, itpremium2012, kimsufi2015, mailpack, mailplan, mediapack, mediaplan, ovhpro1To, ovhpro2To, ovhpro5To, paas2014beta, perf2014x1, perf2014x2, perf2014x3, perf2014x4, perso2010, perso2014, powerBeta1, powerbeta1, premium, pro2010, pro2014, start10g, start10m, start1g, start1ges, start1m, start5g, starter, xxlpack, xxlplan)
operating_systemstringHosting's OS (linux) (wire: operatingSystem)
php_versionsarrayState of available php versions for this account (wire: phpVersions)
primary_loginstringHosting's main login (wire: primaryLogin)
quota_sizeobjectSpace allowed (wire: quotaSize)
quota_usedobjectSpace used (wire: quotaUsed)
recommended_offerstringIf your offer is old, return a recommended offer to migrate on (1000gp, 20gp, 240gp, 240pack, 240plan, 300gp, 60gp, 720pack, 720plan, 90pack, 90plan, CLOUDWEB_1, CLOUDWEB_2, CLOUDWEB_3, KS, PERFORMANCE_1, PERFORMANCE_2, PERFORMANCE_3, PERFORMANCE_4, PERSO, POWER_BETA_1, PRO, START, business, cloudweb1, cloudweb2, cloudweb3, cloudwebbetax1, depro2012, deprol2012, deproxl2012, deproxxl2012, destart2012, destartl2012, destartxl2012, domainpack, hosting-agency, hosting-agency-max, hosting-agency-plus, hosting-free-100m, hosting-performance-1, hosting-performance-2, hosting-performance-3, hosting-performance-4, hosting-perso, hosting-pro, hosting-starter, hosting-starter-ovh, hosting-startup, hostingAtScaleX128, hostingAtScaleX16, hostingAtScaleX20, hostingAtScaleX24, hostingAtScaleX32, hostingAtScaleX64, hostingAtScaleX8, itbusiness2012, itperso2012, itpremium2012, kimsufi2015, mailpack, mailplan, mediapack, mediaplan, ovhpro1To, ovhpro2To, ovhpro5To, paas2014beta, perf2014x1, perf2014x2, perf2014x3, perf2014x4, perso2010, perso2014, powerBeta1, powerbeta1, premium, pro2010, pro2014, start10g, start10m, start1g, start1ges, start1m, start5g, starter, xxlpack, xxlplan) (wire: recommendedOffer)
resource_typestringHosting resource type (bestEffort, cloud, dedicated, shared) (wire: resourceType)
service_management_accessobjectURLs to use to manage your webhosting (wire: serviceManagementAccess)
statestringState of your hosting (active, blocked, bloqued, hardBlocked, hardBloqued, maintenance)
tokenstringUse to link an external domain. ( This token has to be insert into a TXT field on your dns zone with ovhcontrol subdomain )
traffic_quota_sizeobjectTraffic quota allowed ( null = unlimited ) (wire: trafficQuotaSize)
traffic_quota_usedobjectTraffic quota used (wire: trafficQuotaUsed)
updatesarrayList of updates on your hosting

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameReturns the offer, state, cluster, recommended IPs, disk and traffic quotas, and PHP versions of the web hosting.
listselectiam_tags, x_pagination_modeReturns the service names of the web hostings of the account.
updateupdateservice_nameUpdates the display name of the web hosting.
local_seo_visibility_checkexeccountry, name, street, zipCheck location visibility. Starts a visibility check for a location from its name, street, zip code and country. Returns whether the location is already managed.
change_contactexecserviceNameStarts the contact change procedure of the service. Returns the identifiers of the created tasks.
confirm_terminationexecserviceName, tokenConfirms the termination of the service with the token sent by email.
log_urlexecserviceName, kindGenerates a temporary URL to read the logs of one kind. The URL expires. (Beta version)
ovh_config_refreshexecserviceNameRefresh .ovhconfig files. Synchronizes the list of configurations with the .ovhconfig files on the hosting, and returns the task.
requestexecserviceName, actionRun an action. Checks the quota, flushes the cache or runs an antihack scan on the hosting, and returns the task.
request_boostexecserviceNameApplies the requested boost offer to the hosting and returns the task. Send a null offer to disable the boost.
restore_snapshotexecserviceName, backupRestore a backup. Restores the files of the hosting from a daily or weekly backup and returns the task. All current files are replaced by the backup. Databases are not restored.
terminateexecserviceNameRequests the termination of the service. Confirm it with confirmTermination and the token sent by email.
unblock_tcp_outexecserviceNameRequests the unblocking of the outgoing TCP connections of the hosting, blocked after an abuse. Their current state is outState in the abuse state.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
serviceNamestringService name
service_namestringService name (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the offer, state, cluster, recommended IPs, disk and traffic quotas, and PHP versions of the web hosting.

SELECT
display_name,
service_name,
available_boost_offer,
boost_offer,
cluster,
cluster_ip,
cluster_ipv_6,
countries_ip,
datacenter,
default_attached_domain,
filer,
has_cdn,
has_hosted_ssl,
home,
hosting_ip,
hosting_ipv_6,
iam,
last_ovh_config_scan,
multiple_ssl,
object_quota,
object_used,
offer,
operating_system,
php_versions,
primary_login,
quota_size,
quota_used,
recommended_offer,
resource_type,
service_management_access,
state,
token,
traffic_quota_size,
traffic_quota_used,
updates
FROM ovh.hosting_web.hostings
WHERE service_name = '{{ service_name }}' -- required
;

UPDATE examples​

Updates the display name of the web hosting.

UPDATE ovh.hosting_web.hostings
SET
display_name = '{{ display_name }}'
WHERE
service_name = '{{ service_name }}' --required;

Lifecycle Methods​

EXEC variables use wire (API) names.

Check location visibility. Starts a visibility check for a location from its name, street, zip code and country. Returns whether the location is already managed.

EXEC ovh.hosting_web.hostings.local_seo_visibility_check
@@json=
'{
"country": "{{ country }}",
"name": "{{ name }}",
"street": "{{ street }}",
"zip": "{{ zip }}"
}'
;