1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/requests/ec2/terminate_instances.rb

32 lines
1 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 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)
params = indexed_params('InstanceId', instance_id)
request({
'Action' => 'TerminateInstances'
}.merge!(params), Fog::Parsers::AWS::EC2::TerminateInstances.new)
end
end
end
end