aws-sdk-synthetics 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-synthetics.rb +50 -0
- data/lib/aws-sdk-synthetics/client.rb +1144 -0
- data/lib/aws-sdk-synthetics/client_api.rb +495 -0
- data/lib/aws-sdk-synthetics/customizations.rb +0 -0
- data/lib/aws-sdk-synthetics/errors.rb +100 -0
- data/lib/aws-sdk-synthetics/resource.rb +24 -0
- data/lib/aws-sdk-synthetics/types.rb +1273 -0
- metadata +88 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9dbe74f64c46a3f2a66d4a789dc104983990ee91d543ba16de18627a81404b0e
|
4
|
+
data.tar.gz: d6497dfc9af444aea4681f5efa1686b54e80e7e8198166096ebe9a76d16e16a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 893c78affe72a603008531be66220c2953de3c0e0819a7382afe98551fcceabe790403511409c46bca2bf331f86db94b4bc5394a74908e5ab9d9f742722d30e2
|
7
|
+
data.tar.gz: 204dec172e13f79b7fb3d49c98aee46617f67a8f5b671b1b524aec52f49708bb927de9b41548857a0401f92059920854f12f003a47347b1bc1e04759d1d2a7e0
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-synthetics/types'
|
12
|
+
require_relative 'aws-sdk-synthetics/client_api'
|
13
|
+
require_relative 'aws-sdk-synthetics/client'
|
14
|
+
require_relative 'aws-sdk-synthetics/errors'
|
15
|
+
require_relative 'aws-sdk-synthetics/resource'
|
16
|
+
require_relative 'aws-sdk-synthetics/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Synthetics. This module is available in the
|
19
|
+
# `aws-sdk-synthetics` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# synthetics = Aws::Synthetics::Client.new
|
28
|
+
# resp = synthetics.create_canary(params)
|
29
|
+
#
|
30
|
+
# See {Client} for more information.
|
31
|
+
#
|
32
|
+
# # Errors
|
33
|
+
#
|
34
|
+
# Errors returned from Synthetics are defined in the
|
35
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
36
|
+
#
|
37
|
+
# begin
|
38
|
+
# # do stuff
|
39
|
+
# rescue Aws::Synthetics::Errors::ServiceError
|
40
|
+
# # rescues all Synthetics API errors
|
41
|
+
# end
|
42
|
+
#
|
43
|
+
# See {Errors} for more information.
|
44
|
+
#
|
45
|
+
# @service
|
46
|
+
module Aws::Synthetics
|
47
|
+
|
48
|
+
GEM_VERSION = '1.0.0'
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,1144 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
29
|
+
|
30
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:synthetics)
|
31
|
+
|
32
|
+
module Aws::Synthetics
|
33
|
+
# An API client for Synthetics. To construct a client, you need to configure a `:region` and `:credentials`.
|
34
|
+
#
|
35
|
+
# client = Aws::Synthetics::Client.new(
|
36
|
+
# region: region_name,
|
37
|
+
# credentials: credentials,
|
38
|
+
# # ...
|
39
|
+
# )
|
40
|
+
#
|
41
|
+
# For details on configuring region and credentials see
|
42
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
43
|
+
#
|
44
|
+
# See {#initialize} for a full list of supported configuration options.
|
45
|
+
class Client < Seahorse::Client::Base
|
46
|
+
|
47
|
+
include Aws::ClientStubs
|
48
|
+
|
49
|
+
@identifier = :synthetics
|
50
|
+
|
51
|
+
set_api(ClientApi::API)
|
52
|
+
|
53
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
54
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
55
|
+
add_plugin(Aws::Plugins::Logging)
|
56
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
57
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
58
|
+
add_plugin(Aws::Plugins::UserAgent)
|
59
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
60
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
61
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
62
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
63
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
64
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
65
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
66
|
+
add_plugin(Aws::Plugins::StubResponses)
|
67
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
68
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
69
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
70
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
71
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
72
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
73
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
74
|
+
|
75
|
+
# @overload initialize(options)
|
76
|
+
# @param [Hash] options
|
77
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
78
|
+
# Your AWS credentials. This can be an instance of any one of the
|
79
|
+
# following classes:
|
80
|
+
#
|
81
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
82
|
+
# credentials.
|
83
|
+
#
|
84
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
85
|
+
# from an EC2 IMDS on an EC2 instance.
|
86
|
+
#
|
87
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
88
|
+
# shared file, such as `~/.aws/config`.
|
89
|
+
#
|
90
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
91
|
+
#
|
92
|
+
# When `:credentials` are not configured directly, the following
|
93
|
+
# locations will be searched for credentials:
|
94
|
+
#
|
95
|
+
# * `Aws.config[:credentials]`
|
96
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
97
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
98
|
+
# * `~/.aws/credentials`
|
99
|
+
# * `~/.aws/config`
|
100
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
101
|
+
# very aggressive. Construct and pass an instance of
|
102
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
103
|
+
# timeouts.
|
104
|
+
#
|
105
|
+
# @option options [required, String] :region
|
106
|
+
# The AWS region to connect to. The configured `:region` is
|
107
|
+
# used to determine the service `:endpoint`. When not passed,
|
108
|
+
# a default `:region` is search for in the following locations:
|
109
|
+
#
|
110
|
+
# * `Aws.config[:region]`
|
111
|
+
# * `ENV['AWS_REGION']`
|
112
|
+
# * `ENV['AMAZON_REGION']`
|
113
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
114
|
+
# * `~/.aws/credentials`
|
115
|
+
# * `~/.aws/config`
|
116
|
+
#
|
117
|
+
# @option options [String] :access_key_id
|
118
|
+
#
|
119
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
120
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
121
|
+
# the background every 60 secs (default). Defaults to `false`.
|
122
|
+
#
|
123
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
124
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
125
|
+
# until there is sufficent client side capacity to retry the request.
|
126
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
127
|
+
# not retry instead of sleeping.
|
128
|
+
#
|
129
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
130
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
131
|
+
# this client.
|
132
|
+
#
|
133
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
134
|
+
# Allows you to provide an identifier for this client which will be attached to
|
135
|
+
# all generated client side metrics. Defaults to an empty string.
|
136
|
+
#
|
137
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
138
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
139
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
140
|
+
#
|
141
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
142
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
143
|
+
# agent is running on, where client metrics will be published via UDP.
|
144
|
+
#
|
145
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
146
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
147
|
+
# will use the Client Side Monitoring Agent Publisher.
|
148
|
+
#
|
149
|
+
# @option options [Boolean] :convert_params (true)
|
150
|
+
# When `true`, an attempt is made to coerce request parameters into
|
151
|
+
# the required types.
|
152
|
+
#
|
153
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
154
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
155
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
156
|
+
#
|
157
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
158
|
+
# Set to true to disable SDK automatically adding host prefix
|
159
|
+
# to default service endpoint when available.
|
160
|
+
#
|
161
|
+
# @option options [String] :endpoint
|
162
|
+
# The client endpoint is normally constructed from the `:region`
|
163
|
+
# option. You should only configure an `:endpoint` when connecting
|
164
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
165
|
+
#
|
166
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
167
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
168
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
169
|
+
#
|
170
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
171
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
172
|
+
#
|
173
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
174
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
175
|
+
# Use this option to config the time interval in seconds for making
|
176
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
177
|
+
#
|
178
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
179
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
180
|
+
#
|
181
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
182
|
+
# The log formatter.
|
183
|
+
#
|
184
|
+
# @option options [Symbol] :log_level (:info)
|
185
|
+
# The log level to send messages to the `:logger` at.
|
186
|
+
#
|
187
|
+
# @option options [Logger] :logger
|
188
|
+
# The Logger instance to send log messages to. If this option
|
189
|
+
# is not set, logging will be disabled.
|
190
|
+
#
|
191
|
+
# @option options [Integer] :max_attempts (3)
|
192
|
+
# An integer representing the maximum number attempts that will be made for
|
193
|
+
# a single request, including the initial attempt. For example,
|
194
|
+
# setting this value to 5 will result in a request being retried up to
|
195
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
196
|
+
#
|
197
|
+
# @option options [String] :profile ("default")
|
198
|
+
# Used when loading credentials from the shared credentials file
|
199
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
200
|
+
#
|
201
|
+
# @option options [Proc] :retry_backoff
|
202
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
203
|
+
# This option is only used in the `legacy` retry mode.
|
204
|
+
#
|
205
|
+
# @option options [Float] :retry_base_delay (0.3)
|
206
|
+
# The base delay in seconds used by the default backoff function. This option
|
207
|
+
# is only used in the `legacy` retry mode.
|
208
|
+
#
|
209
|
+
# @option options [Symbol] :retry_jitter (:none)
|
210
|
+
# A delay randomiser function used by the default backoff function.
|
211
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
212
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
213
|
+
# in the `legacy` retry mode.
|
214
|
+
#
|
215
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
216
|
+
#
|
217
|
+
# @option options [Integer] :retry_limit (3)
|
218
|
+
# The maximum number of times to retry failed requests. Only
|
219
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
220
|
+
# are retried. Generally, these are throttling errors, data
|
221
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
222
|
+
# endpoint discovery, and errors from expired credentials.
|
223
|
+
# This option is only used in the `legacy` retry mode.
|
224
|
+
#
|
225
|
+
# @option options [Integer] :retry_max_delay (0)
|
226
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
227
|
+
# used by the default backoff function. This option is only used in the
|
228
|
+
# `legacy` retry mode.
|
229
|
+
#
|
230
|
+
# @option options [String] :retry_mode ("legacy")
|
231
|
+
# Specifies which retry algorithm to use. Values are:
|
232
|
+
#
|
233
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
234
|
+
# no retry mode is provided.
|
235
|
+
#
|
236
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
237
|
+
# This includes support for retry quotas, which limit the number of
|
238
|
+
# unsuccessful retries a client can make.
|
239
|
+
#
|
240
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
241
|
+
# functionality of `standard` mode along with automatic client side
|
242
|
+
# throttling. This is a provisional mode that may change behavior
|
243
|
+
# in the future.
|
244
|
+
#
|
245
|
+
#
|
246
|
+
# @option options [String] :secret_access_key
|
247
|
+
#
|
248
|
+
# @option options [String] :session_token
|
249
|
+
#
|
250
|
+
# @option options [Boolean] :stub_responses (false)
|
251
|
+
# Causes the client to return stubbed responses. By default
|
252
|
+
# fake responses are generated and returned. You can specify
|
253
|
+
# the response data to return or errors to raise by calling
|
254
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
255
|
+
#
|
256
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
257
|
+
# requests are made, and retries are disabled.
|
258
|
+
#
|
259
|
+
# @option options [Boolean] :validate_params (true)
|
260
|
+
# When `true`, request parameters are validated before
|
261
|
+
# sending the request.
|
262
|
+
#
|
263
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
264
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
265
|
+
#
|
266
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
267
|
+
# seconds to wait when opening a HTTP session before raising a
|
268
|
+
# `Timeout::Error`.
|
269
|
+
#
|
270
|
+
# @option options [Integer] :http_read_timeout (60) The default
|
271
|
+
# number of seconds to wait for response data. This value can
|
272
|
+
# safely be set per-request on the session.
|
273
|
+
#
|
274
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
275
|
+
# seconds a connection is allowed to sit idle before it is
|
276
|
+
# considered stale. Stale connections are closed and removed
|
277
|
+
# from the pool before making a request.
|
278
|
+
#
|
279
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
280
|
+
# seconds to wait for a 100-continue response before sending the
|
281
|
+
# request body. This option has no effect unless the request has
|
282
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
283
|
+
# disables this behaviour. This value can safely be set per
|
284
|
+
# request on the session.
|
285
|
+
#
|
286
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
287
|
+
# HTTP debug output will be sent to the `:logger`.
|
288
|
+
#
|
289
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
290
|
+
# SSL peer certificates are verified when establishing a
|
291
|
+
# connection.
|
292
|
+
#
|
293
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
294
|
+
# certificate authority bundle file that should be used when
|
295
|
+
# verifying peer certificates. If you do not pass
|
296
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
297
|
+
# will be used if available.
|
298
|
+
#
|
299
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
300
|
+
# directory that contains the unbundled SSL certificate
|
301
|
+
# authority files for verifying peer certificates. If you do
|
302
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
303
|
+
# system default will be used if available.
|
304
|
+
#
|
305
|
+
def initialize(*args)
|
306
|
+
super
|
307
|
+
end
|
308
|
+
|
309
|
+
# @!group API Operations
|
310
|
+
|
311
|
+
# Creates a canary. Canaries are scripts that monitor your endpoints and
|
312
|
+
# APIs from the outside-in. Canaries help you check the availability and
|
313
|
+
# latency of your web services and troubleshoot anomalies by
|
314
|
+
# investigating load time data, screenshots of the UI, logs, and
|
315
|
+
# metrics. You can set up a canary to run continuously or just once.
|
316
|
+
#
|
317
|
+
# Do not use `CreateCanary` to modify an existing canary. Use
|
318
|
+
# UpdateCanary instead.
|
319
|
+
#
|
320
|
+
# To create canaries, you must have the `CloudWatchSyntheticsFullAccess`
|
321
|
+
# policy. If you are creating a new IAM role for the canary, you also
|
322
|
+
# need the the `iam:CreateRole`, `iam:CreatePolicy` and
|
323
|
+
# `iam:AttachRolePolicy` permissions. For more information, see
|
324
|
+
# [Necessary Roles and Permissions][1].
|
325
|
+
#
|
326
|
+
# Do not include secrets or proprietary information in your canary
|
327
|
+
# names. The canary name makes up part of the Amazon Resource Name (ARN)
|
328
|
+
# for the canary, and the ARN is included in outbound calls over the
|
329
|
+
# internet. For more information, see [Security Considerations for
|
330
|
+
# Synthetics Canaries][2].
|
331
|
+
#
|
332
|
+
#
|
333
|
+
#
|
334
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Roles
|
335
|
+
# [2]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html
|
336
|
+
#
|
337
|
+
# @option params [required, String] :name
|
338
|
+
# The name for this canary. Be sure to give it a descriptive name that
|
339
|
+
# distinguishes it from other canaries in your account.
|
340
|
+
#
|
341
|
+
# Do not include secrets or proprietary information in your canary
|
342
|
+
# names. The canary name makes up part of the canary ARN, and the ARN is
|
343
|
+
# included in outbound calls over the internet. For more information,
|
344
|
+
# see [Security Considerations for Synthetics Canaries][1].
|
345
|
+
#
|
346
|
+
#
|
347
|
+
#
|
348
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html
|
349
|
+
#
|
350
|
+
# @option params [required, Types::CanaryCodeInput] :code
|
351
|
+
# A structure that includes the entry point from which the canary should
|
352
|
+
# start running your script. If the script is stored in an S3 bucket,
|
353
|
+
# the bucket name, key, and version are also included.
|
354
|
+
#
|
355
|
+
# @option params [required, String] :artifact_s3_location
|
356
|
+
# The location in Amazon S3 where Synthetics stores artifacts from the
|
357
|
+
# test runs of this canary. Artifacts include the log file, screenshots,
|
358
|
+
# and HAR files.
|
359
|
+
#
|
360
|
+
# @option params [required, String] :execution_role_arn
|
361
|
+
# The ARN of the IAM role to be used to run the canary. This role must
|
362
|
+
# already exist, and must include `lambda.amazonaws.com` as a principal
|
363
|
+
# in the trust policy. The role must also have the following
|
364
|
+
# permissions:
|
365
|
+
#
|
366
|
+
# * `s3:PutObject`
|
367
|
+
#
|
368
|
+
# * `s3:GetBucketLocation`
|
369
|
+
#
|
370
|
+
# * `s3:ListAllMyBuckets`
|
371
|
+
#
|
372
|
+
# * `cloudwatch:PutMetricData`
|
373
|
+
#
|
374
|
+
# * `logs:CreateLogGroup`
|
375
|
+
#
|
376
|
+
# * `logs:CreateLogStream`
|
377
|
+
#
|
378
|
+
# * `logs:CreateLogStream`
|
379
|
+
#
|
380
|
+
# @option params [required, Types::CanaryScheduleInput] :schedule
|
381
|
+
# A structure that contains information about how often the canary is to
|
382
|
+
# run and when these test runs are to stop.
|
383
|
+
#
|
384
|
+
# @option params [Types::CanaryRunConfigInput] :run_config
|
385
|
+
# A structure that contains the configuration for individual canary
|
386
|
+
# runs, such as timeout value.
|
387
|
+
#
|
388
|
+
# @option params [Integer] :success_retention_period_in_days
|
389
|
+
# The number of days to retain data about successful runs of this
|
390
|
+
# canary. If you omit this field, the default of 31 days is used. The
|
391
|
+
# valid range is 1 to 455 days.
|
392
|
+
#
|
393
|
+
# @option params [Integer] :failure_retention_period_in_days
|
394
|
+
# The number of days to retain data about failed runs of this canary. If
|
395
|
+
# you omit this field, the default of 31 days is used. The valid range
|
396
|
+
# is 1 to 455 days.
|
397
|
+
#
|
398
|
+
# @option params [required, String] :runtime_version
|
399
|
+
# Specifies the runtime version to use for the canary. Currently, the
|
400
|
+
# only valid value is `syn-1.0`. For more information about runtime
|
401
|
+
# versions, see [ Canary Runtime Versions][1].
|
402
|
+
#
|
403
|
+
#
|
404
|
+
#
|
405
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html
|
406
|
+
#
|
407
|
+
# @option params [Types::VpcConfigInput] :vpc_config
|
408
|
+
# If this canary is to test an endpoint in a VPC, this structure
|
409
|
+
# contains information about the subnet and security groups of the VPC
|
410
|
+
# endpoint. For more information, see [ Running a Canary in a VPC][1].
|
411
|
+
#
|
412
|
+
#
|
413
|
+
#
|
414
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html
|
415
|
+
#
|
416
|
+
# @option params [Hash<String,String>] :tags
|
417
|
+
# A list of key-value pairs to associate with the canary. You can
|
418
|
+
# associate as many as 50 tags with a canary.
|
419
|
+
#
|
420
|
+
# Tags can help you organize and categorize your resources. You can also
|
421
|
+
# use them to scope user permissions, by granting a user permission to
|
422
|
+
# access or change only the resources that have certain tag values.
|
423
|
+
#
|
424
|
+
# @return [Types::CreateCanaryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
425
|
+
#
|
426
|
+
# * {Types::CreateCanaryResponse#canary #canary} => Types::Canary
|
427
|
+
#
|
428
|
+
# @example Request syntax with placeholder values
|
429
|
+
#
|
430
|
+
# resp = client.create_canary({
|
431
|
+
# name: "CanaryName", # required
|
432
|
+
# code: { # required
|
433
|
+
# s3_bucket: "String",
|
434
|
+
# s3_key: "String",
|
435
|
+
# s3_version: "String",
|
436
|
+
# zip_file: "data",
|
437
|
+
# handler: "String", # required
|
438
|
+
# },
|
439
|
+
# artifact_s3_location: "String", # required
|
440
|
+
# execution_role_arn: "Arn", # required
|
441
|
+
# schedule: { # required
|
442
|
+
# expression: "String", # required
|
443
|
+
# duration_in_seconds: 1,
|
444
|
+
# },
|
445
|
+
# run_config: {
|
446
|
+
# timeout_in_seconds: 1, # required
|
447
|
+
# },
|
448
|
+
# success_retention_period_in_days: 1,
|
449
|
+
# failure_retention_period_in_days: 1,
|
450
|
+
# runtime_version: "String", # required
|
451
|
+
# vpc_config: {
|
452
|
+
# subnet_ids: ["SubnetId"],
|
453
|
+
# security_group_ids: ["SecurityGroupId"],
|
454
|
+
# },
|
455
|
+
# tags: {
|
456
|
+
# "TagKey" => "TagValue",
|
457
|
+
# },
|
458
|
+
# })
|
459
|
+
#
|
460
|
+
# @example Response structure
|
461
|
+
#
|
462
|
+
# resp.canary.id #=> String
|
463
|
+
# resp.canary.name #=> String
|
464
|
+
# resp.canary.code.source_location_arn #=> String
|
465
|
+
# resp.canary.code.handler #=> String
|
466
|
+
# resp.canary.execution_role_arn #=> String
|
467
|
+
# resp.canary.schedule.expression #=> String
|
468
|
+
# resp.canary.schedule.duration_in_seconds #=> Integer
|
469
|
+
# resp.canary.run_config.timeout_in_seconds #=> Integer
|
470
|
+
# resp.canary.success_retention_period_in_days #=> Integer
|
471
|
+
# resp.canary.failure_retention_period_in_days #=> Integer
|
472
|
+
# resp.canary.status.state #=> String, one of "CREATING", "READY", "STARTING", "RUNNING", "UPDATING", "STOPPING", "STOPPED", "ERROR", "DELETING"
|
473
|
+
# resp.canary.status.state_reason #=> String
|
474
|
+
# resp.canary.status.state_reason_code #=> String, one of "INVALID_PERMISSIONS"
|
475
|
+
# resp.canary.timeline.created #=> Time
|
476
|
+
# resp.canary.timeline.last_modified #=> Time
|
477
|
+
# resp.canary.timeline.last_started #=> Time
|
478
|
+
# resp.canary.timeline.last_stopped #=> Time
|
479
|
+
# resp.canary.artifact_s3_location #=> String
|
480
|
+
# resp.canary.engine_arn #=> String
|
481
|
+
# resp.canary.runtime_version #=> String
|
482
|
+
# resp.canary.vpc_config.vpc_id #=> String
|
483
|
+
# resp.canary.vpc_config.subnet_ids #=> Array
|
484
|
+
# resp.canary.vpc_config.subnet_ids[0] #=> String
|
485
|
+
# resp.canary.vpc_config.security_group_ids #=> Array
|
486
|
+
# resp.canary.vpc_config.security_group_ids[0] #=> String
|
487
|
+
# resp.canary.tags #=> Hash
|
488
|
+
# resp.canary.tags["TagKey"] #=> String
|
489
|
+
#
|
490
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/CreateCanary AWS API Documentation
|
491
|
+
#
|
492
|
+
# @overload create_canary(params = {})
|
493
|
+
# @param [Hash] params ({})
|
494
|
+
def create_canary(params = {}, options = {})
|
495
|
+
req = build_request(:create_canary, params)
|
496
|
+
req.send_request(options)
|
497
|
+
end
|
498
|
+
|
499
|
+
# Permanently deletes the specified canary.
|
500
|
+
#
|
501
|
+
# When you delete a canary, resources used and created by the canary are
|
502
|
+
# not automatically deleted. After you delete a canary that you do not
|
503
|
+
# intend to use again, you should also delete the following:
|
504
|
+
#
|
505
|
+
# * The Lambda functions and layers used by this canary. These have the
|
506
|
+
# prefix `cwsyn-MyCanaryName `.
|
507
|
+
#
|
508
|
+
# * The CloudWatch alarms created for this canary. These alarms have a
|
509
|
+
# name of `Synthetics-SharpDrop-Alarm-MyCanaryName `.
|
510
|
+
#
|
511
|
+
# * Amazon S3 objects and buckets, such as the canary's artifact
|
512
|
+
# location.
|
513
|
+
#
|
514
|
+
# * IAM roles created for the canary. If they were created in the
|
515
|
+
# console, these roles have the name `
|
516
|
+
# role/service-role/CloudWatchSyntheticsRole-MyCanaryName `.
|
517
|
+
#
|
518
|
+
# * CloudWatch Logs log groups created for the canary. These logs groups
|
519
|
+
# have the name `/aws/lambda/cwsyn-MyCanaryName `.
|
520
|
+
#
|
521
|
+
# Before you delete a canary, you might want to use `GetCanary` to
|
522
|
+
# display the information about this canary. Make note of the
|
523
|
+
# information returned by this operation so that you can delete these
|
524
|
+
# resources after you delete the canary.
|
525
|
+
#
|
526
|
+
# @option params [required, String] :name
|
527
|
+
# The name of the canary that you want to delete. To find the names of
|
528
|
+
# your canaries, use DescribeCanaries.
|
529
|
+
#
|
530
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
531
|
+
#
|
532
|
+
# @example Request syntax with placeholder values
|
533
|
+
#
|
534
|
+
# resp = client.delete_canary({
|
535
|
+
# name: "CanaryName", # required
|
536
|
+
# })
|
537
|
+
#
|
538
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DeleteCanary AWS API Documentation
|
539
|
+
#
|
540
|
+
# @overload delete_canary(params = {})
|
541
|
+
# @param [Hash] params ({})
|
542
|
+
def delete_canary(params = {}, options = {})
|
543
|
+
req = build_request(:delete_canary, params)
|
544
|
+
req.send_request(options)
|
545
|
+
end
|
546
|
+
|
547
|
+
# This operation returns a list of the canaries in your account, along
|
548
|
+
# with full details about each canary.
|
549
|
+
#
|
550
|
+
# This operation does not have resource-level authorization, so if a
|
551
|
+
# user is able to use `DescribeCanaries`, the user can see all of the
|
552
|
+
# canaries in the account. A deny policy can only be used to restrict
|
553
|
+
# access to all canaries. It cannot be used on specific resources.
|
554
|
+
#
|
555
|
+
# @option params [String] :next_token
|
556
|
+
# A token that indicates that there is more data available. You can use
|
557
|
+
# this token in a subsequent operation to retrieve the next set of
|
558
|
+
# results.
|
559
|
+
#
|
560
|
+
# @option params [Integer] :max_results
|
561
|
+
# Specify this parameter to limit how many canaries are returned each
|
562
|
+
# time you use the `DescribeCanaries` operation. If you omit this
|
563
|
+
# parameter, the default of 100 is used.
|
564
|
+
#
|
565
|
+
# @return [Types::DescribeCanariesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
566
|
+
#
|
567
|
+
# * {Types::DescribeCanariesResponse#canaries #canaries} => Array<Types::Canary>
|
568
|
+
# * {Types::DescribeCanariesResponse#next_token #next_token} => String
|
569
|
+
#
|
570
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
571
|
+
#
|
572
|
+
# @example Request syntax with placeholder values
|
573
|
+
#
|
574
|
+
# resp = client.describe_canaries({
|
575
|
+
# next_token: "Token",
|
576
|
+
# max_results: 1,
|
577
|
+
# })
|
578
|
+
#
|
579
|
+
# @example Response structure
|
580
|
+
#
|
581
|
+
# resp.canaries #=> Array
|
582
|
+
# resp.canaries[0].id #=> String
|
583
|
+
# resp.canaries[0].name #=> String
|
584
|
+
# resp.canaries[0].code.source_location_arn #=> String
|
585
|
+
# resp.canaries[0].code.handler #=> String
|
586
|
+
# resp.canaries[0].execution_role_arn #=> String
|
587
|
+
# resp.canaries[0].schedule.expression #=> String
|
588
|
+
# resp.canaries[0].schedule.duration_in_seconds #=> Integer
|
589
|
+
# resp.canaries[0].run_config.timeout_in_seconds #=> Integer
|
590
|
+
# resp.canaries[0].success_retention_period_in_days #=> Integer
|
591
|
+
# resp.canaries[0].failure_retention_period_in_days #=> Integer
|
592
|
+
# resp.canaries[0].status.state #=> String, one of "CREATING", "READY", "STARTING", "RUNNING", "UPDATING", "STOPPING", "STOPPED", "ERROR", "DELETING"
|
593
|
+
# resp.canaries[0].status.state_reason #=> String
|
594
|
+
# resp.canaries[0].status.state_reason_code #=> String, one of "INVALID_PERMISSIONS"
|
595
|
+
# resp.canaries[0].timeline.created #=> Time
|
596
|
+
# resp.canaries[0].timeline.last_modified #=> Time
|
597
|
+
# resp.canaries[0].timeline.last_started #=> Time
|
598
|
+
# resp.canaries[0].timeline.last_stopped #=> Time
|
599
|
+
# resp.canaries[0].artifact_s3_location #=> String
|
600
|
+
# resp.canaries[0].engine_arn #=> String
|
601
|
+
# resp.canaries[0].runtime_version #=> String
|
602
|
+
# resp.canaries[0].vpc_config.vpc_id #=> String
|
603
|
+
# resp.canaries[0].vpc_config.subnet_ids #=> Array
|
604
|
+
# resp.canaries[0].vpc_config.subnet_ids[0] #=> String
|
605
|
+
# resp.canaries[0].vpc_config.security_group_ids #=> Array
|
606
|
+
# resp.canaries[0].vpc_config.security_group_ids[0] #=> String
|
607
|
+
# resp.canaries[0].tags #=> Hash
|
608
|
+
# resp.canaries[0].tags["TagKey"] #=> String
|
609
|
+
# resp.next_token #=> String
|
610
|
+
#
|
611
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanaries AWS API Documentation
|
612
|
+
#
|
613
|
+
# @overload describe_canaries(params = {})
|
614
|
+
# @param [Hash] params ({})
|
615
|
+
def describe_canaries(params = {}, options = {})
|
616
|
+
req = build_request(:describe_canaries, params)
|
617
|
+
req.send_request(options)
|
618
|
+
end
|
619
|
+
|
620
|
+
# Use this operation to see information from the most recent run of each
|
621
|
+
# canary that you have created.
|
622
|
+
#
|
623
|
+
# @option params [String] :next_token
|
624
|
+
# A token that indicates that there is more data available. You can use
|
625
|
+
# this token in a subsequent `DescribeCanaries` operation to retrieve
|
626
|
+
# the next set of results.
|
627
|
+
#
|
628
|
+
# @option params [Integer] :max_results
|
629
|
+
# Specify this parameter to limit how many runs are returned each time
|
630
|
+
# you use the `DescribeLastRun` operation. If you omit this parameter,
|
631
|
+
# the default of 100 is used.
|
632
|
+
#
|
633
|
+
# @return [Types::DescribeCanariesLastRunResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
634
|
+
#
|
635
|
+
# * {Types::DescribeCanariesLastRunResponse#canaries_last_run #canaries_last_run} => Array<Types::CanaryLastRun>
|
636
|
+
# * {Types::DescribeCanariesLastRunResponse#next_token #next_token} => String
|
637
|
+
#
|
638
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
639
|
+
#
|
640
|
+
# @example Request syntax with placeholder values
|
641
|
+
#
|
642
|
+
# resp = client.describe_canaries_last_run({
|
643
|
+
# next_token: "Token",
|
644
|
+
# max_results: 1,
|
645
|
+
# })
|
646
|
+
#
|
647
|
+
# @example Response structure
|
648
|
+
#
|
649
|
+
# resp.canaries_last_run #=> Array
|
650
|
+
# resp.canaries_last_run[0].canary_name #=> String
|
651
|
+
# resp.canaries_last_run[0].last_run.name #=> String
|
652
|
+
# resp.canaries_last_run[0].last_run.status.state #=> String, one of "RUNNING", "PASSED", "FAILED"
|
653
|
+
# resp.canaries_last_run[0].last_run.status.state_reason #=> String
|
654
|
+
# resp.canaries_last_run[0].last_run.status.state_reason_code #=> String, one of "CANARY_FAILURE", "EXECUTION_FAILURE"
|
655
|
+
# resp.canaries_last_run[0].last_run.timeline.started #=> Time
|
656
|
+
# resp.canaries_last_run[0].last_run.timeline.completed #=> Time
|
657
|
+
# resp.canaries_last_run[0].last_run.artifact_s3_location #=> String
|
658
|
+
# resp.next_token #=> String
|
659
|
+
#
|
660
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeCanariesLastRun AWS API Documentation
|
661
|
+
#
|
662
|
+
# @overload describe_canaries_last_run(params = {})
|
663
|
+
# @param [Hash] params ({})
|
664
|
+
def describe_canaries_last_run(params = {}, options = {})
|
665
|
+
req = build_request(:describe_canaries_last_run, params)
|
666
|
+
req.send_request(options)
|
667
|
+
end
|
668
|
+
|
669
|
+
# Returns a list of Synthetics canary runtime versions. For more
|
670
|
+
# information, see [ Canary Runtime Versions][1].
|
671
|
+
#
|
672
|
+
#
|
673
|
+
#
|
674
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html
|
675
|
+
#
|
676
|
+
# @option params [String] :next_token
|
677
|
+
# A token that indicates that there is more data available. You can use
|
678
|
+
# this token in a subsequent `DescribeRuntimeVersions` operation to
|
679
|
+
# retrieve the next set of results.
|
680
|
+
#
|
681
|
+
# @option params [Integer] :max_results
|
682
|
+
# Specify this parameter to limit how many runs are returned each time
|
683
|
+
# you use the `DescribeRuntimeVersions` operation. If you omit this
|
684
|
+
# parameter, the default of 100 is used.
|
685
|
+
#
|
686
|
+
# @return [Types::DescribeRuntimeVersionsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
687
|
+
#
|
688
|
+
# * {Types::DescribeRuntimeVersionsResponse#runtime_versions #runtime_versions} => Array<Types::RuntimeVersion>
|
689
|
+
# * {Types::DescribeRuntimeVersionsResponse#next_token #next_token} => String
|
690
|
+
#
|
691
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
692
|
+
#
|
693
|
+
# @example Request syntax with placeholder values
|
694
|
+
#
|
695
|
+
# resp = client.describe_runtime_versions({
|
696
|
+
# next_token: "Token",
|
697
|
+
# max_results: 1,
|
698
|
+
# })
|
699
|
+
#
|
700
|
+
# @example Response structure
|
701
|
+
#
|
702
|
+
# resp.runtime_versions #=> Array
|
703
|
+
# resp.runtime_versions[0].version_name #=> String
|
704
|
+
# resp.runtime_versions[0].description #=> String
|
705
|
+
# resp.runtime_versions[0].release_date #=> Time
|
706
|
+
# resp.runtime_versions[0].deprecation_date #=> Time
|
707
|
+
# resp.next_token #=> String
|
708
|
+
#
|
709
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/DescribeRuntimeVersions AWS API Documentation
|
710
|
+
#
|
711
|
+
# @overload describe_runtime_versions(params = {})
|
712
|
+
# @param [Hash] params ({})
|
713
|
+
def describe_runtime_versions(params = {}, options = {})
|
714
|
+
req = build_request(:describe_runtime_versions, params)
|
715
|
+
req.send_request(options)
|
716
|
+
end
|
717
|
+
|
718
|
+
# Retrieves complete information about one canary. You must specify the
|
719
|
+
# name of the canary that you want. To get a list of canaries and their
|
720
|
+
# names, use [DescribeCanaries][1].
|
721
|
+
#
|
722
|
+
#
|
723
|
+
#
|
724
|
+
# [1]: https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html
|
725
|
+
#
|
726
|
+
# @option params [required, String] :name
|
727
|
+
# The name of the canary that you want details for.
|
728
|
+
#
|
729
|
+
# @return [Types::GetCanaryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
730
|
+
#
|
731
|
+
# * {Types::GetCanaryResponse#canary #canary} => Types::Canary
|
732
|
+
#
|
733
|
+
# @example Request syntax with placeholder values
|
734
|
+
#
|
735
|
+
# resp = client.get_canary({
|
736
|
+
# name: "CanaryName", # required
|
737
|
+
# })
|
738
|
+
#
|
739
|
+
# @example Response structure
|
740
|
+
#
|
741
|
+
# resp.canary.id #=> String
|
742
|
+
# resp.canary.name #=> String
|
743
|
+
# resp.canary.code.source_location_arn #=> String
|
744
|
+
# resp.canary.code.handler #=> String
|
745
|
+
# resp.canary.execution_role_arn #=> String
|
746
|
+
# resp.canary.schedule.expression #=> String
|
747
|
+
# resp.canary.schedule.duration_in_seconds #=> Integer
|
748
|
+
# resp.canary.run_config.timeout_in_seconds #=> Integer
|
749
|
+
# resp.canary.success_retention_period_in_days #=> Integer
|
750
|
+
# resp.canary.failure_retention_period_in_days #=> Integer
|
751
|
+
# resp.canary.status.state #=> String, one of "CREATING", "READY", "STARTING", "RUNNING", "UPDATING", "STOPPING", "STOPPED", "ERROR", "DELETING"
|
752
|
+
# resp.canary.status.state_reason #=> String
|
753
|
+
# resp.canary.status.state_reason_code #=> String, one of "INVALID_PERMISSIONS"
|
754
|
+
# resp.canary.timeline.created #=> Time
|
755
|
+
# resp.canary.timeline.last_modified #=> Time
|
756
|
+
# resp.canary.timeline.last_started #=> Time
|
757
|
+
# resp.canary.timeline.last_stopped #=> Time
|
758
|
+
# resp.canary.artifact_s3_location #=> String
|
759
|
+
# resp.canary.engine_arn #=> String
|
760
|
+
# resp.canary.runtime_version #=> String
|
761
|
+
# resp.canary.vpc_config.vpc_id #=> String
|
762
|
+
# resp.canary.vpc_config.subnet_ids #=> Array
|
763
|
+
# resp.canary.vpc_config.subnet_ids[0] #=> String
|
764
|
+
# resp.canary.vpc_config.security_group_ids #=> Array
|
765
|
+
# resp.canary.vpc_config.security_group_ids[0] #=> String
|
766
|
+
# resp.canary.tags #=> Hash
|
767
|
+
# resp.canary.tags["TagKey"] #=> String
|
768
|
+
#
|
769
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanary AWS API Documentation
|
770
|
+
#
|
771
|
+
# @overload get_canary(params = {})
|
772
|
+
# @param [Hash] params ({})
|
773
|
+
def get_canary(params = {}, options = {})
|
774
|
+
req = build_request(:get_canary, params)
|
775
|
+
req.send_request(options)
|
776
|
+
end
|
777
|
+
|
778
|
+
# Retrieves a list of runs for a specified canary.
|
779
|
+
#
|
780
|
+
# @option params [required, String] :name
|
781
|
+
# The name of the canary that you want to see runs for.
|
782
|
+
#
|
783
|
+
# @option params [String] :next_token
|
784
|
+
# A token that indicates that there is more data available. You can use
|
785
|
+
# this token in a subsequent `GetCanaryRuns` operation to retrieve the
|
786
|
+
# next set of results.
|
787
|
+
#
|
788
|
+
# @option params [Integer] :max_results
|
789
|
+
# Specify this parameter to limit how many runs are returned each time
|
790
|
+
# you use the `GetCanaryRuns` operation. If you omit this parameter, the
|
791
|
+
# default of 100 is used.
|
792
|
+
#
|
793
|
+
# @return [Types::GetCanaryRunsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
794
|
+
#
|
795
|
+
# * {Types::GetCanaryRunsResponse#canary_runs #canary_runs} => Array<Types::CanaryRun>
|
796
|
+
# * {Types::GetCanaryRunsResponse#next_token #next_token} => String
|
797
|
+
#
|
798
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
799
|
+
#
|
800
|
+
# @example Request syntax with placeholder values
|
801
|
+
#
|
802
|
+
# resp = client.get_canary_runs({
|
803
|
+
# name: "CanaryName", # required
|
804
|
+
# next_token: "Token",
|
805
|
+
# max_results: 1,
|
806
|
+
# })
|
807
|
+
#
|
808
|
+
# @example Response structure
|
809
|
+
#
|
810
|
+
# resp.canary_runs #=> Array
|
811
|
+
# resp.canary_runs[0].name #=> String
|
812
|
+
# resp.canary_runs[0].status.state #=> String, one of "RUNNING", "PASSED", "FAILED"
|
813
|
+
# resp.canary_runs[0].status.state_reason #=> String
|
814
|
+
# resp.canary_runs[0].status.state_reason_code #=> String, one of "CANARY_FAILURE", "EXECUTION_FAILURE"
|
815
|
+
# resp.canary_runs[0].timeline.started #=> Time
|
816
|
+
# resp.canary_runs[0].timeline.completed #=> Time
|
817
|
+
# resp.canary_runs[0].artifact_s3_location #=> String
|
818
|
+
# resp.next_token #=> String
|
819
|
+
#
|
820
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/GetCanaryRuns AWS API Documentation
|
821
|
+
#
|
822
|
+
# @overload get_canary_runs(params = {})
|
823
|
+
# @param [Hash] params ({})
|
824
|
+
def get_canary_runs(params = {}, options = {})
|
825
|
+
req = build_request(:get_canary_runs, params)
|
826
|
+
req.send_request(options)
|
827
|
+
end
|
828
|
+
|
829
|
+
# Displays the tags associated with a canary.
|
830
|
+
#
|
831
|
+
# @option params [required, String] :resource_arn
|
832
|
+
# The ARN of the canary that you want to view tags for.
|
833
|
+
#
|
834
|
+
# The ARN format of a canary is
|
835
|
+
# `arn:aws:synthetics:Region:account-id:canary:canary-name `.
|
836
|
+
#
|
837
|
+
# @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
838
|
+
#
|
839
|
+
# * {Types::ListTagsForResourceResponse#tags #tags} => Hash<String,String>
|
840
|
+
#
|
841
|
+
# @example Request syntax with placeholder values
|
842
|
+
#
|
843
|
+
# resp = client.list_tags_for_resource({
|
844
|
+
# resource_arn: "Arn", # required
|
845
|
+
# })
|
846
|
+
#
|
847
|
+
# @example Response structure
|
848
|
+
#
|
849
|
+
# resp.tags #=> Hash
|
850
|
+
# resp.tags["TagKey"] #=> String
|
851
|
+
#
|
852
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/ListTagsForResource AWS API Documentation
|
853
|
+
#
|
854
|
+
# @overload list_tags_for_resource(params = {})
|
855
|
+
# @param [Hash] params ({})
|
856
|
+
def list_tags_for_resource(params = {}, options = {})
|
857
|
+
req = build_request(:list_tags_for_resource, params)
|
858
|
+
req.send_request(options)
|
859
|
+
end
|
860
|
+
|
861
|
+
# Use this operation to run a canary that has already been created. The
|
862
|
+
# frequency of the canary runs is determined by the value of the
|
863
|
+
# canary's `Schedule`. To see a canary's schedule, use [GetCanary][1].
|
864
|
+
#
|
865
|
+
#
|
866
|
+
#
|
867
|
+
# [1]: https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanary.html
|
868
|
+
#
|
869
|
+
# @option params [required, String] :name
|
870
|
+
# The name of the canary that you want to run. To find canary names, use
|
871
|
+
# DescribeCanaries.
|
872
|
+
#
|
873
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
874
|
+
#
|
875
|
+
# @example Request syntax with placeholder values
|
876
|
+
#
|
877
|
+
# resp = client.start_canary({
|
878
|
+
# name: "CanaryName", # required
|
879
|
+
# })
|
880
|
+
#
|
881
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StartCanary AWS API Documentation
|
882
|
+
#
|
883
|
+
# @overload start_canary(params = {})
|
884
|
+
# @param [Hash] params ({})
|
885
|
+
def start_canary(params = {}, options = {})
|
886
|
+
req = build_request(:start_canary, params)
|
887
|
+
req.send_request(options)
|
888
|
+
end
|
889
|
+
|
890
|
+
# Stops the canary to prevent all future runs. If the canary is
|
891
|
+
# currently running, Synthetics stops waiting for the current run of the
|
892
|
+
# specified canary to complete. The run that is in progress completes on
|
893
|
+
# its own, publishes metrics, and uploads artifacts, but it is not
|
894
|
+
# recorded in Synthetics as a completed run.
|
895
|
+
#
|
896
|
+
# You can use `StartCanary` to start it running again with the canary’s
|
897
|
+
# current schedule at any point in the future.
|
898
|
+
#
|
899
|
+
# @option params [required, String] :name
|
900
|
+
# The name of the canary that you want to stop. To find the names of
|
901
|
+
# your canaries, use DescribeCanaries.
|
902
|
+
#
|
903
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
904
|
+
#
|
905
|
+
# @example Request syntax with placeholder values
|
906
|
+
#
|
907
|
+
# resp = client.stop_canary({
|
908
|
+
# name: "CanaryName", # required
|
909
|
+
# })
|
910
|
+
#
|
911
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/StopCanary AWS API Documentation
|
912
|
+
#
|
913
|
+
# @overload stop_canary(params = {})
|
914
|
+
# @param [Hash] params ({})
|
915
|
+
def stop_canary(params = {}, options = {})
|
916
|
+
req = build_request(:stop_canary, params)
|
917
|
+
req.send_request(options)
|
918
|
+
end
|
919
|
+
|
920
|
+
# Assigns one or more tags (key-value pairs) to the specified canary.
|
921
|
+
#
|
922
|
+
# Tags can help you organize and categorize your resources. You can also
|
923
|
+
# use them to scope user permissions, by granting a user permission to
|
924
|
+
# access or change only resources with certain tag values.
|
925
|
+
#
|
926
|
+
# Tags don't have any semantic meaning to AWS and are interpreted
|
927
|
+
# strictly as strings of characters.
|
928
|
+
#
|
929
|
+
# You can use the `TagResource` action with a canary that already has
|
930
|
+
# tags. If you specify a new tag key for the alarm, this tag is appended
|
931
|
+
# to the list of tags associated with the alarm. If you specify a tag
|
932
|
+
# key that is already associated with the alarm, the new tag value that
|
933
|
+
# you specify replaces the previous value for that tag.
|
934
|
+
#
|
935
|
+
# You can associate as many as 50 tags with a canary.
|
936
|
+
#
|
937
|
+
# @option params [required, String] :resource_arn
|
938
|
+
# The ARN of the canary that you're adding tags to.
|
939
|
+
#
|
940
|
+
# The ARN format of a canary is
|
941
|
+
# `arn:aws:synthetics:Region:account-id:canary:canary-name `.
|
942
|
+
#
|
943
|
+
# @option params [required, Hash<String,String>] :tags
|
944
|
+
# The list of key-value pairs to associate with the canary.
|
945
|
+
#
|
946
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
947
|
+
#
|
948
|
+
# @example Request syntax with placeholder values
|
949
|
+
#
|
950
|
+
# resp = client.tag_resource({
|
951
|
+
# resource_arn: "Arn", # required
|
952
|
+
# tags: { # required
|
953
|
+
# "TagKey" => "TagValue",
|
954
|
+
# },
|
955
|
+
# })
|
956
|
+
#
|
957
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/TagResource AWS API Documentation
|
958
|
+
#
|
959
|
+
# @overload tag_resource(params = {})
|
960
|
+
# @param [Hash] params ({})
|
961
|
+
def tag_resource(params = {}, options = {})
|
962
|
+
req = build_request(:tag_resource, params)
|
963
|
+
req.send_request(options)
|
964
|
+
end
|
965
|
+
|
966
|
+
# Removes one or more tags from the specified canary.
|
967
|
+
#
|
968
|
+
# @option params [required, String] :resource_arn
|
969
|
+
# The ARN of the canary that you're removing tags from.
|
970
|
+
#
|
971
|
+
# The ARN format of a canary is
|
972
|
+
# `arn:aws:synthetics:Region:account-id:canary:canary-name `.
|
973
|
+
#
|
974
|
+
# @option params [required, Array<String>] :tag_keys
|
975
|
+
# The list of tag keys to remove from the resource.
|
976
|
+
#
|
977
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
978
|
+
#
|
979
|
+
# @example Request syntax with placeholder values
|
980
|
+
#
|
981
|
+
# resp = client.untag_resource({
|
982
|
+
# resource_arn: "Arn", # required
|
983
|
+
# tag_keys: ["TagKey"], # required
|
984
|
+
# })
|
985
|
+
#
|
986
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UntagResource AWS API Documentation
|
987
|
+
#
|
988
|
+
# @overload untag_resource(params = {})
|
989
|
+
# @param [Hash] params ({})
|
990
|
+
def untag_resource(params = {}, options = {})
|
991
|
+
req = build_request(:untag_resource, params)
|
992
|
+
req.send_request(options)
|
993
|
+
end
|
994
|
+
|
995
|
+
# Use this operation to change the settings of a canary that has already
|
996
|
+
# been created.
|
997
|
+
#
|
998
|
+
# You can't use this operation to update the tags of an existing
|
999
|
+
# canary. To change the tags of an existing canary, use
|
1000
|
+
# [TagResource][1].
|
1001
|
+
#
|
1002
|
+
#
|
1003
|
+
#
|
1004
|
+
# [1]: https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_TagResource.html
|
1005
|
+
#
|
1006
|
+
# @option params [required, String] :name
|
1007
|
+
# The name of the canary that you want to update. To find the names of
|
1008
|
+
# your canaries, use DescribeCanaries.
|
1009
|
+
#
|
1010
|
+
# You cannot change the name of a canary that has already been created.
|
1011
|
+
#
|
1012
|
+
# @option params [Types::CanaryCodeInput] :code
|
1013
|
+
# A structure that includes the entry point from which the canary should
|
1014
|
+
# start running your script. If the script is stored in an S3 bucket,
|
1015
|
+
# the bucket name, key, and version are also included.
|
1016
|
+
#
|
1017
|
+
# @option params [String] :execution_role_arn
|
1018
|
+
# The ARN of the IAM role to be used to run the canary. This role must
|
1019
|
+
# already exist, and must include `lambda.amazonaws.com` as a principal
|
1020
|
+
# in the trust policy. The role must also have the following
|
1021
|
+
# permissions:
|
1022
|
+
#
|
1023
|
+
# * `s3:PutObject`
|
1024
|
+
#
|
1025
|
+
# * `s3:GetBucketLocation`
|
1026
|
+
#
|
1027
|
+
# * `s3:ListAllMyBuckets`
|
1028
|
+
#
|
1029
|
+
# * `cloudwatch:PutMetricData`
|
1030
|
+
#
|
1031
|
+
# * `logs:CreateLogGroup`
|
1032
|
+
#
|
1033
|
+
# * `logs:CreateLogStream`
|
1034
|
+
#
|
1035
|
+
# * `logs:CreateLogStream`
|
1036
|
+
#
|
1037
|
+
# @option params [String] :runtime_version
|
1038
|
+
# Specifies the runtime version to use for the canary. Currently, the
|
1039
|
+
# only valid value is `syn-1.0`. For more information about runtime
|
1040
|
+
# versions, see [ Canary Runtime Versions][1].
|
1041
|
+
#
|
1042
|
+
#
|
1043
|
+
#
|
1044
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html
|
1045
|
+
#
|
1046
|
+
# @option params [Types::CanaryScheduleInput] :schedule
|
1047
|
+
# A structure that contains information about how often the canary is to
|
1048
|
+
# run, and when these runs are to stop.
|
1049
|
+
#
|
1050
|
+
# @option params [Types::CanaryRunConfigInput] :run_config
|
1051
|
+
# A structure that contains the timeout value that is used for each
|
1052
|
+
# individual run of the canary.
|
1053
|
+
#
|
1054
|
+
# @option params [Integer] :success_retention_period_in_days
|
1055
|
+
# The number of days to retain data about successful runs of this
|
1056
|
+
# canary.
|
1057
|
+
#
|
1058
|
+
# @option params [Integer] :failure_retention_period_in_days
|
1059
|
+
# The number of days to retain data about failed runs of this canary.
|
1060
|
+
#
|
1061
|
+
# @option params [Types::VpcConfigInput] :vpc_config
|
1062
|
+
# If this canary is to test an endpoint in a VPC, this structure
|
1063
|
+
# contains information about the subnet and security groups of the VPC
|
1064
|
+
# endpoint. For more information, see [ Running a Canary in a VPC][1].
|
1065
|
+
#
|
1066
|
+
#
|
1067
|
+
#
|
1068
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html
|
1069
|
+
#
|
1070
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1071
|
+
#
|
1072
|
+
# @example Request syntax with placeholder values
|
1073
|
+
#
|
1074
|
+
# resp = client.update_canary({
|
1075
|
+
# name: "CanaryName", # required
|
1076
|
+
# code: {
|
1077
|
+
# s3_bucket: "String",
|
1078
|
+
# s3_key: "String",
|
1079
|
+
# s3_version: "String",
|
1080
|
+
# zip_file: "data",
|
1081
|
+
# handler: "String", # required
|
1082
|
+
# },
|
1083
|
+
# execution_role_arn: "Arn",
|
1084
|
+
# runtime_version: "String",
|
1085
|
+
# schedule: {
|
1086
|
+
# expression: "String", # required
|
1087
|
+
# duration_in_seconds: 1,
|
1088
|
+
# },
|
1089
|
+
# run_config: {
|
1090
|
+
# timeout_in_seconds: 1, # required
|
1091
|
+
# },
|
1092
|
+
# success_retention_period_in_days: 1,
|
1093
|
+
# failure_retention_period_in_days: 1,
|
1094
|
+
# vpc_config: {
|
1095
|
+
# subnet_ids: ["SubnetId"],
|
1096
|
+
# security_group_ids: ["SecurityGroupId"],
|
1097
|
+
# },
|
1098
|
+
# })
|
1099
|
+
#
|
1100
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/synthetics-2017-10-11/UpdateCanary AWS API Documentation
|
1101
|
+
#
|
1102
|
+
# @overload update_canary(params = {})
|
1103
|
+
# @param [Hash] params ({})
|
1104
|
+
def update_canary(params = {}, options = {})
|
1105
|
+
req = build_request(:update_canary, params)
|
1106
|
+
req.send_request(options)
|
1107
|
+
end
|
1108
|
+
|
1109
|
+
# @!endgroup
|
1110
|
+
|
1111
|
+
# @param params ({})
|
1112
|
+
# @api private
|
1113
|
+
def build_request(operation_name, params = {})
|
1114
|
+
handlers = @handlers.for(operation_name)
|
1115
|
+
context = Seahorse::Client::RequestContext.new(
|
1116
|
+
operation_name: operation_name,
|
1117
|
+
operation: config.api.operation(operation_name),
|
1118
|
+
client: self,
|
1119
|
+
params: params,
|
1120
|
+
config: config)
|
1121
|
+
context[:gem_name] = 'aws-sdk-synthetics'
|
1122
|
+
context[:gem_version] = '1.0.0'
|
1123
|
+
Seahorse::Client::Request.new(handlers, context)
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
# @api private
|
1127
|
+
# @deprecated
|
1128
|
+
def waiter_names
|
1129
|
+
[]
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
class << self
|
1133
|
+
|
1134
|
+
# @api private
|
1135
|
+
attr_reader :identifier
|
1136
|
+
|
1137
|
+
# @api private
|
1138
|
+
def errors_module
|
1139
|
+
Errors
|
1140
|
+
end
|
1141
|
+
|
1142
|
+
end
|
1143
|
+
end
|
1144
|
+
end
|