Method: Fog::AWS::AutoScaling::Real#initialize
- Defined in:
- lib/fog/aws/auto_scaling.rb
#initialize(options = {}) ⇒ Real
Initialize connection to AutoScaling
Notes
options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection
Examples
as = AutoScaling.new(
:aws_access_key_id => your_aws_access_key_id,
:aws_secret_access_key => your_aws_secret_access_key
)
Parameters
-
options<~Hash> - config arguments for connection. Defaults to {}.
Returns
-
AutoScaling object with connection to AWS.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/fog/aws/auto_scaling.rb', line 75 def initialize(={}) require 'fog/core/parser' @use_iam_profile = [:use_iam_profile] setup_credentials() @connection_options = [:connection_options] || {} @instrumentor = [:instrumentor] @instrumentor_name = [:instrumentor_name] || 'fog.aws.auto_scaling' [:region] ||= 'us-east-1' @host = [:host] || "autoscaling.#{[:region]}.amazonaws.com" @path = [:path] || '/' @port = [:port] || 443 @persistent = [:persistent] || false @scheme = [:scheme] || 'https' @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) end |