Skip to main content

zone_histories

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

Overview​

Namezone_histories
TypeResource
Idovh.domain.zone_histories

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
creation_datestring (date-time)The date of backup creation (wire: creationDate)
zone_file_urlstringThe URL of the saved zone at this date (wire: zoneFileUrl)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcreation_date, zone_nameReturns a restore point: its creation date and the URL of the saved zone file.
listselectzone_namecreation_date.from, creation_date.to, x_pagination_modeReturns the creation dates of the zone restore points. Can be filtered by a creation date range.
restoreexeccreationDate, zoneNameRestores the zone to the selected restore point and returns the task.

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"}})
creationDatestring (date-time)Creation date
creation_datestring (date-time)Creation date (wire: creationDate)
zoneNamestringZone name
zone_namestringZone name (wire: zoneName)
creation_date.fromstring (date-time)Filter using the value of creationDate property (>=) (wire: creationDate.from)
creation_date.tostring (date-time)Filter using the value of creationDate property (<=) (wire: creationDate.to)
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 a restore point: its creation date and the URL of the saved zone file.

SELECT
creation_date,
zone_file_url
FROM ovh.domain.zone_histories
WHERE creation_date = '{{ creation_date }}' -- required
AND zone_name = '{{ zone_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Restores the zone to the selected restore point and returns the task.

EXEC ovh.domain.zone_histories.restore
@creationDate='{{ creationDate }}' --required,
@zoneName='{{ zoneName }}' --required
;