Class: RightScale::CloudApi::AWS::Route53::ApiManager

Inherits:
CloudApi::ApiManager
  • Object
show all
Includes:
Mixin::QueryApiPatterns
Defined in:
lib/cloud/aws/route53/manager.rb

Overview

Amazon Route 53 (Route) compatible manager (thread safe)

See Also:

Defined Under Namespace

Classes: Error

Constant Summary collapse

DEFAULT_API_VERSION =

Default API version for Route53 service. To override the API version use :api_version key when instantiating a manager.

'2013-04-01'

Instance Method Summary collapse

Constructor Details

#initialize(aws_access_key_id, aws_secret_access_key, endpoint, options = {}) ⇒ ApiManager

Constructor

Examples:

# see Manager class usage

Parameters:

  • aws_access_key_id (String)
  • aws_secret_access_key (String)
  • endpoint (String)
  • options (Hash) (defaults to: {})

See Also:



186
187
188
189
190
# File 'lib/cloud/aws/route53/manager.rb', line 186

def initialize(aws_access_key_id, aws_secret_access_key, endpoint, options={})
  credentials = { :aws_access_key_id     => aws_access_key_id,
                  :aws_secret_access_key => aws_secret_access_key }
  super(credentials, endpoint, options)
end

Instance Method Details

#api(verb, *args, &block) ⇒ Object

Makes an API call to AWS::Route53 compatible cloud

Examples:

api(verb,         opts={})
# Where opts may have next keys: :options, :headers, :params
api(verb, 'path', opts={})

Parameters:

  • verb (String, Symbol)
  • args (Objects)

Returns:

  • (Object)

Raises:



205
206
207
208
209
210
# File 'lib/cloud/aws/route53/manager.rb', line 205

def api(verb, *args, &block)
  relative_path = args.first.is_a?(String) ? args.shift : ''
  opts          = args.shift || {}
  raise Error::new("Opts must be Hash not #{opts.class.name}") unless opts.is_a?(Hash)
  process_api_request(verb, relative_path, opts, &block)
end