Class: Jets::Cfn::Builders::ApiDeploymentBuilder
- Inherits:
-
Object
- Object
- Jets::Cfn::Builders::ApiDeploymentBuilder
- Includes:
- AwsServices, Interface
- Defined in:
- lib/jets/cfn/builders/api_deployment_builder.rb
Instance Method Summary collapse
-
#compose ⇒ Object
compose is an interface method.
-
#initialize(options = {}) ⇒ ApiDeploymentBuilder
constructor
A new instance of ApiDeploymentBuilder.
-
#template_path ⇒ Object
template_path is an interface method.
-
#write ⇒ Object
do not bother writing a template if routes are empty.
Methods included from AwsServices
#cfn, #lambda, #logs, #s3, #s3_resource, #sns, #sts
Methods included from AwsServices::StackStatus
#stack_exists?, #stack_in_progress?
Methods included from Interface
#add_output, #add_outputs, #add_parameter, #add_parameters, #add_resource, #add_resources, #add_template_resource, #build, #post_process_template, #template, #text
Constructor Details
#initialize(options = {}) ⇒ ApiDeploymentBuilder
Returns a new instance of ApiDeploymentBuilder.
6 7 8 9 |
# File 'lib/jets/cfn/builders/api_deployment_builder.rb', line 6 def initialize(={}) @options = @template = ActiveSupport::HashWithIndifferentAccess.new(Resources: {}) end |
Instance Method Details
#compose ⇒ Object
compose is an interface method
12 13 14 15 16 17 18 19 |
# File 'lib/jets/cfn/builders/api_deployment_builder.rb', line 12 def compose return unless @options[:templates] || @options[:stack_type] != :minimal deployment = Jets::Resource::ApiGateway::Deployment.new add_resource(deployment) add_parameters(deployment.parameters) add_outputs(deployment.outputs) end |
#template_path ⇒ Object
template_path is an interface method
22 23 24 |
# File 'lib/jets/cfn/builders/api_deployment_builder.rb', line 22 def template_path Jets::Naming.api_deployment_template_path end |