portability_documents
Creates, updates, deletes, gets or lists a portability_documents resource.
Overview​
| Name | portability_documents |
| Type | Resource |
| Id | ovh.telephony.portability_documents |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the document |
document_id | integer | Identifier of the document (wire: documentId) |
description | string | Description of the document |
get_url | string | URL to get document (wire: getUrl) |
put_url | string | URL to upload document (wire: putUrl) |
size | integer | Document size (in bytes) |
Document linked to a portability
| Name | Datatype | Description |
|---|---|---|
name | string | Name of the document |
document_id | integer | Identifier of the document (wire: documentId) |
description | string | Description of the document |
get_url | string | URL to get document (wire: getUrl) |
put_url | string | URL to upload document (wire: putUrl) |
size | integer | Document size (in bytes) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, document_id, id | Get a porting document | |
list | select | billing_account, id | x_pagination_mode | List porting documents |
create | insert | billing_account, id, name | Create a porting document | |
update | update | billing_account, document_id, id | Update a porting document | |
delete | delete | billing_account, document_id, id | Delete a porting document |
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"}}) |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
document_id | integer | Identifier of the document (wire: documentId) |
id | integer | The ID of the portability |
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
Get a porting document
SELECT
name,
document_id,
description,
get_url,
put_url,
size
FROM ovh.telephony.portability_documents
WHERE billing_account = '{{ billing_account }}' -- required
AND document_id = '{{ document_id }}' -- required
AND id = '{{ id }}' -- required
;
List porting documents
SELECT
name,
document_id,
description,
get_url,
put_url,
size
FROM ovh.telephony.portability_documents
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a porting document
INSERT INTO ovh.telephony.portability_documents (
description,
name,
billing_account,
id
)
SELECT
'{{ description }}',
'{{ name }}' /* required */,
'{{ billing_account }}',
'{{ id }}'
RETURNING
name,
document_id,
description,
get_url,
put_url,
size
;
# Description fields are for documentation purposes
- name: portability_documents
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the portability_documents resource.
- name: id
value: {{ id }}
description: Required parameter for the portability_documents resource.
- name: description
value: "{{ description }}"
description: |
Description of the document
- name: name
value: "{{ name }}"
description: |
Document's name
UPDATE examples​
- update
Update a porting document
UPDATE ovh.telephony.portability_documents
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND document_id = '{{ document_id }}' --required
AND id = '{{ id }}' --required;
DELETE examples​
- delete
Delete a porting document
DELETE FROM ovh.telephony.portability_documents
WHERE billing_account = '{{ billing_account }}' --required
AND document_id = '{{ document_id }}' --required
AND id = '{{ id }}' --required
;