2009-07-17 07:36:42 +00:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class EC2
|
|
|
|
|
2009-07-19 23:50:19 +00:00
|
|
|
# Terminate specified instances
|
2009-07-17 07:36:42 +00:00
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * instance_id<~Array> - Ids of instances to terminates
|
|
|
|
#
|
|
|
|
# ==== Returns
|
2009-07-19 23:50:19 +00:00
|
|
|
# # * response<~Fog::AWS::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * :request_id<~String> - Id of request
|
|
|
|
# * :instances_set<~Array>:
|
|
|
|
# * :instance_id<~String> - id of the terminated instance
|
|
|
|
# * :previous_state<~Hash>: previous state of instance
|
|
|
|
# * :code<~Integer> - previous status code
|
|
|
|
# * :name<~String> - name of previous state
|
|
|
|
# * :shutdown_state<~Hash>: shutdown state of instance
|
|
|
|
# * :code<~Integer> - current status code
|
|
|
|
# * :name<~String> - name of current state
|
2009-07-25 02:18:30 +00:00
|
|
|
def terminate_instances(instance_id)
|
2009-07-17 07:36:42 +00:00
|
|
|
params = indexed_params('InstanceId', instance_id)
|
|
|
|
request({
|
|
|
|
'Action' => 'TerminateInstances'
|
|
|
|
}.merge!(params), Fog::Parsers::AWS::EC2::TerminateInstances.new)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|