Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for instance creation from another backup image #43

Open
1ndistinct opened this issue Feb 11, 2021 · 0 comments
Open

Example for instance creation from another backup image #43

1ndistinct opened this issue Feb 11, 2021 · 0 comments

Comments

@1ndistinct
Copy link

I am using your API in order to automate our systems setup process, I have
run into an issue. I seem to be unable to figure out how to make a call to
this endpoint:
POST /cloud/project/{serviceName}/instance
If you could provide me with an example, that would be great.
I am using OVH- NodeJS as the use case requires it to be in JavaScript.
For the example, we need to be able to create an instance from the backup
of another instance. and we need automated backups on.
here is what I have done so far, but a 400 gets returned!
return new Promise((resolve,reject) =>
{
ovh.request('POST', '/cloud/project/'+config.ovh_service_name+
'/instance', {
flavorId: "4d4fd037-9493-4f2b-9afe-b542b5248eac",
imageId: "309e9cc9-8318-49a0-9c41-6d9b7ec1f071",
sshKeyId: "51326c68636d4675",
monthlyBilling: false,
name:"name",
region: "ovh-eu",
autobackup:{rotation:7,cron:"0 0 * * *"}
}, function (err, result) {
if(err)
reject(err)
else
resolve(result);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant