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 of creating a Linode instance #43

Open
mahemoff opened this issue Jun 10, 2019 · 1 comment
Open

Example of creating a Linode instance #43

mahemoff opened this issue Jun 10, 2019 · 1 comment

Comments

@mahemoff
Copy link

The README only shows queries. Can you please provide an example of creating a Linode instance?

I'm having some issues. e.g. I tried linode.linode.create(region: '...', label: '...', type: 1, private_ip: true) and got back Error #6 - DATACENTERID is required but was not passed in. (Please consult https://www.linode.com/api/linode/linode.create), but the referenced page doesn't mention DATACENTERID.

@ellisbenjamin
Copy link

ellisbenjamin commented Jun 13, 2019

Hey there,

This gem points you to the v4 documentation when errors crop up, which is not helpful. Please check out the following:

https://www.linode.com/apiv3/linode

The correct syntax to use this is:
linode.linode.create(:datacenterid => 2, :planid => 1)

You can get a list of available datacenters with:

linode.avail.datacenters

and plans with:

linode.avail.linodeplans

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

2 participants