Sha256: 858a3ad8940ecbd20e8b5be3384218c54f44169b7605e7d4b949820cd5e0ac9b

Contents?: true

Size: 951 Bytes

Versions: 10

Compression:

Stored size: 951 Bytes

Contents

#!/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"] || "<Your Access Key ID>"
SECRET_KEY = ENV["NIFTY_CLOUD_SECRET_KEY"] || "<Your Secret Access Key>"


ncs4r = NIFTY::Cloud::Base.new(:access_key => ACCESS_KEY, :secret_key => SECRET_KEY)

options = {
  #:instance_id  => ["instanceId"]
}

pp response = ncs4r.terminate_instances(options)

response.instancesSet.item.each do |instance|
  p instance.instanceId
  p instance.currentState.code
  p instance.currentState.name
  p instance.previousState.code
  p instance.previousState.name
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
nifty-cloud-sdk-1.11.beta7 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta6 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta5 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta4 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta3 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta2 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.11.beta1 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.9.beta1 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.8.beta1 sample/instances/terminate-instances.rb
nifty-cloud-sdk-1.7 sample/instances/terminate-instances.rb