class Monosasi::DSL::Context::Rule::Target

Attributes

result[R]

Public Class Methods

new(context, id, &block) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 5
def initialize(context, id, &block)
  @id = id
  @context = context.merge(target_id: id)
  @result = {}
  instance_eval(&block)
end

Private Instance Methods

arn(value) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 16
def arn(value)
  @result[:arn] = value.to_s
end
batch_parameters(*values, &block) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 45
def batch_parameters(*values, &block)
  unless values.empty?
    log(:warn, "`batch_parameter(Hash)` will no longer be available. use batch_parameter(block)", color: :yellow)
    @result[:batch_parameters] = Hash(*values)
  else
    @result[:batch_parameters] = Monosasi::DSL::Context::Rule::Target::BatchParameters.new(@context, &block).result
  end
end
ecs_parameters(*values, &block) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 36
def ecs_parameters(*values, &block)
  unless values.empty?
    log(:warn, "`ecs_parameter(Hash)` will no longer be available. use ecs_parameter(block)", color: :yellow)
    @result[:ecs_parameters] = Hash(*values)
  else
    @result[:ecs_parameters] = Monosasi::DSL::Context::Rule::Target::EcsParameters.new(@context, &block).result
  end
end
input(value) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 24
def input(value)
  @result[:input] = value.to_s
end
input_path(value) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 20
def input_path(value)
  @result[:input_path] = value.to_s
end
input_transformer(value) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 28
def input_transformer(value)
  @result[:input_transformer] = value.to_h
end
role_arn(value) click to toggle source
# File lib/monosasi/dsl/context/rule/target.rb, line 32
def role_arn(value)
  @result[:role_arn] = value.to_s
end