Skip to content

Example for instance creation from another backup image #43

@1ndistinct

Description

@1ndistinct

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);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions