alvaroag
16-10-2016, 02:13
Hi. My answers are regarding Public Cloud Instances, as i understand that's what you are interested in.
1. The hourly charge is per hour of existence, no matter the instance is running or not. This is based in the fact that the resources are reserved no matter the instance status; hourly charge makes sense only when you need extra power to handle a high load for a brief time. The only eay you won't get chsrged for a stopped instance is by deleting it.
2. You cannot shutdown an instance via API - you would have to do it via installed OS or some management agent. There's an API call "/cloud/project/{serviceName}/instance/{instanceId}/reboot", which is intended to reboot an instance. I suppose it will also start the instance if it was shut down from the installed OS.
3. You can use the following API calls to create and delete an instance:
/cloud/project/{serviceName}/instance
/cloud/project/{serviceName}/instance/{instanceId}
1. The hourly charge is per hour of existence, no matter the instance is running or not. This is based in the fact that the resources are reserved no matter the instance status; hourly charge makes sense only when you need extra power to handle a high load for a brief time. The only eay you won't get chsrged for a stopped instance is by deleting it.
2. You cannot shutdown an instance via API - you would have to do it via installed OS or some management agent. There's an API call "/cloud/project/{serviceName}/instance/{instanceId}/reboot", which is intended to reboot an instance. I suppose it will also start the instance if it was shut down from the installed OS.
3. You can use the following API calls to create and delete an instance:
/cloud/project/{serviceName}/instance
/cloud/project/{serviceName}/instance/{instanceId}