migration_tokens
Creates, updates, deletes, gets or lists a migration_tokens resource.
Overview​
| Name | migration_tokens |
| Type | Resource |
| Id | ovh.ip.migration_tokens |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
customer_id | string | destination customer ID (wire: customerId) |
token | string | migration token |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | ip | Get the transfer token. Returns the pending token to transfer this IP to another OVHcloud account, and that account's ID. | |
create | insert | ip, customer_id | Create a transfer token. Generates the token that the destination OVHcloud account, given by its customer ID, needs to take over this IP. |
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"}}) |
ip | string (ip-block) |
SELECT examples​
- get
Get the transfer token. Returns the pending token to transfer this IP to another OVHcloud account, and that account's ID.
SELECT
customer_id,
token
FROM ovh.ip.migration_tokens
WHERE ip = '{{ ip }}' -- required
;
INSERT examples​
- create
- Manifest
Create a transfer token. Generates the token that the destination OVHcloud account, given by its customer ID, needs to take over this IP.
INSERT INTO ovh.ip.migration_tokens (
customer_id,
ip
)
SELECT
'{{ customer_id }}' /* required */,
'{{ ip }}'
RETURNING
customer_id,
token
;
# Description fields are for documentation purposes
- name: migration_tokens
props:
- name: ip
value: "{{ ip }}"
description: Required parameter for the migration_tokens resource.
- name: customer_id
value: "{{ customer_id }}"
description: |
destination customer ID