#!/usr/bin/env ruby #-- # ニフティクラウドSDK for Ruby # # Ruby Gem Name:: nifty-cloud-sdk # Author:: NIFTY Corporation # Copyright:: Copyright 2011 NIFTY Corporation All Rights Reserved. # License:: Distributes under the same terms as Ruby # Home:: http://cloud.nifty.com/api/ #++ require 'rubygems' require File.dirname(__FILE__) + "/../../lib/NIFTY" require 'pp' ACCESS_KEY = ENV["NIFTY_CLOUD_ACCESS_KEY"] || "" SECRET_KEY = ENV["NIFTY_CLOUD_SECRET_KEY"] || "" ncs4r = NIFTY::Cloud::Base.new(:access_key => ACCESS_KEY, :secret_key => SECRET_KEY) options = { #:instance_id => "instanceId", #:name => "name", #:description => "description", #:no_reboot => false, #:left_instance => false } pp response = ncs4r.create_image(options) p response.imageId p response.imageState