Module | Rudy::AWS::EC2::Instances |
In: |
lib/rudy/aws/ec2/instance.rb
|
KNOWN_STATES | = | [:running, :pending, :shutting_down, :terminated, :degraded].freeze |
h is a hash of instance properties in the format returned by EC2::Base#describe_instances:
kernelId: aki-9b00e5f2 amiLaunchIndex: "0" keyName: solutious-default launchTime: "2009-03-14T12:48:15.000Z" instanceType: m1.small imageId: ami-0734d36e privateDnsName: reason: placement: availabilityZone: us-east-1b dnsName: instanceId: i-cdaa34a4 instanceState: name: pending code: "0"
Returns an Instance object.
System console output.
NOTE: Amazon sends the console outputs as a Base64 encoded string. This method DOES NOT decode in order to remain compliant with the data formats returned by Amazon.
You can decode it like this:
require 'base64' Base64.decode64(output)
Return an Array of Instance objects. Note: These objects will not have DNS data because they will still be in pending state. The DNS info becomes available once the instance enters the running state.
opts supports the following parameters:
Returns an Array of Rudy::AWS::EC2::Instance objects.
one of: running (default), pending, terminated, any
Returns a Hash of Rudy::AWS::EC2::Instance objects. The key is the instance ID.