Method: AWS::EC2::Instance#user_data
- Defined in:
- lib/aws/ec2/instance.rb
#user_data ⇒ String
Arbitrary metadata that is available to the instance while it is running. This interface handles the details of encoding the user data for transmission; you should set the user data exactly as you want it to be made available to the instance.
The instance must be in a stopped state to change user data; for example:
i.user_data # => "HELLO"
i.status # => :running
i.user_data = "GOODBYE" # raises an exception
i.stop; sleep 1 until i.status == :stopped
i.user_data = "GOODBYE" # => "GOODBYE"
147 148 149 |
# File 'lib/aws/ec2/instance.rb', line 147 def user_data @user_data end |