Skip to main content

customer_approvals

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

Overview​

Namecustomer_approvals
TypeResource
Idovh.webhosting.customer_approvals

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerUnique identifier of the customer approval
resource_idstringIdentifier of the resource the approval targets (wire: resourceId)
approval_codestringCode identifying the operation the customer approves (CLOUDWEB_MIGRATION) (wire: approvalCode)
approvedbooleanWhether the customer approved the operation
created_atstring (date-time)Date when the customer approval was registered (wire: createdAt)
resource_typestringType of the resource the approval targets (WEB) (wire: resourceType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomer_approval_idGet a customer approval
listselectx_pagination_cursor, x_pagination_size, approval_code, resource_id, resource_typeList customer approvals, optionally filtered by approval code, resource type and resource id
createinsertapproval_code, approved, resource_id, resource_typeRegister a customer approval

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"}})
customer_approval_idintegerCustomer approval ID (wire: customerApprovalId)
approval_codestringCode identifying the operation the customer approves (wire: approvalCode)
resource_idstringIdentifier of the resource the approval targets (wire: resourceId)
resource_typestringType of the resource the approval targets (wire: resourceType)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Get a customer approval

SELECT
id,
resource_id,
approval_code,
approved,
created_at,
resource_type
FROM ovh.webhosting.customer_approvals
WHERE customer_approval_id = '{{ customer_approval_id }}' -- required
;

INSERT examples​

Register a customer approval

INSERT INTO ovh.webhosting.customer_approvals (
approval_code,
approved,
resource_id,
resource_type
)
SELECT
'{{ approval_code }}' /* required */,
{{ approved }} /* required */,
'{{ resource_id }}' /* required */,
'{{ resource_type }}' /* required */
RETURNING
id,
resource_id,
approval_code,
approved,
created_at,
resource_type
;