aws-sdk-oam 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/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-oam/client.rb +1169 -0
- data/lib/aws-sdk-oam/client_api.rb +487 -0
- data/lib/aws-sdk-oam/customizations.rb +0 -0
- data/lib/aws-sdk-oam/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-oam/endpoint_provider.rb +110 -0
- data/lib/aws-sdk-oam/endpoints.rb +225 -0
- data/lib/aws-sdk-oam/errors.rb +196 -0
- data/lib/aws-sdk-oam/plugins/endpoints.rb +98 -0
- data/lib/aws-sdk-oam/resource.rb +26 -0
- data/lib/aws-sdk-oam/types.rb +1024 -0
- data/lib/aws-sdk-oam.rb +57 -0
- metadata +94 -0
@@ -0,0 +1,1169 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
require 'seahorse/client/plugins/content_length.rb'
|
11
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
12
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
13
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
14
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
15
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
16
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
17
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
18
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
19
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
20
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
21
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
22
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
23
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
24
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
25
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
26
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
27
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
|
+
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
35
|
+
|
36
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:oam)
|
37
|
+
|
38
|
+
module Aws::OAM
|
39
|
+
# An API client for OAM. To construct a client, you need to configure a `:region` and `:credentials`.
|
40
|
+
#
|
41
|
+
# client = Aws::OAM::Client.new(
|
42
|
+
# region: region_name,
|
43
|
+
# credentials: credentials,
|
44
|
+
# # ...
|
45
|
+
# )
|
46
|
+
#
|
47
|
+
# For details on configuring region and credentials see
|
48
|
+
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
49
|
+
#
|
50
|
+
# See {#initialize} for a full list of supported configuration options.
|
51
|
+
class Client < Seahorse::Client::Base
|
52
|
+
|
53
|
+
include Aws::ClientStubs
|
54
|
+
|
55
|
+
@identifier = :oam
|
56
|
+
|
57
|
+
set_api(ClientApi::API)
|
58
|
+
|
59
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
60
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
61
|
+
add_plugin(Aws::Plugins::Logging)
|
62
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
63
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
64
|
+
add_plugin(Aws::Plugins::UserAgent)
|
65
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
66
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
67
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
68
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
69
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
70
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
71
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
72
|
+
add_plugin(Aws::Plugins::StubResponses)
|
73
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
74
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
75
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
76
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
77
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
78
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
79
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
|
+
add_plugin(Aws::Plugins::DefaultsMode)
|
81
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
84
|
+
add_plugin(Aws::OAM::Plugins::Endpoints)
|
85
|
+
|
86
|
+
# @overload initialize(options)
|
87
|
+
# @param [Hash] options
|
88
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
89
|
+
# Your AWS credentials. This can be an instance of any one of the
|
90
|
+
# following classes:
|
91
|
+
#
|
92
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
93
|
+
# credentials.
|
94
|
+
#
|
95
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
96
|
+
# shared file, such as `~/.aws/config`.
|
97
|
+
#
|
98
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
99
|
+
#
|
100
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
101
|
+
# assume a role after providing credentials via the web.
|
102
|
+
#
|
103
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
104
|
+
# access token generated from `aws login`.
|
105
|
+
#
|
106
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
107
|
+
# process that outputs to stdout.
|
108
|
+
#
|
109
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
110
|
+
# from an EC2 IMDS on an EC2 instance.
|
111
|
+
#
|
112
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
113
|
+
# instances running in ECS.
|
114
|
+
#
|
115
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
116
|
+
# from the Cognito Identity service.
|
117
|
+
#
|
118
|
+
# When `:credentials` are not configured directly, the following
|
119
|
+
# locations will be searched for credentials:
|
120
|
+
#
|
121
|
+
# * `Aws.config[:credentials]`
|
122
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
123
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
124
|
+
# * `~/.aws/credentials`
|
125
|
+
# * `~/.aws/config`
|
126
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
127
|
+
# are very aggressive. Construct and pass an instance of
|
128
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
129
|
+
# enable retries and extended timeouts. Instance profile credential
|
130
|
+
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
131
|
+
# to true.
|
132
|
+
#
|
133
|
+
# @option options [required, String] :region
|
134
|
+
# The AWS region to connect to. The configured `:region` is
|
135
|
+
# used to determine the service `:endpoint`. When not passed,
|
136
|
+
# a default `:region` is searched for in the following locations:
|
137
|
+
#
|
138
|
+
# * `Aws.config[:region]`
|
139
|
+
# * `ENV['AWS_REGION']`
|
140
|
+
# * `ENV['AMAZON_REGION']`
|
141
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
142
|
+
# * `~/.aws/credentials`
|
143
|
+
# * `~/.aws/config`
|
144
|
+
#
|
145
|
+
# @option options [String] :access_key_id
|
146
|
+
#
|
147
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
148
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
149
|
+
# the background every 60 secs (default). Defaults to `false`.
|
150
|
+
#
|
151
|
+
# @option options [Boolean] :adaptive_retry_wait_to_fill (true)
|
152
|
+
# Used only in `adaptive` retry mode. When true, the request will sleep
|
153
|
+
# until there is sufficent client side capacity to retry the request.
|
154
|
+
# When false, the request will raise a `RetryCapacityNotAvailableError` and will
|
155
|
+
# not retry instead of sleeping.
|
156
|
+
#
|
157
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
158
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
159
|
+
# this client.
|
160
|
+
#
|
161
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
162
|
+
# Allows you to provide an identifier for this client which will be attached to
|
163
|
+
# all generated client side metrics. Defaults to an empty string.
|
164
|
+
#
|
165
|
+
# @option options [String] :client_side_monitoring_host ("127.0.0.1")
|
166
|
+
# Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
|
167
|
+
# side monitoring agent is running on, where client metrics will be published via UDP.
|
168
|
+
#
|
169
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
170
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
171
|
+
# agent is running on, where client metrics will be published via UDP.
|
172
|
+
#
|
173
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
174
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
175
|
+
# will use the Client Side Monitoring Agent Publisher.
|
176
|
+
#
|
177
|
+
# @option options [Boolean] :convert_params (true)
|
178
|
+
# When `true`, an attempt is made to coerce request parameters into
|
179
|
+
# the required types.
|
180
|
+
#
|
181
|
+
# @option options [Boolean] :correct_clock_skew (true)
|
182
|
+
# Used only in `standard` and adaptive retry modes. Specifies whether to apply
|
183
|
+
# a clock skew correction and retry requests with skewed client clocks.
|
184
|
+
#
|
185
|
+
# @option options [String] :defaults_mode ("legacy")
|
186
|
+
# See {Aws::DefaultsModeConfiguration} for a list of the
|
187
|
+
# accepted modes and the configuration defaults that are included.
|
188
|
+
#
|
189
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
190
|
+
# Set to true to disable SDK automatically adding host prefix
|
191
|
+
# to default service endpoint when available.
|
192
|
+
#
|
193
|
+
# @option options [String] :endpoint
|
194
|
+
# The client endpoint is normally constructed from the `:region`
|
195
|
+
# option. You should only configure an `:endpoint` when connecting
|
196
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
197
|
+
#
|
198
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
199
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
200
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
201
|
+
#
|
202
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
203
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
204
|
+
#
|
205
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
206
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
207
|
+
# Use this option to config the time interval in seconds for making
|
208
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
209
|
+
#
|
210
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
211
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
212
|
+
#
|
213
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
214
|
+
# The log formatter.
|
215
|
+
#
|
216
|
+
# @option options [Symbol] :log_level (:info)
|
217
|
+
# The log level to send messages to the `:logger` at.
|
218
|
+
#
|
219
|
+
# @option options [Logger] :logger
|
220
|
+
# The Logger instance to send log messages to. If this option
|
221
|
+
# is not set, logging will be disabled.
|
222
|
+
#
|
223
|
+
# @option options [Integer] :max_attempts (3)
|
224
|
+
# An integer representing the maximum number attempts that will be made for
|
225
|
+
# a single request, including the initial attempt. For example,
|
226
|
+
# setting this value to 5 will result in a request being retried up to
|
227
|
+
# 4 times. Used in `standard` and `adaptive` retry modes.
|
228
|
+
#
|
229
|
+
# @option options [String] :profile ("default")
|
230
|
+
# Used when loading credentials from the shared credentials file
|
231
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
232
|
+
#
|
233
|
+
# @option options [Proc] :retry_backoff
|
234
|
+
# A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
|
235
|
+
# This option is only used in the `legacy` retry mode.
|
236
|
+
#
|
237
|
+
# @option options [Float] :retry_base_delay (0.3)
|
238
|
+
# The base delay in seconds used by the default backoff function. This option
|
239
|
+
# is only used in the `legacy` retry mode.
|
240
|
+
#
|
241
|
+
# @option options [Symbol] :retry_jitter (:none)
|
242
|
+
# A delay randomiser function used by the default backoff function.
|
243
|
+
# Some predefined functions can be referenced by name - :none, :equal, :full,
|
244
|
+
# otherwise a Proc that takes and returns a number. This option is only used
|
245
|
+
# in the `legacy` retry mode.
|
246
|
+
#
|
247
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
248
|
+
#
|
249
|
+
# @option options [Integer] :retry_limit (3)
|
250
|
+
# The maximum number of times to retry failed requests. Only
|
251
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
252
|
+
# are retried. Generally, these are throttling errors, data
|
253
|
+
# checksum errors, networking errors, timeout errors, auth errors,
|
254
|
+
# endpoint discovery, and errors from expired credentials.
|
255
|
+
# This option is only used in the `legacy` retry mode.
|
256
|
+
#
|
257
|
+
# @option options [Integer] :retry_max_delay (0)
|
258
|
+
# The maximum number of seconds to delay between retries (0 for no limit)
|
259
|
+
# used by the default backoff function. This option is only used in the
|
260
|
+
# `legacy` retry mode.
|
261
|
+
#
|
262
|
+
# @option options [String] :retry_mode ("legacy")
|
263
|
+
# Specifies which retry algorithm to use. Values are:
|
264
|
+
#
|
265
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
266
|
+
# no retry mode is provided.
|
267
|
+
#
|
268
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
269
|
+
# This includes support for retry quotas, which limit the number of
|
270
|
+
# unsuccessful retries a client can make.
|
271
|
+
#
|
272
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
273
|
+
# functionality of `standard` mode along with automatic client side
|
274
|
+
# throttling. This is a provisional mode that may change behavior
|
275
|
+
# in the future.
|
276
|
+
#
|
277
|
+
#
|
278
|
+
# @option options [String] :secret_access_key
|
279
|
+
#
|
280
|
+
# @option options [String] :session_token
|
281
|
+
#
|
282
|
+
# @option options [Boolean] :stub_responses (false)
|
283
|
+
# Causes the client to return stubbed responses. By default
|
284
|
+
# fake responses are generated and returned. You can specify
|
285
|
+
# the response data to return or errors to raise by calling
|
286
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
287
|
+
#
|
288
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
289
|
+
# requests are made, and retries are disabled.
|
290
|
+
#
|
291
|
+
# @option options [Aws::TokenProvider] :token_provider
|
292
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
293
|
+
# following classes:
|
294
|
+
#
|
295
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
296
|
+
# tokens.
|
297
|
+
#
|
298
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
299
|
+
# access token generated from `aws login`.
|
300
|
+
#
|
301
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
302
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
303
|
+
#
|
304
|
+
# @option options [Boolean] :use_dualstack_endpoint
|
305
|
+
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
306
|
+
# will be used if available.
|
307
|
+
#
|
308
|
+
# @option options [Boolean] :use_fips_endpoint
|
309
|
+
# When set to `true`, fips compatible endpoints will be used if available.
|
310
|
+
# When a `fips` region is used, the region is normalized and this config
|
311
|
+
# is set to `true`.
|
312
|
+
#
|
313
|
+
# @option options [Boolean] :validate_params (true)
|
314
|
+
# When `true`, request parameters are validated before
|
315
|
+
# sending the request.
|
316
|
+
#
|
317
|
+
# @option options [Aws::OAM::EndpointProvider] :endpoint_provider
|
318
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::OAM::EndpointParameters`
|
319
|
+
#
|
320
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
321
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
322
|
+
#
|
323
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
324
|
+
# seconds to wait when opening a HTTP session before raising a
|
325
|
+
# `Timeout::Error`.
|
326
|
+
#
|
327
|
+
# @option options [Float] :http_read_timeout (60) The default
|
328
|
+
# number of seconds to wait for response data. This value can
|
329
|
+
# safely be set per-request on the session.
|
330
|
+
#
|
331
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
332
|
+
# seconds a connection is allowed to sit idle before it is
|
333
|
+
# considered stale. Stale connections are closed and removed
|
334
|
+
# from the pool before making a request.
|
335
|
+
#
|
336
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
337
|
+
# seconds to wait for a 100-continue response before sending the
|
338
|
+
# request body. This option has no effect unless the request has
|
339
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
340
|
+
# disables this behaviour. This value can safely be set per
|
341
|
+
# request on the session.
|
342
|
+
#
|
343
|
+
# @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
|
344
|
+
# in seconds.
|
345
|
+
#
|
346
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
347
|
+
# HTTP debug output will be sent to the `:logger`.
|
348
|
+
#
|
349
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
350
|
+
# SSL peer certificates are verified when establishing a
|
351
|
+
# connection.
|
352
|
+
#
|
353
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
354
|
+
# certificate authority bundle file that should be used when
|
355
|
+
# verifying peer certificates. If you do not pass
|
356
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
357
|
+
# will be used if available.
|
358
|
+
#
|
359
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
360
|
+
# directory that contains the unbundled SSL certificate
|
361
|
+
# authority files for verifying peer certificates. If you do
|
362
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
363
|
+
# system default will be used if available.
|
364
|
+
#
|
365
|
+
def initialize(*args)
|
366
|
+
super
|
367
|
+
end
|
368
|
+
|
369
|
+
# @!group API Operations
|
370
|
+
|
371
|
+
# Creates a link between a source account and a sink that you have
|
372
|
+
# created in a monitoring account.
|
373
|
+
#
|
374
|
+
# Before you create a link, you must create a sink in the monitoring
|
375
|
+
# account and create a sink policy in that account. The sink policy must
|
376
|
+
# permit the source account to link to it. You can grant permission to
|
377
|
+
# source accounts by granting permission to an entire organization or to
|
378
|
+
# individual accounts.
|
379
|
+
#
|
380
|
+
# For more information, see [CreateSink][1] and [PutSinkPolicy][2].
|
381
|
+
#
|
382
|
+
# Each monitoring account can be linked to as many as 100,000 source
|
383
|
+
# accounts.
|
384
|
+
#
|
385
|
+
# Each source account can be linked to as many as five monitoring
|
386
|
+
# accounts.
|
387
|
+
#
|
388
|
+
#
|
389
|
+
#
|
390
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html
|
391
|
+
# [2]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html
|
392
|
+
#
|
393
|
+
# @option params [required, String] :label_template
|
394
|
+
# Specify a friendly human-readable name to use to identify this source
|
395
|
+
# account when you are viewing data from it in the monitoring account.
|
396
|
+
#
|
397
|
+
# You can use a custom label or use the following variables:
|
398
|
+
#
|
399
|
+
# * `$AccountName` is the name of the account
|
400
|
+
#
|
401
|
+
# * `$AccountEmail` is the globally unique email address of the account
|
402
|
+
#
|
403
|
+
# * `$AccountEmailNoDomain` is the email address of the account without
|
404
|
+
# the domain name
|
405
|
+
#
|
406
|
+
# @option params [required, Array<String>] :resource_types
|
407
|
+
# An array of strings that define which types of data that the source
|
408
|
+
# account shares with the monitoring account.
|
409
|
+
#
|
410
|
+
# @option params [required, String] :sink_identifier
|
411
|
+
# The ARN of the sink to use to create this link. You can use
|
412
|
+
# [ListSinks][1] to find the ARNs of sinks.
|
413
|
+
#
|
414
|
+
# For more information about sinks, see [CreateSink][2].
|
415
|
+
#
|
416
|
+
#
|
417
|
+
#
|
418
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html
|
419
|
+
# [2]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_CreateSink.html
|
420
|
+
#
|
421
|
+
# @option params [Hash<String,String>] :tags
|
422
|
+
# Assigns one or more tags (key-value pairs) to the link.
|
423
|
+
#
|
424
|
+
# Tags can help you organize and categorize your resources. You can also
|
425
|
+
# use them to scope user permissions by granting a user permission to
|
426
|
+
# access or change only resources with certain tag values.
|
427
|
+
#
|
428
|
+
# For more information about using tags to control access, see
|
429
|
+
# [Controlling access to Amazon Web Services resources using tags][1].
|
430
|
+
#
|
431
|
+
#
|
432
|
+
#
|
433
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html
|
434
|
+
#
|
435
|
+
# @return [Types::CreateLinkOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
436
|
+
#
|
437
|
+
# * {Types::CreateLinkOutput#arn #arn} => String
|
438
|
+
# * {Types::CreateLinkOutput#id #id} => String
|
439
|
+
# * {Types::CreateLinkOutput#label #label} => String
|
440
|
+
# * {Types::CreateLinkOutput#label_template #label_template} => String
|
441
|
+
# * {Types::CreateLinkOutput#resource_types #resource_types} => Array<String>
|
442
|
+
# * {Types::CreateLinkOutput#sink_arn #sink_arn} => String
|
443
|
+
# * {Types::CreateLinkOutput#tags #tags} => Hash<String,String>
|
444
|
+
#
|
445
|
+
# @example Request syntax with placeholder values
|
446
|
+
#
|
447
|
+
# resp = client.create_link({
|
448
|
+
# label_template: "LabelTemplate", # required
|
449
|
+
# resource_types: ["AWS::CloudWatch::Metric"], # required, accepts AWS::CloudWatch::Metric, AWS::Logs::LogGroup, AWS::XRay::Trace
|
450
|
+
# sink_identifier: "ResourceIdentifier", # required
|
451
|
+
# tags: {
|
452
|
+
# "TagKey" => "TagValue",
|
453
|
+
# },
|
454
|
+
# })
|
455
|
+
#
|
456
|
+
# @example Response structure
|
457
|
+
#
|
458
|
+
# resp.arn #=> String
|
459
|
+
# resp.id #=> String
|
460
|
+
# resp.label #=> String
|
461
|
+
# resp.label_template #=> String
|
462
|
+
# resp.resource_types #=> Array
|
463
|
+
# resp.resource_types[0] #=> String
|
464
|
+
# resp.sink_arn #=> String
|
465
|
+
# resp.tags #=> Hash
|
466
|
+
# resp.tags["String"] #=> String
|
467
|
+
#
|
468
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/CreateLink AWS API Documentation
|
469
|
+
#
|
470
|
+
# @overload create_link(params = {})
|
471
|
+
# @param [Hash] params ({})
|
472
|
+
def create_link(params = {}, options = {})
|
473
|
+
req = build_request(:create_link, params)
|
474
|
+
req.send_request(options)
|
475
|
+
end
|
476
|
+
|
477
|
+
# Use this to create a *sink* in the current account, so that it can be
|
478
|
+
# used as a monitoring account in CloudWatch cross-account
|
479
|
+
# observability. A sink is a resource that represents an attachment
|
480
|
+
# point in a monitoring account. Source accounts can link to the sink to
|
481
|
+
# send observability data.
|
482
|
+
#
|
483
|
+
# After you create a sink, you must create a sink policy that allows
|
484
|
+
# source accounts to attach to it. For more information, see
|
485
|
+
# [PutSinkPolicy][1].
|
486
|
+
#
|
487
|
+
# Each account can contain one sink. If you delete a sink, you can then
|
488
|
+
# create a new one in that account.
|
489
|
+
#
|
490
|
+
#
|
491
|
+
#
|
492
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_PutSinkPolicy.html
|
493
|
+
#
|
494
|
+
# @option params [required, String] :name
|
495
|
+
# A name for the sink.
|
496
|
+
#
|
497
|
+
# @option params [Hash<String,String>] :tags
|
498
|
+
# Assigns one or more tags (key-value pairs) to the link.
|
499
|
+
#
|
500
|
+
# Tags can help you organize and categorize your resources. You can also
|
501
|
+
# use them to scope user permissions by granting a user permission to
|
502
|
+
# access or change only resources with certain tag values.
|
503
|
+
#
|
504
|
+
# For more information about using tags to control access, see
|
505
|
+
# [Controlling access to Amazon Web Services resources using tags][1].
|
506
|
+
#
|
507
|
+
#
|
508
|
+
#
|
509
|
+
# [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html
|
510
|
+
#
|
511
|
+
# @return [Types::CreateSinkOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
512
|
+
#
|
513
|
+
# * {Types::CreateSinkOutput#arn #arn} => String
|
514
|
+
# * {Types::CreateSinkOutput#id #id} => String
|
515
|
+
# * {Types::CreateSinkOutput#name #name} => String
|
516
|
+
# * {Types::CreateSinkOutput#tags #tags} => Hash<String,String>
|
517
|
+
#
|
518
|
+
# @example Request syntax with placeholder values
|
519
|
+
#
|
520
|
+
# resp = client.create_sink({
|
521
|
+
# name: "SinkName", # required
|
522
|
+
# tags: {
|
523
|
+
# "TagKey" => "TagValue",
|
524
|
+
# },
|
525
|
+
# })
|
526
|
+
#
|
527
|
+
# @example Response structure
|
528
|
+
#
|
529
|
+
# resp.arn #=> String
|
530
|
+
# resp.id #=> String
|
531
|
+
# resp.name #=> String
|
532
|
+
# resp.tags #=> Hash
|
533
|
+
# resp.tags["String"] #=> String
|
534
|
+
#
|
535
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/CreateSink AWS API Documentation
|
536
|
+
#
|
537
|
+
# @overload create_sink(params = {})
|
538
|
+
# @param [Hash] params ({})
|
539
|
+
def create_sink(params = {}, options = {})
|
540
|
+
req = build_request(:create_sink, params)
|
541
|
+
req.send_request(options)
|
542
|
+
end
|
543
|
+
|
544
|
+
# Deletes a link between a monitoring account sink and a source account.
|
545
|
+
# You must run this operation in the source account.
|
546
|
+
#
|
547
|
+
# @option params [required, String] :identifier
|
548
|
+
# The ARN of the link to delete.
|
549
|
+
#
|
550
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
551
|
+
#
|
552
|
+
# @example Request syntax with placeholder values
|
553
|
+
#
|
554
|
+
# resp = client.delete_link({
|
555
|
+
# identifier: "ResourceIdentifier", # required
|
556
|
+
# })
|
557
|
+
#
|
558
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/DeleteLink AWS API Documentation
|
559
|
+
#
|
560
|
+
# @overload delete_link(params = {})
|
561
|
+
# @param [Hash] params ({})
|
562
|
+
def delete_link(params = {}, options = {})
|
563
|
+
req = build_request(:delete_link, params)
|
564
|
+
req.send_request(options)
|
565
|
+
end
|
566
|
+
|
567
|
+
# Deletes a sink. You must delete all links to a sink before you can
|
568
|
+
# delete that sink.
|
569
|
+
#
|
570
|
+
# @option params [required, String] :identifier
|
571
|
+
# The ARN of the sink to delete.
|
572
|
+
#
|
573
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
574
|
+
#
|
575
|
+
# @example Request syntax with placeholder values
|
576
|
+
#
|
577
|
+
# resp = client.delete_sink({
|
578
|
+
# identifier: "ResourceIdentifier", # required
|
579
|
+
# })
|
580
|
+
#
|
581
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/DeleteSink AWS API Documentation
|
582
|
+
#
|
583
|
+
# @overload delete_sink(params = {})
|
584
|
+
# @param [Hash] params ({})
|
585
|
+
def delete_sink(params = {}, options = {})
|
586
|
+
req = build_request(:delete_sink, params)
|
587
|
+
req.send_request(options)
|
588
|
+
end
|
589
|
+
|
590
|
+
# Returns complete information about one link.
|
591
|
+
#
|
592
|
+
# To use this operation, provide the link ARN. To retrieve a list of
|
593
|
+
# link ARNs, use [ListLinks][1].
|
594
|
+
#
|
595
|
+
#
|
596
|
+
#
|
597
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html
|
598
|
+
#
|
599
|
+
# @option params [required, String] :identifier
|
600
|
+
# The ARN of the link to retrieve information for.
|
601
|
+
#
|
602
|
+
# @return [Types::GetLinkOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
603
|
+
#
|
604
|
+
# * {Types::GetLinkOutput#arn #arn} => String
|
605
|
+
# * {Types::GetLinkOutput#id #id} => String
|
606
|
+
# * {Types::GetLinkOutput#label #label} => String
|
607
|
+
# * {Types::GetLinkOutput#label_template #label_template} => String
|
608
|
+
# * {Types::GetLinkOutput#resource_types #resource_types} => Array<String>
|
609
|
+
# * {Types::GetLinkOutput#sink_arn #sink_arn} => String
|
610
|
+
# * {Types::GetLinkOutput#tags #tags} => Hash<String,String>
|
611
|
+
#
|
612
|
+
# @example Request syntax with placeholder values
|
613
|
+
#
|
614
|
+
# resp = client.get_link({
|
615
|
+
# identifier: "ResourceIdentifier", # required
|
616
|
+
# })
|
617
|
+
#
|
618
|
+
# @example Response structure
|
619
|
+
#
|
620
|
+
# resp.arn #=> String
|
621
|
+
# resp.id #=> String
|
622
|
+
# resp.label #=> String
|
623
|
+
# resp.label_template #=> String
|
624
|
+
# resp.resource_types #=> Array
|
625
|
+
# resp.resource_types[0] #=> String
|
626
|
+
# resp.sink_arn #=> String
|
627
|
+
# resp.tags #=> Hash
|
628
|
+
# resp.tags["String"] #=> String
|
629
|
+
#
|
630
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/GetLink AWS API Documentation
|
631
|
+
#
|
632
|
+
# @overload get_link(params = {})
|
633
|
+
# @param [Hash] params ({})
|
634
|
+
def get_link(params = {}, options = {})
|
635
|
+
req = build_request(:get_link, params)
|
636
|
+
req.send_request(options)
|
637
|
+
end
|
638
|
+
|
639
|
+
# Returns complete information about one monitoring account sink.
|
640
|
+
#
|
641
|
+
# To use this operation, provide the sink ARN. To retrieve a list of
|
642
|
+
# sink ARNs, use [ListSinks][1].
|
643
|
+
#
|
644
|
+
#
|
645
|
+
#
|
646
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html
|
647
|
+
#
|
648
|
+
# @option params [required, String] :identifier
|
649
|
+
# The ARN of the sink to retrieve information for.
|
650
|
+
#
|
651
|
+
# @return [Types::GetSinkOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
652
|
+
#
|
653
|
+
# * {Types::GetSinkOutput#arn #arn} => String
|
654
|
+
# * {Types::GetSinkOutput#id #id} => String
|
655
|
+
# * {Types::GetSinkOutput#name #name} => String
|
656
|
+
# * {Types::GetSinkOutput#tags #tags} => Hash<String,String>
|
657
|
+
#
|
658
|
+
# @example Request syntax with placeholder values
|
659
|
+
#
|
660
|
+
# resp = client.get_sink({
|
661
|
+
# identifier: "ResourceIdentifier", # required
|
662
|
+
# })
|
663
|
+
#
|
664
|
+
# @example Response structure
|
665
|
+
#
|
666
|
+
# resp.arn #=> String
|
667
|
+
# resp.id #=> String
|
668
|
+
# resp.name #=> String
|
669
|
+
# resp.tags #=> Hash
|
670
|
+
# resp.tags["String"] #=> String
|
671
|
+
#
|
672
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/GetSink AWS API Documentation
|
673
|
+
#
|
674
|
+
# @overload get_sink(params = {})
|
675
|
+
# @param [Hash] params ({})
|
676
|
+
def get_sink(params = {}, options = {})
|
677
|
+
req = build_request(:get_sink, params)
|
678
|
+
req.send_request(options)
|
679
|
+
end
|
680
|
+
|
681
|
+
# Returns the current sink policy attached to this sink. The sink policy
|
682
|
+
# specifies what accounts can attach to this sink as source accounts,
|
683
|
+
# and what types of data they can share.
|
684
|
+
#
|
685
|
+
# @option params [required, String] :sink_identifier
|
686
|
+
# The ARN of the sink to retrieve the policy of.
|
687
|
+
#
|
688
|
+
# @return [Types::GetSinkPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
689
|
+
#
|
690
|
+
# * {Types::GetSinkPolicyOutput#sink_arn #sink_arn} => String
|
691
|
+
# * {Types::GetSinkPolicyOutput#sink_id #sink_id} => String
|
692
|
+
# * {Types::GetSinkPolicyOutput#policy #policy} => String
|
693
|
+
#
|
694
|
+
# @example Request syntax with placeholder values
|
695
|
+
#
|
696
|
+
# resp = client.get_sink_policy({
|
697
|
+
# sink_identifier: "ResourceIdentifier", # required
|
698
|
+
# })
|
699
|
+
#
|
700
|
+
# @example Response structure
|
701
|
+
#
|
702
|
+
# resp.sink_arn #=> String
|
703
|
+
# resp.sink_id #=> String
|
704
|
+
# resp.policy #=> String
|
705
|
+
#
|
706
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/GetSinkPolicy AWS API Documentation
|
707
|
+
#
|
708
|
+
# @overload get_sink_policy(params = {})
|
709
|
+
# @param [Hash] params ({})
|
710
|
+
def get_sink_policy(params = {}, options = {})
|
711
|
+
req = build_request(:get_sink_policy, params)
|
712
|
+
req.send_request(options)
|
713
|
+
end
|
714
|
+
|
715
|
+
# Returns a list of source account links that are linked to this
|
716
|
+
# monitoring account sink.
|
717
|
+
#
|
718
|
+
# To use this operation, provide the sink ARN. To retrieve a list of
|
719
|
+
# sink ARNs, use [ListSinks][1].
|
720
|
+
#
|
721
|
+
# To find a list of links for one source account, use [ListLinks][2].
|
722
|
+
#
|
723
|
+
#
|
724
|
+
#
|
725
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListSinks.html
|
726
|
+
# [2]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListLinks.html
|
727
|
+
#
|
728
|
+
# @option params [Integer] :max_results
|
729
|
+
# Limits the number of returned links to the specified number.
|
730
|
+
#
|
731
|
+
# @option params [String] :next_token
|
732
|
+
# The token for the next set of items to return. You received this token
|
733
|
+
# from a previous call.
|
734
|
+
#
|
735
|
+
# @option params [required, String] :sink_identifier
|
736
|
+
# The ARN of the sink that you want to retrieve links for.
|
737
|
+
#
|
738
|
+
# @return [Types::ListAttachedLinksOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
739
|
+
#
|
740
|
+
# * {Types::ListAttachedLinksOutput#items #items} => Array<Types::ListAttachedLinksItem>
|
741
|
+
# * {Types::ListAttachedLinksOutput#next_token #next_token} => String
|
742
|
+
#
|
743
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
744
|
+
#
|
745
|
+
# @example Request syntax with placeholder values
|
746
|
+
#
|
747
|
+
# resp = client.list_attached_links({
|
748
|
+
# max_results: 1,
|
749
|
+
# next_token: "NextToken",
|
750
|
+
# sink_identifier: "ResourceIdentifier", # required
|
751
|
+
# })
|
752
|
+
#
|
753
|
+
# @example Response structure
|
754
|
+
#
|
755
|
+
# resp.items #=> Array
|
756
|
+
# resp.items[0].label #=> String
|
757
|
+
# resp.items[0].link_arn #=> String
|
758
|
+
# resp.items[0].resource_types #=> Array
|
759
|
+
# resp.items[0].resource_types[0] #=> String
|
760
|
+
# resp.next_token #=> String
|
761
|
+
#
|
762
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListAttachedLinks AWS API Documentation
|
763
|
+
#
|
764
|
+
# @overload list_attached_links(params = {})
|
765
|
+
# @param [Hash] params ({})
|
766
|
+
def list_attached_links(params = {}, options = {})
|
767
|
+
req = build_request(:list_attached_links, params)
|
768
|
+
req.send_request(options)
|
769
|
+
end
|
770
|
+
|
771
|
+
# Use this operation in a source account to return a list of links to
|
772
|
+
# monitoring account sinks that this source account has.
|
773
|
+
#
|
774
|
+
# To find a list of links for one monitoring account sink, use
|
775
|
+
# [ListAttachedLinks][1] from within the monitoring account.
|
776
|
+
#
|
777
|
+
#
|
778
|
+
#
|
779
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_ListAttachedLinks.html
|
780
|
+
#
|
781
|
+
# @option params [Integer] :max_results
|
782
|
+
# Limits the number of returned links to the specified number.
|
783
|
+
#
|
784
|
+
# @option params [String] :next_token
|
785
|
+
# The token for the next set of items to return. You received this token
|
786
|
+
# from a previous call.
|
787
|
+
#
|
788
|
+
# @return [Types::ListLinksOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
789
|
+
#
|
790
|
+
# * {Types::ListLinksOutput#items #items} => Array<Types::ListLinksItem>
|
791
|
+
# * {Types::ListLinksOutput#next_token #next_token} => String
|
792
|
+
#
|
793
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
794
|
+
#
|
795
|
+
# @example Request syntax with placeholder values
|
796
|
+
#
|
797
|
+
# resp = client.list_links({
|
798
|
+
# max_results: 1,
|
799
|
+
# next_token: "NextToken",
|
800
|
+
# })
|
801
|
+
#
|
802
|
+
# @example Response structure
|
803
|
+
#
|
804
|
+
# resp.items #=> Array
|
805
|
+
# resp.items[0].arn #=> String
|
806
|
+
# resp.items[0].id #=> String
|
807
|
+
# resp.items[0].label #=> String
|
808
|
+
# resp.items[0].resource_types #=> Array
|
809
|
+
# resp.items[0].resource_types[0] #=> String
|
810
|
+
# resp.items[0].sink_arn #=> String
|
811
|
+
# resp.next_token #=> String
|
812
|
+
#
|
813
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListLinks AWS API Documentation
|
814
|
+
#
|
815
|
+
# @overload list_links(params = {})
|
816
|
+
# @param [Hash] params ({})
|
817
|
+
def list_links(params = {}, options = {})
|
818
|
+
req = build_request(:list_links, params)
|
819
|
+
req.send_request(options)
|
820
|
+
end
|
821
|
+
|
822
|
+
# Use this operation in a monitoring account to return the list of sinks
|
823
|
+
# created in that account.
|
824
|
+
#
|
825
|
+
# @option params [Integer] :max_results
|
826
|
+
# Limits the number of returned links to the specified number.
|
827
|
+
#
|
828
|
+
# @option params [String] :next_token
|
829
|
+
# The token for the next set of items to return. You received this token
|
830
|
+
# from a previous call.
|
831
|
+
#
|
832
|
+
# @return [Types::ListSinksOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
833
|
+
#
|
834
|
+
# * {Types::ListSinksOutput#items #items} => Array<Types::ListSinksItem>
|
835
|
+
# * {Types::ListSinksOutput#next_token #next_token} => String
|
836
|
+
#
|
837
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
838
|
+
#
|
839
|
+
# @example Request syntax with placeholder values
|
840
|
+
#
|
841
|
+
# resp = client.list_sinks({
|
842
|
+
# max_results: 1,
|
843
|
+
# next_token: "NextToken",
|
844
|
+
# })
|
845
|
+
#
|
846
|
+
# @example Response structure
|
847
|
+
#
|
848
|
+
# resp.items #=> Array
|
849
|
+
# resp.items[0].arn #=> String
|
850
|
+
# resp.items[0].id #=> String
|
851
|
+
# resp.items[0].name #=> String
|
852
|
+
# resp.next_token #=> String
|
853
|
+
#
|
854
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListSinks AWS API Documentation
|
855
|
+
#
|
856
|
+
# @overload list_sinks(params = {})
|
857
|
+
# @param [Hash] params ({})
|
858
|
+
def list_sinks(params = {}, options = {})
|
859
|
+
req = build_request(:list_sinks, params)
|
860
|
+
req.send_request(options)
|
861
|
+
end
|
862
|
+
|
863
|
+
# Displays the tags associated with a resource. Both sinks and links
|
864
|
+
# support tagging.
|
865
|
+
#
|
866
|
+
# @option params [required, String] :resource_arn
|
867
|
+
# The ARN of the resource that you want to view tags for.
|
868
|
+
#
|
869
|
+
# The ARN format of a sink is
|
870
|
+
# `arn:aws:oam:Region:account-id:sink/sink-id `
|
871
|
+
#
|
872
|
+
# The ARN format of a link is
|
873
|
+
# `arn:aws:oam:Region:account-id:link/link-id `
|
874
|
+
#
|
875
|
+
# For more information about ARN format, see [CloudWatch Logs resources
|
876
|
+
# and operations][1].
|
877
|
+
#
|
878
|
+
# Unlike tagging permissions in other Amazon Web Services services, to
|
879
|
+
# retrieve the list of tags for links or sinks you must have the
|
880
|
+
# `oam:RequestTag` permission. The `aws:ReguestTag` permission does not
|
881
|
+
# allow you to tag and untag links and sinks.
|
882
|
+
#
|
883
|
+
#
|
884
|
+
#
|
885
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
|
886
|
+
#
|
887
|
+
# @return [Types::ListTagsForResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
888
|
+
#
|
889
|
+
# * {Types::ListTagsForResourceOutput#tags #tags} => Hash<String,String>
|
890
|
+
#
|
891
|
+
# @example Request syntax with placeholder values
|
892
|
+
#
|
893
|
+
# resp = client.list_tags_for_resource({
|
894
|
+
# resource_arn: "Arn", # required
|
895
|
+
# })
|
896
|
+
#
|
897
|
+
# @example Response structure
|
898
|
+
#
|
899
|
+
# resp.tags #=> Hash
|
900
|
+
# resp.tags["String"] #=> String
|
901
|
+
#
|
902
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/ListTagsForResource AWS API Documentation
|
903
|
+
#
|
904
|
+
# @overload list_tags_for_resource(params = {})
|
905
|
+
# @param [Hash] params ({})
|
906
|
+
def list_tags_for_resource(params = {}, options = {})
|
907
|
+
req = build_request(:list_tags_for_resource, params)
|
908
|
+
req.send_request(options)
|
909
|
+
end
|
910
|
+
|
911
|
+
# Creates or updates the resource policy that grants permissions to
|
912
|
+
# source accounts to link to the monitoring account sink. When you
|
913
|
+
# create a sink policy, you can grant permissions to all accounts in an
|
914
|
+
# organization or to individual accounts.
|
915
|
+
#
|
916
|
+
# You can also use a sink policy to limit the types of data that is
|
917
|
+
# shared. The three types that you can allow or deny are:
|
918
|
+
#
|
919
|
+
# * **Metrics** - Specify with `AWS::CloudWatch::Metric`
|
920
|
+
#
|
921
|
+
# * **Log groups** - Specify with `AWS::Logs::LogGroup`
|
922
|
+
#
|
923
|
+
# * **Traces** - Specify with `AWS::XRay::Trace`
|
924
|
+
#
|
925
|
+
# See the examples in this section to see how to specify permitted
|
926
|
+
# source accounts and data types.
|
927
|
+
#
|
928
|
+
# @option params [required, String] :sink_identifier
|
929
|
+
# The ARN of the sink to attach this policy to.
|
930
|
+
#
|
931
|
+
# @option params [required, String] :policy
|
932
|
+
# The JSON policy to use. If you are updating an existing policy, the
|
933
|
+
# entire existing policy is replaced by what you specify here.
|
934
|
+
#
|
935
|
+
# The policy must be in JSON string format with quotation marks escaped
|
936
|
+
# and no newlines.
|
937
|
+
#
|
938
|
+
# For examples of different types of policies, see the **Examples**
|
939
|
+
# section on this page.
|
940
|
+
#
|
941
|
+
# @return [Types::PutSinkPolicyOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
942
|
+
#
|
943
|
+
# * {Types::PutSinkPolicyOutput#sink_arn #sink_arn} => String
|
944
|
+
# * {Types::PutSinkPolicyOutput#sink_id #sink_id} => String
|
945
|
+
# * {Types::PutSinkPolicyOutput#policy #policy} => String
|
946
|
+
#
|
947
|
+
# @example Request syntax with placeholder values
|
948
|
+
#
|
949
|
+
# resp = client.put_sink_policy({
|
950
|
+
# sink_identifier: "ResourceIdentifier", # required
|
951
|
+
# policy: "SinkPolicy", # required
|
952
|
+
# })
|
953
|
+
#
|
954
|
+
# @example Response structure
|
955
|
+
#
|
956
|
+
# resp.sink_arn #=> String
|
957
|
+
# resp.sink_id #=> String
|
958
|
+
# resp.policy #=> String
|
959
|
+
#
|
960
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/PutSinkPolicy AWS API Documentation
|
961
|
+
#
|
962
|
+
# @overload put_sink_policy(params = {})
|
963
|
+
# @param [Hash] params ({})
|
964
|
+
def put_sink_policy(params = {}, options = {})
|
965
|
+
req = build_request(:put_sink_policy, params)
|
966
|
+
req.send_request(options)
|
967
|
+
end
|
968
|
+
|
969
|
+
# Assigns one or more tags (key-value pairs) to the specified resource.
|
970
|
+
# Both sinks and links can be tagged.
|
971
|
+
#
|
972
|
+
# Tags can help you organize and categorize your resources. You can also
|
973
|
+
# use them to scope user permissions by granting a user permission to
|
974
|
+
# access or change only resources with certain tag values.
|
975
|
+
#
|
976
|
+
# Tags don't have any semantic meaning to Amazon Web Services and are
|
977
|
+
# interpreted strictly as strings of characters.
|
978
|
+
#
|
979
|
+
# You can use the `TagResource` action with a resource that already has
|
980
|
+
# tags. If you specify a new tag key for the alarm, this tag is appended
|
981
|
+
# to the list of tags associated with the alarm. If you specify a tag
|
982
|
+
# key that is already associated with the alarm, the new tag value that
|
983
|
+
# you specify replaces the previous value for that tag.
|
984
|
+
#
|
985
|
+
# You can associate as many as 50 tags with a resource.
|
986
|
+
#
|
987
|
+
# Unlike tagging permissions in other Amazon Web Services services, to
|
988
|
+
# tag or untag links and sinks you must have the `oam:ResourceTag`
|
989
|
+
# permission. The `iam:ResourceTag` permission does not allow you to tag
|
990
|
+
# and untag links and sinks.
|
991
|
+
#
|
992
|
+
# @option params [required, String] :resource_arn
|
993
|
+
# The ARN of the resource that you're adding tags to.
|
994
|
+
#
|
995
|
+
# The ARN format of a sink is
|
996
|
+
# `arn:aws:oam:Region:account-id:sink/sink-id `
|
997
|
+
#
|
998
|
+
# The ARN format of a link is
|
999
|
+
# `arn:aws:oam:Region:account-id:link/link-id `
|
1000
|
+
#
|
1001
|
+
# For more information about ARN format, see [CloudWatch Logs resources
|
1002
|
+
# and operations][1].
|
1003
|
+
#
|
1004
|
+
#
|
1005
|
+
#
|
1006
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
|
1007
|
+
#
|
1008
|
+
# @option params [required, Hash<String,String>] :tags
|
1009
|
+
# The list of key-value pairs to associate with the resource.
|
1010
|
+
#
|
1011
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1012
|
+
#
|
1013
|
+
# @example Request syntax with placeholder values
|
1014
|
+
#
|
1015
|
+
# resp = client.tag_resource({
|
1016
|
+
# resource_arn: "Arn", # required
|
1017
|
+
# tags: { # required
|
1018
|
+
# "TagKey" => "TagValue",
|
1019
|
+
# },
|
1020
|
+
# })
|
1021
|
+
#
|
1022
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/TagResource AWS API Documentation
|
1023
|
+
#
|
1024
|
+
# @overload tag_resource(params = {})
|
1025
|
+
# @param [Hash] params ({})
|
1026
|
+
def tag_resource(params = {}, options = {})
|
1027
|
+
req = build_request(:tag_resource, params)
|
1028
|
+
req.send_request(options)
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Removes one or more tags from the specified resource.
|
1032
|
+
#
|
1033
|
+
# Unlike tagging permissions in other Amazon Web Services services, to
|
1034
|
+
# tag or untag links and sinks you must have the `oam:ResourceTag`
|
1035
|
+
# permission. The `iam:TagResource` permission does not allow you to tag
|
1036
|
+
# and untag links and sinks.
|
1037
|
+
#
|
1038
|
+
# @option params [required, String] :resource_arn
|
1039
|
+
# The ARN of the resource that you're removing tags from.
|
1040
|
+
#
|
1041
|
+
# The ARN format of a sink is
|
1042
|
+
# `arn:aws:oam:Region:account-id:sink/sink-id `
|
1043
|
+
#
|
1044
|
+
# The ARN format of a link is
|
1045
|
+
# `arn:aws:oam:Region:account-id:link/link-id `
|
1046
|
+
#
|
1047
|
+
# For more information about ARN format, see [CloudWatch Logs resources
|
1048
|
+
# and operations][1].
|
1049
|
+
#
|
1050
|
+
#
|
1051
|
+
#
|
1052
|
+
# [1]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html
|
1053
|
+
#
|
1054
|
+
# @option params [required, Array<String>] :tag_keys
|
1055
|
+
# The list of tag keys to remove from the resource.
|
1056
|
+
#
|
1057
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1058
|
+
#
|
1059
|
+
# @example Request syntax with placeholder values
|
1060
|
+
#
|
1061
|
+
# resp = client.untag_resource({
|
1062
|
+
# resource_arn: "Arn", # required
|
1063
|
+
# tag_keys: ["TagKey"], # required
|
1064
|
+
# })
|
1065
|
+
#
|
1066
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/UntagResource AWS API Documentation
|
1067
|
+
#
|
1068
|
+
# @overload untag_resource(params = {})
|
1069
|
+
# @param [Hash] params ({})
|
1070
|
+
def untag_resource(params = {}, options = {})
|
1071
|
+
req = build_request(:untag_resource, params)
|
1072
|
+
req.send_request(options)
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# Use this operation to change what types of data are shared from a
|
1076
|
+
# source account to its linked monitoring account sink. You can't
|
1077
|
+
# change the sink or change the monitoring account with this operation.
|
1078
|
+
#
|
1079
|
+
# To update the list of tags associated with the sink, use
|
1080
|
+
# [TagResource][1].
|
1081
|
+
#
|
1082
|
+
#
|
1083
|
+
#
|
1084
|
+
# [1]: https://docs.aws.amazon.com/OAM/latest/APIReference/API_TagResource.html
|
1085
|
+
#
|
1086
|
+
# @option params [required, String] :identifier
|
1087
|
+
# The ARN of the link that you want to update.
|
1088
|
+
#
|
1089
|
+
# @option params [required, Array<String>] :resource_types
|
1090
|
+
# An array of strings that define which types of data that the source
|
1091
|
+
# account will send to the monitoring account.
|
1092
|
+
#
|
1093
|
+
# Your input here replaces the current set of data types that are
|
1094
|
+
# shared.
|
1095
|
+
#
|
1096
|
+
# @return [Types::UpdateLinkOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1097
|
+
#
|
1098
|
+
# * {Types::UpdateLinkOutput#arn #arn} => String
|
1099
|
+
# * {Types::UpdateLinkOutput#id #id} => String
|
1100
|
+
# * {Types::UpdateLinkOutput#label #label} => String
|
1101
|
+
# * {Types::UpdateLinkOutput#label_template #label_template} => String
|
1102
|
+
# * {Types::UpdateLinkOutput#resource_types #resource_types} => Array<String>
|
1103
|
+
# * {Types::UpdateLinkOutput#sink_arn #sink_arn} => String
|
1104
|
+
# * {Types::UpdateLinkOutput#tags #tags} => Hash<String,String>
|
1105
|
+
#
|
1106
|
+
# @example Request syntax with placeholder values
|
1107
|
+
#
|
1108
|
+
# resp = client.update_link({
|
1109
|
+
# identifier: "ResourceIdentifier", # required
|
1110
|
+
# resource_types: ["AWS::CloudWatch::Metric"], # required, accepts AWS::CloudWatch::Metric, AWS::Logs::LogGroup, AWS::XRay::Trace
|
1111
|
+
# })
|
1112
|
+
#
|
1113
|
+
# @example Response structure
|
1114
|
+
#
|
1115
|
+
# resp.arn #=> String
|
1116
|
+
# resp.id #=> String
|
1117
|
+
# resp.label #=> String
|
1118
|
+
# resp.label_template #=> String
|
1119
|
+
# resp.resource_types #=> Array
|
1120
|
+
# resp.resource_types[0] #=> String
|
1121
|
+
# resp.sink_arn #=> String
|
1122
|
+
# resp.tags #=> Hash
|
1123
|
+
# resp.tags["String"] #=> String
|
1124
|
+
#
|
1125
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/oam-2022-06-10/UpdateLink AWS API Documentation
|
1126
|
+
#
|
1127
|
+
# @overload update_link(params = {})
|
1128
|
+
# @param [Hash] params ({})
|
1129
|
+
def update_link(params = {}, options = {})
|
1130
|
+
req = build_request(:update_link, params)
|
1131
|
+
req.send_request(options)
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# @!endgroup
|
1135
|
+
|
1136
|
+
# @param params ({})
|
1137
|
+
# @api private
|
1138
|
+
def build_request(operation_name, params = {})
|
1139
|
+
handlers = @handlers.for(operation_name)
|
1140
|
+
context = Seahorse::Client::RequestContext.new(
|
1141
|
+
operation_name: operation_name,
|
1142
|
+
operation: config.api.operation(operation_name),
|
1143
|
+
client: self,
|
1144
|
+
params: params,
|
1145
|
+
config: config)
|
1146
|
+
context[:gem_name] = 'aws-sdk-oam'
|
1147
|
+
context[:gem_version] = '1.0.0'
|
1148
|
+
Seahorse::Client::Request.new(handlers, context)
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
# @api private
|
1152
|
+
# @deprecated
|
1153
|
+
def waiter_names
|
1154
|
+
[]
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
class << self
|
1158
|
+
|
1159
|
+
# @api private
|
1160
|
+
attr_reader :identifier
|
1161
|
+
|
1162
|
+
# @api private
|
1163
|
+
def errors_module
|
1164
|
+
Errors
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
end
|
1168
|
+
end
|
1169
|
+
end
|