customer_approvals
Creates, updates, deletes, gets or lists a customer_approvals resource.
Overview​
| Name | customer_approvals |
| Type | Resource |
| Id | ovh.webhosting.customer_approvals |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the customer approval |
resource_id | string | Identifier of the resource the approval targets (wire: resourceId) |
approval_code | string | Code identifying the operation the customer approves (CLOUDWEB_MIGRATION) (wire: approvalCode) |
approved | boolean | Whether the customer approved the operation |
created_at | string (date-time) | Date when the customer approval was registered (wire: createdAt) |
resource_type | string | Type of the resource the approval targets (WEB) (wire: resourceType) |
Customer approval given for an operation on a target resource
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the customer approval |
resource_id | string | Identifier of the resource the approval targets (wire: resourceId) |
approval_code | string | Code identifying the operation the customer approves (CLOUDWEB_MIGRATION) (wire: approvalCode) |
approved | boolean | Whether the customer approved the operation |
created_at | string (date-time) | Date when the customer approval was registered (wire: createdAt) |
resource_type | string | Type of the resource the approval targets (WEB) (wire: resourceType) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | customer_approval_id | Get a customer approval | |
list | select | x_pagination_cursor, x_pagination_size, approval_code, resource_id, resource_type | List customer approvals, optionally filtered by approval code, resource type and resource id | |
create | insert | approval_code, approved, resource_id, resource_type | Register 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.
| 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"}}) |
customer_approval_id | integer | Customer approval ID (wire: customerApprovalId) |
approval_code | string | Code identifying the operation the customer approves (wire: approvalCode) |
resource_id | string | Identifier of the resource the approval targets (wire: resourceId) |
resource_type | string | Type of the resource the approval targets (wire: resourceType) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
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
;
List customer approvals, optionally filtered by approval code, resource type and resource id
SELECT
id,
resource_id,
approval_code,
approved,
created_at,
resource_type
FROM ovh.webhosting.customer_approvals
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND approval_code = '{{ approval_code }}'
AND resource_id = '{{ resource_id }}'
AND resource_type = '{{ resource_type }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: customer_approvals
props:
- name: approval_code
value: "{{ approval_code }}"
description: |
Code identifying the operation the customer approves
valid_values: ['CLOUDWEB_MIGRATION']
- name: approved
value: {{ approved }}
description: |
Whether the customer approved the operation
- name: resource_id
value: "{{ resource_id }}"
description: |
Identifier of the resource the approval targets
- name: resource_type
value: "{{ resource_type }}"
description: |
Type of the resource the approval targets
valid_values: ['WEB']