Class: Jets::Cfn::Resource::Nested::Api::Methods
- Defined in:
- lib/jets/cfn/resource/nested/api/methods.rb
Overview
interface method
Instance Method Summary collapse
- #definition ⇒ Object
-
#parameters ⇒ Object
Read current paged ApiMethods1 template and see what parameters it needs.
Methods inherited from Page
Methods inherited from Base
#initialize, #outputs, #template_filename, #template_url
Methods inherited from Base
#attributes, #logical_id, #outputs, #permission, #properties, #replacements, #replacer, #standarize, #template, truncate_id, #type
Methods included from Util::Camelize
Constructor Details
This class inherits a constructor from Jets::Cfn::Resource::Nested::Api::Page
Instance Method Details
#definition ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/jets/cfn/resource/nested/api/methods.rb', line 4 def definition { "ApiMethods#{@page_number}" => { Type: "AWS::CloudFormation::Stack", Properties: { TemplateURL: template_url, Parameters: parameters, }, } } end |
#parameters ⇒ Object
Read current paged ApiMethods1 template and see what parameters it needs. Then add them to the params hash from Controller Lambda functions outputs Example:
api-methods-1.yml:
params["PostsControllerIndexLambdaFunction"] = "!GetAtt UpController.Outputs.PostsControllerIndexLambdaFunction"
24 25 26 27 28 |
# File 'lib/jets/cfn/resource/nested/api/methods.rb', line 24 def parameters template_path = Jets::Names.api_methods_template_path(@page_number) api_methods = Jets::Cfn::Params::Api::Methods.new(template_path: template_path) api_methods.params end |