class Ncf::Client

Public Class Methods

new(options) click to toggle source
Calls superclass method
# File lib/ncf/client.rb, line 7
def initialize(options)
        super(options)
end

Public Instance Methods

describe_stack(exec_id) click to toggle source
# File lib/ncf/client.rb, line 17
def describe_stack(exec_id)
        @response = self.action('DescribeStack', 'ExecutionId' => exec_id)
        raise_if_response_error
        @response
end
execute_stack(json) click to toggle source
# File lib/ncf/client.rb, line 11
def execute_stack(json)
        @response = self.action('ExecuteStack', 'TemplateBody' => json)
        raise_if_response_error
        @response
end
raise_if_response_error() click to toggle source
# File lib/ncf/client.rb, line 23
def raise_if_response_error
        if @response.code != 200
                code = @response['ErrorResponse']['Error']['Code']
                message = @response['ErrorResponse']['Error']['Message']
                raise ResponseError, "#{code}: #{message}"
        end
end