Skip to main content

customer_approvals

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

Overview​

Namecustomer_approvals
TypeResource
Idovh.managed_cms.customer_approvals

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the customer approval
resource_idstringIdentifier of the resource the approval targets (wire: resourceId)
approval_codestringCode identifying the operation the customer approves (TECH_ACCESS_DISCLAIMER) (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 (RESOURCE) (wire: resourceType)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomer_approval_idReturns the approved operation, the target resource, the decision and the registration date. (Alpha version)
listselectx_pagination_cursor, x_pagination_size, approval_code, resource_id, resource_typeReturns the customer approvals of the account. Filter them by approval code, resource type or resource ID. (Alpha version)
createinsertapproval_code, approved, resource_id, resource_typeRegisters whether the customer approves an operation on a resource. (Alpha version)

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_idstring (uuid)Customer 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​

Returns the approved operation, the target resource, the decision and the registration date. (Alpha version)

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

INSERT examples​

Registers whether the customer approves an operation on a resource. (Alpha version)

INSERT INTO ovh.managed_cms.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
;