datacenters
Creates, updates, deletes, gets or lists a datacenters resource.
Overview​
| Name | datacenters |
| Type | Resource |
| Id | ovh.dedicated_cloud.datacenters |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | |
datacenter_id | integer | Id of the Datacenter (wire: datacenterId) |
commercial_name | string | The commercial name of this Datacenter (CDI, CDI-HDS, CDI-HIPAA, CDI-NSX, CDI-NSX-T, CDI-NSX-VROPS, CDI-PCIDSS, CDI-UNKNOWN, CDI-VROPS, DC, DC-ANCIENT, DC-ANCIENT-HDS, DC-ANCIENT-HIPAA, DC-ANCIENT-NSX, DC-ANCIENT-NSX-T, DC-ANCIENT-NSX-VROPS, DC-ANCIENT-PCIDSS, DC-ANCIENT-UNKNOWN, DC-ANCIENT-VROPS, DC-HDS, DC-HIPAA, DC-LEGACY, DC-LEGACY-HDS, DC-LEGACY-HIPAA, DC-LEGACY-NSX, DC-LEGACY-NSX-T, DC-LEGACY-NSX-VROPS, DC-LEGACY-PCIDSS, DC-LEGACY-UNKNOWN, DC-LEGACY-VROPS, DC-NSX, DC-NSX-T, DC-NSX-VROPS, DC-PCIDSS, DC-UNKNOWN, DC-VROPS, ESSENTIALS, ESSENTIALS-HDS, ESSENTIALS-HIPAA, ESSENTIALS-NSX, ESSENTIALS-NSX-T, ESSENTIALS-NSX-VROPS, ESSENTIALS-PCIDSS, ESSENTIALS-UNKNOWN, ESSENTIALS-VROPS, NSX-T, NSX-T-DEFAULT, NSX-T-HDS, NSX-T-NSX, NSX-T-NSX-VROPS, NSX-T-PCIDSS, NSX-T-VROPS, NSX-T-VROPS-WITHOUT-NSX, NSX-T-WITHOUT-NSX, PREMIER, PREMIER-DEFAULT, PREMIER-HDS, PREMIER-HIPAA, PREMIER-NSX, PREMIER-NSX-T, PREMIER-NSX-VROPS, PREMIER-PCIDSS, PREMIER-UNKNOWN, PREMIER-VROPS, SDDC, SDDC-DEFAULT, SDDC-HDS, SDDC-HIPAA, SDDC-LEGACY, SDDC-LEGACY-HDS, SDDC-LEGACY-HIPAA, SDDC-LEGACY-PCIDSS, SDDC-LEGACY-UNKNOWN, SDDC-LEGACY-VROPS, SDDC-LEGACY-VROPS-WITHOUT-NSX, SDDC-LEGACY-WITHOUT-NSX, SDDC-PCIDSS, SDDC-UNKNOWN, SDDC-VROPS, SDDC-VROPS-WITHOUT-NSX, SDDC-WITHOUT-NSX, UNKNOWN, UNKNOWN-HDS, UNKNOWN-HIPAA, UNKNOWN-NSX, UNKNOWN-NSX-T, UNKNOWN-NSX-VROPS, UNKNOWN-PCIDSS, UNKNOWN-UNKNOWN, UNKNOWN-VROPS, UNKNOWN-VSPHERE, VSPHERE, VSPHERE-DEFAULT, VSPHERE-HDS, VSPHERE-NSX, VSPHERE-NSX-VROPS, VSPHERE-PCIDSS, VSPHERE-VROPS, VSPHERE-VROPS-WITHOUT-NSX, VSPHERE-WITHOUT-NSX) (wire: commercialName) |
commercial_range_name | string | The commercial range associated to this Datacenter (wire: commercialRangeName) |
horizon_view_name | string | Name of the associated Horizon View service if the VDI option is enabled (wire: horizonViewName) |
description | string | |
has_mixed_host_profiles | boolean | Check if this datacenter has different host profiles (wire: hasMixedHostProfiles) |
has_mixed_vsan_host_profiles | boolean | Check if this datacenter has different VSAN host profiles (wire: hasMixedVsanHostProfiles) |
is_removable | boolean | Check if this datacenter is removable (Need to be Empty) (wire: isRemovable) |
version | string | Os version installed on your VMware on OVHcloud |
Virtual datacenter
| Name | Datatype | Description |
|---|---|---|
name | string | |
datacenter_id | integer | Id of the Datacenter (wire: datacenterId) |
commercial_name | string | The commercial name of this Datacenter (CDI, CDI-HDS, CDI-HIPAA, CDI-NSX, CDI-NSX-T, CDI-NSX-VROPS, CDI-PCIDSS, CDI-UNKNOWN, CDI-VROPS, DC, DC-ANCIENT, DC-ANCIENT-HDS, DC-ANCIENT-HIPAA, DC-ANCIENT-NSX, DC-ANCIENT-NSX-T, DC-ANCIENT-NSX-VROPS, DC-ANCIENT-PCIDSS, DC-ANCIENT-UNKNOWN, DC-ANCIENT-VROPS, DC-HDS, DC-HIPAA, DC-LEGACY, DC-LEGACY-HDS, DC-LEGACY-HIPAA, DC-LEGACY-NSX, DC-LEGACY-NSX-T, DC-LEGACY-NSX-VROPS, DC-LEGACY-PCIDSS, DC-LEGACY-UNKNOWN, DC-LEGACY-VROPS, DC-NSX, DC-NSX-T, DC-NSX-VROPS, DC-PCIDSS, DC-UNKNOWN, DC-VROPS, ESSENTIALS, ESSENTIALS-HDS, ESSENTIALS-HIPAA, ESSENTIALS-NSX, ESSENTIALS-NSX-T, ESSENTIALS-NSX-VROPS, ESSENTIALS-PCIDSS, ESSENTIALS-UNKNOWN, ESSENTIALS-VROPS, NSX-T, NSX-T-DEFAULT, NSX-T-HDS, NSX-T-NSX, NSX-T-NSX-VROPS, NSX-T-PCIDSS, NSX-T-VROPS, NSX-T-VROPS-WITHOUT-NSX, NSX-T-WITHOUT-NSX, PREMIER, PREMIER-DEFAULT, PREMIER-HDS, PREMIER-HIPAA, PREMIER-NSX, PREMIER-NSX-T, PREMIER-NSX-VROPS, PREMIER-PCIDSS, PREMIER-UNKNOWN, PREMIER-VROPS, SDDC, SDDC-DEFAULT, SDDC-HDS, SDDC-HIPAA, SDDC-LEGACY, SDDC-LEGACY-HDS, SDDC-LEGACY-HIPAA, SDDC-LEGACY-PCIDSS, SDDC-LEGACY-UNKNOWN, SDDC-LEGACY-VROPS, SDDC-LEGACY-VROPS-WITHOUT-NSX, SDDC-LEGACY-WITHOUT-NSX, SDDC-PCIDSS, SDDC-UNKNOWN, SDDC-VROPS, SDDC-VROPS-WITHOUT-NSX, SDDC-WITHOUT-NSX, UNKNOWN, UNKNOWN-HDS, UNKNOWN-HIPAA, UNKNOWN-NSX, UNKNOWN-NSX-T, UNKNOWN-NSX-VROPS, UNKNOWN-PCIDSS, UNKNOWN-UNKNOWN, UNKNOWN-VROPS, UNKNOWN-VSPHERE, VSPHERE, VSPHERE-DEFAULT, VSPHERE-HDS, VSPHERE-NSX, VSPHERE-NSX-VROPS, VSPHERE-PCIDSS, VSPHERE-VROPS, VSPHERE-VROPS-WITHOUT-NSX, VSPHERE-WITHOUT-NSX) (wire: commercialName) |
commercial_range_name | string | The commercial range associated to this Datacenter (wire: commercialRangeName) |
horizon_view_name | string | Name of the associated Horizon View service if the VDI option is enabled (wire: horizonViewName) |
description | string | |
has_mixed_host_profiles | boolean | Check if this datacenter has different host profiles (wire: hasMixedHostProfiles) |
has_mixed_vsan_host_profiles | boolean | Check if this datacenter has different VSAN host profiles (wire: hasMixedVsanHostProfiles) |
is_removable | boolean | Check if this datacenter is removable (Need to be Empty) (wire: isRemovable) |
version | string | Os version installed on your VMware on OVHcloud |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | datacenter_id, service_name | Get a datacenter. Returns the datacenter: name, commercial range, version and whether it can be removed. | |
list | select | service_name | x_pagination_mode | List datacenters |
create | insert | service_name, commercial_range_name | Create a datacenter. Creates a datacenter in a commercial range, optionally linked to a vRack. Returns a task to track progress. | |
update | update | datacenter_id, service_name | Update a datacenter. Updates the name and description of the datacenter. Returns a task to track progress. | |
delete | delete | datacenter_id, service_name | Delete a datacenter. Deletes the datacenter. The datacenter must be empty: check isRemovable first. Returns a task to track progress. | |
check_backup_jobs | exec | datacenterId, serviceName | Check backup jobs. Checks that the backup jobs of the datacenter are set correctly after virtual machines moved to another datacenter. Returns a task to track progress. | |
disaster_recovery_zerto_disable | exec | datacenterId, serviceName, secondaryDatacenterId, secondaryServiceName | Disable Zerto disaster recovery between two VMware on OVHcloud infrastructures | |
disaster_recovery_zerto_end_migration | exec | datacenterId, serviceName | Unlink migration source virtual datacenter from Zerto disaster recovery | |
disaster_recovery_zerto_endpoint_public_ip | exec | datacenterId, serviceName, newEndpointPublicIp | Change the IP address used by Zerto disaster recovery endpoint for public network access | |
disaster_recovery_zerto_request_health_check | exec | datacenterId, serviceName | Run Zerto disaster recovery health check task | |
disaster_recovery_zerto_start_migration | exec | datacenterId, serviceName | Link migration target virtual datacenter to Zerto disaster recovery | |
disaster_recovery_zerto_single_disable | exec | datacenterId, serviceName | Disable Zerto disaster recovery between VMware on OVHcloud infrastructure and onsite infrastructure | |
disaster_recovery_zerto_single_endpoint_public_ip | exec | datacenterId, serviceName, newEndpointPublicIp | Change the IP address used by Zerto disaster recovery endpoint for public network access | |
disaster_recovery_zerto_single_request_pairing_token | exec | datacenterId, serviceName | Request Zerto disaster recovery pairing token for onsite infrastructure | |
order_new_filer_hourly | exec | datacenterId, serviceName, name | Order an hourly datastore. Orders a datastore billed by the hour with the given profile. Returns a task to track progress. | |
order_new_host_hourly | exec | datacenterId, serviceName, name | Order an hourly host. Orders a host billed by the hour with the given host profile, optionally in a given cluster. Returns a task to track progress. | |
resize_nsxt_edge_cluster | exec | datacenterId, serviceName, size | Resize the edge nodes. Changes the size of the edge nodes of the datacenter: MEDIUM, LARGE or XLARGE. Returns a task to track progress. |
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"}}) |
datacenterId | integer | Id of the Datacenter |
datacenter_id | integer | Id of the Datacenter (wire: datacenterId) |
serviceName | string | Domain of the service |
service_name | string | Domain of the service (wire: serviceName) |
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 datacenter. Returns the datacenter: name, commercial range, version and whether it can be removed.
SELECT
name,
datacenter_id,
commercial_name,
commercial_range_name,
horizon_view_name,
description,
has_mixed_host_profiles,
has_mixed_vsan_host_profiles,
is_removable,
version
FROM ovh.dedicated_cloud.datacenters
WHERE datacenter_id = '{{ datacenter_id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List datacenters
SELECT
name,
datacenter_id,
commercial_name,
commercial_range_name,
horizon_view_name,
description,
has_mixed_host_profiles,
has_mixed_vsan_host_profiles,
is_removable,
version
FROM ovh.dedicated_cloud.datacenters
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a datacenter. Creates a datacenter in a commercial range, optionally linked to a vRack. Returns a task to track progress.
INSERT INTO ovh.dedicated_cloud.datacenters (
commercial_range_name,
vrack_name,
service_name
)
SELECT
'{{ commercial_range_name }}' /* required */,
'{{ vrack_name }}',
'{{ service_name }}'
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type
;
# Description fields are for documentation purposes
- name: datacenters
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the datacenters resource.
- name: commercial_range_name
value: "{{ commercial_range_name }}"
description: |
The commercial range of this new datacenter. You can see what commercial ranges are orderable on this API section : /dedicatedCloud/commercialRange/
- name: vrack_name
value: "{{ vrack_name }}"
description: |
Name of the Vrack link to the new datacenter.
UPDATE examples​
- update
Update a datacenter. Updates the name and description of the datacenter. Returns a task to track progress.
UPDATE ovh.dedicated_cloud.datacenters
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
datacenter_id = '{{ datacenter_id }}' --required
AND service_name = '{{ service_name }}' --required
RETURNING
name,
datacenter_id,
filer_id,
host_id,
network_access_id,
order_id,
parent_task_id,
task_id,
user_id,
vlan_id,
created_by,
created_from,
description,
end_date,
execution_date,
last_modification_date,
maintenance_date_from,
maintenance_date_to,
network,
progress,
state,
type;
DELETE examples​
- delete
Delete a datacenter. Deletes the datacenter. The datacenter must be empty: check isRemovable first. Returns a task to track progress.
DELETE FROM ovh.dedicated_cloud.datacenters
WHERE datacenter_id = '{{ datacenter_id }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- check_backup_jobs
- disaster_recovery_zerto_disable
- disaster_recovery_zerto_end_migration
- disaster_recovery_zerto_endpoint_public_ip
- disaster_recovery_zerto_request_health_check
- disaster_recovery_zerto_start_migration
- disaster_recovery_zerto_single_disable
- disaster_recovery_zerto_single_endpoint_public_ip
- disaster_recovery_zerto_single_request_pairing_token
- order_new_filer_hourly
- order_new_host_hourly
- resize_nsxt_edge_cluster
Check backup jobs. Checks that the backup jobs of the datacenter are set correctly after virtual machines moved to another datacenter. Returns a task to track progress.
EXEC ovh.dedicated_cloud.datacenters.check_backup_jobs
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Disable Zerto disaster recovery between two VMware on OVHcloud infrastructures
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_disable
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"secondaryDatacenterId": {{ secondaryDatacenterId }},
"secondaryServiceName": "{{ secondaryServiceName }}"
}'
;
Unlink migration source virtual datacenter from Zerto disaster recovery
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_end_migration
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Change the IP address used by Zerto disaster recovery endpoint for public network access
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_endpoint_public_ip
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"newEndpointPublicIp": "{{ newEndpointPublicIp }}"
}'
;
Run Zerto disaster recovery health check task
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_request_health_check
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Link migration target virtual datacenter to Zerto disaster recovery
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_start_migration
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Disable Zerto disaster recovery between VMware on OVHcloud infrastructure and onsite infrastructure
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_single_disable
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Change the IP address used by Zerto disaster recovery endpoint for public network access
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_single_endpoint_public_ip
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"newEndpointPublicIp": "{{ newEndpointPublicIp }}"
}'
;
Request Zerto disaster recovery pairing token for onsite infrastructure
EXEC ovh.dedicated_cloud.datacenters.disaster_recovery_zerto_single_request_pairing_token
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
;
Order an hourly datastore. Orders a datastore billed by the hour with the given profile. Returns a task to track progress.
EXEC ovh.dedicated_cloud.datacenters.order_new_filer_hourly
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"name": "{{ name }}"
}'
;
Order an hourly host. Orders a host billed by the hour with the given host profile, optionally in a given cluster. Returns a task to track progress.
EXEC ovh.dedicated_cloud.datacenters.order_new_host_hourly
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"name": "{{ name }}",
"vmwareClusterId": "{{ vmwareClusterId }}"
}'
;
Resize the edge nodes. Changes the size of the edge nodes of the datacenter: MEDIUM, LARGE or XLARGE. Returns a task to track progress.
EXEC ovh.dedicated_cloud.datacenters.resize_nsxt_edge_cluster
@datacenterId='{{ datacenterId }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"size": "{{ size }}"
}'
;