Sha256: 80ed4b5d9bdfbe6eef7085d0cdb329063a124d6f7d83bf9378ce7fbb3b6eb24e
Contents?: true
Size: 906 Bytes
Versions: 3
Compression:
Stored size: 906 Bytes
Contents
# List all images on your account image = OneAndOne::Image.new() response = image.list puts JSON.pretty_generate(response) # Create a new image image = OneAndOne::Image.new() response = image.create(server_id: '<SERVER-ID>', name: 'Example Image', frequency: 'ONCE', num_images: 1) puts JSON.pretty_generate(response) ## Wait for image to deploy before performing other actions ## puts "\nCreating image, please wait..." image.wait_for # Retrieve the current specs for an image image = OneAndOne::Image.new() response = image.get(image_id: '<IMAGE-ID>') puts JSON.pretty_generate(response) # Modify an image image = OneAndOne::Image.new() response = image.modify(image_id: '<IMAGE-ID>', name: 'New Name') puts JSON.pretty_generate(response) # Delete the new image image = OneAndOne::Image.new() response = image.delete(image_id: '<IMAGE-ID>') puts JSON.pretty_generate(response)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
1and1-1.3.0 | examples/image_examples.rb |
1and1-1.2.0 | examples/image_examples.rb |
1and1-1.1 | examples/image_examples.rb |