hostings
Creates, updates, deletes, gets or lists a hostings resource.
Overview​
| Name | hostings |
| Type | Resource |
| Id | ovh.hosting_web.hostings |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
display_name | string | Set the name displayed in ManagerV6 for your hosting (max 50 chars) (wire: displayName) |
service_name | string | Service name (wire: serviceName) |
available_boost_offer | array | Available offers for boost option (wire: availableBoostOffer) |
boost_offer | string | Current 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) |
cluster | string | Cluster name |
cluster_ip | string (ipv4) | This direct ip to your cluster ( usefull for application like api ) (example: 192.0.2.0) (wire: clusterIp) |
cluster_ipv_6 | string (ipv6) | This direct ipv6 to your cluster ( usefull for application like api ) (example: 2001:41d0:1:1994::1) (wire: clusterIpv6) |
countries_ip | array | Available clusterIp by countries (wire: countriesIp) |
datacenter | string | Datacenter where this account is located |
default_attached_domain | string | The default attached domain created along with your hosting (wire: defaultAttachedDomain) |
filer | string | Filer name |
has_cdn | boolean | Has a CDN service linked on the hosting (wire: hasCdn) |
has_hosted_ssl | boolean | Has a HostedSSL service linked on the hosting (wire: hasHostedSsl) |
home | string | Path of your home |
hosting_ip | string (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_6 | string (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) |
iam | object | IAM resource metadata |
last_ovh_config_scan | string (date-time) | /hosting/web/{serviceName}/ovhConfig is stored in cache. This date is the last refresh of this data (wire: lastOvhConfigScan) |
multiple_ssl | boolean | If set to true, service can manage more than only one certificate (wire: multipleSSL) |
object_quota | number | objects allowed (wire: objectQuota) |
object_used | number | objects used (wire: objectUsed) |
offer | string | Hosting 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_system | string | Hosting's OS (linux) (wire: operatingSystem) |
php_versions | array | State of available php versions for this account (wire: phpVersions) |
primary_login | string | Hosting's main login (wire: primaryLogin) |
quota_size | object | Space allowed (wire: quotaSize) |
quota_used | object | Space used (wire: quotaUsed) |
recommended_offer | string | If 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_type | string | Hosting resource type (bestEffort, cloud, dedicated, shared) (wire: resourceType) |
service_management_access | object | URLs to use to manage your webhosting (wire: serviceManagementAccess) |
state | string | State of your hosting (active, blocked, bloqued, hardBlocked, hardBloqued, maintenance) |
token | string | Use to link an external domain. ( This token has to be insert into a TXT field on your dns zone with ovhcontrol subdomain ) |
traffic_quota_size | object | Traffic quota allowed ( null = unlimited ) (wire: trafficQuotaSize) |
traffic_quota_used | object | Traffic quota used (wire: trafficQuotaUsed) |
updates | array | List of updates on your hosting |
Web Hosting
| Name | Datatype | Description |
|---|---|---|
display_name | string | Set the name displayed in ManagerV6 for your hosting (max 50 chars) (wire: displayName) |
service_name | string | Service name (wire: serviceName) |
available_boost_offer | array | Available offers for boost option (wire: availableBoostOffer) |
boost_offer | string | Current 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) |
cluster | string | Cluster name |
cluster_ip | string (ipv4) | This direct ip to your cluster ( usefull for application like api ) (example: 192.0.2.0) (wire: clusterIp) |
cluster_ipv_6 | string (ipv6) | This direct ipv6 to your cluster ( usefull for application like api ) (example: 2001:41d0:1:1994::1) (wire: clusterIpv6) |
countries_ip | array | Available clusterIp by countries (wire: countriesIp) |
datacenter | string | Datacenter where this account is located |
default_attached_domain | string | The default attached domain created along with your hosting (wire: defaultAttachedDomain) |
filer | string | Filer name |
has_cdn | boolean | Has a CDN service linked on the hosting (wire: hasCdn) |
has_hosted_ssl | boolean | Has a HostedSSL service linked on the hosting (wire: hasHostedSsl) |
home | string | Path of your home |
hosting_ip | string (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_6 | string (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) |
iam | object | IAM resource metadata |
last_ovh_config_scan | string (date-time) | /hosting/web/{serviceName}/ovhConfig is stored in cache. This date is the last refresh of this data (wire: lastOvhConfigScan) |
multiple_ssl | boolean | If set to true, service can manage more than only one certificate (wire: multipleSSL) |
object_quota | number | objects allowed (wire: objectQuota) |
object_used | number | objects used (wire: objectUsed) |
offer | string | Hosting 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_system | string | Hosting's OS (linux) (wire: operatingSystem) |
php_versions | array | State of available php versions for this account (wire: phpVersions) |
primary_login | string | Hosting's main login (wire: primaryLogin) |
quota_size | object | Space allowed (wire: quotaSize) |
quota_used | object | Space used (wire: quotaUsed) |
recommended_offer | string | If 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_type | string | Hosting resource type (bestEffort, cloud, dedicated, shared) (wire: resourceType) |
service_management_access | object | URLs to use to manage your webhosting (wire: serviceManagementAccess) |
state | string | State of your hosting (active, blocked, bloqued, hardBlocked, hardBloqued, maintenance) |
token | string | Use to link an external domain. ( This token has to be insert into a TXT field on your dns zone with ovhcontrol subdomain ) |
traffic_quota_size | object | Traffic quota allowed ( null = unlimited ) (wire: trafficQuotaSize) |
traffic_quota_used | object | Traffic quota used (wire: trafficQuotaUsed) |
updates | array | List of updates on your hosting |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name | Returns the offer, state, cluster, recommended IPs, disk and traffic quotas, and PHP versions of the web hosting. | |
list | select | iam_tags, x_pagination_mode | Returns the service names of the web hostings of the account. | |
update | update | service_name | Updates the display name of the web hosting. | |
local_seo_visibility_check | exec | country, name, street, zip | 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. | |
change_contact | exec | serviceName | Starts the contact change procedure of the service. Returns the identifiers of the created tasks. | |
confirm_termination | exec | serviceName, token | Confirms the termination of the service with the token sent by email. | |
log_url | exec | serviceName, kind | Generates a temporary URL to read the logs of one kind. The URL expires. (Beta version) | |
ovh_config_refresh | exec | serviceName | Refresh .ovhconfig files. Synchronizes the list of configurations with the .ovhconfig files on the hosting, and returns the task. | |
request | exec | serviceName, action | Run an action. Checks the quota, flushes the cache or runs an antihack scan on the hosting, and returns the task. | |
request_boost | exec | serviceName | Applies the requested boost offer to the hosting and returns the task. Send a null offer to disable the boost. | |
restore_snapshot | exec | serviceName, backup | Restore 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. | |
terminate | exec | serviceName | Requests the termination of the service. Confirm it with confirmTermination and the token sent by email. | |
unblock_tcp_out | exec | serviceName | Requests 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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"}}) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the service names of the web hostings of the account.
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 iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
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.
- local_seo_visibility_check
- change_contact
- confirm_termination
- log_url
- ovh_config_refresh
- request
- request_boost
- restore_snapshot
- terminate
- unblock_tcp_out
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 }}"
}'
;
Starts the contact change procedure of the service. Returns the identifiers of the created tasks.
EXEC ovh.hosting_web.hostings.change_contact
@serviceName='{{ serviceName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;
Confirms the termination of the service with the token sent by email.
EXEC ovh.hosting_web.hostings.confirm_termination
@serviceName='{{ serviceName }}' --required
@@json=
'{
"commentary": "{{ commentary }}",
"commentaryFutureUse": "{{ commentaryFutureUse }}",
"commentaryReason": "{{ commentaryReason }}",
"futureUse": "{{ futureUse }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Generates a temporary URL to read the logs of one kind. The URL expires. (Beta version)
EXEC ovh.hosting_web.hostings.log_url
@serviceName='{{ serviceName }}' --required
@@json=
'{
"kind": "{{ kind }}"
}'
;
Refresh .ovhconfig files. Synchronizes the list of configurations with the .ovhconfig files on the hosting, and returns the task.
EXEC ovh.hosting_web.hostings.ovh_config_refresh
@serviceName='{{ serviceName }}' --required
;
Run an action. Checks the quota, flushes the cache or runs an antihack scan on the hosting, and returns the task.
EXEC ovh.hosting_web.hostings.request
@serviceName='{{ serviceName }}' --required
@@json=
'{
"action": "{{ action }}"
}'
;
Applies the requested boost offer to the hosting and returns the task. Send a null offer to disable the boost.
EXEC ovh.hosting_web.hostings.request_boost
@serviceName='{{ serviceName }}' --required
@@json=
'{
"offer": "{{ offer }}"
}'
;
Restore 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.
EXEC ovh.hosting_web.hostings.restore_snapshot
@serviceName='{{ serviceName }}' --required
@@json=
'{
"backup": "{{ backup }}"
}'
;
Requests the termination of the service. Confirm it with confirmTermination and the token sent by email.
EXEC ovh.hosting_web.hostings.terminate
@serviceName='{{ serviceName }}' --required
;
Requests the unblocking of the outgoing TCP connections of the hosting, blocked after an abuse. Their current state is outState in the abuse state.
EXEC ovh.hosting_web.hostings.unblock_tcp_out
@serviceName='{{ serviceName }}' --required
;