fog--fog/lib/fog/aws/requests/ec2/terminate_instances.rb

32 lines
1.0 KiB
Ruby
Raw Normal View History

module Fog
module AWS
class EC2
# Terminate specified instances
#
# ==== Parameters
# * instance_id<~Array> - Ids of instances to terminates
#
# ==== Returns
# # * response<~Fog::AWS::Response>:
# * body<~Hash>:
2009-08-01 08:15:44 +00: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-25 02:18:30 +00:00
def terminate_instances(instance_id)
params = indexed_params('InstanceId', instance_id)
request({
'Action' => 'TerminateInstances'
}.merge!(params), Fog::Parsers::AWS::EC2::TerminateInstances.new)
end
end
end
end