aws-sdk-cloudwatchevents 1.0.0.rc1 → 1.0.0.rc2

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
  SHA1:
3
- metadata.gz: 03c644226f70a2bab59d8c9c1bba5ef6cab459af
4
- data.tar.gz: c3e06e3001e20567a7ee01815347366f1bd0569b
3
+ metadata.gz: df7192364528bc96e659bf121f7a267a18d0ae84
4
+ data.tar.gz: 8a28f4fa5c23cfe46e895a363d6731fc1042f48b
5
5
  SHA512:
6
- metadata.gz: cc5317a1cf65aee36cc00d88888e76b657f851ee0bf9e08ef6923443eef1952078578a3d8c0d8a8343f9601d4cb6e0ce85ac0db5ef071daffe065589bca8bd41
7
- data.tar.gz: 6d2856e51873f0117dfff040cd919155c00ec5a4e35f5e7f57b7ab14800849b82e20ebc7cfcfe6712a6ad1d4667b192534c1f380d3ea6cc4d7a2dae571d3c8bc
6
+ metadata.gz: a4ca04de0c7e7e1827fd5bdee64373368065e840dac1981ab8bbf43cd004fd4635753117ee5057a2a372e7907f68cf308fe21554df72a21e5c70ef12cb24fe7c
7
+ data.tar.gz: f7eaaa896408064eac51be209032075e942a3046f97ac697aca3503fc99345f6b1010259788832f07c3966536a488dcbdd903a6597ada0b65393a5be3b25def8
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-cloudwatchevents/customizations'
42
42
  # @service
43
43
  module Aws::CloudWatchEvents
44
44
 
45
- GEM_VERSION = '1.0.0.rc1'
45
+ GEM_VERSION = '1.0.0.rc2'
46
46
 
47
47
  end
@@ -1,6 +1,6 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
@@ -18,598 +18,752 @@ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
18
  require 'aws-sdk-core/plugins/response_paging.rb'
19
19
  require 'aws-sdk-core/plugins/stub_responses.rb'
20
20
  require 'aws-sdk-core/plugins/idempotency_token.rb'
21
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
21
22
  require 'aws-sdk-core/plugins/signature_v4.rb'
22
23
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
23
24
 
24
25
  Aws::Plugins::GlobalConfiguration.add_identifier(:cloudwatchevents)
25
26
 
26
- module Aws
27
- module CloudWatchEvents
28
- class Client < Seahorse::Client::Base
27
+ module Aws::CloudWatchEvents
28
+ class Client < Seahorse::Client::Base
29
29
 
30
- include Aws::ClientStubs
30
+ include Aws::ClientStubs
31
31
 
32
- @identifier = :cloudwatchevents
32
+ @identifier = :cloudwatchevents
33
33
 
34
- set_api(ClientApi::API)
34
+ set_api(ClientApi::API)
35
35
 
36
- add_plugin(Seahorse::Client::Plugins::ContentLength)
37
- add_plugin(Aws::Plugins::CredentialsConfiguration)
38
- add_plugin(Aws::Plugins::Logging)
39
- add_plugin(Aws::Plugins::ParamConverter)
40
- add_plugin(Aws::Plugins::ParamValidator)
41
- add_plugin(Aws::Plugins::UserAgent)
42
- add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
- add_plugin(Aws::Plugins::RetryErrors)
44
- add_plugin(Aws::Plugins::GlobalConfiguration)
45
- add_plugin(Aws::Plugins::RegionalEndpoint)
46
- add_plugin(Aws::Plugins::ResponsePaging)
47
- add_plugin(Aws::Plugins::StubResponses)
48
- add_plugin(Aws::Plugins::IdempotencyToken)
49
- add_plugin(Aws::Plugins::SignatureV4)
50
- add_plugin(Aws::Plugins::Protocols::JsonRpc)
36
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
37
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
38
+ add_plugin(Aws::Plugins::Logging)
39
+ add_plugin(Aws::Plugins::ParamConverter)
40
+ add_plugin(Aws::Plugins::ParamValidator)
41
+ add_plugin(Aws::Plugins::UserAgent)
42
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
43
+ add_plugin(Aws::Plugins::RetryErrors)
44
+ add_plugin(Aws::Plugins::GlobalConfiguration)
45
+ add_plugin(Aws::Plugins::RegionalEndpoint)
46
+ add_plugin(Aws::Plugins::ResponsePaging)
47
+ add_plugin(Aws::Plugins::StubResponses)
48
+ add_plugin(Aws::Plugins::IdempotencyToken)
49
+ add_plugin(Aws::Plugins::JsonvalueConverter)
50
+ add_plugin(Aws::Plugins::SignatureV4)
51
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
51
52
 
52
- # @option options [required, Aws::CredentialProvider] :credentials
53
- # Your AWS credentials. This can be an instance of any one of the
54
- # following classes:
55
- #
56
- # * `Aws::Credentials` - Used for configuring static, non-refreshing
57
- # credentials.
58
- #
59
- # * `Aws::InstanceProfileCredentials` - Used for loading credentials
60
- # from an EC2 IMDS on an EC2 instance.
61
- #
62
- # * `Aws::SharedCredentials` - Used for loading credentials from a
63
- # shared file, such as `~/.aws/config`.
64
- #
65
- # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
66
- #
67
- # When `:credentials` are not configured directly, the following
68
- # locations will be searched for credentials:
69
- #
70
- # * `Aws.config[:credentials]`
71
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
72
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
73
- # * `~/.aws/credentials`
74
- # * `~/.aws/config`
75
- # * EC2 IMDS instance profile - When used by default, the timeouts are
76
- # very aggressive. Construct and pass an instance of
77
- # `Aws::InstanceProfileCredentails` to enable retries and extended
78
- # timeouts.
79
- # @option options [required, String] :region
80
- # The AWS region to connect to. The configured `:region` is
81
- # used to determine the service `:endpoint`. When not passed,
82
- # a default `:region` is search for in the following locations:
83
- #
84
- # * `Aws.config[:region]`
85
- # * `ENV['AWS_REGION']`
86
- # * `ENV['AMAZON_REGION']`
87
- # * `ENV['AWS_DEFAULT_REGION']`
88
- # * `~/.aws/credentials`
89
- # * `~/.aws/config`
90
- # @option options [String] :access_key_id
91
- # @option options [Boolean] :convert_params (true)
92
- # When `true`, an attempt is made to coerce request parameters into
93
- # the required types.
94
- # @option options [String] :endpoint
95
- # The client endpoint is normally constructed from the `:region`
96
- # option. You should only configure an `:endpoint` when connecting
97
- # to test endpoints. This should be avalid HTTP(S) URI.
98
- # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
99
- # The log formatter.
100
- # @option options [Symbol] :log_level (:info)
101
- # The log level to send messages to the `:logger` at.
102
- # @option options [Logger] :logger
103
- # The Logger instance to send log messages to. If this option
104
- # is not set, logging will be disabled.
105
- # @option options [String] :profile ("default")
106
- # Used when loading credentials from the shared credentials file
107
- # at HOME/.aws/credentials. When not specified, 'default' is used.
108
- # @option options [Integer] :retry_limit (3)
109
- # The maximum number of times to retry failed requests. Only
110
- # ~ 500 level server errors and certain ~ 400 level client errors
111
- # are retried. Generally, these are throttling errors, data
112
- # checksum errors, networking errors, timeout errors and auth
113
- # errors from expired credentials.
114
- # @option options [String] :secret_access_key
115
- # @option options [String] :session_token
116
- # @option options [Boolean] :simple_json (false)
117
- # Disables request parameter conversion, validation, and formatting.
118
- # Also disable response data type conversions. This option is useful
119
- # when you want to ensure the highest level of performance by
120
- # avoiding overhead of walking request parameters and response data
121
- # structures.
122
- #
123
- # When `:simple_json` is enabled, the request parameters hash must
124
- # be formatted exactly as the DynamoDB API expects.
125
- # @option options [Boolean] :stub_responses (false)
126
- # Causes the client to return stubbed responses. By default
127
- # fake responses are generated and returned. You can specify
128
- # the response data to return or errors to raise by calling
129
- # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
130
- #
131
- # ** Please note ** When response stubbing is enabled, no HTTP
132
- # requests are made, and retries are disabled.
133
- # @option options [Boolean] :validate_params (true)
134
- # When `true`, request parameters are validated before
135
- # sending the request.
136
- def initialize(*args)
137
- super
138
- end
53
+ # @option options [required, Aws::CredentialProvider] :credentials
54
+ # Your AWS credentials. This can be an instance of any one of the
55
+ # following classes:
56
+ #
57
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
58
+ # credentials.
59
+ #
60
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
61
+ # from an EC2 IMDS on an EC2 instance.
62
+ #
63
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
64
+ # shared file, such as `~/.aws/config`.
65
+ #
66
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
67
+ #
68
+ # When `:credentials` are not configured directly, the following
69
+ # locations will be searched for credentials:
70
+ #
71
+ # * `Aws.config[:credentials]`
72
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
73
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
74
+ # * `~/.aws/credentials`
75
+ # * `~/.aws/config`
76
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
77
+ # very aggressive. Construct and pass an instance of
78
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
79
+ # timeouts.
80
+ #
81
+ # @option options [required, String] :region
82
+ # The AWS region to connect to. The configured `:region` is
83
+ # used to determine the service `:endpoint`. When not passed,
84
+ # a default `:region` is search for in the following locations:
85
+ #
86
+ # * `Aws.config[:region]`
87
+ # * `ENV['AWS_REGION']`
88
+ # * `ENV['AMAZON_REGION']`
89
+ # * `ENV['AWS_DEFAULT_REGION']`
90
+ # * `~/.aws/credentials`
91
+ # * `~/.aws/config`
92
+ #
93
+ # @option options [String] :access_key_id
94
+ #
95
+ # @option options [Boolean] :convert_params (true)
96
+ # When `true`, an attempt is made to coerce request parameters into
97
+ # the required types.
98
+ #
99
+ # @option options [String] :endpoint
100
+ # The client endpoint is normally constructed from the `:region`
101
+ # option. You should only configure an `:endpoint` when connecting
102
+ # to test endpoints. This should be avalid HTTP(S) URI.
103
+ #
104
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
105
+ # The log formatter.
106
+ #
107
+ # @option options [Symbol] :log_level (:info)
108
+ # The log level to send messages to the `:logger` at.
109
+ #
110
+ # @option options [Logger] :logger
111
+ # The Logger instance to send log messages to. If this option
112
+ # is not set, logging will be disabled.
113
+ #
114
+ # @option options [String] :profile ("default")
115
+ # Used when loading credentials from the shared credentials file
116
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
117
+ #
118
+ # @option options [Integer] :retry_limit (3)
119
+ # The maximum number of times to retry failed requests. Only
120
+ # ~ 500 level server errors and certain ~ 400 level client errors
121
+ # are retried. Generally, these are throttling errors, data
122
+ # checksum errors, networking errors, timeout errors and auth
123
+ # errors from expired credentials.
124
+ #
125
+ # @option options [String] :secret_access_key
126
+ #
127
+ # @option options [String] :session_token
128
+ #
129
+ # @option options [Boolean] :simple_json (false)
130
+ # Disables request parameter conversion, validation, and formatting.
131
+ # Also disable response data type conversions. This option is useful
132
+ # when you want to ensure the highest level of performance by
133
+ # avoiding overhead of walking request parameters and response data
134
+ # structures.
135
+ #
136
+ # When `:simple_json` is enabled, the request parameters hash must
137
+ # be formatted exactly as the DynamoDB API expects.
138
+ #
139
+ # @option options [Boolean] :stub_responses (false)
140
+ # Causes the client to return stubbed responses. By default
141
+ # fake responses are generated and returned. You can specify
142
+ # the response data to return or errors to raise by calling
143
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
144
+ #
145
+ # ** Please note ** When response stubbing is enabled, no HTTP
146
+ # requests are made, and retries are disabled.
147
+ #
148
+ # @option options [Boolean] :validate_params (true)
149
+ # When `true`, request parameters are validated before
150
+ # sending the request.
151
+ #
152
+ def initialize(*args)
153
+ super
154
+ end
139
155
 
140
- # @!group API Operations
156
+ # @!group API Operations
141
157
 
142
- # Deletes a rule. You must remove all targets from a rule using
143
- # RemoveTargets before you can delete the rule.
144
- #
145
- # **Note:** When you delete a rule, incoming events might still continue
146
- # to match to the deleted rule. Please allow a short period of time for
147
- # changes to take effect.
148
- # @option params [required, String] :name
149
- # The name of the rule to be deleted.
150
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
151
- #
152
- # @example Request syntax with placeholder values
153
- # resp = client.delete_rule({
154
- # name: "RuleName", # required
155
- # })
156
- # @overload delete_rule(params = {})
157
- # @param [Hash] params ({})
158
- def delete_rule(params = {}, options = {})
159
- req = build_request(:delete_rule, params)
160
- req.send_request(options)
161
- end
162
-
163
- # Describes the details of the specified rule.
164
- # @option params [required, String] :name
165
- # The name of the rule you want to describe details for.
166
- # @return [Types::DescribeRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
167
- #
168
- # * {Types::DescribeRuleResponse#name #Name} => String
169
- # * {Types::DescribeRuleResponse#arn #Arn} => String
170
- # * {Types::DescribeRuleResponse#event_pattern #EventPattern} => String
171
- # * {Types::DescribeRuleResponse#schedule_expression #ScheduleExpression} => String
172
- # * {Types::DescribeRuleResponse#state #State} => String
173
- # * {Types::DescribeRuleResponse#description #Description} => String
174
- # * {Types::DescribeRuleResponse#role_arn #RoleArn} => String
175
- #
176
- # @example Request syntax with placeholder values
177
- # resp = client.describe_rule({
178
- # name: "RuleName", # required
179
- # })
180
- #
181
- # @example Response structure
182
- # resp.name #=> String
183
- # resp.arn #=> String
184
- # resp.event_pattern #=> String
185
- # resp.schedule_expression #=> String
186
- # resp.state #=> String, one of "ENABLED", "DISABLED"
187
- # resp.description #=> String
188
- # resp.role_arn #=> String
189
- # @overload describe_rule(params = {})
190
- # @param [Hash] params ({})
191
- def describe_rule(params = {}, options = {})
192
- req = build_request(:describe_rule, params)
193
- req.send_request(options)
194
- end
158
+ # Deletes the specified rule.
159
+ #
160
+ # You must remove all targets from a rule using RemoveTargets before you
161
+ # can delete the rule.
162
+ #
163
+ # When you delete a rule, incoming events might continue to match to the
164
+ # deleted rule. Please allow a short period of time for changes to take
165
+ # effect.
166
+ #
167
+ # @option params [required, String] :name
168
+ # The name of the rule.
169
+ #
170
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
171
+ #
172
+ # @example Request syntax with placeholder values
173
+ #
174
+ # resp = client.delete_rule({
175
+ # name: "RuleName", # required
176
+ # })
177
+ #
178
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DeleteRule AWS API Documentation
179
+ #
180
+ # @overload delete_rule(params = {})
181
+ # @param [Hash] params ({})
182
+ def delete_rule(params = {}, options = {})
183
+ req = build_request(:delete_rule, params)
184
+ req.send_request(options)
185
+ end
195
186
 
196
- # Disables a rule. A disabled rule won't match any events, and won't
197
- # self-trigger if it has a schedule expression.
198
- #
199
- # **Note:** When you disable a rule, incoming events might still
200
- # continue to match to the disabled rule. Please allow a short period of
201
- # time for changes to take effect.
202
- # @option params [required, String] :name
203
- # The name of the rule you want to disable.
204
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
205
- #
206
- # @example Request syntax with placeholder values
207
- # resp = client.disable_rule({
208
- # name: "RuleName", # required
209
- # })
210
- # @overload disable_rule(params = {})
211
- # @param [Hash] params ({})
212
- def disable_rule(params = {}, options = {})
213
- req = build_request(:disable_rule, params)
214
- req.send_request(options)
215
- end
187
+ # Describes the specified rule.
188
+ #
189
+ # @option params [required, String] :name
190
+ # The name of the rule.
191
+ #
192
+ # @return [Types::DescribeRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
193
+ #
194
+ # * {Types::DescribeRuleResponse#name #name} => String
195
+ # * {Types::DescribeRuleResponse#arn #arn} => String
196
+ # * {Types::DescribeRuleResponse#event_pattern #event_pattern} => String
197
+ # * {Types::DescribeRuleResponse#schedule_expression #schedule_expression} => String
198
+ # * {Types::DescribeRuleResponse#state #state} => String
199
+ # * {Types::DescribeRuleResponse#description #description} => String
200
+ # * {Types::DescribeRuleResponse#role_arn #role_arn} => String
201
+ #
202
+ # @example Request syntax with placeholder values
203
+ #
204
+ # resp = client.describe_rule({
205
+ # name: "RuleName", # required
206
+ # })
207
+ #
208
+ # @example Response structure
209
+ #
210
+ # resp.name #=> String
211
+ # resp.arn #=> String
212
+ # resp.event_pattern #=> String
213
+ # resp.schedule_expression #=> String
214
+ # resp.state #=> String, one of "ENABLED", "DISABLED"
215
+ # resp.description #=> String
216
+ # resp.role_arn #=> String
217
+ #
218
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DescribeRule AWS API Documentation
219
+ #
220
+ # @overload describe_rule(params = {})
221
+ # @param [Hash] params ({})
222
+ def describe_rule(params = {}, options = {})
223
+ req = build_request(:describe_rule, params)
224
+ req.send_request(options)
225
+ end
216
226
 
217
- # Enables a rule. If the rule does not exist, the operation fails.
218
- #
219
- # **Note:** When you enable a rule, incoming events might not
220
- # immediately start matching to a newly enabled rule. Please allow a
221
- # short period of time for changes to take effect.
222
- # @option params [required, String] :name
223
- # The name of the rule that you want to enable.
224
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
225
- #
226
- # @example Request syntax with placeholder values
227
- # resp = client.enable_rule({
228
- # name: "RuleName", # required
229
- # })
230
- # @overload enable_rule(params = {})
231
- # @param [Hash] params ({})
232
- def enable_rule(params = {}, options = {})
233
- req = build_request(:enable_rule, params)
234
- req.send_request(options)
235
- end
227
+ # Disables the specified rule. A disabled rule won't match any events,
228
+ # and won't self-trigger if it has a schedule expression.
229
+ #
230
+ # When you disable a rule, incoming events might continue to match to
231
+ # the disabled rule. Please allow a short period of time for changes to
232
+ # take effect.
233
+ #
234
+ # @option params [required, String] :name
235
+ # The name of the rule.
236
+ #
237
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
238
+ #
239
+ # @example Request syntax with placeholder values
240
+ #
241
+ # resp = client.disable_rule({
242
+ # name: "RuleName", # required
243
+ # })
244
+ #
245
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/DisableRule AWS API Documentation
246
+ #
247
+ # @overload disable_rule(params = {})
248
+ # @param [Hash] params ({})
249
+ def disable_rule(params = {}, options = {})
250
+ req = build_request(:disable_rule, params)
251
+ req.send_request(options)
252
+ end
236
253
 
237
- # Lists the names of the rules that the given target is put to. You can
238
- # see which of the rules in Amazon CloudWatch Events can invoke a
239
- # specific target in your account. If you have more rules in your
240
- # account than the given limit, the results will be paginated. In that
241
- # case, use the next token returned in the response and repeat
242
- # ListRulesByTarget until the NextToken in the response is returned as
243
- # null.
244
- # @option params [required, String] :target_arn
245
- # The Amazon Resource Name (ARN) of the target resource that you want to
246
- # list the rules for.
247
- # @option params [String] :next_token
248
- # The token returned by a previous call to indicate that there is more
249
- # data available.
250
- # @option params [Integer] :limit
251
- # The maximum number of results to return.
252
- # @return [Types::ListRuleNamesByTargetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
253
- #
254
- # * {Types::ListRuleNamesByTargetResponse#rule_names #RuleNames} => Array&lt;String&gt;
255
- # * {Types::ListRuleNamesByTargetResponse#next_token #NextToken} => String
256
- #
257
- # @example Request syntax with placeholder values
258
- # resp = client.list_rule_names_by_target({
259
- # target_arn: "TargetArn", # required
260
- # next_token: "NextToken",
261
- # limit: 1,
262
- # })
263
- #
264
- # @example Response structure
265
- # resp.rule_names #=> Array
266
- # resp.rule_names[0] #=> String
267
- # resp.next_token #=> String
268
- # @overload list_rule_names_by_target(params = {})
269
- # @param [Hash] params ({})
270
- def list_rule_names_by_target(params = {}, options = {})
271
- req = build_request(:list_rule_names_by_target, params)
272
- req.send_request(options)
273
- end
254
+ # Enables the specified rule. If the rule does not exist, the operation
255
+ # fails.
256
+ #
257
+ # When you enable a rule, incoming events might not immediately start
258
+ # matching to a newly enabled rule. Please allow a short period of time
259
+ # for changes to take effect.
260
+ #
261
+ # @option params [required, String] :name
262
+ # The name of the rule.
263
+ #
264
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
265
+ #
266
+ # @example Request syntax with placeholder values
267
+ #
268
+ # resp = client.enable_rule({
269
+ # name: "RuleName", # required
270
+ # })
271
+ #
272
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/EnableRule AWS API Documentation
273
+ #
274
+ # @overload enable_rule(params = {})
275
+ # @param [Hash] params ({})
276
+ def enable_rule(params = {}, options = {})
277
+ req = build_request(:enable_rule, params)
278
+ req.send_request(options)
279
+ end
274
280
 
275
- # Lists the Amazon CloudWatch Events rules in your account. You can
276
- # either list all the rules or you can provide a prefix to match to the
277
- # rule names. If you have more rules in your account than the given
278
- # limit, the results will be paginated. In that case, use the next token
279
- # returned in the response and repeat ListRules until the NextToken in
280
- # the response is returned as null.
281
- # @option params [String] :name_prefix
282
- # The prefix matching the rule name.
283
- # @option params [String] :next_token
284
- # The token returned by a previous call to indicate that there is more
285
- # data available.
286
- # @option params [Integer] :limit
287
- # The maximum number of results to return.
288
- # @return [Types::ListRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
289
- #
290
- # * {Types::ListRulesResponse#rules #Rules} => Array&lt;Types::Rule&gt;
291
- # * {Types::ListRulesResponse#next_token #NextToken} => String
292
- #
293
- # @example Request syntax with placeholder values
294
- # resp = client.list_rules({
295
- # name_prefix: "RuleName",
296
- # next_token: "NextToken",
297
- # limit: 1,
298
- # })
299
- #
300
- # @example Response structure
301
- # resp.rules #=> Array
302
- # resp.rules[0].name #=> String
303
- # resp.rules[0].arn #=> String
304
- # resp.rules[0].event_pattern #=> String
305
- # resp.rules[0].state #=> String, one of "ENABLED", "DISABLED"
306
- # resp.rules[0].description #=> String
307
- # resp.rules[0].schedule_expression #=> String
308
- # resp.rules[0].role_arn #=> String
309
- # resp.next_token #=> String
310
- # @overload list_rules(params = {})
311
- # @param [Hash] params ({})
312
- def list_rules(params = {}, options = {})
313
- req = build_request(:list_rules, params)
314
- req.send_request(options)
315
- end
281
+ # Lists the rules for the specified target. You can see which of the
282
+ # rules in Amazon CloudWatch Events can invoke a specific target in your
283
+ # account.
284
+ #
285
+ # @option params [required, String] :target_arn
286
+ # The Amazon Resource Name (ARN) of the target resource.
287
+ #
288
+ # @option params [String] :next_token
289
+ # The token returned by a previous call to retrieve the next set of
290
+ # results.
291
+ #
292
+ # @option params [Integer] :limit
293
+ # The maximum number of results to return.
294
+ #
295
+ # @return [Types::ListRuleNamesByTargetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
296
+ #
297
+ # * {Types::ListRuleNamesByTargetResponse#rule_names #rule_names} => Array&lt;String&gt;
298
+ # * {Types::ListRuleNamesByTargetResponse#next_token #next_token} => String
299
+ #
300
+ # @example Request syntax with placeholder values
301
+ #
302
+ # resp = client.list_rule_names_by_target({
303
+ # target_arn: "TargetArn", # required
304
+ # next_token: "NextToken",
305
+ # limit: 1,
306
+ # })
307
+ #
308
+ # @example Response structure
309
+ #
310
+ # resp.rule_names #=> Array
311
+ # resp.rule_names[0] #=> String
312
+ # resp.next_token #=> String
313
+ #
314
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRuleNamesByTarget AWS API Documentation
315
+ #
316
+ # @overload list_rule_names_by_target(params = {})
317
+ # @param [Hash] params ({})
318
+ def list_rule_names_by_target(params = {}, options = {})
319
+ req = build_request(:list_rule_names_by_target, params)
320
+ req.send_request(options)
321
+ end
316
322
 
317
- # Lists of targets assigned to the rule.
318
- # @option params [required, String] :rule
319
- # The name of the rule whose targets you want to list.
320
- # @option params [String] :next_token
321
- # The token returned by a previous call to indicate that there is more
322
- # data available.
323
- # @option params [Integer] :limit
324
- # The maximum number of results to return.
325
- # @return [Types::ListTargetsByRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
326
- #
327
- # * {Types::ListTargetsByRuleResponse#targets #Targets} => Array&lt;Types::Target&gt;
328
- # * {Types::ListTargetsByRuleResponse#next_token #NextToken} => String
329
- #
330
- # @example Request syntax with placeholder values
331
- # resp = client.list_targets_by_rule({
332
- # rule: "RuleName", # required
333
- # next_token: "NextToken",
334
- # limit: 1,
335
- # })
336
- #
337
- # @example Response structure
338
- # resp.targets #=> Array
339
- # resp.targets[0].id #=> String
340
- # resp.targets[0].arn #=> String
341
- # resp.targets[0].input #=> String
342
- # resp.targets[0].input_path #=> String
343
- # resp.next_token #=> String
344
- # @overload list_targets_by_rule(params = {})
345
- # @param [Hash] params ({})
346
- def list_targets_by_rule(params = {}, options = {})
347
- req = build_request(:list_targets_by_rule, params)
348
- req.send_request(options)
349
- end
323
+ # Lists your Amazon CloudWatch Events rules. You can either list all the
324
+ # rules or you can provide a prefix to match to the rule names.
325
+ #
326
+ # @option params [String] :name_prefix
327
+ # The prefix matching the rule name.
328
+ #
329
+ # @option params [String] :next_token
330
+ # The token returned by a previous call to retrieve the next set of
331
+ # results.
332
+ #
333
+ # @option params [Integer] :limit
334
+ # The maximum number of results to return.
335
+ #
336
+ # @return [Types::ListRulesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
337
+ #
338
+ # * {Types::ListRulesResponse#rules #rules} => Array&lt;Types::Rule&gt;
339
+ # * {Types::ListRulesResponse#next_token #next_token} => String
340
+ #
341
+ # @example Request syntax with placeholder values
342
+ #
343
+ # resp = client.list_rules({
344
+ # name_prefix: "RuleName",
345
+ # next_token: "NextToken",
346
+ # limit: 1,
347
+ # })
348
+ #
349
+ # @example Response structure
350
+ #
351
+ # resp.rules #=> Array
352
+ # resp.rules[0].name #=> String
353
+ # resp.rules[0].arn #=> String
354
+ # resp.rules[0].event_pattern #=> String
355
+ # resp.rules[0].state #=> String, one of "ENABLED", "DISABLED"
356
+ # resp.rules[0].description #=> String
357
+ # resp.rules[0].schedule_expression #=> String
358
+ # resp.rules[0].role_arn #=> String
359
+ # resp.next_token #=> String
360
+ #
361
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListRules AWS API Documentation
362
+ #
363
+ # @overload list_rules(params = {})
364
+ # @param [Hash] params ({})
365
+ def list_rules(params = {}, options = {})
366
+ req = build_request(:list_rules, params)
367
+ req.send_request(options)
368
+ end
350
369
 
351
- # Sends custom events to Amazon CloudWatch Events so that they can be
352
- # matched to rules.
353
- # @option params [required, Array<Types::PutEventsRequestEntry>] :entries
354
- # The entry that defines an event in your system. You can specify
355
- # several parameters for the entry such as the source and type of the
356
- # event, resources associated with the event, and so on.
357
- # @return [Types::PutEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
358
- #
359
- # * {Types::PutEventsResponse#failed_entry_count #FailedEntryCount} => Integer
360
- # * {Types::PutEventsResponse#entries #Entries} => Array&lt;Types::PutEventsResultEntry&gt;
361
- #
362
- # @example Request syntax with placeholder values
363
- # resp = client.put_events({
364
- # entries: [ # required
365
- # {
366
- # time: Time.now,
367
- # source: "String",
368
- # resources: ["EventResource"],
369
- # detail_type: "String",
370
- # detail: "String",
371
- # },
372
- # ],
373
- # })
374
- #
375
- # @example Response structure
376
- # resp.failed_entry_count #=> Integer
377
- # resp.entries #=> Array
378
- # resp.entries[0].event_id #=> String
379
- # resp.entries[0].error_code #=> String
380
- # resp.entries[0].error_message #=> String
381
- # @overload put_events(params = {})
382
- # @param [Hash] params ({})
383
- def put_events(params = {}, options = {})
384
- req = build_request(:put_events, params)
385
- req.send_request(options)
386
- end
370
+ # Lists the targets assigned to the specified rule.
371
+ #
372
+ # @option params [required, String] :rule
373
+ # The name of the rule.
374
+ #
375
+ # @option params [String] :next_token
376
+ # The token returned by a previous call to retrieve the next set of
377
+ # results.
378
+ #
379
+ # @option params [Integer] :limit
380
+ # The maximum number of results to return.
381
+ #
382
+ # @return [Types::ListTargetsByRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
383
+ #
384
+ # * {Types::ListTargetsByRuleResponse#targets #targets} => Array&lt;Types::Target&gt;
385
+ # * {Types::ListTargetsByRuleResponse#next_token #next_token} => String
386
+ #
387
+ # @example Request syntax with placeholder values
388
+ #
389
+ # resp = client.list_targets_by_rule({
390
+ # rule: "RuleName", # required
391
+ # next_token: "NextToken",
392
+ # limit: 1,
393
+ # })
394
+ #
395
+ # @example Response structure
396
+ #
397
+ # resp.targets #=> Array
398
+ # resp.targets[0].id #=> String
399
+ # resp.targets[0].arn #=> String
400
+ # resp.targets[0].role_arn #=> String
401
+ # resp.targets[0].input #=> String
402
+ # resp.targets[0].input_path #=> String
403
+ # resp.targets[0].input_transformer.input_paths_map #=> Hash
404
+ # resp.targets[0].input_transformer.input_paths_map["InputTransformerPathKey"] #=> String
405
+ # resp.targets[0].input_transformer.input_template #=> String
406
+ # resp.targets[0].kinesis_parameters.partition_key_path #=> String
407
+ # resp.targets[0].run_command_parameters.run_command_targets #=> Array
408
+ # resp.targets[0].run_command_parameters.run_command_targets[0].key #=> String
409
+ # resp.targets[0].run_command_parameters.run_command_targets[0].values #=> Array
410
+ # resp.targets[0].run_command_parameters.run_command_targets[0].values[0] #=> String
411
+ # resp.targets[0].ecs_parameters.task_definition_arn #=> String
412
+ # resp.targets[0].ecs_parameters.task_count #=> Integer
413
+ # resp.next_token #=> String
414
+ #
415
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/ListTargetsByRule AWS API Documentation
416
+ #
417
+ # @overload list_targets_by_rule(params = {})
418
+ # @param [Hash] params ({})
419
+ def list_targets_by_rule(params = {}, options = {})
420
+ req = build_request(:list_targets_by_rule, params)
421
+ req.send_request(options)
422
+ end
387
423
 
388
- # Creates or updates a rule. Rules are enabled by default, or based on
389
- # value of the State parameter. You can disable a rule using
390
- # DisableRule.
391
- #
392
- # **Note:** When you create or update a rule, incoming events might not
393
- # immediately start matching to new or updated rules. Please allow a
394
- # short period of time for changes to take effect.
395
- #
396
- # A rule must contain at least an EventPattern or ScheduleExpression.
397
- # Rules with EventPatterns are triggered when a matching event is
398
- # observed. Rules with ScheduleExpressions self-trigger based on the
399
- # given schedule. A rule can have both an EventPattern and a
400
- # ScheduleExpression, in which case the rule will trigger on matching
401
- # events as well as on a schedule.
402
- #
403
- # **Note:** Most services in AWS treat : or / as the same character in
404
- # Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact
405
- # match in event patterns and rules. Be sure to use the correct ARN
406
- # characters when creating event patterns so that they match the ARN
407
- # syntax in the event you want to match.
408
- # @option params [required, String] :name
409
- # The name of the rule that you are creating or updating.
410
- # @option params [String] :schedule_expression
411
- # The scheduling expression. For example, "cron(0 20 * * ? *)",
412
- # "rate(5 minutes)".
413
- # @option params [String] :event_pattern
414
- # The event pattern.
415
- # @option params [String] :state
416
- # Indicates whether the rule is enabled or disabled.
417
- # @option params [String] :description
418
- # A description of the rule.
419
- # @option params [String] :role_arn
420
- # The Amazon Resource Name (ARN) of the IAM role associated with the
421
- # rule.
422
- # @return [Types::PutRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
423
- #
424
- # * {Types::PutRuleResponse#rule_arn #RuleArn} => String
425
- #
426
- # @example Request syntax with placeholder values
427
- # resp = client.put_rule({
428
- # name: "RuleName", # required
429
- # schedule_expression: "ScheduleExpression",
430
- # event_pattern: "EventPattern",
431
- # state: "ENABLED", # accepts ENABLED, DISABLED
432
- # description: "RuleDescription",
433
- # role_arn: "RoleArn",
434
- # })
435
- #
436
- # @example Response structure
437
- # resp.rule_arn #=> String
438
- # @overload put_rule(params = {})
439
- # @param [Hash] params ({})
440
- def put_rule(params = {}, options = {})
441
- req = build_request(:put_rule, params)
442
- req.send_request(options)
443
- end
424
+ # Sends custom events to Amazon CloudWatch Events so that they can be
425
+ # matched to rules.
426
+ #
427
+ # @option params [required, Array<Types::PutEventsRequestEntry>] :entries
428
+ # The entry that defines an event in your system. You can specify
429
+ # several parameters for the entry such as the source and type of the
430
+ # event, resources associated with the event, and so on.
431
+ #
432
+ # @return [Types::PutEventsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
433
+ #
434
+ # * {Types::PutEventsResponse#failed_entry_count #failed_entry_count} => Integer
435
+ # * {Types::PutEventsResponse#entries #entries} => Array&lt;Types::PutEventsResultEntry&gt;
436
+ #
437
+ # @example Request syntax with placeholder values
438
+ #
439
+ # resp = client.put_events({
440
+ # entries: [ # required
441
+ # {
442
+ # time: Time.now,
443
+ # source: "String",
444
+ # resources: ["EventResource"],
445
+ # detail_type: "String",
446
+ # detail: "String",
447
+ # },
448
+ # ],
449
+ # })
450
+ #
451
+ # @example Response structure
452
+ #
453
+ # resp.failed_entry_count #=> Integer
454
+ # resp.entries #=> Array
455
+ # resp.entries[0].event_id #=> String
456
+ # resp.entries[0].error_code #=> String
457
+ # resp.entries[0].error_message #=> String
458
+ #
459
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutEvents AWS API Documentation
460
+ #
461
+ # @overload put_events(params = {})
462
+ # @param [Hash] params ({})
463
+ def put_events(params = {}, options = {})
464
+ req = build_request(:put_events, params)
465
+ req.send_request(options)
466
+ end
444
467
 
445
- # Adds target(s) to a rule. Targets are the resources that can be
446
- # invoked when a rule is triggered. For example, AWS Lambda functions,
447
- # Amazon Kinesis streams, and built-in targets. Updates the target(s) if
448
- # they are already associated with the role. In other words, if there is
449
- # already a target with the given target ID, then the target associated
450
- # with that ID is updated.
451
- #
452
- # In order to be able to make API calls against the resources you own,
453
- # Amazon CloudWatch Events needs the appropriate permissions. For AWS
454
- # Lambda and Amazon SNS resources, CloudWatch Events relies on
455
- # resource-based policies. For Amazon Kinesis streams, CloudWatch Events
456
- # relies on IAM roles. For more information, see [Permissions for
457
- # Sending Events to Targets][1] in the ***Amazon CloudWatch Developer
458
- # Guide***.
459
- #
460
- # **Input** and **InputPath** are mutually-exclusive and optional
461
- # parameters of a target. When a rule is triggered due to a matched
462
- # event, if for a target:
463
- #
464
- # * Neither **Input** nor **InputPath** is specified, then the entire
465
- # event is passed to the target in JSON form.
466
- # * **InputPath** is specified in the form of JSONPath (e.g.
467
- # **$.detail**), then only the part of the event specified in the path
468
- # is passed to the target (e.g. only the detail part of the event is
469
- # passed).
470
- # * **Input** is specified in the form of a valid JSON, then the matched
471
- # event is overridden with this constant.
472
- #
473
- # **Note:** When you add targets to a rule, when the associated rule
474
- # triggers, new or updated targets might not be immediately invoked.
475
- # Please allow a short period of time for changes to take effect.
476
- #
477
- #
478
- #
479
- # [1]: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/EventsTargetPermissions.html
480
- # @option params [required, String] :rule
481
- # The name of the rule you want to add targets to.
482
- # @option params [required, Array<Types::Target>] :targets
483
- # List of targets you want to update or add to the rule.
484
- # @return [Types::PutTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
485
- #
486
- # * {Types::PutTargetsResponse#failed_entry_count #FailedEntryCount} => Integer
487
- # * {Types::PutTargetsResponse#failed_entries #FailedEntries} => Array&lt;Types::PutTargetsResultEntry&gt;
488
- #
489
- # @example Request syntax with placeholder values
490
- # resp = client.put_targets({
491
- # rule: "RuleName", # required
492
- # targets: [ # required
493
- # {
494
- # id: "TargetId", # required
495
- # arn: "TargetArn", # required
496
- # input: "TargetInput",
497
- # input_path: "TargetInputPath",
498
- # },
499
- # ],
500
- # })
501
- #
502
- # @example Response structure
503
- # resp.failed_entry_count #=> Integer
504
- # resp.failed_entries #=> Array
505
- # resp.failed_entries[0].target_id #=> String
506
- # resp.failed_entries[0].error_code #=> String
507
- # resp.failed_entries[0].error_message #=> String
508
- # @overload put_targets(params = {})
509
- # @param [Hash] params ({})
510
- def put_targets(params = {}, options = {})
511
- req = build_request(:put_targets, params)
512
- req.send_request(options)
513
- end
468
+ # Creates or updates the specified rule. Rules are enabled by default,
469
+ # or based on value of the state. You can disable a rule using
470
+ # DisableRule.
471
+ #
472
+ # When you create or update a rule, incoming events might not
473
+ # immediately start matching to new or updated rules. Please allow a
474
+ # short period of time for changes to take effect.
475
+ #
476
+ # A rule must contain at least an EventPattern or ScheduleExpression.
477
+ # Rules with EventPatterns are triggered when a matching event is
478
+ # observed. Rules with ScheduleExpressions self-trigger based on the
479
+ # given schedule. A rule can have both an EventPattern and a
480
+ # ScheduleExpression, in which case the rule triggers on matching events
481
+ # as well as on a schedule.
482
+ #
483
+ # Most services in AWS treat : or / as the same character in Amazon
484
+ # Resource Names (ARNs). However, CloudWatch Events uses an exact match
485
+ # in event patterns and rules. Be sure to use the correct ARN characters
486
+ # when creating event patterns so that they match the ARN syntax in the
487
+ # event you want to match.
488
+ #
489
+ # @option params [required, String] :name
490
+ # The name of the rule that you are creating or updating.
491
+ #
492
+ # @option params [String] :schedule_expression
493
+ # The scheduling expression. For example, "cron(0 20 * * ? *)",
494
+ # "rate(5 minutes)".
495
+ #
496
+ # @option params [String] :event_pattern
497
+ # The event pattern.
498
+ #
499
+ # @option params [String] :state
500
+ # Indicates whether the rule is enabled or disabled.
501
+ #
502
+ # @option params [String] :description
503
+ # A description of the rule.
504
+ #
505
+ # @option params [String] :role_arn
506
+ # The Amazon Resource Name (ARN) of the IAM role associated with the
507
+ # rule.
508
+ #
509
+ # @return [Types::PutRuleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
510
+ #
511
+ # * {Types::PutRuleResponse#rule_arn #rule_arn} => String
512
+ #
513
+ # @example Request syntax with placeholder values
514
+ #
515
+ # resp = client.put_rule({
516
+ # name: "RuleName", # required
517
+ # schedule_expression: "ScheduleExpression",
518
+ # event_pattern: "EventPattern",
519
+ # state: "ENABLED", # accepts ENABLED, DISABLED
520
+ # description: "RuleDescription",
521
+ # role_arn: "RoleArn",
522
+ # })
523
+ #
524
+ # @example Response structure
525
+ #
526
+ # resp.rule_arn #=> String
527
+ #
528
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutRule AWS API Documentation
529
+ #
530
+ # @overload put_rule(params = {})
531
+ # @param [Hash] params ({})
532
+ def put_rule(params = {}, options = {})
533
+ req = build_request(:put_rule, params)
534
+ req.send_request(options)
535
+ end
514
536
 
515
- # Removes target(s) from a rule so that when the rule is triggered,
516
- # those targets will no longer be invoked.
517
- #
518
- # **Note:** When you remove a target, when the associated rule triggers,
519
- # removed targets might still continue to be invoked. Please allow a
520
- # short period of time for changes to take effect.
521
- # @option params [required, String] :rule
522
- # The name of the rule you want to remove targets from.
523
- # @option params [required, Array<String>] :ids
524
- # The list of target IDs to remove from the rule.
525
- # @return [Types::RemoveTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
526
- #
527
- # * {Types::RemoveTargetsResponse#failed_entry_count #FailedEntryCount} => Integer
528
- # * {Types::RemoveTargetsResponse#failed_entries #FailedEntries} => Array&lt;Types::RemoveTargetsResultEntry&gt;
529
- #
530
- # @example Request syntax with placeholder values
531
- # resp = client.remove_targets({
532
- # rule: "RuleName", # required
533
- # ids: ["TargetId"], # required
534
- # })
535
- #
536
- # @example Response structure
537
- # resp.failed_entry_count #=> Integer
538
- # resp.failed_entries #=> Array
539
- # resp.failed_entries[0].target_id #=> String
540
- # resp.failed_entries[0].error_code #=> String
541
- # resp.failed_entries[0].error_message #=> String
542
- # @overload remove_targets(params = {})
543
- # @param [Hash] params ({})
544
- def remove_targets(params = {}, options = {})
545
- req = build_request(:remove_targets, params)
546
- req.send_request(options)
547
- end
537
+ # Adds the specified targets to the specified rule, or updates the
538
+ # targets if they are already associated with the rule.
539
+ #
540
+ # Targets are the resources that are invoked when a rule is triggered.
541
+ # Example targets include EC2 instances, AWS Lambda functions, Amazon
542
+ # Kinesis streams, Amazon ECS tasks, AWS Step Functions state machines,
543
+ # and built-in targets. Note that creating rules with built-in targets
544
+ # is supported only in the AWS Management Console.
545
+ #
546
+ # For some target types, `PutTargets` provides target-specific
547
+ # parameters. If the target is an Amazon Kinesis stream, you can
548
+ # optionally specify which shard the event goes to by using the
549
+ # `KinesisParameters` argument. To invoke a command on multiple EC2
550
+ # instances with one rule, you can use the `RunCommandParameters` field.
551
+ #
552
+ # To be able to make API calls against the resources that you own,
553
+ # Amazon CloudWatch Events needs the appropriate permissions. For AWS
554
+ # Lambda and Amazon SNS resources, CloudWatch Events relies on
555
+ # resource-based policies. For EC2 instances, Amazon Kinesis streams,
556
+ # and AWS Step Functions state machines, CloudWatch Events relies on IAM
557
+ # roles that you specify in the `RoleARN` argument in `PutTarget`. For
558
+ # more information, see [Authentication and Access Control][1] in the
559
+ # *Amazon CloudWatch Events User Guide*.
560
+ #
561
+ # **Input**, **InputPath** and **InputTransformer** are mutually
562
+ # exclusive and optional parameters of a target. When a rule is
563
+ # triggered due to a matched event:
564
+ #
565
+ # * If none of the following arguments are specified for a target, then
566
+ # the entire event is passed to the target in JSON form (unless the
567
+ # target is Amazon EC2 Run Command or Amazon ECS task, in which case
568
+ # nothing from the event is passed to the target).
569
+ #
570
+ # * If **Input** is specified in the form of valid JSON, then the
571
+ # matched event is overridden with this constant.
572
+ #
573
+ # * If **InputPath** is specified in the form of JSONPath (for example,
574
+ # `$.detail`), then only the part of the event specified in the path
575
+ # is passed to the target (for example, only the detail part of the
576
+ # event is passed).
577
+ #
578
+ # * If **InputTransformer** is specified, then one or more specified
579
+ # JSONPaths are extracted from the event and used as values in a
580
+ # template that you specify as the input to the target.
581
+ #
582
+ # When you add targets to a rule and the associated rule triggers soon
583
+ # after, new or updated targets might not be immediately invoked. Please
584
+ # allow a short period of time for changes to take effect.
585
+ #
586
+ #
587
+ #
588
+ # [1]: http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/auth-and-access-control-cwe.html
589
+ #
590
+ # @option params [required, String] :rule
591
+ # The name of the rule.
592
+ #
593
+ # @option params [required, Array<Types::Target>] :targets
594
+ # The targets to update or add to the rule.
595
+ #
596
+ # @return [Types::PutTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
597
+ #
598
+ # * {Types::PutTargetsResponse#failed_entry_count #failed_entry_count} => Integer
599
+ # * {Types::PutTargetsResponse#failed_entries #failed_entries} => Array&lt;Types::PutTargetsResultEntry&gt;
600
+ #
601
+ # @example Request syntax with placeholder values
602
+ #
603
+ # resp = client.put_targets({
604
+ # rule: "RuleName", # required
605
+ # targets: [ # required
606
+ # {
607
+ # id: "TargetId", # required
608
+ # arn: "TargetArn", # required
609
+ # role_arn: "RoleArn",
610
+ # input: "TargetInput",
611
+ # input_path: "TargetInputPath",
612
+ # input_transformer: {
613
+ # input_paths_map: {
614
+ # "InputTransformerPathKey" => "TargetInputPath",
615
+ # },
616
+ # input_template: "TransformerInput", # required
617
+ # },
618
+ # kinesis_parameters: {
619
+ # partition_key_path: "TargetPartitionKeyPath", # required
620
+ # },
621
+ # run_command_parameters: {
622
+ # run_command_targets: [ # required
623
+ # {
624
+ # key: "RunCommandTargetKey", # required
625
+ # values: ["RunCommandTargetValue"], # required
626
+ # },
627
+ # ],
628
+ # },
629
+ # ecs_parameters: {
630
+ # task_definition_arn: "Arn", # required
631
+ # task_count: 1,
632
+ # },
633
+ # },
634
+ # ],
635
+ # })
636
+ #
637
+ # @example Response structure
638
+ #
639
+ # resp.failed_entry_count #=> Integer
640
+ # resp.failed_entries #=> Array
641
+ # resp.failed_entries[0].target_id #=> String
642
+ # resp.failed_entries[0].error_code #=> String
643
+ # resp.failed_entries[0].error_message #=> String
644
+ #
645
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/PutTargets AWS API Documentation
646
+ #
647
+ # @overload put_targets(params = {})
648
+ # @param [Hash] params ({})
649
+ def put_targets(params = {}, options = {})
650
+ req = build_request(:put_targets, params)
651
+ req.send_request(options)
652
+ end
548
653
 
549
- # Tests whether an event pattern matches the provided event.
550
- #
551
- # **Note:** Most services in AWS treat : or / as the same character in
552
- # Amazon Resource Names (ARNs). However, CloudWatch Events uses an exact
553
- # match in event patterns and rules. Be sure to use the correct ARN
554
- # characters when creating event patterns so that they match the ARN
555
- # syntax in the event you want to match.
556
- # @option params [required, String] :event_pattern
557
- # The event pattern you want to test.
558
- # @option params [required, String] :event
559
- # The event in the JSON format to test against the event pattern.
560
- # @return [Types::TestEventPatternResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
561
- #
562
- # * {Types::TestEventPatternResponse#result #Result} => Boolean
563
- #
564
- # @example Request syntax with placeholder values
565
- # resp = client.test_event_pattern({
566
- # event_pattern: "EventPattern", # required
567
- # event: "String", # required
568
- # })
569
- #
570
- # @example Response structure
571
- # resp.result #=> Boolean
572
- # @overload test_event_pattern(params = {})
573
- # @param [Hash] params ({})
574
- def test_event_pattern(params = {}, options = {})
575
- req = build_request(:test_event_pattern, params)
576
- req.send_request(options)
577
- end
654
+ # Removes the specified targets from the specified rule. When the rule
655
+ # is triggered, those targets are no longer be invoked.
656
+ #
657
+ # When you remove a target, when the associated rule triggers, removed
658
+ # targets might continue to be invoked. Please allow a short period of
659
+ # time for changes to take effect.
660
+ #
661
+ # @option params [required, String] :rule
662
+ # The name of the rule.
663
+ #
664
+ # @option params [required, Array<String>] :ids
665
+ # The IDs of the targets to remove from the rule.
666
+ #
667
+ # @return [Types::RemoveTargetsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
668
+ #
669
+ # * {Types::RemoveTargetsResponse#failed_entry_count #failed_entry_count} => Integer
670
+ # * {Types::RemoveTargetsResponse#failed_entries #failed_entries} => Array&lt;Types::RemoveTargetsResultEntry&gt;
671
+ #
672
+ # @example Request syntax with placeholder values
673
+ #
674
+ # resp = client.remove_targets({
675
+ # rule: "RuleName", # required
676
+ # ids: ["TargetId"], # required
677
+ # })
678
+ #
679
+ # @example Response structure
680
+ #
681
+ # resp.failed_entry_count #=> Integer
682
+ # resp.failed_entries #=> Array
683
+ # resp.failed_entries[0].target_id #=> String
684
+ # resp.failed_entries[0].error_code #=> String
685
+ # resp.failed_entries[0].error_message #=> String
686
+ #
687
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/RemoveTargets AWS API Documentation
688
+ #
689
+ # @overload remove_targets(params = {})
690
+ # @param [Hash] params ({})
691
+ def remove_targets(params = {}, options = {})
692
+ req = build_request(:remove_targets, params)
693
+ req.send_request(options)
694
+ end
578
695
 
579
- # @!endgroup
696
+ # Tests whether the specified event pattern matches the provided event.
697
+ #
698
+ # Most services in AWS treat : or / as the same character in Amazon
699
+ # Resource Names (ARNs). However, CloudWatch Events uses an exact match
700
+ # in event patterns and rules. Be sure to use the correct ARN characters
701
+ # when creating event patterns so that they match the ARN syntax in the
702
+ # event you want to match.
703
+ #
704
+ # @option params [required, String] :event_pattern
705
+ # The event pattern.
706
+ #
707
+ # @option params [required, String] :event
708
+ # The event, in JSON format, to test against the event pattern.
709
+ #
710
+ # @return [Types::TestEventPatternResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
711
+ #
712
+ # * {Types::TestEventPatternResponse#result #result} => Boolean
713
+ #
714
+ # @example Request syntax with placeholder values
715
+ #
716
+ # resp = client.test_event_pattern({
717
+ # event_pattern: "EventPattern", # required
718
+ # event: "String", # required
719
+ # })
720
+ #
721
+ # @example Response structure
722
+ #
723
+ # resp.result #=> Boolean
724
+ #
725
+ # @see http://docs.aws.amazon.com/goto/WebAPI/events-2015-10-07/TestEventPattern AWS API Documentation
726
+ #
727
+ # @overload test_event_pattern(params = {})
728
+ # @param [Hash] params ({})
729
+ def test_event_pattern(params = {}, options = {})
730
+ req = build_request(:test_event_pattern, params)
731
+ req.send_request(options)
732
+ end
580
733
 
581
- # @param params ({})
582
- # @api private
583
- def build_request(operation_name, params = {})
584
- handlers = @handlers.for(operation_name)
585
- context = Seahorse::Client::RequestContext.new(
586
- operation_name: operation_name,
587
- operation: config.api.operation(operation_name),
588
- client: self,
589
- params: params,
590
- config: config)
591
- context[:gem_name] = 'aws-sdk-cloudwatchevents'
592
- context[:gem_version] = '1.0.0.rc1'
593
- Seahorse::Client::Request.new(handlers, context)
594
- end
734
+ # @!endgroup
595
735
 
596
- # @api private
597
- # @deprecated
598
- def waiter_names
599
- []
600
- end
736
+ # @param params ({})
737
+ # @api private
738
+ def build_request(operation_name, params = {})
739
+ handlers = @handlers.for(operation_name)
740
+ context = Seahorse::Client::RequestContext.new(
741
+ operation_name: operation_name,
742
+ operation: config.api.operation(operation_name),
743
+ client: self,
744
+ params: params,
745
+ config: config)
746
+ context[:gem_name] = 'aws-sdk-cloudwatchevents'
747
+ context[:gem_version] = '1.0.0.rc2'
748
+ Seahorse::Client::Request.new(handlers, context)
749
+ end
601
750
 
602
- class << self
751
+ # @api private
752
+ # @deprecated
753
+ def waiter_names
754
+ []
755
+ end
603
756
 
604
- # @api private
605
- attr_reader :identifier
757
+ class << self
606
758
 
607
- # @api private
608
- def errors_module
609
- Errors
610
- end
759
+ # @api private
760
+ attr_reader :identifier
611
761
 
762
+ # @api private
763
+ def errors_module
764
+ Errors
612
765
  end
766
+
613
767
  end
614
768
  end
615
769
  end