Class: Ncf::Client
- Inherits:
-
AceClient::Query2
- Object
- AceClient::Query2
- Ncf::Client
- Defined in:
- lib/ncf/client.rb
Defined Under Namespace
Classes: ResponseError
Instance Method Summary collapse
- #describe_stack(exec_id) ⇒ Object
- #execute_stack(json) ⇒ Object
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #raise_if_response_error ⇒ Object
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/ncf/client.rb', line 7 def initialize() super() end |
Instance Method Details
#describe_stack(exec_id) ⇒ Object
17 18 19 20 21 |
# 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) ⇒ Object
11 12 13 14 15 |
# 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 ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ncf/client.rb', line 23 def raise_if_response_error if @response.code != 200 code = @response['ErrorResponse']['Error']['Code'] = @response['ErrorResponse']['Error']['Message'] raise ResponseError, "#{code}: #{}" end end |