website_deployments
Creates, updates, deletes, gets or lists a website_deployments resource.
Overview​
| Name | website_deployments |
| Type | Resource |
| Id | ovh.hosting_web.website_deployments |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Deployment numeric identifier |
vcs_commit_id | string | Identifier of the last commit after deployment (wire: vcsCommitId) |
website_id | integer | Website numeric identifier (wire: websiteId) |
date | string (date-time) | Date of the deployment |
reset | boolean | Whether a reset was requested before deploying |
source | string | Source which triggered the deployment |
status | string | Current status of the deployment (doing, failed, successful) |
vcs_branch | string | Which branch of the repository is deployed (wire: vcsBranch) |
vcs_commit_message | string | Message of the last commit after deployment (wire: vcsCommitMessage) |
A website deployment
| Name | Datatype | Description |
|---|---|---|
id | integer | Deployment numeric identifier |
vcs_commit_id | string | Identifier of the last commit after deployment (wire: vcsCommitId) |
website_id | integer | Website numeric identifier (wire: websiteId) |
date | string (date-time) | Date of the deployment |
reset | boolean | Whether a reset was requested before deploying |
source | string | Source which triggered the deployment |
status | string | Current status of the deployment (doing, failed, successful) |
vcs_branch | string | Which branch of the repository is deployed (wire: vcsBranch) |
vcs_commit_message | string | Message of the last commit after deployment (wire: vcsCommitMessage) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | deployment_id, id, service_name | Returns the status, source, branch and last commit of the deployment. | |
list | select | id, service_name | x_pagination_mode | Returns the IDs of the deployments of the website. |
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"}}) |
deployment_id | integer | Deployment ID (wire: deploymentId) |
id | integer | Id |
service_name | string | Service name (wire: serviceName) |
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 status, source, branch and last commit of the deployment.
SELECT
id,
vcs_commit_id,
website_id,
date,
reset,
source,
status,
vcs_branch,
vcs_commit_message
FROM ovh.hosting_web.website_deployments
WHERE deployment_id = '{{ deployment_id }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the IDs of the deployments of the website.
SELECT
id,
vcs_commit_id,
website_id,
date,
reset,
source,
status,
vcs_branch,
vcs_commit_message
FROM ovh.hosting_web.website_deployments
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;