When performing a "Second Day Resize Operation" for a machine using the API without specifying the "coreCount" parameter, the operation will succeed. However, the "coreCount" value will be set randomly.
Example:
You send the following API request to resize a machine with 8 CPU cores:
iaas/api/machines/$machineID/operations/resize?apiVersion=2021-07-15&cpuCount=8&memoryInMB=2048
The request completes successfully, but the resulting machine might have a random number of cores, such as:
1 CPU with 8 cores
2 CPUs with 4 cores
8 CPUs with 1 core
To control the "coreCount" value and ensure consistent CPU configuration, you must explicitly provide the "coreCount" parameter in your API request.
Example:
To resize the machine to 8 CPU cores with 2 cores per CPU:
iaas/api/machines/$machineID/operations/resize?apiVersion=2021-07-15&cpuCount=8&memoryInMB=2048&coreCount=2
Important Note:
By providing the "coreCount" parameter in the API request, you explicitly define the desired number of cores per CPU, eliminating the uncertainty of random core count allocation.