monosasi 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ee247e5eb60502622139ec208c231320aa6bf8491798c567db452055cac87c2
4
- data.tar.gz: 5dafcdabe3a37b5d36abadebbafd147e70738563296e6a219ef10936d1956f67
3
+ metadata.gz: 59fbb459c9fe2e563a97130ffb73f96668e41efa01219070969d259e2882534a
4
+ data.tar.gz: 71240ada08e3ce67acb26c960d72379519f20ede50db4b05511c8a1fb5a092c5
5
5
  SHA512:
6
- metadata.gz: 14cc6b2f5d8f1e07036638551b847af0f5e5628d6db098be741080baeb1200abc188eb2b2334c898a8a93a1f4cd6430a3b4e8a188f568e0ae423125effe0bc5b
7
- data.tar.gz: c2a5f4d5c6ebf3774d00466ca2fef863a87c6dc2e1755ca2555b307c7eb36244d9df8fa40f9a54c5496fc3e0517e597508da7ebf654304ad76d0b577370c09b7
6
+ metadata.gz: 0655ede007497ebd8918e6bccc19a6a7c00a4afc95f8f5470f9dde3a258c885a527555f5bd97388dc81b537ff0d31f98450d0510a13903af437522c2f0ff3c5b
7
+ data.tar.gz: 9ae5121d7861b63c1458e107c9210ad5a169b68b2b0ed389a976cd7c7c99d76952cb8b42a032f20870450ee47715f04279885b5dddbfd0f5b4d23e60d6fdeb3b
data/README.md CHANGED
@@ -119,6 +119,21 @@ rule "batch-scheduled-task" do
119
119
  })
120
120
  end
121
121
  end
122
+
123
+ rule "hako-console-ScaleSpotFleetByReservation-ap-northeast-1" do
124
+ state "ENABLED"
125
+ schedule_expression "rate(30 minutes)"
126
+ target "zzzzzzzzzz-zzzzzzz-zzzzzz" do
127
+ arn 'arn:aws:sqs:ap-northeast-1:33333333333:monosasi-events'
128
+ input_transformer(
129
+ input_paths_map: {
130
+ 'id' => '$.id',
131
+ 'time' => '$.time',
132
+ },
133
+ input_template: '{"id": <id>, "time": <time>, "message": "hello, world"}',
134
+ )
135
+ end
136
+ end
122
137
  ```
123
138
 
124
139
  ## Similar tools
@@ -101,6 +101,10 @@ class Monosasi::Driver
101
101
  params_target[:input_path] = target[:input_path]
102
102
  end
103
103
 
104
+ if target[:input_transformer]
105
+ params_target[:input_transformer] = target[:input_transformer]
106
+ end
107
+
104
108
  if target[:role_arn]
105
109
  params_target[:role_arn] = target[:role_arn]
106
110
  end
@@ -24,6 +24,10 @@ class Monosasi::DSL::Context::Rule::Target
24
24
  @result[:input] = value.to_s
25
25
  end
26
26
 
27
+ def input_transformer(value)
28
+ @result[:input_transformer] = value.to_h
29
+ end
30
+
27
31
  def role_arn(value)
28
32
  @result[:role_arn] = value.to_s
29
33
  end
@@ -89,6 +89,12 @@ end
89
89
  EOS
90
90
  end
91
91
 
92
+ if target[:input_transformer]
93
+ body += <<-EOS
94
+ input_transformer #{target[:input_transformer].inspect}
95
+ EOS
96
+ end
97
+
92
98
  if target[:ecs_parameters]
93
99
  body += <<-EOS
94
100
  ecs_parameters #{target[:ecs_parameters].inspect}
@@ -1,3 +1,3 @@
1
1
  module Monosasi
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monosasi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-05 00:00:00.000000000 Z
11
+ date: 2019-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk