2009-07-17 03:36:42 -04:00
|
|
|
module Fog
|
|
|
|
module AWS
|
|
|
|
class EC2
|
|
|
|
|
2009-07-19 19:50:19 -04:00
|
|
|
# Terminate specified instances
|
2009-07-17 03:36:42 -04:00
|
|
|
#
|
|
|
|
# ==== Parameters
|
|
|
|
# * instance_id<~Array> - Ids of instances to terminates
|
|
|
|
#
|
|
|
|
# ==== Returns
|
2009-07-19 19:50:19 -04:00
|
|
|
# # * response<~Fog::AWS::Response>:
|
|
|
|
# * body<~Hash>:
|
2009-08-01 04:15:44 -04:00
|
|
|
# * 'requestId'<~String> - Id of request
|
|
|
|
# * 'instancesSet'<~Array>:
|
|
|
|
# * 'instanceId'<~String> - id of the terminated instance
|
|
|
|
# * 'previousState'<~Hash>: previous state of instance
|
|
|
|
# * 'code'<~Integer> - previous status code
|
|
|
|
# * 'name'<~String> - name of previous state
|
|
|
|
# * 'shutdownState'<~Hash>: shutdown state of instance
|
|
|
|
# * 'code'<~Integer> - current status code
|
|
|
|
# * 'name'<~String> - name of current state
|
2009-07-24 22:18:30 -04:00
|
|
|
def terminate_instances(instance_id)
|
2009-07-17 03:36:42 -04:00
|
|
|
params = indexed_params('InstanceId', instance_id)
|
|
|
|
request({
|
|
|
|
'Action' => 'TerminateInstances'
|
|
|
|
}.merge!(params), Fog::Parsers::AWS::EC2::TerminateInstances.new)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|