{"openapi":"3.0.0","info":{"title":"OVHcloud API specification","description":"Specification for OVHcloud API","version":"1.0","contact":{"name":"OVH","email":"api@ml.ovh.net"}},"servers":[{"url":"https://api.eu.ovhcloud.com/v1"}],"components":{"schemas":{"any":{"description":"Can be anything (text, int, bool, json, html, etc.)","example":"This is a content of any type !"},"complexType.UnitAndValue_long":{"type":"object","description":"A numeric value tagged with its unit","properties":{"unit":{"type":"string"},"value":{"type":"integer"}}},"dedicatedCloud.DvsSecurityPolicy":{"type":"object","description":"A structure describing the vmware DVSSecurityPolicy data object","properties":{"allowPromiscuous":{"$ref":"#/components/schemas/dedicatedCloud.vmwareBoolPolicy"},"forgedTransmits":{"$ref":"#/components/schemas/dedicatedCloud.vmwareBoolPolicy"},"macChanges":{"$ref":"#/components/schemas/dedicatedCloud.vmwareBoolPolicy"}}},"dedicatedCloud.Task":{"type":"object","description":"Operation","properties":{"createdBy":{"type":"string","description":"Creator of the task","nullable":true,"readOnly":true},"createdFrom":{"type":"string","description":"Origin of the task","nullable":true,"readOnly":true},"datacenterId":{"type":"integer","description":"datacenterId of the associated dedicatedCloud.Datacenter object","nullable":true,"readOnly":true},"description":{"type":"string","description":"Current progress description","nullable":true,"readOnly":true},"endDate":{"type":"string","description":"Task end date","nullable":true,"format":"date-time","readOnly":true},"executionDate":{"type":"string","description":"Task execution date","format":"date-time","readOnly":true},"filerId":{"type":"integer","description":"filerId of the associated dedicatedCloud.Filer object","nullable":true,"readOnly":true},"hostId":{"type":"integer","description":"hostId of the associated dedicatedCloud.Host object","nullable":true,"readOnly":true},"lastModificationDate":{"type":"string","description":"Task last modification date","nullable":true,"format":"date-time","readOnly":true},"maintenanceDateFrom":{"type":"string","description":"Maintenance task min allowed execution date","nullable":true,"format":"date-time","readOnly":true},"maintenanceDateTo":{"type":"string","description":"Maintenance task max allowed execution date","nullable":true,"format":"date-time","readOnly":true},"name":{"type":"string","description":"Task name","readOnly":true},"network":{"type":"string","description":"network of the associated dedicatedCloud.Ip object","nullable":true,"readOnly":true},"networkAccessId":{"type":"integer","description":"networkAccessId of the associated dedicatedCloud.AllowedNetwork object","nullable":true,"readOnly":true},"orderId":{"type":"integer","description":"orderId of the associated billing.Order object","nullable":true,"readOnly":true},"parentTaskId":{"type":"integer","description":"taskId of the parent dedicatedCloud.Task object","nullable":true,"readOnly":true},"progress":{"type":"integer","description":"Current progress","readOnly":true},"state":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.TaskStateEnum"}],"description":"Current Task state","readOnly":true},"taskId":{"type":"integer","description":"Task id","readOnly":true},"type":{"type":"string","description":"Task type","readOnly":true},"userId":{"type":"integer","description":"userId of the associated dedicatedCloud.User object","nullable":true,"readOnly":true},"vlanId":{"type":"integer","description":"vlanId of the parent dedicatedCloud.Vlan object","nullable":true,"readOnly":true}}},"dedicatedCloud.TaskStateEnum":{"type":"string","description":"All states a Dedicated Cloud Task can be in","enum":["canceled","doing","done","error","fixing","toCancel","toCreate","todo","unknown","waitingForChilds","waitingTodo"]},"dedicatedCloud.Vm":{"type":"object","description":"Virtual machine","properties":{"backup":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.backup.Backup"}],"description":"Backup associated to this Virtual Machine","nullable":true,"readOnly":true},"cdroms":{"type":"array","description":"Virtual machine cdroms devices","nullable":true,"items":{"$ref":"#/components/schemas/dedicatedCloud.virtualMachineCdrom"},"readOnly":true},"clusterName":{"type":"string","description":"Cluster of the virtual machine.","nullable":true,"readOnly":true},"cpuMax":{"type":"number","description":"Maximum CPU performance, in MHz.","nullable":true,"readOnly":true},"cpuNum":{"type":"integer","description":"Number of processors in the virtual machine.","nullable":true,"readOnly":true},"cpuReady":{"type":"number","description":"Time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. In millisecond","nullable":true,"readOnly":true},"cpuReadyPercent":{"type":"number","description":"Percentage of time that the virtual machine was ready, but could not get scheduled to run on the physical CPU. In percent","nullable":true,"readOnly":true},"cpuUsed":{"type":"integer","description":"Current CPU performance, in MHz.","nullable":true,"readOnly":true},"filers":{"type":"array","description":"List of filers in use by the virtual machine.","nullable":true,"items":{"$ref":"#/components/schemas/dedicatedCloud.vmFiler"},"readOnly":true},"folderName":{"type":"string","description":"Folder of the virtual machine.","nullable":true,"readOnly":true},"guestOsFamily":{"type":"string","description":"VMware guest configured OS family","nullable":true,"readOnly":true},"hostName":{"type":"string","description":"Name of the host hosting the virtual machine.","nullable":true,"readOnly":true},"license":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.spla.KmsLicenseIncludingLegacyEnum"}],"description":"Registered managed license","nullable":true,"readOnly":true},"memoryMax":{"type":"integer","description":"Memory size of the virtual machine, in MB","nullable":true,"readOnly":true},"memoryTps":{"type":"string","description":"Amount of guest memory that is shared with other virtual machines, in Mb","nullable":true,"readOnly":true},"memoryUsed":{"type":"integer","description":"Current memory utilization, in MB","nullable":true,"readOnly":true},"moRef":{"type":"string","description":"moRef of the virtual machine.","readOnly":true},"name":{"type":"string","description":"Name of the virtual machine.","nullable":true,"readOnly":true},"netPacketRx":{"type":"number","description":"Number of packets received.","nullable":true,"readOnly":true},"netPacketTx":{"type":"number","description":"Number of packets transmitted.","nullable":true,"readOnly":true},"netRx":{"type":"number","description":"Rate at which data is received. In KB/s","nullable":true,"readOnly":true},"netTx":{"type":"number","description":"Rate at which data is transmitted. In KB/s","nullable":true,"readOnly":true},"networks":{"type":"array","description":"List of the networks link to this virtual machine","nullable":true,"items":{"$ref":"#/components/schemas/dedicatedCloud.vmNetwork"},"readOnly":true},"powerState":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.virtualMachinePowerState"}],"description":"Power state of the virtual machine.","readOnly":true},"readLatency":{"type":"number","description":"Amount of time for a read operation from the virtual disk. In millisecond","nullable":true,"readOnly":true},"readPerSecond":{"type":"number","description":"Number of read issued per second to the virtual disk. In millisecond","nullable":true,"readOnly":true},"readRate":{"type":"number","description":"Rate of reading data from the virtual disk. In KB/s","nullable":true,"readOnly":true},"roleFt":{"type":"string","description":"The index of the current VM in instanceUuids array starting from 1, so 1 means that it is the primary VM.","nullable":true,"readOnly":true},"snapshotNum":{"type":"integer","description":"Number of snapshot of the virtual machine.","nullable":true,"readOnly":true},"stateFt":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.virtualMachineFaultToleranceState"}],"description":"The fault tolerance state of the virtual machine.","nullable":true,"readOnly":true},"vmId":{"type":"integer","description":"Id of the virtual machine.","readOnly":true},"vmwareTools":{"type":"string","description":"Current version status of VMware Tools in the guest operating system.","nullable":true,"readOnly":true},"vmwareToolsVersion":{"type":"string","description":"Current version of VMware Tools","nullable":true,"readOnly":true},"writeLatency":{"type":"number","description":"Amount of time for a write operation from the virtual disk. In millisecond","nullable":true,"readOnly":true},"writePerSecond":{"type":"number","description":"Number of write issued per second to the virtual disk. In millisecond","nullable":true,"readOnly":true},"writeRate":{"type":"number","description":"Rate of writing data from the virtual disk. In KB/s","nullable":true,"readOnly":true}}},"dedicatedCloud.backup.Backup":{"type":"object","description":"Details about a backup","properties":{"allocatedDisk":{"type":"number","description":"Disk space allocated to the virtual machine (in GB)","nullable":true},"backupDays":{"type":"array","description":"List of days your Virtual Machine will be backuped","nullable":true,"items":{"$ref":"#/components/schemas/dedicatedCloud.backup.BackupDaysEnum"}},"backupRepositoryId":{"type":"integer","description":"Associated backup repository Id","nullable":true},"encryption":{"type":"boolean","description":"Backup is encrypted","nullable":true},"lastCreationTime":{"type":"string","description":"Last creation time of the backup job","nullable":true,"format":"date-time"},"lastDuration":{"allOf":[{"$ref":"#/components/schemas/complexType.UnitAndValue_long"}],"description":"Last duration of the backup job","nullable":true},"lastResult":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.backup.JobStateEnum"}],"description":"Last result of the backup job","nullable":true},"lastSuccessfulCreationTime":{"type":"string","description":"Last successful creation time of the backup job","nullable":true,"format":"date-time"},"lastSuccessfulDuration":{"allOf":[{"$ref":"#/components/schemas/complexType.UnitAndValue_long"}],"description":"Last successful duration of the backup job","nullable":true},"offerType":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.backup.OfferTypeEnum"}],"description":"Offer type of the backup job","nullable":true},"restorePoints":{"type":"array","description":"Restore points of this backup job","nullable":true,"items":{"$ref":"#/components/schemas/dedicatedCloud.backup.RestorePoint"}},"retentionTime":{"type":"integer","description":"Number of days before the backup is deleted","nullable":true},"state":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.backup.StateEnum"}],"description":"State of the backup job","nullable":true}}},"dedicatedCloud.backup.BackupDaysEnum":{"type":"string","description":"All the possible Days of Backup","enum":["Friday","Monday","Saturday","Sunday","Thursday","Tuesday","Wednesday"]},"dedicatedCloud.backup.BackupTypeEnum":{"type":"string","description":"All the type of a restore point","enum":["full","incremental"]},"dedicatedCloud.backup.JobStateEnum":{"type":"string","description":"State of the backup job","enum":["failed","running","stopped","stopping","success","unknown","warning"]},"dedicatedCloud.backup.OfferTypeEnum":{"type":"string","description":"All the offer type of the backup","enum":["advanced","backup","classic","legacy","premium"]},"dedicatedCloud.backup.RestorePoint":{"type":"object","description":"Details about a restore point","properties":{"creationTime":{"type":"string","description":"Creation time of the restore point","nullable":true,"format":"date-time"},"isCorrupted":{"type":"boolean","description":"Show if the restore point is corrupted","nullable":true},"restorePointId":{"type":"integer","description":"Id of the restore point"},"size":{"allOf":[{"$ref":"#/components/schemas/complexType.UnitAndValue_long"}],"description":"Size of the restore point","nullable":true},"type":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.backup.BackupTypeEnum"}],"description":"Type of the restore point","nullable":true}}},"dedicatedCloud.backup.StateEnum":{"type":"string","description":"All the state of the backup","enum":["deleting","delivered","disabled","disabling","enabling","error","migrating","pending","removed","stopping","toCreate","toDelete","toDisable","toEnable","toStop","unknown"]},"dedicatedCloud.spla.KmsLicenseEnum":{"type":"string","description":"Managed license identifiers","enum":["windows 2016 Datacenter","windows 2016 Standard","windows 2016 Standard SQL2016 Standard","windows 2016 Standard SQL2016 Web","windows 2019 Datacenter","windows 2019 Datacenter Core","windows 2019 Standard","windows 2019 Standard Core","windows 2019 Standard SQL2019 Standard","windows 2019 Standard SQL2019 Web","windows 2019 Standard SQL2022 Standard","windows 2019 Standard SQL2022 Web","windows 2022 Datacenter","windows 2022 Datacenter Core","windows 2022 Datacenter SQL2019 Standard","windows 2022 Datacenter SQL2019 Web","windows 2022 Datacenter SQL2022 Standard","windows 2022 Datacenter SQL2022 Web","windows 2022 Standard","windows 2022 Standard Core","windows 2022 Standard SQL2019 Standard","windows 2022 Standard SQL2019 Web","windows 2022 Standard SQL2022 Standard","windows 2022 Standard SQL2022 Web","windows 2025 Datacenter","windows 2025 Datacenter Core","windows 2025 Datacenter SQL2022 Enterprise","windows 2025 Datacenter SQL2022 Standard","windows 2025 Datacenter SQL2022 Web","windows 2025 Standard","windows 2025 Standard Core","windows 2025 Standard SQL2022 Standard","windows 2025 Standard SQL2022 Web"]},"dedicatedCloud.spla.KmsLicenseIncludingLegacyEnum":{"type":"string","description":"Managed license identifiers (including legacy ones)","enum":["OVHcloud managed","unknown or unsupported license","unlicensed windows guestos","windows 2008 R2 Datacenter","windows 2008 R2 Enterprise","windows 2008 R2 Standard","windows 2008 R2 Web","windows 2012 Datacenter","windows 2012 R2 Datacenter","windows 2012 R2 Standard","windows 2012 R2 Standard SQL2016 Standard","windows 2012 R2 Standard SQL2016 Web","windows 2012 Standard","windows 2016 Datacenter","windows 2016 Standard","windows 2016 Standard SQL2016 Standard","windows 2016 Standard SQL2016 Web","windows 2019 Datacenter","windows 2019 Datacenter Core","windows 2019 Standard","windows 2019 Standard Core","windows 2019 Standard SQL2019 Standard","windows 2019 Standard SQL2019 Web","windows 2019 Standard SQL2022 Standard","windows 2019 Standard SQL2022 Web","windows 2022 Datacenter","windows 2022 Datacenter Core","windows 2022 Datacenter SQL2019 Standard","windows 2022 Datacenter SQL2019 Web","windows 2022 Datacenter SQL2022 Standard","windows 2022 Datacenter SQL2022 Web","windows 2022 Standard","windows 2022 Standard Core","windows 2022 Standard SQL2019 Standard","windows 2022 Standard SQL2019 Web","windows 2022 Standard SQL2022 Standard","windows 2022 Standard SQL2022 Web","windows 2025 Datacenter","windows 2025 Datacenter Core","windows 2025 Datacenter SQL2022 Enterprise","windows 2025 Datacenter SQL2022 Standard","windows 2025 Datacenter SQL2022 Web","windows 2025 Standard","windows 2025 Standard Core","windows 2025 Standard SQL2022 Standard","windows 2025 Standard SQL2022 Web"]},"dedicatedCloud.virtualDeviceConnectInfoStatus":{"type":"string","description":"The connectable virtual device status","enum":["ok","recoverableError","unrecoverableError","untried"]},"dedicatedCloud.virtualMachineCdrom":{"type":"object","description":"A structure describing the cdrom configuration of a virtual machine","properties":{"connected":{"type":"boolean","nullable":true},"iso":{"type":"string","nullable":true}}},"dedicatedCloud.virtualMachineFaultToleranceState":{"type":"string","description":"The fault tolerance state of the virtual machine","enum":["disabled","enabled","needSecondary","notConfigured","running","starting"]},"dedicatedCloud.virtualMachineLicensingSummary":{"type":"object","description":"A structure describing the licensing of a virtual machine","properties":{"guestOsFamily":{"type":"string","description":"Guest Operating System reported by VMware tools","nullable":true},"license":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.spla.KmsLicenseIncludingLegacyEnum"}],"description":"Attached SPLA licensing"},"moRef":{"type":"string","description":"VMware Managed object Reference identifier"},"name":{"type":"string","description":"Virtual machine name"},"vmId":{"type":"integer","description":"Virtual machine identifier"}}},"dedicatedCloud.virtualMachinePowerState":{"type":"string","description":"The power state of the virtual machine","enum":["deleted","poweredOff","poweredOn","suspended"]},"dedicatedCloud.vmFiler":{"type":"object","description":"A structure describing filers of a the virtual machine","properties":{"committed":{"type":"number"},"disks":{"type":"array","items":{"$ref":"#/components/schemas/dedicatedCloud.vmFilerDisk"}},"name":{"type":"string"}}},"dedicatedCloud.vmFilerDisk":{"type":"object","description":"A structure describing filer disks of a the virtual machine","properties":{"capacity":{"type":"number"},"id":{"type":"string"}}},"dedicatedCloud.vmNetwork":{"type":"object","description":"A structure describing the network of a the virtual machine","properties":{"allowGuestControl":{"type":"boolean"},"backing":{"$ref":"#/components/schemas/dedicatedCloud.vmNetworkBacking"},"connected":{"type":"boolean"},"controler":{"type":"string"},"label":{"type":"string"},"macAddress":{"type":"string"},"startConnected":{"type":"boolean"},"status":{"$ref":"#/components/schemas/dedicatedCloud.virtualDeviceConnectInfoStatus"}}},"dedicatedCloud.vmNetworkBacking":{"type":"object","description":"A structure describing the backing network of a the virtual machine","properties":{"carpState":{"type":"string","nullable":true},"deviceName":{"type":"string","nullable":true},"portGroupKey":{"type":"string","nullable":true},"portGroupName":{"type":"string","nullable":true},"portKey":{"type":"string","nullable":true},"portKeySecurityPolicy":{"allOf":[{"$ref":"#/components/schemas/dedicatedCloud.DvsSecurityPolicy"}],"nullable":true},"switchUuid":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/dedicatedCloud.vmNetworkBackingTypeEnum"},"useAutoDetect":{"type":"boolean","nullable":true},"valueMoref":{"type":"string","nullable":true}}},"dedicatedCloud.vmNetworkBackingTypeEnum":{"type":"string","description":"The type of the network backing","enum":["DVS","VSS"]},"dedicatedCloud.vmwareBoolPolicy":{"type":"object","description":"A structure describing the vmware bool policy data object","properties":{"inherited":{"type":"boolean"},"value":{"type":"boolean"}}},"duration":{"type":"string","description":"Duration (e.g., P1Y2M3DT4H6M9S)","example":"P1Y2M3DT4H6M9S"},"email":{"type":"string","description":"Email address (e.g., api@ml.ovh.net)","format":"email","example":"api@ml.ovh.net"},"internationalPhoneNumber":{"type":"string","description":"International phone number","format":"phone-number"},"ip":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipBlock":{"type":"string","description":"IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)","format":"ip-block","example":"192.0.2.0/24"},"ipInterface":{"type":"string","description":"IP address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4":{"type":"string","description":"IPv4 address (e.g., 192.0.2.0)","format":"ipv4","example":"192.0.2.0"},"ipv4Block":{"type":"string","description":"IPv4 CIDR notation (e.g., 192.0.2.0/24)","format":"ipv4-block","example":"192.0.2.0/24"},"ipv6":{"type":"string","description":"IPv6 address (e.g., 2001:41d0:1:1994::1)","format":"ipv6","example":"2001:41d0:1:1994::1"},"ipv6Block":{"type":"string","description":"IPv6 CIDR notation (e.g., 2001:41d0::/128)","format":"ipv6-block","example":"2001:41d0::/128"},"macAddress":{"type":"string","description":"MAC address (e.g., 00:00:5e:00:53:01)","format":"mac-address","example":"00:00:5e:00:53:01"},"phoneNumber":{"type":"string","description":"Phone number","format":"phone-number"},"time":{"type":"string","description":"Time (e.g., 15:04:05)","format":"time","example":"15:04:05"}},"securitySchemes":{"oAuth2AuthCode":{"type":"oauth2","description":"Oauth2","x-client-id":"1bb9c7df371741c0","x-client-secret":"a5b4de870aca620d10fbf63cd18d205b","flows":{"authorizationCode":{"authorizationUrl":"https://auth.eu.ovhcloud.com/oauth2/authorize","tokenUrl":"https://auth.eu.ovhcloud.com/oauth2/token","scopes":{"account/all":"Manage your account","all":"Manage your whole account and all your services","services/all":"Manage your services lifecycle and billing"}}}}}},"paths":{"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm":{"get":{"summary":"List virtual machines","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@10"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/get","required":true}],"x-expanded-response":"DedicatedCloudVm"}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}":{"get":{"summary":"Get a virtual machine","description":"Get a virtual machine. Returns the virtual machine: power state, host, cluster, CPU, memory, disk and network usage, backup and license.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}},{"in":"path","name":"vmId","description":"Id of the virtual machine.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dedicatedCloud.Vm"}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@10"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/get","required":true}]}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableCarp":{"post":{"summary":"Disable CARP on a VM","description":"Disable CARP on a VM. Disables CARP on the network port of the virtual machine with the given MAC address, on the VM Network portgroup. Returns a task to track progress.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}},{"in":"path","name":"vmId","description":"Id of the virtual machine.","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"macAddress":{"type":"string","description":"Mac address of the port to enable Carp"}},"required":["macAddress"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dedicatedCloud.Task"}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@20"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: string\nresult = client.post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableCarp\",\n\tmacAddress = None, # Mac address of the port to enable Carp (type: string)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: string\n$result = $ovh->post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/disableCarp\", array(\n\tmacAddress => null, // Mac address of the port to enable Carp (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/disableCarp","required":true}]}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableCarp":{"post":{"summary":"Enable CARP on a VM","description":"Enable CARP on a VM. Enables CARP on the network port of the virtual machine with the given MAC address, on the VM Network portgroup. Returns a task to track progress.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}},{"in":"path","name":"vmId","description":"Id of the virtual machine.","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"macAddress":{"type":"string","description":"Mac address of the port to enable Carp"}},"required":["macAddress"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dedicatedCloud.Task"}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@20"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\n# Request body type: string\nresult = client.post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableCarp\",\n\tmacAddress = None, # Mac address of the port to enable Carp (type: string)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: string\n$result = $ovh->post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/enableCarp\", array(\n\tmacAddress => null, // Mac address of the port to enable Carp (type: string)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/enableCarp","required":true}]}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/removeLicense":{"post":{"summary":"Remove a managed license","description":"Remove a managed license. Removes the managed license from the virtual machine. Returns a task to track progress.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}},{"in":"path","name":"vmId","description":"Id of the virtual machine.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dedicatedCloud.Task"}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@20"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/removeLicense\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/removeLicense\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/removeLicense","required":true}]}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/setLicense":{"post":{"summary":"Set a managed license","description":"Set a managed license. Attaches an OVHcloud managed Windows license to the virtual machine. Skip the guest OS family check with `bypassGuestOsFamilyCheck`. Returns a task to track progress.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}},{"in":"path","name":"vmId","description":"Id of the virtual machine.","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bypassGuestOsFamilyCheck":{"type":"boolean","description":"Bypass compatibility check between managed license and current VMware guest configured OS family"},"kmsLicense":{"description":"License to use","$ref":"#/components/schemas/dedicatedCloud.spla.KmsLicenseEnum"}},"required":["bypassGuestOsFamilyCheck","kmsLicense"]}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dedicatedCloud.Task"}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@20"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/setLicense\",\n\tbypassGuestOsFamilyCheck = None, # Bypass compatibility check between managed license and current VMware guest configured OS family (type: boolean)\n\tkmsLicense = None, # License to use (type: dedicatedCloud.spla.KmsLicenseEnum)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/setLicense\", array(\n\tbypassGuestOsFamilyCheck => null, // Bypass compatibility check between managed license and current VMware guest configured OS family (type: boolean)\n\tkmsLicense => null, // License to use (type: dedicatedCloud.spla.KmsLicenseEnum)\n));\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vm/setLicense","required":true}]}},"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vmLicensed":{"get":{"summary":"List licensed VMs","description":"List licensed VMs. Returns the virtual machines with a managed license, with their guest OS and license. Filter by license with `kmsLicense`.","security":[{"oAuth2AuthCode":[]}],"parameters":[{"in":"path","name":"datacenterId","description":"Id of the Datacenter","required":true,"schema":{"type":"integer"}},{"in":"query","name":"kmsLicense","description":"Only display virtual machines with this license","schema":{"$ref":"#/components/schemas/dedicatedCloud.spla.KmsLicenseIncludingLegacyEnum"}},{"in":"path","name":"serviceName","description":"Domain of the service","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/dedicatedCloud.virtualMachineLicensingSummary"}}}}}},"x-developer-hub-navigation":[["Private Cloud","Managed VMware","Managed VMware vSphere","Datacenter","Virtual Machines@@@10"]],"x-badges":[{"color":"green","label":"Stable production version"}],"x-code-samples":[{"lang":"python","label":"Python","source":"'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx',    # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx',       # Consumer Key\n)\n\nresult = client.get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vmLicensed\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"},{"lang":"php","label":"PHP","source":"<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx',  // Application Key\n               'xxxxxxxxxx',  // Application Secret\n               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n               'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vmLicensed\");\n\nprint_r($result);\n?>"}],"x-iam-actions":[{"name":"pccVMware:apiovh:datacenter/vmLicensed/get","required":true}]}}}}
